diff options
author | Julian Wiedmann <jwi@linux.ibm.com> | 2021-01-28 14:25:48 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-01-29 07:35:58 +0300 |
commit | 17f3a8b5f5c9097c658d662df9beaff0932b0242 (patch) | |
tree | b9270782fc98754e738af0df4b4f659024a223b0 /drivers/s390/net/qeth_l2_main.c | |
parent | ea12f1b3c8289102620d3030de3547eedce6d9e8 (diff) | |
download | linux-17f3a8b5f5c9097c658d662df9beaff0932b0242.tar.xz |
s390/qeth: remove qeth_get_ip_version()
Replace our home-grown helper with the more robust vlan_get_protocol().
This is pretty much a 1:1 replacement, we just need to pass around a
proper ETH_P_* everyhwere and convert the old value range.
For readability also convert the protocol checks in
qeth_l3_hard_start_xmit() to a switch statement.
Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Acked-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/s390/net/qeth_l2_main.c')
-rw-r--r-- | drivers/s390/net/qeth_l2_main.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c index 4254caf1d9b6..ca44421a6d6e 100644 --- a/drivers/s390/net/qeth_l2_main.c +++ b/drivers/s390/net/qeth_l2_main.c @@ -157,7 +157,7 @@ static void qeth_l2_drain_rx_mode_cache(struct qeth_card *card) static void qeth_l2_fill_header(struct qeth_qdio_out_q *queue, struct qeth_hdr *hdr, struct sk_buff *skb, - int ipv, unsigned int data_len) + __be16 proto, unsigned int data_len) { int cast_type = qeth_get_ether_cast_type(skb); struct vlan_ethhdr *veth = vlan_eth_hdr(skb); @@ -169,7 +169,7 @@ static void qeth_l2_fill_header(struct qeth_qdio_out_q *queue, } else { hdr->hdr.l2.id = QETH_HEADER_TYPE_LAYER2; if (skb->ip_summed == CHECKSUM_PARTIAL) - qeth_tx_csum(skb, &hdr->hdr.l2.flags[1], ipv); + qeth_tx_csum(skb, &hdr->hdr.l2.flags[1], proto); } /* set byte byte 3 to casting flags */ @@ -551,7 +551,7 @@ static netdev_tx_t qeth_l2_hard_start_xmit(struct sk_buff *skb, if (IS_OSN(card)) rc = qeth_l2_xmit_osn(card, skb, queue); else - rc = qeth_xmit(card, skb, queue, qeth_get_ip_version(skb), + rc = qeth_xmit(card, skb, queue, vlan_get_protocol(skb), qeth_l2_fill_header); if (!rc) |