040-ath9k-support-DT-ieee80211-freq-limit-property-to-li.patch 1.1 KB

1234567891011121314151617181920212223242526272829
  1. From 03469e79fee9e8e908dae3bd1a80bcd9a66f2a88 Mon Sep 17 00:00:00 2001
  2. From: Christian Lamparter <[email protected]>
  3. Date: Mon, 11 Oct 2021 18:18:00 +0300
  4. Subject: ath9k: support DT ieee80211-freq-limit property to limit channels
  5. The common DT property can be used to limit the available channels
  6. but ath9k has to manually call wiphy_read_of_freq_limits().
  7. I would have put this into ath9k_of_init(). But it didn't work there.
  8. The reason is that in ath9k_of_init() the channels and bands are not yet
  9. registered in the wiphy struct. So there isn't any channel to flag as
  10. disabled.
  11. Signed-off-by: Christian Lamparter <[email protected]>
  12. Signed-off-by: Kalle Valo <[email protected]>
  13. Link: https://lore.kernel.org/r/[email protected]
  14. ---
  15. --- a/drivers/net/wireless/ath/ath9k/init.c
  16. +++ b/drivers/net/wireless/ath/ath9k/init.c
  17. @@ -1094,6 +1094,8 @@ int ath9k_init_device(u16 devid, struct ath_softc *sc,
  18. ARRAY_SIZE(ath9k_tpt_blink));
  19. #endif
  20. + wiphy_read_of_freq_limits(hw->wiphy);
  21. +
  22. /* Register with mac80211 */
  23. error = ieee80211_register_hw(hw);
  24. if (error)