Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit eed9535f authored by Peng Li's avatar Peng Li Committed by David S. Miller
Browse files

net: hns3: fix an issue for hclgevf_ae_get_hdev



HNS3 VF driver support NIC and Roce, hdev stores NIC
handle and Roce handle, should use correct parameter for
container_of.

Signed-off-by: default avatarPeng Li <lipeng321@huawei.com>
Signed-off-by: default avatarHuazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9fc55413
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -86,6 +86,11 @@ static const u32 tqp_intr_reg_addr_list[] = {HCLGEVF_TQP_INTR_CTRL_REG,
static inline struct hclgevf_dev *hclgevf_ae_get_hdev(
	struct hnae3_handle *handle)
{
	if (!handle->client)
		return container_of(handle, struct hclgevf_dev, nic);
	else if (handle->client->type == HNAE3_CLIENT_ROCE)
		return container_of(handle, struct hclgevf_dev, roce);
	else
		return container_of(handle, struct hclgevf_dev, nic);
}