Commit c7258d86 authored by Thomas Richter's avatar Thomas Richter Committed by David S. Miller

qeth: fix rx checksum offload handling

ethtool is used to change some device driver features
such as RX/TX hardware checksum offloading.
The qeth device driver callback function to
turn on/off RX hardware check sum handling never changes
the hardware configuration.
The NETIF_F_RXCSUM bit is cleared when the feature bitset
type netdev_features_t(64bit) is assigned to 32 a bit
variable.

This patch fixes the NETIF_F_RXCSUM handling.
Also there is no need to manipulate the device's features
bit set as this is done by the caller when no error occurs.
Signed-off-by: default avatarThomas Richter <tmricht@linux.vnet.ibm.com>
Signed-off-by: default avatarUrsula Braun <ursula.braun@de.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b9fbe709
...@@ -3198,8 +3198,7 @@ static int qeth_l3_set_features(struct net_device *dev, ...@@ -3198,8 +3198,7 @@ static int qeth_l3_set_features(struct net_device *dev,
netdev_features_t features) netdev_features_t features)
{ {
struct qeth_card *card = dev->ml_priv; struct qeth_card *card = dev->ml_priv;
u32 changed = dev->features ^ features; netdev_features_t changed = dev->features ^ features;
int err;
if (!(changed & NETIF_F_RXCSUM)) if (!(changed & NETIF_F_RXCSUM))
return 0; return 0;
...@@ -3208,11 +3207,7 @@ static int qeth_l3_set_features(struct net_device *dev, ...@@ -3208,11 +3207,7 @@ static int qeth_l3_set_features(struct net_device *dev,
card->state == CARD_STATE_RECOVER) card->state == CARD_STATE_RECOVER)
return 0; return 0;
err = qeth_l3_set_rx_csum(card, features & NETIF_F_RXCSUM); return qeth_l3_set_rx_csum(card, features & NETIF_F_RXCSUM ? 1 : 0);
if (err)
dev->features = features ^ NETIF_F_RXCSUM;
return err;
} }
static const struct ethtool_ops qeth_l3_ethtool_ops = { static const struct ethtool_ops qeth_l3_ethtool_ops = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment