]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: mwifiex: Fix a loop in mwifiex_update_ampdu_rxwinsize()
authorDan Carpenter <dan.carpenter@linaro.org>
Thu, 8 Jan 2026 20:00:24 +0000 (23:00 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 12 Jan 2026 18:36:55 +0000 (19:36 +0100)
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>
drivers/net/wireless/marvell/mwifiex/11n_rxreorder.c

index 354c5ce66045503cb4c60697d6206bfb887785ec..f3397dc6c422ed97b399f5e5af50950394868816 100644 (file)
@@ -825,7 +825,7 @@ void mwifiex_update_rxreor_flags(struct mwifiex_adapter *adapter, u8 flags)
 static void mwifiex_update_ampdu_rxwinsize(struct mwifiex_adapter *adapter,
                                           bool coex_flag)
 {
-       u8 i;
+       u8 i, j;
        u32 rx_win_size;
        struct mwifiex_private *priv;
 
@@ -863,8 +863,8 @@ static void mwifiex_update_ampdu_rxwinsize(struct mwifiex_adapter *adapter,
                if (rx_win_size != priv->add_ba_param.rx_win_size) {
                        if (!priv->media_connected)
                                continue;
-                       for (i = 0; i < MAX_NUM_TID; i++)
-                               mwifiex_11n_delba(priv, i);
+                       for (j = 0; j < MAX_NUM_TID; j++)
+                               mwifiex_11n_delba(priv, j);
                }
        }
 }