aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSomnath kotur <somnath.kotur@emulex.com>2014-03-03 03:54:43 -0500
committerDavid S. Miller <davem@davemloft.net>2014-03-03 15:48:11 -0500
commit7ad09458a5be9a0990457c1a198e702559ac25ca (patch)
tree1684ce8fdf7de1c9299ffff98fef1983a23bb74e
parentc502224efb2eaec47f16da39235079598a0f3ed2 (diff)
be2net: clear promiscuous bits in adapter->flags while disabling promiscuous mode
We should clear promiscuous bits in adapter->flags while disabling promiscuous mode. Else we will not put interface back into VLAN promisc mode if the vlans already added exceeds the maximum limit. Signed-off-by: Kalesh AP <kalesh.purayil@emulex.com> Signed-off-by: Somnath Kotur <somnath.kotur@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/emulex/benet/be_main.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c
index 45662af28928..9e6d678bca43 100644
--- a/drivers/net/ethernet/emulex/benet/be_main.c
+++ b/drivers/net/ethernet/emulex/benet/be_main.c
@@ -1157,6 +1157,14 @@ ret:
1157 return status; 1157 return status;
1158} 1158}
1159 1159
1160static void be_clear_promisc(struct be_adapter *adapter)
1161{
1162 adapter->promiscuous = false;
1163 adapter->flags &= ~BE_FLAGS_VLAN_PROMISC;
1164
1165 be_cmd_rx_filter(adapter, IFF_PROMISC, OFF);
1166}
1167
1160static void be_set_rx_mode(struct net_device *netdev) 1168static void be_set_rx_mode(struct net_device *netdev)
1161{ 1169{
1162 struct be_adapter *adapter = netdev_priv(netdev); 1170 struct be_adapter *adapter = netdev_priv(netdev);
@@ -1170,9 +1178,7 @@ static void be_set_rx_mode(struct net_device *netdev)
1170 1178
1171 /* BE was previously in promiscuous mode; disable it */ 1179 /* BE was previously in promiscuous mode; disable it */
1172 if (adapter->promiscuous) { 1180 if (adapter->promiscuous) {
1173 adapter->promiscuous = false; 1181 be_clear_promisc(adapter);
1174 be_cmd_rx_filter(adapter, IFF_PROMISC, OFF);
1175
1176 if (adapter->vlans_added) 1182 if (adapter->vlans_added)
1177 be_vid_config(adapter); 1183 be_vid_config(adapter);
1178 } 1184 }