From: Padmanabh Ratnakar Date: Thu, 3 Nov 2011 01:49:27 +0000 (+0000) Subject: be2net: Fix disabling multicast promiscous mode X-Git-Tag: firefly_0821_release~3680^2~4212^2~2 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=1610c79f1e9545d0a64dc6bb4f9affdfcf1d5726;p=firefly-linux-kernel-4.4.55.git be2net: Fix disabling multicast promiscous mode If user tries to disable multicast promiscous mode, the adapter remains in this mode as resetting the multicast promiscous mode was missing in RX filter command. Fixed this. Signed-off-by: Padmanabh Ratnakar Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/emulex/benet/be_cmds.c b/drivers/net/ethernet/emulex/benet/be_cmds.c index bd8332cbf619..03fe7cde2e61 100644 --- a/drivers/net/ethernet/emulex/benet/be_cmds.c +++ b/drivers/net/ethernet/emulex/benet/be_cmds.c @@ -1540,6 +1540,13 @@ int be_cmd_rx_filter(struct be_adapter *adapter, u32 flags, u32 value) req->if_flags_mask = req->if_flags = cpu_to_le32(BE_IF_FLAGS_MULTICAST); + + /* Reset mcast promisc mode if already set by setting mask + * and not setting flags field + */ + req->if_flags_mask |= + cpu_to_le32(BE_IF_FLAGS_MCAST_PROMISCUOUS); + req->mcast_num = cpu_to_le32(netdev_mc_count(adapter->netdev)); netdev_for_each_mc_addr(ha, adapter->netdev) memcpy(req->mcast_mac[i++].byte, ha->addr, ETH_ALEN);