From: Johannes Berg <johannes@sipsolutions.net>
To: Bert Karwatzki <spasswolf@web.de>,
Lorenzo Bianconi <lorenzo@kernel.org>,
Felix Fietkau <nbd@nbd.name>, Ryder Lee <ryder.lee@mediatek.com>
Cc: linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org
Subject: Re: [PATCH] wifi: mt76: inititalize sband.band to correct value
Date: Wed, 07 Feb 2024 11:52:07 +0100 [thread overview]
Message-ID: <cc9b25a584471699375d85f12e24a26098397ad5.camel@sipsolutions.net> (raw)
In-Reply-To: <20240207072253.4189-1-spasswolf@web.de>
On Wed, 2024-02-07 at 08:22 +0100, Bert Karwatzki wrote:
> Set phy->sband_{2,5,6}g.sband.band to the correct enum value, otherwise
> the ieee80211_register_hw() will fail to register the device.
So turns out that technically, it wasn't needed before because cfg80211
*will* set sband->band, but *mac80211* now requires it to have been set
before ...
We could do a trivial fix in mac80211 as well:
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -1124,7 +1124,7 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
supp_he = supp_he || iftd->he_cap.has_he;
supp_eht = supp_eht || iftd->eht_cap.has_eht;
- if (sband->band == NL80211_BAND_2GHZ)
+ if (band == NL80211_BAND_2GHZ)
he_40_mhz_cap =
IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_40MHZ_IN_2G;
else
but seems like no other driver even likely needed this, and it's
probably less reliable in the long term?
Or do both?
johannes
next prev parent reply other threads:[~2024-02-07 10:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-07 7:22 Bert Karwatzki
2024-02-07 10:52 ` Johannes Berg [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-02-07 0:01 Bert Karwatzki
2024-02-07 5:46 ` Kalle Valo
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=cc9b25a584471699375d85f12e24a26098397ad5.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=lorenzo@kernel.org \
--cc=nbd@nbd.name \
--cc=ryder.lee@mediatek.com \
--cc=spasswolf@web.de \
/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®