• Ivan Khoronzhuk's avatar
    net: 8021q: vlan_core: allow use list of vlans for real device · 960abf68
    Ivan Khoronzhuk authored
    It's redundancy for the drivers to hold the list of vlans when
    absolutely the same list exists in vlan core. In most cases it's
    needed only to traverse the vlan devices, their vids and sync some
    settings with h/w, so add API to simplify this.
    
    At least some of these drivers also can benefit:
    grep "for_each.*vid" -r drivers/net/ethernet/
    
    drivers/net/ethernet/hisilicon/hns3/hns3_enet.c:
    drivers/net/ethernet/synopsys/dwc-xlgmac-hw.c:
    drivers/net/ethernet/qlogic/qlge/qlge_main.c:
    drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c:
    drivers/net/ethernet/via/via-rhine.c:
    drivers/net/ethernet/via/via-velocity.c:
    drivers/net/ethernet/intel/igb/igb_main.c:
    drivers/net/ethernet/intel/ice/ice_main.c:
    drivers/net/ethernet/intel/e1000/e1000_main.c:
    drivers/net/ethernet/intel/i40e/i40e_main.c:
    drivers/net/ethernet/intel/e1000e/netdev.c:
    drivers/net/ethernet/intel/igbvf/netdev.c:
    drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c:
    drivers/net/ethernet/intel/ixgb/ixgb_main.c:
    drivers/net/ethernet/intel/ixgbe/ixgbe_main.c:
    drivers/net/ethernet/amd/xgbe/xgbe-dev.c:
    drivers/net/ethernet/emulex/benet/be_main.c:
    drivers/net/ethernet/neterion/vxge/vxge-main.c:
    drivers/net/ethernet/adaptec/starfire.c:
    drivers/net/ethernet/brocade/bna/bnad.c:
    Reviewed-by: default avatarGrygorii Strashko <grygorii.strashko@ti.com>
    Signed-off-by: default avatarIvan Khoronzhuk <ivan.khoronzhuk@linaro.org>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    960abf68
vlan_core.c 10.4 KB