0050-wifi-ath11k-Configure-the-FTM-responder-role-using-f.patch 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. From 813968c24126cc5c8320cd5db0e262069a535063 Mon Sep 17 00:00:00 2001
  2. From: Ganesh Babu Jothiram <quic_gjothira@quicinc.com>
  3. Date: Fri, 24 Mar 2023 16:57:00 +0200
  4. Subject: [PATCH] wifi: ath11k: Configure the FTM responder role using firmware
  5. capability flag
  6. Fine Time Measurement(FTM) is offloaded feature to firmware.
  7. Hence, the configuration of FTM responder role is done using
  8. firmware capability flag instead of hw param.
  9. Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1
  10. Signed-off-by: Ganesh Babu Jothiram <quic_gjothira@quicinc.com>
  11. Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
  12. Link: https://lore.kernel.org/r/20230317072034.8217-1-quic_gjothira@quicinc.com
  13. ---
  14. drivers/net/wireless/ath/ath11k/core.c | 8 --------
  15. drivers/net/wireless/ath/ath11k/hw.h | 1 -
  16. drivers/net/wireless/ath/ath11k/mac.c | 4 ++--
  17. 3 files changed, 2 insertions(+), 11 deletions(-)
  18. --- a/drivers/net/wireless/ath/ath11k/core.c
  19. +++ b/drivers/net/wireless/ath/ath11k/core.c
  20. @@ -116,7 +116,6 @@ static const struct ath11k_hw_params ath
  21. .tcl_ring_retry = true,
  22. .tx_ring_size = DP_TCL_DATA_RING_SIZE,
  23. .smp2p_wow_exit = false,
  24. - .ftm_responder = true,
  25. },
  26. {
  27. .hw_rev = ATH11K_HW_IPQ6018_HW10,
  28. @@ -199,7 +198,6 @@ static const struct ath11k_hw_params ath
  29. .tx_ring_size = DP_TCL_DATA_RING_SIZE,
  30. .smp2p_wow_exit = false,
  31. .support_fw_mac_sequence = false,
  32. - .ftm_responder = true,
  33. },
  34. {
  35. .name = "qca6390 hw2.0",
  36. @@ -284,7 +282,6 @@ static const struct ath11k_hw_params ath
  37. .tx_ring_size = DP_TCL_DATA_RING_SIZE,
  38. .smp2p_wow_exit = false,
  39. .support_fw_mac_sequence = true,
  40. - .ftm_responder = false,
  41. },
  42. {
  43. .name = "qcn9074 hw1.0",
  44. @@ -366,7 +363,6 @@ static const struct ath11k_hw_params ath
  45. .tx_ring_size = DP_TCL_DATA_RING_SIZE,
  46. .smp2p_wow_exit = false,
  47. .support_fw_mac_sequence = false,
  48. - .ftm_responder = true,
  49. },
  50. {
  51. .name = "wcn6855 hw2.0",
  52. @@ -451,7 +447,6 @@ static const struct ath11k_hw_params ath
  53. .tx_ring_size = DP_TCL_DATA_RING_SIZE,
  54. .smp2p_wow_exit = false,
  55. .support_fw_mac_sequence = true,
  56. - .ftm_responder = false,
  57. },
  58. {
  59. .name = "wcn6855 hw2.1",
  60. @@ -534,7 +529,6 @@ static const struct ath11k_hw_params ath
  61. .tx_ring_size = DP_TCL_DATA_RING_SIZE,
  62. .smp2p_wow_exit = false,
  63. .support_fw_mac_sequence = true,
  64. - .ftm_responder = false,
  65. },
  66. {
  67. .name = "wcn6750 hw1.0",
  68. @@ -615,7 +609,6 @@ static const struct ath11k_hw_params ath
  69. .tx_ring_size = DP_TCL_DATA_RING_SIZE_WCN6750,
  70. .smp2p_wow_exit = true,
  71. .support_fw_mac_sequence = true,
  72. - .ftm_responder = false,
  73. },
  74. {
  75. .hw_rev = ATH11K_HW_IPQ5018_HW10,
  76. @@ -695,7 +688,6 @@ static const struct ath11k_hw_params ath
  77. .tx_ring_size = DP_TCL_DATA_RING_SIZE,
  78. .smp2p_wow_exit = false,
  79. .support_fw_mac_sequence = false,
  80. - .ftm_responder = true,
  81. },
  82. };
  83. --- a/drivers/net/wireless/ath/ath11k/hw.h
  84. +++ b/drivers/net/wireless/ath/ath11k/hw.h
  85. @@ -224,7 +224,6 @@ struct ath11k_hw_params {
  86. u32 tx_ring_size;
  87. bool smp2p_wow_exit;
  88. bool support_fw_mac_sequence;
  89. - bool ftm_responder;
  90. };
  91. struct ath11k_hw_ops {
  92. --- a/drivers/net/wireless/ath/ath11k/mac.c
  93. +++ b/drivers/net/wireless/ath/ath11k/mac.c
  94. @@ -3538,7 +3538,7 @@ static void ath11k_mac_op_bss_info_chang
  95. if (changed & BSS_CHANGED_FTM_RESPONDER &&
  96. arvif->ftm_responder != info->ftm_responder &&
  97. - ar->ab->hw_params.ftm_responder &&
  98. + test_bit(WMI_TLV_SERVICE_RTT, ar->ab->wmi_ab.svc_map) &&
  99. (vif->type == NL80211_IFTYPE_AP ||
  100. vif->type == NL80211_IFTYPE_MESH_POINT)) {
  101. arvif->ftm_responder = info->ftm_responder;
  102. @@ -9234,7 +9234,7 @@ static int __ath11k_mac_register(struct
  103. wiphy_ext_feature_set(ar->hw->wiphy,
  104. NL80211_EXT_FEATURE_SET_SCAN_DWELL);
  105. - if (ab->hw_params.ftm_responder)
  106. + if (test_bit(WMI_TLV_SERVICE_RTT, ar->ab->wmi_ab.svc_map))
  107. wiphy_ext_feature_set(ar->hw->wiphy,
  108. NL80211_EXT_FEATURE_ENABLE_FTM_RESPONDER);