All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [bug report] wifi: nl80211/mac80211: clarify link ID in control port TX
Date: Tue, 26 Jul 2022 18:39:16 +0300	[thread overview]
Message-ID: <20220726153915.GP2316@kadam> (raw)
In-Reply-To: <5cdc7a91910a803ef531ae04ba330541476c0f18.camel@sipsolutions.net>

On Tue, Jul 26, 2022 at 04:42:41PM +0200, Johannes Berg wrote:
> Hi Dan,
> 
> 
> On Tue, 2022-07-26 at 17:10 +0300, Dan Carpenter wrote:
> >     5885         rcu_read_lock();
> >     5886         err = ieee80211_lookup_ra_sta(sdata, skb, &sta);
> > 
> > For sdata->vif.type == NL80211_IFTYPE_MESH_POINT then "sta" can be NULL.
> > Smatch doesn't know the value of sdata->vif.type at this point, and even
> > if it did, then it doesn't split the return states up with enough
> > granularity for that to make a difference.
> 
> Right, but that wouldn't matter anyway?
> 
> >     5887         if (err) {
> >     5888                 rcu_read_unlock();
> >     5889                 return err;
> >     5890         }
> >     5891 
> >     5892         if (!IS_ERR(sta)) {
> 
> Since this is all independent of the interface type.
> 
> >     5893                 u16 queue = __ieee80211_select_queue(sdata, sta, skb);
> >     5894 
> >     5895                 skb_set_queue_mapping(skb, queue);
> >     5896                 skb_get_hash(skb);
> >     5897 
> >     5898                 /*
> >     5899                  * for MLO STA, the SA should be the AP MLD address, but
> >     5900                  * the link ID has been selected already
> >     5901                  */
> > --> 5902                 if (sta->sta.mlo)
> > 
> > Which Smatch complains about here.
> 
> Makes sense, should be "if (sta && sta->sta.mlo)" then I suppose. I'm on
> vacation now, so if you want to send a patch as a reminder that'd be
> nice.

Sure.  I can do that.  Enjoy your vacation!

regards,
dan carpenter


      reply	other threads:[~2022-07-26 15:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-26 14:10 [bug report] wifi: nl80211/mac80211: clarify link ID in control port TX Dan Carpenter
2022-07-26 14:42 ` Johannes Berg
2022-07-26 15:39   ` Dan Carpenter [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=20220726153915.GP2316@kadam \
    --to=dan.carpenter@oracle.com \
    --cc=johannes@sipsolutions.net \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.