Skip to contentSkip to conversation

ath9k: support DT ieee80211-freq-limit property to limit channels

PATCH In review Christian Lamparter 2 participants 3 messages Oct 9, 2021 – Oct 13, 2021 Qualcomm Atheros ATH9K wireless driver

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ath9k: support DT ieee80211-freq-limit property to limit channels

The common DT property can be used to limit the available channels but ath9k has to manually call wiphy_read_of_freq_limits().

---

I would have put this into ath9k_of_init(). But it didn't work there. The reason is that in ath9k_of_init() the channels and bands are not yet registered in the wiphy struct. So there isn't any channel to flag as disabled.

---
 drivers/net/wireless/ath/ath9k/init.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/net/wireless/ath/ath9k/init.c +2 -0
index 1568730fc01e..0344d6f27275 100644
@@ -1094,6 +1094,8 @@ int ath9k_init_device(u16 devid, struct ath_softc *sc,
 		ARRAY_SIZE(ath9k_tpt_blink));
 #endif
 
+	wiphy_read_of_freq_limits(hw->wiphy);
+
 	/* Register with mac80211 */
 	error = ieee80211_register_hw(hw);
 	if (error)
Signature · 1 line
2.33.0
#1 lore raw
Quoted 11 lines · Christian Lamparter

The common DT property can be used to limit the available channels but ath9k has to manually call wiphy_read_of_freq_limits().

---

I would have put this into ath9k_of_init(). But it didn't work there. The reason is that in ath9k_of_init() the channels and bands are not yet registered in the wiphy struct. So there isn't any channel to flag as disabled.

I think this is good info to have in the commit log, so in the pending branch I did that.

Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
#2 lore raw
In reply to Christian Lamparter
Quoted 10 lines · Christian Lamparter

The common DT property can be used to limit the available channels but ath9k has to manually call wiphy_read_of_freq_limits().

I would have put this into ath9k_of_init(). But it didn't work there. The reason is that in ath9k_of_init() the channels and bands are not yet registered in the wiphy struct. So there isn't any channel to flag as disabled.

Patch applied to ath-next branch of ath.git, thanks.

03469e79fee9 ath9k: support DT ieee80211-freq-limit property to limit channels

Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches