1
0

0069-wifi-ath11k-fix-registration-of-6Ghz-only-phy-withou.patch 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. From e2ceb1de2f83aafd8003f0b72dfd4b7441e97d14 Mon Sep 17 00:00:00 2001
  2. From: Maxime Bizon <mbizon@freebox.fr>
  3. Date: Fri, 21 Apr 2023 16:54:45 +0200
  4. Subject: [PATCH] wifi: ath11k: fix registration of 6Ghz-only phy without the
  5. full channel range
  6. Because of what seems to be a typo, a 6Ghz-only phy for which the BDF
  7. does not allow the 7115Mhz channel will fail to register:
  8. WARNING: CPU: 2 PID: 106 at net/wireless/core.c:907 wiphy_register+0x914/0x954
  9. Modules linked in: ath11k_pci sbsa_gwdt
  10. CPU: 2 PID: 106 Comm: kworker/u8:5 Not tainted 6.3.0-rc7-next-20230418-00549-g1e096a17625a-dirty #9
  11. Hardware name: Freebox V7R Board (DT)
  12. Workqueue: ath11k_qmi_driver_event ath11k_qmi_driver_event_work
  13. pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
  14. pc : wiphy_register+0x914/0x954
  15. lr : ieee80211_register_hw+0x67c/0xc10
  16. sp : ffffff800b123aa0
  17. x29: ffffff800b123aa0 x28: 0000000000000000 x27: 0000000000000000
  18. x26: 0000000000000000 x25: 0000000000000006 x24: ffffffc008d51418
  19. x23: ffffffc008cb0838 x22: ffffff80176c2460 x21: 0000000000000168
  20. x20: ffffff80176c0000 x19: ffffff80176c03e0 x18: 0000000000000014
  21. x17: 00000000cbef338c x16: 00000000d2a26f21 x15: 00000000ad6bb85f
  22. x14: 0000000000000020 x13: 0000000000000020 x12: 00000000ffffffbd
  23. x11: 0000000000000208 x10: 00000000fffffdf7 x9 : ffffffc009394718
  24. x8 : ffffff80176c0528 x7 : 000000007fffffff x6 : 0000000000000006
  25. x5 : 0000000000000005 x4 : ffffff800b304284 x3 : ffffff800b304284
  26. x2 : ffffff800b304d98 x1 : 0000000000000000 x0 : 0000000000000000
  27. Call trace:
  28. wiphy_register+0x914/0x954
  29. ieee80211_register_hw+0x67c/0xc10
  30. ath11k_mac_register+0x7c4/0xe10
  31. ath11k_core_qmi_firmware_ready+0x1f4/0x570
  32. ath11k_qmi_driver_event_work+0x198/0x590
  33. process_one_work+0x1b8/0x328
  34. worker_thread+0x6c/0x414
  35. kthread+0x100/0x104
  36. ret_from_fork+0x10/0x20
  37. ---[ end trace 0000000000000000 ]---
  38. ath11k_pci 0002:01:00.0: ieee80211 registration failed: -22
  39. ath11k_pci 0002:01:00.0: failed register the radio with mac80211: -22
  40. ath11k_pci 0002:01:00.0: failed to create pdev core: -22
  41. Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
  42. Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
  43. Link: https://lore.kernel.org/r/20230421145445.2612280-1-mbizon@freebox.fr
  44. ---
  45. drivers/net/wireless/ath/ath11k/mac.c | 2 +-
  46. 1 file changed, 1 insertion(+), 1 deletion(-)
  47. --- a/drivers/net/wireless/ath/ath11k/mac.c
  48. +++ b/drivers/net/wireless/ath/ath11k/mac.c
  49. @@ -8892,7 +8892,7 @@ static int ath11k_mac_setup_channels_rat
  50. }
  51. if (supported_bands & WMI_HOST_WLAN_5G_CAP) {
  52. - if (reg_cap->high_5ghz_chan >= ATH11K_MAX_6G_FREQ) {
  53. + if (reg_cap->high_5ghz_chan >= ATH11K_MIN_6G_FREQ) {
  54. channels = kmemdup(ath11k_6ghz_channels,
  55. sizeof(ath11k_6ghz_channels), GFP_KERNEL);
  56. if (!channels) {