aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/net/qeth_l3_main.c
diff options
context:
space:
mode:
authorJulian Wiedmann <jwi@linux.ibm.com>2019-04-25 18:26:00 +0200
committerDavid S. Miller <davem@davemloft.net>2019-04-26 11:14:06 -0400
commit58aa2491aa615d9618ffc764cc3eaf689053c7a9 (patch)
tree13906d11273f817392d2917c091a9229cbafdd16 /drivers/s390/net/qeth_l3_main.c
parents390/qeth: cache max number of available buffer elements (diff)
downloadlinux-dev-58aa2491aa615d9618ffc764cc3eaf689053c7a9.tar.xz
linux-dev-58aa2491aa615d9618ffc764cc3eaf689053c7a9.zip
s390/qeth: extract helper to determine L2 cast type
This de-duplicates the L2 and L3 cast-type code, and makes the L2 code a bit more robust by removing the fragile assumption that skb->data always points to the Ethernet Header. This would break in code paths where we pushed the HW header onto the skb. Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/s390/net/qeth_l3_main.c')
-rw-r--r--drivers/s390/net/qeth_l3_main.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c
index 8fd634229871..b5d76ebb488a 100644
--- a/drivers/s390/net/qeth_l3_main.c
+++ b/drivers/s390/net/qeth_l3_main.c
@@ -1918,13 +1918,7 @@ static int qeth_l3_get_cast_type(struct sk_buff *skb)
RTN_MULTICAST : RTN_UNICAST;
default:
/* ... and MAC address */
- if (ether_addr_equal_64bits(eth_hdr(skb)->h_dest,
- skb->dev->broadcast))
- return RTN_BROADCAST;
- if (is_multicast_ether_addr(eth_hdr(skb)->h_dest))
- return RTN_MULTICAST;
- /* default to unicast */
- return RTN_UNICAST;
+ return qeth_get_ether_cast_type(skb);
}
}