text: /*
   * DO NOT EDIT THIS FILE!
   * This file is auto-generated.
   * Edits to this file will be lost when it is regenerated.
   *
   * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file.
   * 
   * Copyright 2007-2020 Broadcom Inc. All rights reserved.
   */
  
  #include <bcm_int/ltsw/mbcm/stg.h>
  #include <bcm_int/ltsw/xfs/stg.h>
  
  #include <shr/shr_debug.h>
  
  /******************************************************************************
   * Local definitions
   */
  
  #define BSL_LOG_MODULE BSL_LS_BCM_STG
  
  /******************************************************************************
   * Private functions
   */
  
  static int
  bcm56780_a0_ltsw_stg_size_get(
      int unit,
      bcm_stg_t *stg_min,
      bcm_stg_t *stg_max,
      int *vlan_count,
      int *vpn_count,
      int *vpn_offset)
  {
      SHR_FUNC_ENTER(unit);
  
      SHR_IF_ERR_VERBOSE_EXIT
          (xfs_ltsw_stg_size_get(unit, stg_min, stg_max, vlan_count, vpn_count, vpn_offset));
  
  exit:
      SHR_FUNC_EXIT();
  }
  
  static int
  bcm56780_a0_ltsw_stg_vlan_set(
      int unit,
      bcm_vlan_t vid,
      bcm_stg_t stg)
  {
      SHR_FUNC_ENTER(unit);
  
      SHR_IF_ERR_VERBOSE_EXIT
          (xfs_ltsw_stg_vlan_set(unit, vid, stg));
  
  exit:
      SHR_FUNC_EXIT();
  }
  
  static int
  bcm56780_a0_ltsw_stg_vlan_get(
      int unit,
      bcm_vlan_t vid,
      bcm_stg_t *stg)
  {
      SHR_FUNC_ENTER(unit);
  
      SHR_IF_ERR_VERBOSE_EXIT
          (xfs_ltsw_stg_vlan_get(unit, vid, stg));
  
  exit:
      SHR_FUNC_EXIT();
  }
  
  static int
  bcm56780_a0_ltsw_stg_stp_init(
      int unit,
      bcm_stg_t stg)
  {
      SHR_FUNC_ENTER(unit);
  
      SHR_IF_ERR_VERBOSE_EXIT
          (xfs_ltsw_stg_stp_init(unit, stg));
  
  exit:
      SHR_FUNC_EXIT();
  }
  
  static int
  bcm56780_a0_ltsw_stg_stp_clear(
      int unit,
      bcm_stg_t stg)
  {
      SHR_FUNC_ENTER(unit);
  
      SHR_IF_ERR_VERBOSE_EXIT
          (xfs_ltsw_stg_stp_clear(unit, stg));
  
  exit:
      SHR_FUNC_EXIT();
  }
  
  static int
  bcm56780_a0_ltsw_stg_stp_set(
      int unit,
      bcm_stg_t stg,
      bcm_port_t port,
      int stp_state)
  {
      SHR_FUNC_ENTER(unit);
  
      SHR_IF_ERR_VERBOSE_EXIT
          (xfs_ltsw_stg_stp_set(unit, stg, port, stp_state));
  
  exit:
      SHR_FUNC_EXIT();
  }
  
  static int
  bcm56780_a0_ltsw_stg_stp_get(
      int unit,
      bcm_stg_t stg,
      bcm_port_t port,
      int *stp_state)
  {
      SHR_FUNC_ENTER(unit);
  
      SHR_IF_ERR_VERBOSE_EXIT
          (xfs_ltsw_stg_stp_get(unit, stg, port, stp_state));
  
  exit:
      SHR_FUNC_EXIT();
  }
  
  static int
  bcm56780_a0_ltsw_stg_reinit(
      int unit,
      SHR_BITDCL *stg_bmp,
      int *uidx_first,
      int *uidx_next)
  {
      SHR_FUNC_ENTER(unit);
  
      SHR_IF_ERR_VERBOSE_EXIT
          (xfs_ltsw_stg_reinit(unit, stg_bmp, uidx_first, uidx_next));
  
  exit:
      SHR_FUNC_EXIT();
  }
  
  static int
  bcm56780_a0_ltsw_stg_detach(
      int unit,
      bcm_stg_t stg)
  {
      SHR_FUNC_ENTER(unit);
  
      SHR_IF_ERR_VERBOSE_EXIT
          (xfs_ltsw_stg_detach(unit, stg));
  
  exit:
      SHR_FUNC_EXIT();
  }
  
  static int
  bcm56780_a0_ltsw_stg_port_check_set(
      int unit,
      bcm_port_t port,
      int disable,
      uint16_t flags)
  {
      SHR_FUNC_ENTER(unit);
  
      SHR_IF_ERR_VERBOSE_EXIT
          (xfs_ltsw_stg_port_check_set(unit, port, disable, flags));
  
  exit:
      SHR_FUNC_EXIT();
  }
  
  static int
  bcm56780_a0_ltsw_stg_init(int unit)
  {
      SHR_FUNC_ENTER(unit);
  
      SHR_IF_ERR_VERBOSE_EXIT
          (xfs_ltsw_stg_init(unit));
  
  exit:
      SHR_FUNC_EXIT();
  }
  
  static int
  bcm56780_a0_ltsw_stg_info_dump(int unit)
  {
      SHR_FUNC_ENTER(unit);
  
      SHR_IF_ERR_VERBOSE_EXIT
          (xfs_ltsw_stg_info_dump(unit));
  
  exit:
      SHR_FUNC_EXIT();
  }
  
  /*!
   * \brief Stg driver function variable for bcm56780_a0 device.
   */
  static mbcm_ltsw_stg_drv_t bcm56780_a0_ltsw_stg_drv = {
      .stg_size_get = bcm56780_a0_ltsw_stg_size_get,
      .stg_vlan_set = bcm56780_a0_ltsw_stg_vlan_set,
      .stg_vlan_get = bcm56780_a0_ltsw_stg_vlan_get,
      .stg_stp_init = bcm56780_a0_ltsw_stg_stp_init,
      .stg_stp_clear = bcm56780_a0_ltsw_stg_stp_clear,
      .stg_stp_set = bcm56780_a0_ltsw_stg_stp_set,
      .stg_stp_get = bcm56780_a0_ltsw_stg_stp_get,
      .stg_reinit = bcm56780_a0_ltsw_stg_reinit,
      .stg_detach = bcm56780_a0_ltsw_stg_detach,
      .stg_port_check_set = bcm56780_a0_ltsw_stg_port_check_set,
      .stg_init = bcm56780_a0_ltsw_stg_init,
      .stg_info_dump = bcm56780_a0_ltsw_stg_info_dump,
  };
  
  /******************************************************************************
   * Public functions
   */
  
  int
  bcm56780_a0_ltsw_stg_drv_attach(int unit)
  {
      SHR_FUNC_ENTER(unit);
  
      SHR_IF_ERR_VERBOSE_EXIT
          (mbcm_ltsw_stg_drv_set(unit, &bcm56780_a0_ltsw_stg_drv));
  
  exit:
      SHR_FUNC_EXIT();
  }
  
  