Re: [PATCH v3] wifi: iwlegacy: 3945-rs: add a defensive WARN_ON_ONCE for il_sta in il3945_rs_get_rate()
From: Tuo Li
Date: Sat Jan 10 2026 - 08:49:13 EST
Hi Stanislaw,
On Sat, Jan 10, 2026 at 4:42 AM Stanislaw Gruszka <stf_xl@xxxxx> wrote:
>
> Hi
>
> On Fri, Jan 09, 2026 at 11:12:55PM +0800, Tuo Li wrote:
> > > Sorry for giving you wrong advice before, but after examining related code
> > > I agree with Johannes the il_sta can not be NULL.
> > > Now, I think we should just remove il_sta/rs_sta pointer check.
> > >
> > > Regards
> > > Stanislaw
> >
> > Thanks for the follow-up and your patience. I appreciate you taking
> > another look at the code.
> >
> > Just to confirm, would you like me to submit a v4 patch that removes the
> > unnecessary il_sta / rs_sta checks, e.g.:
> >
> > in il3945_rs_get_rate():
> >
> > - if (rs_sta && !rs_sta->il) {
> > + if (!rs_sta->il) {
> >
> > and in il3945_rs_tx_status():
> >
> > - if (!il_sta) {
> > - D_RATE("leave: No STA il data to update!\n");
> > - return;
> > - }
>
> Yes, please post those changes as v4.
>
> Thanks
> Stanislaw
Thanks for your reply.
I will post these changes and submit a v4 patch shortly.
Best regards,
Tuo