openbcm

Git mirror of https://github.com/Broadcom-Network-Switching-Software/OpenBCM
git clone git://git.finwo.net/mirror/broadcom/openbcm
Log | Files | Refs | README

stg.c (1690B)


      1 /*
      2  * 
      3  * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file.
      4  * 
      5  * Copyright 2007-2019 Broadcom Inc. All rights reserved.
      6  */
      7 
      8 #include <soc/defs.h>
      9 #if defined(BCM_HERCULES_SUPPORT)
     10 #include <soc/drv.h>
     11 #include <soc/mem.h>
     12 
     13 #include <bcm/error.h>
     14 #include <bcm/vlan.h>
     15 #include <bcm/port.h>
     16 #include <bcm/stg.h>
     17 
     18 #include <bcm_int/esw/mbcm.h>
     19 #include <bcm_int/esw/stg.h>
     20 #include <bcm_int/esw/hercules.h>
     21 
     22 /*
     23  * Function:
     24  *	bcm_hercules_stg_stp_init
     25  * Purpose:
     26  *	Write an entry with the spanning tree state DISABLE for all ports.
     27  */
     28 
     29 int
     30 bcm_hercules_stg_stp_init(int unit, bcm_stg_t stg)
     31 {
     32     return BCM_E_NONE;
     33 }
     34 
     35 /*
     36  * Function:
     37  *	bcm_hercules_stg_stp_set
     38  * Purpose:
     39  *	Set the spanning tree state for a port in specified STG.
     40  * Parameters:
     41  *	unit - StrataSwitch unit number.
     42  *      stg - STG ID.
     43  *	port - StrataSwitch port number.
     44  *	stp_state - State to place port in.
     45  */
     46 
     47 int
     48 bcm_hercules_stg_stp_set(int unit, bcm_stg_t stg, bcm_port_t port,
     49 			 int stp_state)
     50 {    
     51     return (BCM_E_NONE);
     52 }
     53 
     54 /*
     55  * Function:
     56  *	bcm_hercules_stg_stp_get
     57  * Purpose:
     58  *	Retrieve the spanning tree state for a port in specified STG.
     59  * Parameters:
     60  *	unit - StrataSwitch unit number.
     61  *      stg - STG ID.
     62  *	port - StrataSwitch port number.
     63  *	stp_state - Pointer where state stored.
     64  */
     65 
     66 int
     67 bcm_hercules_stg_stp_get(int unit, bcm_stg_t stg, bcm_port_t port,
     68 			 int *stp_state)
     69 {
     70     /* Hercules ports are always in forwarding, really. */
     71     *stp_state = BCM_STG_STP_FORWARD;
     72     return (BCM_E_NONE);
     73 }
     74 #else /* BCM_HERCULES_SUPPORT */
     75 int _hercules_stg_not_empty;
     76 #endif /* BCM_HERCULES_SUPPORT */