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

Commit a3b75b1e authored by Dan Carpenter's avatar Dan Carpenter Committed by Greg Kroah-Hartman
Browse files

wifi: mwifiex: fix loop iterator in mwifiex_update_ampdu_txwinsize()



[ Upstream commit 3cfb7df24cee0f5fdc4cc5d3176cab9aadfcb430 ]

This code re-uses "i" to be the iterator for both the inside and outside
loops.  It means the outside loop will exit earlier than intended.

Fixes: d219b7eb ("mwifiex: handle BT coex event to adjust Rx BA window size")
Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
Signed-off-by: default avatarKalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/Y+ERnaDaZD7RtLvX@kili


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent c002d274
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -890,7 +890,7 @@ mwifiex_send_delba_txbastream_tbl(struct mwifiex_private *priv, u8 tid)
 */
void mwifiex_update_ampdu_txwinsize(struct mwifiex_adapter *adapter)
{
	u8 i;
	u8 i, j;
	u32 tx_win_size;
	struct mwifiex_private *priv;

@@ -921,8 +921,8 @@ void mwifiex_update_ampdu_txwinsize(struct mwifiex_adapter *adapter)
		if (tx_win_size != priv->add_ba_param.tx_win_size) {
			if (!priv->media_connected)
				continue;
			for (i = 0; i < MAX_NUM_TID; i++)
				mwifiex_send_delba_txbastream_tbl(priv, i);
			for (j = 0; j < MAX_NUM_TID; j++)
				mwifiex_send_delba_txbastream_tbl(priv, j);
		}
	}
}