Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Thomas Richter <tmricht@linux.vnet.ibm.com>
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Thomas Richter and committed by
David S. Miller
c7258d86 b9fbe709

+2 -7
+2 -7
drivers/s390/net/qeth_l3_main.c
··· 3198 3198 netdev_features_t features) 3199 3199 { 3200 3200 struct qeth_card *card = dev->ml_priv; 3201 - u32 changed = dev->features ^ features; 3202 - int err; 3201 + netdev_features_t changed = dev->features ^ features; 3203 3202 3204 3203 if (!(changed & NETIF_F_RXCSUM)) 3205 3204 return 0; ··· 3207 3208 card->state == CARD_STATE_RECOVER) 3208 3209 return 0; 3209 3210 3210 - err = qeth_l3_set_rx_csum(card, features & NETIF_F_RXCSUM); 3211 - if (err) 3212 - dev->features = features ^ NETIF_F_RXCSUM; 3213 - 3214 - return err; 3211 + return qeth_l3_set_rx_csum(card, features & NETIF_F_RXCSUM ? 1 : 0); 3215 3212 } 3216 3213 3217 3214 static const struct ethtool_ops qeth_l3_ethtool_ops = {