Thread (15 messages) flat view 15 messages, 7 authors, 2011-04-05
STALE5630d

[PATCH] netxen: fix LRO disable warning

From: Amit Kumar Salecha <hidden>
Date: 2011-03-21 10:37:23
Subsystem: networking drivers, the rest · Maintainers: Andrew Lunn, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds

netxen_nic_set_flags() rejects data if other flag than ETH_FLAG_LRO is set.
Driver also supports NETIF_F_HW_VLAN_TX.
Now compare data with ethtool_op_get_flags(), to get all supported features.

Reported-by: Jesper Dangaard Brouer <redacted>
Signed-off-by: Rajesh Borundia <redacted>
Signed-off-by: Amit Kumar Salecha <redacted>
---
 drivers/net/netxen/netxen_nic_ethtool.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/net/netxen/netxen_nic_ethtool.c b/drivers/net/netxen/netxen_nic_ethtool.c
index 653d308..31c41d6 100644
--- a/drivers/net/netxen/netxen_nic_ethtool.c
+++ b/drivers/net/netxen/netxen_nic_ethtool.c
@@ -871,7 +871,8 @@ static int netxen_nic_set_flags(struct net_device *netdev, u32 data)
 	struct netxen_adapter *adapter = netdev_priv(netdev);
 	int hw_lro;
 
-	if (data & ~ETH_FLAG_LRO)
+	if ((ethtool_op_get_flags(netdev) & ~ETH_FLAG_LRO) !=
+	    (data & ~ETH_FLAG_LRO))
 		return -EINVAL;
 
 	if (!(adapter->capabilities & NX_FW_CAPABILITY_HW_LRO))
-- 
1.7.3.2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help