Linux wireless drivers development
 help / color / mirror / Atom feed
From: Felix Fietkau <nbd@nbd.name>
To: Johannes Berg <johannes@sipsolutions.net>,
	linux-wireless@vger.kernel.org
Subject: Re: [PATCH] cfg80211: fix sband iftype data lookup for AP_VLAN
Date: Thu, 22 Jun 2023 18:50:38 +0200	[thread overview]
Message-ID: <14bd0b06-d8c1-5c02-42a6-0c8d045b93ff@nbd.name> (raw)
In-Reply-To: <f717c60c24bf3dcec7cd3b0308c6bd804683276a.camel@sipsolutions.net>

On 22.06.23 18:41, Johannes Berg wrote:
> On Thu, 2023-06-22 at 18:25 +0200, Felix Fietkau wrote:
>> On 22.06.23 18:07, Johannes Berg wrote:
>> > On Thu, 2023-06-22 at 18:05 +0200, Felix Fietkau wrote:
>> > > Since AP_VLAN interfaces are not pushed to the driver, 
>> > > 
>> > That's a mac80211 thing though.
>> > 
>> > > the driver should not
>> > > be expected to register iftype data for them.
>> > > Map them to the regular AP iftype on lookup.
>> > 
>> > And this is in cfg80211 - not sure that seems right?
>> > 
>> > OTOH I'd expect no callers with VLAN here, it doesn't really make sense
>> > since they're not a standalone mode that actually has HE/EHT, but still,
>> > seems odd this way?
>> > 
>> > What's actually calling it? I'm guessing somewhere in mac80211?
>> 
>> Yes, I guess only mac80211 is affected. I put in the cfg80211 prefix
>> because that's what the header file belongs to.
>> 
>> I made the patch in response to this:
>> https://patchwork.kernel.org/project/linux-wireless/patch/20230605152141.17434-4-shayne.chen@mediatek.com/
> 
> OK, sure, that also doesn't really make sense.
> 
>> I found that there are several calls to ieee80211_get_he_iftype_cap and
>> ieee80211_get_eht_iftype_cap, which could be affected by this issue.
>> I thought dealing with this in a single place would be better than playing
>> whac-a-mole by fixing it at the call sites.
>> 
> 
> I replaced almost all of them with ieee80211_get_he_iftype_cap_vif() so
> it shouldn't be that bad? Looks like I forgot some though.

I guess one advantage in using my fix would be that it's way easier to 
backport.
How about using my fix initially (with a changed prefix if you prefer), 
and then replace it once the call sites have been switched over to 
ieee80211_get_he_iftype_cap_vif?

- Felix

  reply	other threads:[~2023-06-22 16:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-22 16:05 [PATCH] cfg80211: fix sband iftype data lookup for AP_VLAN Felix Fietkau
2023-06-22 16:07 ` Johannes Berg
2023-06-22 16:25   ` Felix Fietkau
2023-06-22 16:41     ` Johannes Berg
2023-06-22 16:50       ` Felix Fietkau [this message]
2023-06-22 16:52         ` Johannes Berg

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=14bd0b06-d8c1-5c02-42a6-0c8d045b93ff@nbd.name \
    --to=nbd@nbd.name \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox