Re: [PATCH] wifi: mac80211_hwsim: handle 5/10 MHz chanctx in rc update

From: Johannes Berg

Date: Fri May 29 2026 - 02:25:37 EST


On Fri, 2026-05-29 at 15:10 +1000, Lachlan Hodges wrote:
> Hi,
>
> > The STA bandwidth enum has no sub-20 MHz states, so a normal 20 MHz link
> > STA falsely trips the warning on 5/10 MHz OCB channel contexts.so
> > a normal 20 MHz link STA falsely trips the warning on 5/10 MHz OCB
> > channel contexts.
>
> There is also S1G widths :) but that doesn't really matter.
>
> > Treat sub-20 MHz channel contexts as 20 MHz for this validation and use
> > the actual channel-context width in the warning message.
> >
> > Fixes: aea9a6088ae46 ("wifi: mac80211_hwsim: do rc update per link")
> > Reported-by: syzbot+c0472dd80bb8f668625f@xxxxxxxxxxxxxxxxxxxxxxxxx
> > Closes: https://syzkaller.appspot.com/bug?extid=c0472dd80bb8f668625f
> > Signed-off-by: meihaipeng <meihaipeng@xxxxxxxxxxxxx>
>
> Looking at the stack trace of this report and a few of the others,
> it comes from mac80211_hwsim_sta_add() which calls the rc_update on
> the new STA, so it would probably be better to do something similar
> to what we did for S1G [1] since I'm pretty sure the rc_update()
> path isn't reachable on 5/10MHz (just like S1G).

I don't know if it is or isn't, but a simpler change like that would
indeed seem preferable.

> Though there are also quite a few 5/10MHz syzbot reports for various
> things similar so maybe it's not worth it.. but that is up to
> Johannes :).

Yeah, I'm still going to rip it out entirely soon.

johannes