]> git.itanic.dy.fi Git - linux-stable/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)
commitc871195601793118ab081d82f7ddd987aa6c7da1
tree8650ed0d38b1ec28268d10224becfff27f6c317a
parent88b7c58c199dd231fd87703f4a6209eec60ab138
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