0054-wifi-ath11k-Send-11d-scan-start-before-WMI_START_SCA.patch 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. From e89a51aedf380bc60219dc9afa96c36507060fb3 Mon Sep 17 00:00:00 2001
  2. From: Manikanta Pubbisetty <quic_mpubbise@quicinc.com>
  3. Date: Wed, 15 Mar 2023 21:48:17 +0530
  4. Subject: [PATCH] wifi: ath11k: Send 11d scan start before WMI_START_SCAN_CMDID
  5. Firmwares advertising the support of triggering 11d algorithm on the
  6. scan results of a regular scan expects driver to send
  7. WMI_11D_SCAN_START_CMDID before sending WMI_START_SCAN_CMDID.
  8. Triggering 11d algorithm on the scan results of a normal scan helps
  9. in completely avoiding a separate 11d scan for determining regdomain.
  10. This indirectly helps in speeding up connections on station
  11. interfaces on the chipsets supporting 11D scan.
  12. To enable this feature, send WMI_11D_SCAN_START_CMDID just before
  13. sending WMI_START_SCAN_CMDID if the firmware advertises
  14. WMI_TLV_SERVICE_SUPPORT_11D_FOR_HOST_SCAN service flag.
  15. WCN6750 & WCN6855 supports this feature.
  16. Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.1.0.1-01160-QCAMSLSWPLZ-1
  17. Tested-on: WCN6855 hw2.1 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.23
  18. Signed-off-by: Manikanta Pubbisetty <quic_mpubbise@quicinc.com>
  19. Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
  20. Link: https://lore.kernel.org/r/20230315161817.29627-1-quic_mpubbise@quicinc.com
  21. ---
  22. drivers/net/wireless/ath/ath11k/mac.c | 12 ++++++++++++
  23. drivers/net/wireless/ath/ath11k/wmi.h | 1 +
  24. 2 files changed, 13 insertions(+)
  25. --- a/drivers/net/wireless/ath/ath11k/mac.c
  26. +++ b/drivers/net/wireless/ath/ath11k/mac.c
  27. @@ -3755,6 +3755,18 @@ static int ath11k_mac_op_hw_scan(struct
  28. int i;
  29. u32 scan_timeout;
  30. + /* Firmwares advertising the support of triggering 11D algorithm
  31. + * on the scan results of a regular scan expects driver to send
  32. + * WMI_11D_SCAN_START_CMDID before sending WMI_START_SCAN_CMDID.
  33. + * With this feature, separate 11D scan can be avoided since
  34. + * regdomain can be determined with the scan results of the
  35. + * regular scan.
  36. + */
  37. + if (ar->state_11d == ATH11K_11D_PREPARING &&
  38. + test_bit(WMI_TLV_SERVICE_SUPPORT_11D_FOR_HOST_SCAN,
  39. + ar->ab->wmi_ab.svc_map))
  40. + ath11k_mac_11d_scan_start(ar, arvif->vdev_id);
  41. +
  42. mutex_lock(&ar->conf_mutex);
  43. spin_lock_bh(&ar->data_lock);
  44. --- a/drivers/net/wireless/ath/ath11k/wmi.h
  45. +++ b/drivers/net/wireless/ath/ath11k/wmi.h
  46. @@ -2103,6 +2103,7 @@ enum wmi_tlv_service {
  47. WMI_TLV_SERVICE_SCAN_CONFIG_PER_CHANNEL = 265,
  48. WMI_TLV_SERVICE_REG_CC_EXT_EVENT_SUPPORT = 281,
  49. WMI_TLV_SERVICE_BIOS_SAR_SUPPORT = 326,
  50. + WMI_TLV_SERVICE_SUPPORT_11D_FOR_HOST_SCAN = 357,
  51. /* The third 128 bits */
  52. WMI_MAX_EXT2_SERVICE = 384