be2net: fix multicast filter programming
authorSathya Perla <sathya.perla@emulex.com>
Tue, 27 Sep 2011 17:29:38 +0000 (13:29 -0400)
committerDavid S. Miller <davem@davemloft.net>
Tue, 27 Sep 2011 17:29:38 +0000 (13:29 -0400)
 Re-posting with subject fixed!

 Multicast programming has been broken since commit 5b8821b7. Setting the
 MULTICAST flag while sending the cmd to the FW was missing. Fixed this.

Also fixed-up some indentation in the adjacent lines.

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/emulex/benet/be_cmds.c

index bebeee68b2fa3f4866ebe527f8edace1d2dd49dc..6bc07c7515b3625fc7560fa48924622293a3ebc0 100644 (file)
@@ -1580,14 +1580,16 @@ int be_cmd_rx_filter(struct be_adapter *adapter, u32 flags, u32 value)
                                        BE_IF_FLAGS_VLAN_PROMISCUOUS);
                if (value == ON)
                        req->if_flags = cpu_to_le32(BE_IF_FLAGS_PROMISCUOUS |
-                                       BE_IF_FLAGS_VLAN_PROMISCUOUS);
+                                               BE_IF_FLAGS_VLAN_PROMISCUOUS);
        } else if (flags & IFF_ALLMULTI) {
                req->if_flags_mask = req->if_flags =
-                       cpu_to_le32(BE_IF_FLAGS_MCAST_PROMISCUOUS);
+                               cpu_to_le32(BE_IF_FLAGS_MCAST_PROMISCUOUS);
        } else {
                struct netdev_hw_addr *ha;
                int i = 0;
 
+               req->if_flags_mask = req->if_flags =
+                               cpu_to_le32(BE_IF_FLAGS_MULTICAST);
                req->mcast_num = cpu_to_le16(netdev_mc_count(adapter->netdev));
                netdev_for_each_mc_addr(ha, adapter->netdev)
                        memcpy(req->mcast_mac[i++].byte, ha->addr, ETH_ALEN);