net: hns3: Fixes API to fetch ethernet header length with kernel default
authorPeng Li <lipeng321@huawei.com>
Sat, 19 May 2018 15:53:16 +0000 (16:53 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sun, 20 May 2018 22:53:58 +0000 (18:53 -0400)
commite63cd65f435c77eb2bc0c4f6691be350cd749dce
tree930c53c054722f62cb41af000dc848bcd4d0ec98
parent743e1a8438e5a37f9ab1846e75a47de8e9cd522f
net: hns3: Fixes API to fetch ethernet header length with kernel default

During the RX leg driver needs to fetch the ethernet header
length from the RX'ed Buffer Descriptor. Currently, proprietary
version hns3_nic_get_headlen is being used to fetch the header
length which uses l234info present in the Buffer Descriptor
which might not be valid for the first Buffer Descriptor if the
packet is spanning across multiple descriptors.
Kernel default eth_get_headlen API does the job correctly.

Fixes: 76ad4f0ee747 ("net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC")
Signed-off-by: Peng Li <lipeng321@huawei.com>
Reviewed-by: Yisen Zhuang <yisen.zhuang@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c