diff options
author | Kittipon Meesompop <kmeesomp@linux.vnet.ibm.com> | 2018-04-26 10:42:23 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-04-27 20:38:49 +0300 |
commit | d7e6ed97b534e8b5706f4ef6d51c44f13608333c (patch) | |
tree | 868de56dfdb3574c7778885958c344b9c510f759 /drivers/s390/net/qeth_l2_main.c | |
parent | 571f9dd8026b44fe52d9ca9ed6a68c53aad1f3ba (diff) | |
download | linux-d7e6ed97b534e8b5706f4ef6d51c44f13608333c.tar.xz |
s390/qeth: add IPv6 RX checksum offload support
Check if a qeth device supports IPv6 RX checksum offload, and hook it up
into the existing NETIF_F_RXCSUM support.
As NETIF_F_RXCSUM is now backed by a combination of HW Assists, we need
to be a little smarter when dealing with errors during a configuration
change:
- switching on NETIF_F_RXCSUM only makes sense if at least one HW Assist
was enabled successfully.
- for switching off NETIF_F_RXCSUM, all available HW Assists need to be
deactivated.
Signed-off-by: Kittipon Meesompop <kmeesomp@linux.vnet.ibm.com>
Signed-off-by: Julian Wiedmann <jwi@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/s390/net/qeth_l2_main.c')
-rw-r--r-- | drivers/s390/net/qeth_l2_main.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c index 5b1780fa4cb5..810d69bd9991 100644 --- a/drivers/s390/net/qeth_l2_main.c +++ b/drivers/s390/net/qeth_l2_main.c @@ -992,15 +992,16 @@ static int qeth_l2_setup_netdev(struct qeth_card *card) card->dev->hw_features |= NETIF_F_IP_CSUM; card->dev->vlan_features |= NETIF_F_IP_CSUM; } - if (qeth_is_supported(card, IPA_INBOUND_CHECKSUM)) { - card->dev->hw_features |= NETIF_F_RXCSUM; - card->dev->vlan_features |= NETIF_F_RXCSUM; - } } if (qeth_is_supported6(card, IPA_OUTBOUND_CHECKSUM_V6)) { card->dev->hw_features |= NETIF_F_IPV6_CSUM; card->dev->vlan_features |= NETIF_F_IPV6_CSUM; } + if (qeth_is_supported(card, IPA_INBOUND_CHECKSUM) || + qeth_is_supported6(card, IPA_INBOUND_CHECKSUM_V6)) { + card->dev->hw_features |= NETIF_F_RXCSUM; + card->dev->vlan_features |= NETIF_F_RXCSUM; + } card->info.broadcast_capable = 1; qeth_l2_request_initial_mac(card); |