summaryrefslogtreecommitdiffstats
path: root/drivers/net/vmxnet3/vmxnet3_ethtool.c
diff options
context:
space:
mode:
authorShreyas Bhatewara <sbhatewara@vmware.com>2009-11-16 13:41:33 +0000
committerDavid S. Miller <davem@davemloft.net>2009-11-17 04:08:50 -0800
commit115924b6bdc7cc6bf7da5b933b09281e1f4e17a9 (patch)
tree8d883a13b6dc2b29caa77a6e178e921e4843db1c /drivers/net/vmxnet3/vmxnet3_ethtool.c
parent649300b9278dc9fc9c7dfaaa3719ead70882e726 (diff)
net: Getting rid of the x86 dependency to built vmxnet3
This patch removes config dependency on x86 to build vmxnet3 driver. Thus the driver can be built on big endian architectures now. Although vmxnet3 is not supported on VMs other than x86 architecture, all this code goes in to ensure correctness. If the code is not dependent on x86, it should not assume little endian architecture in any of its operations. Signed-off-by: Shreyas Bhatewara <sbhatewara@vmware.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/vmxnet3/vmxnet3_ethtool.c')
-rw-r--r--drivers/net/vmxnet3/vmxnet3_ethtool.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/net/vmxnet3/vmxnet3_ethtool.c b/drivers/net/vmxnet3/vmxnet3_ethtool.c
index c2c15e4cafc..3935c4493fb 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethtool.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethtool.c
@@ -50,11 +50,13 @@ vmxnet3_set_rx_csum(struct net_device *netdev, u32 val)
adapter->rxcsum = val;
if (netif_running(netdev)) {
if (val)
- adapter->shared->devRead.misc.uptFeatures |=
- UPT1_F_RXCSUM;
+ set_flag_le64(
+ &adapter->shared->devRead.misc.uptFeatures,
+ UPT1_F_RXCSUM);
else
- adapter->shared->devRead.misc.uptFeatures &=
- ~UPT1_F_RXCSUM;
+ reset_flag_le64(
+ &adapter->shared->devRead.misc.uptFeatures,
+ UPT1_F_RXCSUM);
VMXNET3_WRITE_BAR1_REG(adapter, VMXNET3_REG_CMD,
VMXNET3_CMD_UPDATE_FEATURE);