net/packet: Remove redundant skb->protocol set
authorMaxim Mikityanskiy <maximmi@mellanox.com>
Thu, 21 Feb 2019 12:40:02 +0000 (12:40 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 22 Feb 2019 20:55:31 +0000 (12:55 -0800)
commit6437866e493fa5aa5be03dfb94e1d686a7fc984b
treecea9c6fe6f9f75ffe9dc9bfc6569bcfbbf2eecfa
parent75c65772c3d18447d62d3aca5f91b06c16cc25e4
net/packet: Remove redundant skb->protocol set

c72219b75f introduced tpacket_set_protocol that parses the Ethernet L2
header and sets skb->protocol if it's unset. It is no longer needed
since the introduction of packet_parse_headers. In case of SOCK_RAW and
unset skb->protocol, packet_parse_headers asks the driver to tell the
protocol number, and it's implemented for all Ethernet devices. As the
old function supported only Ethernet, no functionality is lost.

Signed-off-by: Maxim Mikityanskiy <maximmi@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/packet/af_packet.c