aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390
diff options
context:
space:
mode:
authorHans Wippel <hwippel@linux.vnet.ibm.com>2016-06-16 10:19:00 -0400
committerDavid S. Miller <davem@davemloft.net>2016-06-17 01:16:13 -0400
commit9bdc441102f012b70f51e1ca73b603312fff8b5d (patch)
treecea050940c8d0545c2767cd94429941b430c6b7c /drivers/s390
parent8f43fb00a154712daeaa23e75704c7677294cffc (diff)
qeth: add network device features for VLAN devices
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>
Diffstat (limited to 'drivers/s390')
-rw-r--r--drivers/s390/net/qeth_l2_main.c9
-rw-r--r--drivers/s390/net/qeth_l3_main.c3
2 files changed, 10 insertions, 2 deletions
diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c
index 928a4ad81370..9fd48de38a4c 100644
--- a/drivers/s390/net/qeth_l2_main.c
+++ b/drivers/s390/net/qeth_l2_main.c
@@ -1113,11 +1113,16 @@ static int qeth_l2_setup_netdev(struct qeth_card *card)
1113 card->dev->features |= NETIF_F_HW_VLAN_CTAG_FILTER; 1113 card->dev->features |= NETIF_F_HW_VLAN_CTAG_FILTER;
1114 if (card->info.type == QETH_CARD_TYPE_OSD && !card->info.guestlan) { 1114 if (card->info.type == QETH_CARD_TYPE_OSD && !card->info.guestlan) {
1115 card->dev->hw_features = NETIF_F_SG; 1115 card->dev->hw_features = NETIF_F_SG;
1116 card->dev->vlan_features = NETIF_F_SG;
1116 /* OSA 3S and earlier has no RX/TX support */ 1117 /* OSA 3S and earlier has no RX/TX support */
1117 if (qeth_is_supported(card, IPA_OUTBOUND_CHECKSUM)) 1118 if (qeth_is_supported(card, IPA_OUTBOUND_CHECKSUM)) {
1118 card->dev->hw_features |= NETIF_F_IP_CSUM; 1119 card->dev->hw_features |= NETIF_F_IP_CSUM;
1119 if (qeth_is_supported(card, IPA_INBOUND_CHECKSUM)) 1120 card->dev->vlan_features |= NETIF_F_IP_CSUM;
1121 }
1122 if (qeth_is_supported(card, IPA_INBOUND_CHECKSUM)) {
1120 card->dev->hw_features |= NETIF_F_RXCSUM; 1123 card->dev->hw_features |= NETIF_F_RXCSUM;
1124 card->dev->vlan_features |= NETIF_F_RXCSUM;
1125 }
1121 /* Turn on SG per default */ 1126 /* Turn on SG per default */
1122 card->dev->features |= NETIF_F_SG; 1127 card->dev->features |= NETIF_F_SG;
1123 } 1128 }
diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c
index fc8177689d55..05f764c6b23c 100644
--- a/drivers/s390/net/qeth_l3_main.c
+++ b/drivers/s390/net/qeth_l3_main.c
@@ -3106,6 +3106,9 @@ static int qeth_l3_setup_netdev(struct qeth_card *card)
3106 card->dev->hw_features = NETIF_F_SG | 3106 card->dev->hw_features = NETIF_F_SG |
3107 NETIF_F_RXCSUM | NETIF_F_IP_CSUM | 3107 NETIF_F_RXCSUM | NETIF_F_IP_CSUM |
3108 NETIF_F_TSO; 3108 NETIF_F_TSO;
3109 card->dev->vlan_features = NETIF_F_SG |
3110 NETIF_F_RXCSUM | NETIF_F_IP_CSUM |
3111 NETIF_F_TSO;
3109 card->dev->features = NETIF_F_SG; 3112 card->dev->features = NETIF_F_SG;
3110 } 3113 }
3111 } 3114 }