diff mbox series

wifi: mt76: inititalize sband.band to correct value

Message ID 20240207072253.4189-1-spasswolf@web.de
State New
Headers show
Series wifi: mt76: inititalize sband.band to correct value | expand

Commit Message

Bert Karwatzki Feb. 7, 2024, 7:22 a.m. UTC
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.

Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218466

Signed-off-by: Bert Karwatzki <spasswolf@web.de>
---
 drivers/net/wireless/mediatek/mt76/mac80211.c | 3 +++
 1 file changed, 3 insertions(+)

--
2.39.2

It's "Fixes" for commits and "Closes" for bugs, ain't it?

Bert Karwatzki
diff mbox series

Patch

diff --git a/drivers/net/wireless/mediatek/mt76/mac80211.c b/drivers/net/wireless/mediatek/mt76/mac80211.c
index 8a3a90d1bfac..6cf08446f445 100644
--- a/drivers/net/wireless/mediatek/mt76/mac80211.c
+++ b/drivers/net/wireless/mediatek/mt76/mac80211.c
@@ -363,6 +363,7 @@  mt76_init_sband_2g(struct mt76_phy *phy, struct ieee80211_rate *rates,
 		   int n_rates)
 {
 	phy->hw->wiphy->bands[NL80211_BAND_2GHZ] = &phy->sband_2g.sband;
+	phy->sband_2g.sband.band = NL80211_BAND_2GHZ;

 	return mt76_init_sband(phy, &phy->sband_2g, mt76_channels_2ghz,
 			       ARRAY_SIZE(mt76_channels_2ghz), rates,
@@ -374,6 +375,7 @@  mt76_init_sband_5g(struct mt76_phy *phy, struct ieee80211_rate *rates,
 		   int n_rates, bool vht)
 {
 	phy->hw->wiphy->bands[NL80211_BAND_5GHZ] = &phy->sband_5g.sband;
+	phy->sband_5g.sband.band = NL80211_BAND_5GHZ;

 	return mt76_init_sband(phy, &phy->sband_5g, mt76_channels_5ghz,
 			       ARRAY_SIZE(mt76_channels_5ghz), rates,
@@ -385,6 +387,7 @@  mt76_init_sband_6g(struct mt76_phy *phy, struct ieee80211_rate *rates,
 		   int n_rates)
 {
 	phy->hw->wiphy->bands[NL80211_BAND_6GHZ] = &phy->sband_6g.sband;
+	phy->sband_6g.sband.band = NL80211_BAND_6GHZ;

 	return mt76_init_sband(phy, &phy->sband_6g, mt76_channels_6ghz,
 			       ARRAY_SIZE(mt76_channels_6ghz), rates,