Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: d219b7eb3792 ("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>

authored by

Dan Carpenter and committed by
Johannes Berg
2120f3a3 db1d0b6a

+3 -3
+3 -3
drivers/net/wireless/marvell/mwifiex/11n_rxreorder.c
··· 825 825 static void mwifiex_update_ampdu_rxwinsize(struct mwifiex_adapter *adapter, 826 826 bool coex_flag) 827 827 { 828 - u8 i; 828 + u8 i, j; 829 829 u32 rx_win_size; 830 830 struct mwifiex_private *priv; 831 831 ··· 863 863 if (rx_win_size != priv->add_ba_param.rx_win_size) { 864 864 if (!priv->media_connected) 865 865 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); 868 868 } 869 869 } 870 870 }