igc: Use num_tx_queues when iterating over tx_ring queue
authorToshiki Nishioka <toshiki.nishioka@intel.com>
Thu, 22 Jul 2021 00:34:03 +0000 (17:34 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 3 Sep 2021 08:09:24 +0000 (10:09 +0200)
commit58b3dbf10c01ee076504a203ae93c43d46accf15
tree908ac979f2c56411b8284c2a5e9624037473de3e
parentae6480ba06654b87ed35eb96f4ac6d9ee7cc81b9
igc: Use num_tx_queues when iterating over tx_ring queue

[ Upstream commit 691bd4d7761992914a0e83c27a4ce57d01474cda ]

Use num_tx_queues rather than the IGC_MAX_TX_QUEUES fixed number 4 when
iterating over tx_ring queue since instantiated queue count could be
less than 4 where on-line cpu count is less than 4.

Fixes: ec50a9d437f0 ("igc: Add support for taprio offloading")
Signed-off-by: Toshiki Nishioka <toshiki.nishioka@intel.com>
Signed-off-by: Muhammad Husaini Zulkifli <muhammad.husaini.zulkifli@intel.com>
Tested-by: Muhammad Husaini Zulkifli <muhammad.husaini.zulkifli@intel.com>
Acked-by: Sasha Neftin <sasha.neftin@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/intel/igc/igc_main.c