|
@@ -1133,16 +1133,12 @@ static int be_vid_config(struct be_adapter *adapter)
|
|
|
MCC_ADDL_STATUS_INSUFFICIENT_RESOURCES)
|
|
|
goto set_vlan_promisc;
|
|
|
dev_err(dev, "Setting HW VLAN filtering failed\n");
|
|
|
- } else {
|
|
|
- if (adapter->flags & BE_FLAGS_VLAN_PROMISC) {
|
|
|
- /* hw VLAN filtering re-enabled. */
|
|
|
- status = be_cmd_rx_filter(adapter,
|
|
|
- BE_FLAGS_VLAN_PROMISC, OFF);
|
|
|
- if (!status) {
|
|
|
- dev_info(dev,
|
|
|
- "Disabling VLAN Promiscuous mode\n");
|
|
|
- adapter->flags &= ~BE_FLAGS_VLAN_PROMISC;
|
|
|
- }
|
|
|
+ } else if (adapter->flags & BE_FLAGS_VLAN_PROMISC) {
|
|
|
+ status = be_cmd_rx_filter(adapter, BE_IF_FLAGS_VLAN_PROMISCUOUS,
|
|
|
+ OFF);
|
|
|
+ if (!status) {
|
|
|
+ dev_info(dev, "Disabling VLAN Promiscuous mode\n");
|
|
|
+ adapter->flags &= ~BE_FLAGS_VLAN_PROMISC;
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -1152,7 +1148,7 @@ set_vlan_promisc:
|
|
|
if (adapter->flags & BE_FLAGS_VLAN_PROMISC)
|
|
|
return 0;
|
|
|
|
|
|
- status = be_cmd_rx_filter(adapter, BE_FLAGS_VLAN_PROMISC, ON);
|
|
|
+ status = be_cmd_rx_filter(adapter, BE_IF_FLAGS_VLAN_PROMISCUOUS, ON);
|
|
|
if (!status) {
|
|
|
dev_info(dev, "Enable VLAN Promiscuous mode\n");
|
|
|
adapter->flags |= BE_FLAGS_VLAN_PROMISC;
|
|
@@ -1204,7 +1200,7 @@ static void be_clear_promisc(struct be_adapter *adapter)
|
|
|
adapter->promiscuous = false;
|
|
|
adapter->flags &= ~(BE_FLAGS_VLAN_PROMISC | BE_FLAGS_MCAST_PROMISC);
|
|
|
|
|
|
- be_cmd_rx_filter(adapter, IFF_PROMISC, OFF);
|
|
|
+ be_cmd_rx_filter(adapter, BE_IF_FLAGS_ALL_PROMISCUOUS, OFF);
|
|
|
}
|
|
|
|
|
|
static void be_set_rx_mode(struct net_device *netdev)
|
|
@@ -1213,7 +1209,7 @@ static void be_set_rx_mode(struct net_device *netdev)
|
|
|
int status;
|
|
|
|
|
|
if (netdev->flags & IFF_PROMISC) {
|
|
|
- be_cmd_rx_filter(adapter, IFF_PROMISC, ON);
|
|
|
+ be_cmd_rx_filter(adapter, BE_IF_FLAGS_ALL_PROMISCUOUS, ON);
|
|
|
adapter->promiscuous = true;
|
|
|
goto done;
|
|
|
}
|
|
@@ -1240,7 +1236,8 @@ static void be_set_rx_mode(struct net_device *netdev)
|
|
|
}
|
|
|
|
|
|
if (netdev_uc_count(netdev) > be_max_uc(adapter)) {
|
|
|
- be_cmd_rx_filter(adapter, IFF_PROMISC, ON);
|
|
|
+ be_cmd_rx_filter(adapter, BE_IF_FLAGS_ALL_PROMISCUOUS,
|
|
|
+ ON);
|
|
|
adapter->promiscuous = true;
|
|
|
goto done;
|
|
|
}
|
|
@@ -1253,7 +1250,7 @@ static void be_set_rx_mode(struct net_device *netdev)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- status = be_cmd_rx_filter(adapter, IFF_MULTICAST, ON);
|
|
|
+ status = be_cmd_rx_filter(adapter, BE_IF_FLAGS_MULTICAST, ON);
|
|
|
if (!status) {
|
|
|
if (adapter->flags & BE_FLAGS_MCAST_PROMISC)
|
|
|
adapter->flags &= ~BE_FLAGS_MCAST_PROMISC;
|
|
@@ -1267,7 +1264,7 @@ set_mcast_promisc:
|
|
|
/* Set to MCAST promisc mode if setting MULTICAST address fails
|
|
|
* or if num configured exceeds what we support
|
|
|
*/
|
|
|
- status = be_cmd_rx_filter(adapter, IFF_ALLMULTI, ON);
|
|
|
+ status = be_cmd_rx_filter(adapter, BE_IF_FLAGS_MCAST_PROMISCUOUS, ON);
|
|
|
if (!status)
|
|
|
adapter->flags |= BE_FLAGS_MCAST_PROMISC;
|
|
|
done:
|