lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Wed, 07 Feb 2024 11:52:07 +0100
From: Johannes Berg <johannes@...solutions.net>
To: Bert Karwatzki <spasswolf@....de>, Lorenzo Bianconi
 <lorenzo@...nel.org>,  Felix Fietkau <nbd@....name>, Ryder Lee
 <ryder.lee@...iatek.com>
Cc: linux-kernel@...r.kernel.org, linux-wireless@...r.kernel.org
Subject: Re: [PATCH] wifi: mt76: inititalize sband.band to correct value

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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ