Commit e0752a68 authored by Ngai-Mint Kwan's avatar Ngai-Mint Kwan Committed by Jeff Kirsher

fm10k: clarify action when updating the VLAN table

Clarify the comment for when entering promiscuous mode that we update
the VLAN table. Add a comment distinguishing the case where we're
exiting promiscuous mode and need to clear the entire VLAN table.
Signed-off-by: default avatarNgai-Mint Kwan <ngai-mint.kwan@intel.com>
Signed-off-by: default avatarJacob Keller <jacob.e.keller@gmail.com>
Tested-by: default avatarKrishneil Singh <krishneil.k.singh@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 6ee98686
...@@ -1165,10 +1165,12 @@ static void fm10k_set_rx_mode(struct net_device *dev) ...@@ -1165,10 +1165,12 @@ static void fm10k_set_rx_mode(struct net_device *dev)
/* update xcast mode first, but only if it changed */ /* update xcast mode first, but only if it changed */
if (interface->xcast_mode != xcast_mode) { if (interface->xcast_mode != xcast_mode) {
/* update VLAN table */ /* update VLAN table when entering promiscuous mode */
if (xcast_mode == FM10K_XCAST_MODE_PROMISC) if (xcast_mode == FM10K_XCAST_MODE_PROMISC)
fm10k_queue_vlan_request(interface, FM10K_VLAN_ALL, fm10k_queue_vlan_request(interface, FM10K_VLAN_ALL,
0, true); 0, true);
/* clear VLAN table when exiting promiscuous mode */
if (interface->xcast_mode == FM10K_XCAST_MODE_PROMISC) if (interface->xcast_mode == FM10K_XCAST_MODE_PROMISC)
fm10k_clear_unused_vlans(interface); fm10k_clear_unused_vlans(interface);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment