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

l2.c (1681B)


      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  * File:        l2.c
      8  * Purpose:     BCM layer function driver
      9  * Notes:	Mostly empty for Hercules (does not have L2 table)
     10  */
     11 
     12 #include <bcm/l2.h>
     13 #include <bcm/port.h>
     14 #include <bcm/error.h>
     15 
     16 #include <bcm_int/esw/mbcm.h>
     17 #include <bcm_int/esw/hercules.h>
     18 
     19 int
     20 bcm_hercules_l2_addr_add(int unit, bcm_l2_addr_t *l2addr)
     21 {
     22     return (BCM_E_UNAVAIL);
     23 }
     24 
     25 int
     26 bcm_hercules_l2_addr_delete(int unit, bcm_mac_t mac, bcm_vlan_t vid)
     27 {
     28     return BCM_E_UNAVAIL;
     29 }
     30 
     31 int
     32 bcm_hercules_l2_addr_get(int unit, sal_mac_addr_t mac,
     33 			 bcm_vlan_t vid, bcm_l2_addr_t *l2addr)
     34 {
     35     return (BCM_E_UNAVAIL);
     36 }
     37 
     38 /*
     39  * Function:
     40  *	bcm_hercules_l2_init
     41  * Description:
     42  *	Initialize chip-dependent parts of L2 module
     43  * Parameters:
     44  *	unit        - StrataSwitch unit number.
     45  */
     46 
     47 int
     48 bcm_hercules_l2_init(int unit)
     49 {
     50     COMPILER_REFERENCE(unit);
     51 
     52     return SOC_E_NONE;
     53 }
     54 
     55 /*
     56  * Function:
     57  *	bcm_hercules_l2_term
     58  * Description:
     59  *	Finalize chip-dependent parts of L2 module
     60  * Parameters:
     61  *	unit        - StrataSwitch unit number.
     62  */
     63 
     64 int
     65 bcm_hercules_l2_term(int unit)
     66 {
     67     COMPILER_REFERENCE(unit);
     68 
     69     return SOC_E_NONE;
     70 }
     71 
     72 int
     73 bcm_hercules_l2_conflict_get(int unit, bcm_l2_addr_t *addr,
     74                           bcm_l2_addr_t *cf_array, int cf_max,
     75                           int *cf_count)
     76 {
     77     COMPILER_REFERENCE(unit);
     78     COMPILER_REFERENCE(addr);
     79     COMPILER_REFERENCE(cf_array);
     80     COMPILER_REFERENCE(cf_max);
     81     COMPILER_REFERENCE(cf_count);
     82 
     83     return BCM_E_UNAVAIL;
     84 }
     85