]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: introduce ring_to_netdev() in enet module
authorYunsheng Lin <linyunsheng@huawei.com>
Sat, 19 Oct 2019 08:03:52 +0000 (16:03 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 21 Oct 2019 16:22:09 +0000 (09:22 -0700)
commitd147ee4e5f5424910c2112efd2d6b3f52624d8fc
tree8650ed0d38b1ec28268d10224becfff27f6c317a
parentbd35a8ef2a4e864781b79861898a40a15abdbacf
net: hns3: introduce ring_to_netdev() in enet module

There are a few places that need to access the netdev of a ring
through ring->tqp->handle->kinfo.netdev, and ring->tqp is a struct
which both in enet and hclge modules, it is better to use the
struct that is only used in enet module.

This patch adds the ring_to_netdev() to access the netdev of ring
through ring->tqp_vector->napi.dev.

Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
drivers/net/ethernet/hisilicon/hns3/hns3_enet.h