Patchwork [net-next,1/4] be2net: Fix endian issue in RX filter command

login
register
mail settings
Submitter Padmanabh Ratnakar
Date Nov. 3, 2011, 11:49 a.m.
Message ID <fc385713-1509-494b-a956-e61454a0831a@exht2.ad.emulex.com>
Download mbox | patch
Permalink /patch/123435/
State Accepted
Delegated to: David Miller
Headers show

Comments

Padmanabh Ratnakar - Nov. 3, 2011, 11:49 a.m.
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>
---
 drivers/net/ethernet/emulex/benet/be_cmds.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Patch

diff --git a/drivers/net/ethernet/emulex/benet/be_cmds.c b/drivers/net/ethernet/emulex/benet/be_cmds.c
index 824b8e6..bd8332c 100644
--- a/drivers/net/ethernet/emulex/benet/be_cmds.c
+++ b/drivers/net/ethernet/emulex/benet/be_cmds.c
@@ -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);
 	}