From: Jeff Chen <jeff.chen_1@nxp.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: Dan Carpenter <dan.carpenter@linaro.org>,
Chunfan Chen <jeffc@marvell.com>,
Brian Norris <briannorris@chromium.org>,
Francesco Dolcini <francesco@dolcini.it>,
Kalle Valo <kvalo@kernel.org>,
Amitkumar Karwar <akarwar@marvell.com>,
Cathy Luo <cluo@marvell.com>,
linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] wifi: mwifiex: Fix a loop in mwifiex_update_ampdu_rxwinsize()
Date: Mon, 12 Jan 2026 16:02:45 +0800 [thread overview]
Message-ID: <aWSqpRZmBUmfZMIZ@nxpwireless-Inspiron-14-Plus-7440> (raw)
In-Reply-To: <9085a572f5fee0a14059c023c3240aa4d96afc08.camel@sipsolutions.net>
On Thu, Jan 08, 2026 at 09:58:46 PM +0100, Johannes Berg wrote:
> On Thu, 2026-01-08 at 23:00 +0300, Dan Carpenter wrote:
> > The "i" iterator variable is used to count two different things but
>
> nice catch
>
> > unfortunately we can't store two different numbers in the same variable.
>
> :-)
>
> > This was found via static analysis so I'm not positive on the impact
> > of this bug.
>
> I think it basically means anything other than the first interface
> (using adapter->priv[i] with i>0) will not be updated correctly for A-
> MPDU buffer usage (?) if you use more than two interfaces. Given that
> most people probably only use a single interface, I suppose the impact
> would be rather low.
>
> johannes
>
Johannes is right — with AP and STA both active, whichever interface first meets
media_connected (AP or STA) will trigger the inner loop to overwrite the outer
interface index, so only that first interface gets the per‑TID delba while the
other is skipped.
For reference: mwifiex_update_ampdu_txwinsize() already uses separate iterators
, so aligning the RX-side loop to the same pattern makes sense.
Dan’s change to use a distinct inner iterator (j) here is correct.
Please apply.
Reviewed-by: Jeff Chen <jeff.chen_1@nxp.com>
prev parent reply other threads:[~2026-01-12 8:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-08 20:00 Dan Carpenter
2026-01-08 20:58 ` Johannes Berg
2026-01-12 8:02 ` Jeff Chen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aWSqpRZmBUmfZMIZ@nxpwireless-Inspiron-14-Plus-7440 \
--to=jeff.chen_1@nxp.com \
--cc=akarwar@marvell.com \
--cc=briannorris@chromium.org \
--cc=cluo@marvell.com \
--cc=dan.carpenter@linaro.org \
--cc=francesco@dolcini.it \
--cc=jeffc@marvell.com \
--cc=johannes@sipsolutions.net \
--cc=kernel-janitors@vger.kernel.org \
--cc=kvalo@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®