]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
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)
committerKhalid Elmously <khalid.elmously@canonical.com>
Wed, 6 Jun 2018 18:41:07 +0000 (14:41 -0400)
commit42b927bade198609080ae3ada2f208e69ca90027
treeed695bc397ae8543b1eae1a4e920bb3af17b4fa8
parentbaff3ed74a225c9daec4a7f00d3bf3fe7fc35c03
net: hns3: Fixes API to fetch ethernet header length with kernel default

BugLink: https://bugs.launchpad.net/bugs/1768670
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>
(cherry picked from commit e63cd65f435c77eb2bc0c4f6691be350cd749dce linux-next)
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c