Lines Matching refs:vid
644 u32 vid, u8 vsi, bool set) in fm10k_queue_vlan_request() argument
657 request->vlan.vid = vid; in fm10k_queue_vlan_request()
683 const unsigned char *addr, u16 vid, bool set) in fm10k_queue_mac_request() argument
702 request->mac.vid = vid; in fm10k_queue_mac_request()
758 u16 vid = interface->vid; in fm10k_uc_vlan_unsync() local
759 bool set = !!(vid / VLAN_N_VID); in fm10k_uc_vlan_unsync()
763 vid &= VLAN_N_VID - 1; in fm10k_uc_vlan_unsync()
765 err = fm10k_queue_mac_request(interface, glort, uc_addr, vid, set); in fm10k_uc_vlan_unsync()
778 u16 vid = interface->vid; in fm10k_mc_vlan_unsync() local
779 bool set = !!(vid / VLAN_N_VID); in fm10k_mc_vlan_unsync()
783 vid &= VLAN_N_VID - 1; in fm10k_mc_vlan_unsync()
785 err = fm10k_queue_mac_request(interface, glort, mc_addr, vid, set); in fm10k_mc_vlan_unsync()
793 static int fm10k_update_vid(struct net_device *netdev, u16 vid, bool set) in fm10k_update_vid() argument
803 if (!vid) in fm10k_update_vid()
806 if (vid >= VLAN_N_VID) in fm10k_update_vid()
818 set_bit(vid, interface->active_vlans); in fm10k_update_vid()
820 clear_bit(vid, interface->active_vlans); in fm10k_update_vid()
825 u16 rx_vid = rx_ring->vid & (VLAN_N_VID - 1); in fm10k_update_vid()
828 rx_ring->vid |= FM10K_VLAN_CLEAR; in fm10k_update_vid()
830 rx_ring->vid &= ~FM10K_VLAN_CLEAR; in fm10k_update_vid()
842 if (!set && vid == hw->mac.default_vid) in fm10k_update_vid()
855 err = fm10k_queue_vlan_request(interface, vid, 0, set); in fm10k_update_vid()
862 hw->mac.addr, vid, set); in fm10k_update_vid()
878 vid, set); in fm10k_update_vid()
883 interface->vid = vid + (set ? VLAN_N_VID : 0); in fm10k_update_vid()
896 __always_unused __be16 proto, u16 vid) in fm10k_vlan_rx_add_vid() argument
899 return fm10k_update_vid(netdev, vid, true); in fm10k_vlan_rx_add_vid()
903 __always_unused __be16 proto, u16 vid) in fm10k_vlan_rx_kill_vid() argument
906 return fm10k_update_vid(netdev, vid, false); in fm10k_vlan_rx_kill_vid()
909 static u16 fm10k_find_next_vlan(struct fm10k_intfc *interface, u16 vid) in fm10k_find_next_vlan() argument
913 u16 vid_limit = vid < default_vid ? default_vid : VLAN_N_VID; in fm10k_find_next_vlan()
915 vid = find_next_bit(interface->active_vlans, vid_limit, ++vid); in fm10k_find_next_vlan()
917 return vid; in fm10k_find_next_vlan()
922 u32 vid, prev_vid; in fm10k_clear_unused_vlans() local
925 for (vid = 0, prev_vid = 0; in fm10k_clear_unused_vlans()
927 prev_vid = vid + 1, vid = fm10k_find_next_vlan(interface, vid)) { in fm10k_clear_unused_vlans()
928 if (prev_vid == vid) in fm10k_clear_unused_vlans()
932 prev_vid += (vid - prev_vid - 1) << FM10K_VLAN_LENGTH_SHIFT; in fm10k_clear_unused_vlans()
941 u16 vid, glort = interface->glort; in __fm10k_uc_sync() local
947 for (vid = fm10k_find_next_vlan(interface, 0); in __fm10k_uc_sync()
948 vid < VLAN_N_VID; in __fm10k_uc_sync()
949 vid = fm10k_find_next_vlan(interface, vid)) { in __fm10k_uc_sync()
951 addr, vid, sync); in __fm10k_uc_sync()
1006 u16 vid, glort = interface->glort; in __fm10k_mc_sync() local
1012 for (vid = fm10k_find_next_vlan(interface, 0); in __fm10k_mc_sync()
1013 vid < VLAN_N_VID; in __fm10k_mc_sync()
1014 vid = fm10k_find_next_vlan(interface, vid)) { in __fm10k_mc_sync()
1016 addr, vid, sync); in __fm10k_mc_sync()
1087 u16 vid, glort; in fm10k_restore_rx_state() local
1114 for (vid = fm10k_find_next_vlan(interface, 0); in fm10k_restore_rx_state()
1115 vid < VLAN_N_VID; in fm10k_restore_rx_state()
1116 vid = fm10k_find_next_vlan(interface, vid)) { in fm10k_restore_rx_state()
1117 fm10k_queue_vlan_request(interface, vid, 0, true); in fm10k_restore_rx_state()
1120 hw->mac.addr, vid, true); in fm10k_restore_rx_state()
1134 vid, true); in fm10k_restore_rx_state()
1353 u16 vid, glort; in fm10k_dfwd_add_station() local
1433 for (vid = fm10k_find_next_vlan(interface, 0); in fm10k_dfwd_add_station()
1434 vid < VLAN_N_VID; in fm10k_dfwd_add_station()
1435 vid = fm10k_find_next_vlan(interface, vid)) in fm10k_dfwd_add_station()
1437 vid, true); in fm10k_dfwd_add_station()
1451 u16 vid, glort; in fm10k_dfwd_del_station() local
1479 for (vid = fm10k_find_next_vlan(interface, 0); in fm10k_dfwd_del_station()
1480 vid < VLAN_N_VID; in fm10k_dfwd_del_station()
1481 vid = fm10k_find_next_vlan(interface, vid)) in fm10k_dfwd_del_station()
1483 vid, false); in fm10k_dfwd_del_station()