Search Linux Wireless

RE: [PATCH] wifi: mac80211: remove DEAUTH_NEED_MGD_TX_PREP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 
> On Thu, 2024-06-27 at 12:47 +0200, Jonas Gorski wrote:
> >
> > > +++ b/net/mac80211/mlme.c
> > > @@ -3521,6 +3521,10 @@ static void ieee80211_set_disassoc(struct
> ieee80211_sub_if_data *sdata,
> > >         u64 changed = 0;
> > >         struct ieee80211_prep_tx_info info = {
> > >                 .subtype = stype,
> > > +               .was_assoc = true,
> > > +               .link_id = sdata->vif.active_links ?
> > > +                               __ffs(sdata->vif.active_links) :
> > > +                               0,
> >
> > Shouldn't the else be -1?
> 
> Hm. We didn't document whether it should be 0 or -1 for non-MLO.
> 
> Off-hand, 0 probably makes more sense, then you can use it to index the link
> array etc. unconditionally.
> 
> We sometimes set it to 0 or -1 though, e.g. -1 for auth because we get it directly
> from cfg80211 ...
> 
> However, drv_mgd_prepare_tx() has
> 
> 	info->link_id = info->link_id < 0 ? 0 : info->link_id;
> 
> so in the end, it doesn't matter!

But drv_mgd_complete_tx doesn't have that? And this is called later in the function?

> 
> > Here it would be ffs(0) - 1, which is -1, not 0.
> 
> Indeed. I guess with the way it's handled in drv_mgd_prepare_tx() I can just
> simplify the other one too.
> 
> Johannes

Miri




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux