mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
etherdev: Process is_multicast_ether_addr at same size as other operations
This change makes it so that we process the address in is_multicast_ether_addr at the same size as the other calls. This allows us to avoid duplicate reads when used with other calls such as is_zero_ether_addr or eth_addr_copy. In addition I have added a 64 bit version of the function so in eth_type_trans we can process the destination address as a 64 bit value throughout. Signed-off-by: Alexander Duyck <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
849b920e17
commit
d54385ce68
2 changed files with 24 additions and 2 deletions
|
|
@ -159,7 +159,7 @@ __be16 eth_type_trans(struct sk_buff *skb, struct net_device *dev)
|
|||
skb_pull_inline(skb, ETH_HLEN);
|
||||
eth = eth_hdr(skb);
|
||||
|
||||
if (unlikely(is_multicast_ether_addr(eth->h_dest))) {
|
||||
if (unlikely(is_multicast_ether_addr_64bits(eth->h_dest))) {
|
||||
if (ether_addr_equal_64bits(eth->h_dest, dev->broadcast))
|
||||
skb->pkt_type = PACKET_BROADCAST;
|
||||
else
|
||||
|
|
|
|||
Loading…
Reference in a new issue