diff options
author | Kittipon Meesompop <kmeesomp@linux.vnet.ibm.com> | 2018-04-26 03:42:23 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-04-27 13:38:49 -0400 |
commit | d7e6ed97b534e8b5706f4ef6d51c44f13608333c (patch) | |
tree | 868de56dfdb3574c7778885958c344b9c510f759 /drivers/s390/net/qeth_l2_main.c | |
parent | 571f9dd8026b44fe52d9ca9ed6a68c53aad1f3ba (diff) |
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) | |||
992 | card->dev->hw_features |= NETIF_F_IP_CSUM; | 992 | card->dev->hw_features |= NETIF_F_IP_CSUM; |
993 | card->dev->vlan_features |= NETIF_F_IP_CSUM; | 993 | card->dev->vlan_features |= NETIF_F_IP_CSUM; |
994 | } | 994 | } |
995 | if (qeth_is_supported(card, IPA_INBOUND_CHECKSUM)) { | ||
996 | card->dev->hw_features |= NETIF_F_RXCSUM; | ||
997 | card->dev->vlan_features |= NETIF_F_RXCSUM; | ||
998 | } | ||
999 | } | 995 | } |
1000 | if (qeth_is_supported6(card, IPA_OUTBOUND_CHECKSUM_V6)) { | 996 | if (qeth_is_supported6(card, IPA_OUTBOUND_CHECKSUM_V6)) { |
1001 | card->dev->hw_features |= NETIF_F_IPV6_CSUM; | 997 | card->dev->hw_features |= NETIF_F_IPV6_CSUM; |
1002 | card->dev->vlan_features |= NETIF_F_IPV6_CSUM; | 998 | card->dev->vlan_features |= NETIF_F_IPV6_CSUM; |
1003 | } | 999 | } |
1000 | if (qeth_is_supported(card, IPA_INBOUND_CHECKSUM) || | ||
1001 | qeth_is_supported6(card, IPA_INBOUND_CHECKSUM_V6)) { | ||
1002 | card->dev->hw_features |= NETIF_F_RXCSUM; | ||
1003 | card->dev->vlan_features |= NETIF_F_RXCSUM; | ||
1004 | } | ||
1004 | 1005 | ||
1005 | card->info.broadcast_capable = 1; | 1006 | card->info.broadcast_capable = 1; |
1006 | qeth_l2_request_initial_mac(card); | 1007 | qeth_l2_request_initial_mac(card); |