Re: [PATCH v2 wireless 0/3] wifi: replace open-coded IE searches with cfg80211_find_ie()
From: Greg KH
Date: Tue Oct 27 2026 - 02:04:49 EST
On Mon, Oct 26, 2026 at 10:31:52PM +0000, Tristan Madani wrote:
> Three wireless drivers (carl9170, rt2x00, p54) each hand-roll their own
> TIM IE search function. Replace them with cfg80211_find_ie(), which
> already provides a correct and well-tested IE search.
>
> Changes in v2:
> - Replace the entire open-coded functions with cfg80211_find_ie()
> instead of only tightening the loop condition, per Johannes Berg.
> - Add pre-subtraction length guards in p54 to prevent unsigned
> underflow on truncated beacon frames.
>
> Tristan Madani (3):
> wifi: carl9170: replace open-coded IE search with cfg80211_find_ie()
> wifi: rt2x00: replace open-coded IE search with cfg80211_find_ie()
> wifi: p54: replace open-coded IE search with cfg80211_find_ie()
>
> drivers/net/wireless/ath/carl9170/rx.c | 27 ++++-------------
> drivers/net/wireless/intersil/p54/lmac.h | 3 --
> drivers/net/wireless/intersil/p54/main.c | 30 +++++--------------
> drivers/net/wireless/intersil/p54/txrx.c | 12 ++++++--
> .../net/wireless/ralink/rt2x00/rt2x00dev.c | 30 +++++--------------
> 5 files changed, 29 insertions(+), 73 deletions(-)
>
> --
> 2.47.3
>
>
<formletter>
This is not the correct way to submit patches for inclusion in the
stable kernel tree. Please read:
https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for how to do this properly.
</formletter>