]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
qeth: add network device features for VLAN devices
authorHans Wippel <hwippel@linux.vnet.ibm.com>
Thu, 16 Jun 2016 14:19:00 +0000 (16:19 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 17 Jun 2016 05:16:13 +0000 (22:16 -0700)
Network device features indicate the capabilities of network devices (e.g.,
TX checksum offloading and TSO) and their configuration state. Additional
network device features (vlan_features) indicate for each network device,
which capabilities can be used on VLAN devices, that are configured on the
respective base network device.

In the current qeth implementation, network device features are only set
for the base network devices and not for the VLAN devices. Thus, features
like TX checksum offloading cannot be used on VLAN devices.

This patch adds network device features to vlan_features, so they can be
used by VLAN devices.

Signed-off-by: Hans Wippel <hwippel@linux.vnet.ibm.com>
Signed-off-by: Ursula Braun <ubraun@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/s390/net/qeth_l2_main.c
drivers/s390/net/qeth_l3_main.c

index 928a4ad813703140d441ddddca39c28663c65ed8..9fd48de38a4cfdec0a02ab5e1f9d621a7883b918 100644 (file)
@@ -1113,11 +1113,16 @@ static int qeth_l2_setup_netdev(struct qeth_card *card)
        card->dev->features |= NETIF_F_HW_VLAN_CTAG_FILTER;
        if (card->info.type == QETH_CARD_TYPE_OSD && !card->info.guestlan) {
                card->dev->hw_features = NETIF_F_SG;
+               card->dev->vlan_features = NETIF_F_SG;
                /* OSA 3S and earlier has no RX/TX support */
-               if (qeth_is_supported(card, IPA_OUTBOUND_CHECKSUM))
+               if (qeth_is_supported(card, IPA_OUTBOUND_CHECKSUM)) {
                        card->dev->hw_features |= NETIF_F_IP_CSUM;
-               if (qeth_is_supported(card, IPA_INBOUND_CHECKSUM))
+                       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;
+               }
                /* Turn on SG per default */
                card->dev->features |= NETIF_F_SG;
        }
index fc8177689d5555f8c969d3864964929a7a592319..05f764c6b23c1447c5b47a78c454163d14d7c78a 100644 (file)
@@ -3106,6 +3106,9 @@ static int qeth_l3_setup_netdev(struct qeth_card *card)
                                card->dev->hw_features = NETIF_F_SG |
                                        NETIF_F_RXCSUM | NETIF_F_IP_CSUM |
                                        NETIF_F_TSO;
+                               card->dev->vlan_features = NETIF_F_SG |
+                                       NETIF_F_RXCSUM | NETIF_F_IP_CSUM |
+                                       NETIF_F_TSO;
                                card->dev->features = NETIF_F_SG;
                        }
                }