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

Commit 0c46bacf authored by Jedrzej Jagielski's avatar Jedrzej Jagielski Committed by Greg Kroah-Hartman
Browse files

igb: Fix position of assignment to *ring



[ Upstream commit 382a7c20d9253bcd5715789b8179528d0f3de72c ]

Assignment to *ring should be done after correctness check of the
argument queue.

Fixes: 91db3642 ("igb: Refactor igb_configure_cbs()")
Signed-off-by: default avatarJedrzej Jagielski <jedrzej.jagielski@intel.com>
Acked-by: default avatarVinicius Costa Gomes <vinicius.gomes@intel.com>
Tested-by: default avatarTony Brelinski <tonyx.brelinski@intel.com>
Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 4b65576c
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1692,14 +1692,15 @@ static bool is_any_txtime_enabled(struct igb_adapter *adapter)
 **/
static void igb_config_tx_modes(struct igb_adapter *adapter, int queue)
{
	struct igb_ring *ring = adapter->tx_ring[queue];
	struct net_device *netdev = adapter->netdev;
	struct e1000_hw *hw = &adapter->hw;
	struct igb_ring *ring;
	u32 tqavcc, tqavctrl;
	u16 value;

	WARN_ON(hw->mac.type != e1000_i210);
	WARN_ON(queue < 0 || queue > 1);
	ring = adapter->tx_ring[queue];

	/* If any of the Qav features is enabled, configure queues as SR and
	 * with HIGH PRIO. If none is, then configure them with LOW PRIO and