summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/hisilicon
diff options
context:
space:
mode:
authorJian Shen <shenjian15@huawei.com>2019-04-19 11:05:41 +0800
committerDavid S. Miller <davem@davemloft.net>2019-04-19 18:43:16 -0700
commitfa6c4084b98b82c98cada0f0d5c9f8577579f962 (patch)
tree1f9c1740ea3b96116a484175b4b3c0d9c168df57 /drivers/net/ethernet/hisilicon
parentbeab694aa32afb7c785c55f075628d9a21ed8011 (diff)
downloadlinux-fa6c4084b98b82c98cada0f0d5c9f8577579f962.tar.bz2
net: hns3: fix loop condition of hns3_get_tx_timeo_queue_info()
In function hns3_get_tx_timeo_queue_info(), it should use netdev->num_tx_queues, instead of netdve->real_num_tx_queues as the loop limitation. Fixes: 424eb834a9be ("net: hns3: Unified HNS3 {VF|PF} Ethernet Driver for hip08 SoC") Signed-off-by: Jian Shen <shenjian15@huawei.com> Signed-off-by: Peng Li <lipeng321@huawei.com> Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/hisilicon')
-rw-r--r--drivers/net/ethernet/hisilicon/hns3/hns3_enet.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
index 193994cf7899..652b19d16834 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
@@ -1634,7 +1634,7 @@ static bool hns3_get_tx_timeo_queue_info(struct net_device *ndev)
int i;
/* Find the stopped queue the same way the stack does */
- for (i = 0; i < ndev->real_num_tx_queues; i++) {
+ for (i = 0; i < ndev->num_tx_queues; i++) {
struct netdev_queue *q;
unsigned long trans_start;