diff options
author | Shrikrishna Khare <skhare@vmware.com> | 2015-11-13 15:42:10 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-11-16 15:06:47 -0500 |
commit | d37d5ec861b0d937c0bdd70f0138e2750aacccdb (patch) | |
tree | 53f80fc5381b3f0e9c7058370ea7cae43ca5eeb6 /drivers/net/vmxnet3/vmxnet3_drv.c | |
parent | 0b88393cdf6b1322522849e61f7a3328f4fd3843 (diff) | |
download | linux-d37d5ec861b0d937c0bdd70f0138e2750aacccdb.tar.bz2 |
Driver: Vmxnet3: Fix use of mfTableLen for big endian architectures
Signed-off-by: Shrikrishna Khare <skhare@vmware.com>
Reported-by: Masao Uebayashi <uebayasi@gmail.com>
Signed-off-by: Bhavesh Davda <bhavesh@vmware.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/vmxnet3/vmxnet3_drv.c')
-rw-r--r-- | drivers/net/vmxnet3/vmxnet3_drv.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c index 46f4caddccbe..899ea4288197 100644 --- a/drivers/net/vmxnet3/vmxnet3_drv.c +++ b/drivers/net/vmxnet3/vmxnet3_drv.c @@ -2157,12 +2157,13 @@ vmxnet3_set_mc(struct net_device *netdev) if (!netdev_mc_empty(netdev)) { new_table = vmxnet3_copy_mc(netdev); if (new_table) { - rxConf->mfTableLen = cpu_to_le16( - netdev_mc_count(netdev) * ETH_ALEN); + size_t sz = netdev_mc_count(netdev) * ETH_ALEN; + + rxConf->mfTableLen = cpu_to_le16(sz); new_table_pa = dma_map_single( &adapter->pdev->dev, new_table, - rxConf->mfTableLen, + sz, PCI_DMA_TODEVICE); } |