From: Johannes Berg <johannes@sipsolutions.net>
To: Jeff Johnson <quic_jjohnson@quicinc.com>,
Lin Ma <linma@zju.edu.cn>,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, linux-wireless@vger.kernel.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
kvalo@kernel.org
Subject: Re: [PATCH wireless v2] nl80211/cfg80211: add nla_policy for S1G band
Date: Sat, 20 Jan 2024 21:27:19 +0100 [thread overview]
Message-ID: <590fe2823d934af997c515640733eb8889b0560f.camel@sipsolutions.net> (raw)
In-Reply-To: <9e1db7f3-fd18-4b3b-a912-3cf6efd96fed@quicinc.com>
On Fri, 2024-01-19 at 15:47 -0800, Jeff Johnson wrote:
> > --- a/net/wireless/nl80211.c
> > +++ b/net/wireless/nl80211.c
> > @@ -911,6 +911,7 @@ nl80211_match_band_rssi_policy[NUM_NL80211_BANDS] = {
> > [NL80211_BAND_5GHZ] = { .type = NLA_S32 },
> > [NL80211_BAND_6GHZ] = { .type = NLA_S32 },
> > [NL80211_BAND_60GHZ] = { .type = NLA_S32 },
> > + [NL80211_BAND_S1GHZ] = { .type = NLA_S32 },
> > [NL80211_BAND_LC] = { .type = NLA_S32 },
> > };
> >
> something is really suspicious since the NL80211_BAND_* enums are
> *value* enums, not attribute ID enums, and hence they should never be
> used in an nla_policy.
Yeah, that's what it looks like first, but then they do get used
anyway...
> what is actually using these as attribute IDs, noting that
> NL80211_BAND_2GHZ == 0 and hence cannot be used as an attribute ID
Ohh. Good catch!
> seems the logic that introduced this policy needs to be revisited.
>
Let's just remove it?
commit 1e1b11b6a1111cd9e8af1fd6ccda270a9fa3eacf
Author: vamsi krishna <vamsin@codeaurora.org>
Date: Fri Feb 1 18:34:51 2019 +0530
nl80211/cfg80211: Specify band specific min RSSI thresholds with sched scan
As far as I can tell nothing is using that in the first place ...
Certainly not in the kernel, nor wpa_s, nor anything else I could find
really ...
We can't completely revert it since we need the attribute number to stay
allocated, but that's all we cannot remove.
johannes
next prev parent reply other threads:[~2024-01-20 20:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-19 15:12 Lin Ma
2024-01-19 15:21 ` Johannes Berg
2024-01-19 23:47 ` Jeff Johnson
2024-01-20 20:27 ` Johannes Berg [this message]
2024-01-22 18:33 ` Jeff Johnson
2024-01-25 18:32 ` Jeff Johnson
2024-01-25 18:39 ` 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=590fe2823d934af997c515640733eb8889b0560f.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=kvalo@kernel.org \
--cc=linma@zju.edu.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=quic_jjohnson@quicinc.com \
/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
all inboxes | Powered by JetHome®