be2net: Fix endian issue in RX filter command
authorPadmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Thu, 3 Nov 2011 01:49:13 +0000 (01:49 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 4 Nov 2011 01:59:39 +0000 (21:59 -0400)
Use cpu_to_le32() for mcast_num field in RX filter command as this
field is of type u32.

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/emulex/benet/be_cmds.c

index 824b8e6021f6eff17299350a1e6e9af05380b448..bd8332cbf61933960fe35f0fd2c674be1fb71bf5 100644 (file)
@@ -1540,7 +1540,7 @@ 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);
-               req->mcast_num = cpu_to_le16(netdev_mc_count(adapter->netdev));
+               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);
        }