Skip to content

Commit 2120f3a

Browse files
Dan Carpenterjmberg-intel
authored andcommitted
wifi: mwifiex: Fix a loop in mwifiex_update_ampdu_rxwinsize()
The "i" iterator variable is used to count two different things but unfortunately we can't store two different numbers in the same variable. Use "i" for the outside loop and "j" for the inside loop. Cc: stable@vger.kernel.org Fixes: d219b7e ("mwifiex: handle BT coex event to adjust Rx BA window size") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Jeff Chen <jeff.chen_1@nxp.com> Link: https://patch.msgid.link/aWAM2MGUWRP0zWUd@stanley.mountain Signed-off-by: Johannes Berg <johannes.berg@intel.com>
1 parent db1d0b6 commit 2120f3a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

drivers/net/wireless/marvell/mwifiex/11n_rxreorder.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -825,7 +825,7 @@ void mwifiex_update_rxreor_flags(struct mwifiex_adapter *adapter, u8 flags)
825825
static void mwifiex_update_ampdu_rxwinsize(struct mwifiex_adapter *adapter,
826826
bool coex_flag)
827827
{
828-
u8 i;
828+
u8 i, j;
829829
u32 rx_win_size;
830830
struct mwifiex_private *priv;
831831

@@ -863,8 +863,8 @@ static void mwifiex_update_ampdu_rxwinsize(struct mwifiex_adapter *adapter,
863863
if (rx_win_size != priv->add_ba_param.rx_win_size) {
864864
if (!priv->media_connected)
865865
continue;
866-
for (i = 0; i < MAX_NUM_TID; i++)
867-
mwifiex_11n_delba(priv, i);
866+
for (j = 0; j < MAX_NUM_TID; j++)
867+
mwifiex_11n_delba(priv, j);
868868
}
869869
}
870870
}

0 commit comments

Comments
 (0)