diff mbox series

wifi: ath12k: enable IEEE80211_HW_SINGLE_SCAN_ON_ALL_BANDS for WCN7850

Message ID 20230913105507.17675-1-quic_wgong@quicinc.com (mailing list archive)
State Accepted
Commit a1e09eb35476d66d7641c226f7d531cdac844761
Delegated to: Kalle Valo
Headers show
Series wifi: ath12k: enable IEEE80211_HW_SINGLE_SCAN_ON_ALL_BANDS for WCN7850 | expand

Commit Message

Wen Gong Sept. 13, 2023, 10:55 a.m. UTC
Currently mac80211 will send 3 scan request for each scan of WCN7850, they
are 2.4 GHz/5 GHz/6 GHz band scan. Firmware of WCN7850 will cache the RNR
IE(Reduced Neighbor Report element) which exist in the beacon of 2.4 GHz/5
GHz of the AP which is co-located with 6 GHz, and then use the cache to
scan in 6 GHz band scan if the 6 GHz scan is in the same scan with the 2.4
GHz/5 GHz band, this will helpful to search more AP of 6 GHz. Also it will
decrease the time cost of scan because firmware will use dual-band scan
for the 2.4 GHz/5 GHz, it means the 2.4 GHz and 5 GHz scans are doing
simultaneously.

Set the flag IEEE80211_HW_SINGLE_SCAN_ON_ALL_BANDS for WCN7850 since it
supports 2.4 GHz/5 GHz/6 GHz in a single wiphy/ieee80211_hw.

This does not impact QCN9274, because it is not single_phy, so does not
have 2.4 GHz/5 GHz/6 GHz in the same wiphy, then it does not match the
condition and then IEEE80211_HW_SINGLE_SCAN_ON_ALL_BANDS will not set for
QCN9274.

Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4

Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
---
 drivers/net/wireless/ath/ath12k/mac.c | 5 +++++
 1 file changed, 5 insertions(+)


base-commit: 3f257461ab0ab19806bae2bfde4c3cd88dbf050e

Comments

Jeff Johnson Sept. 14, 2023, 1:52 a.m. UTC | #1
On 9/13/2023 3:55 AM, Wen Gong wrote:
> Currently mac80211 will send 3 scan request for each scan of WCN7850, they
> are 2.4 GHz/5 GHz/6 GHz band scan. Firmware of WCN7850 will cache the RNR
> IE(Reduced Neighbor Report element) which exist in the beacon of 2.4 GHz/5
> GHz of the AP which is co-located with 6 GHz, and then use the cache to
> scan in 6 GHz band scan if the 6 GHz scan is in the same scan with the 2.4
> GHz/5 GHz band, this will helpful to search more AP of 6 GHz. Also it will
> decrease the time cost of scan because firmware will use dual-band scan
> for the 2.4 GHz/5 GHz, it means the 2.4 GHz and 5 GHz scans are doing
> simultaneously.
> 
> Set the flag IEEE80211_HW_SINGLE_SCAN_ON_ALL_BANDS for WCN7850 since it
> supports 2.4 GHz/5 GHz/6 GHz in a single wiphy/ieee80211_hw.
> 
> This does not impact QCN9274, because it is not single_phy, so does not
> have 2.4 GHz/5 GHz/6 GHz in the same wiphy, then it does not match the
> condition and then IEEE80211_HW_SINGLE_SCAN_ON_ALL_BANDS will not set for
> QCN9274.
> 
> Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4
> 
> Signed-off-by: Wen Gong <quic_wgong@quicinc.com>

Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>

> ---
>   drivers/net/wireless/ath/ath12k/mac.c | 5 +++++
>   1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c
> index 0f2af2f14ef7..d4dc03dc8d11 100644
> --- a/drivers/net/wireless/ath/ath12k/mac.c
> +++ b/drivers/net/wireless/ath/ath12k/mac.c
> @@ -7232,6 +7232,11 @@ static int __ath12k_mac_register(struct ath12k *ar)
>   
>   	ar->hw->wiphy->interface_modes = ab->hw_params->interface_modes;
>   
> +	if (ar->hw->wiphy->bands[NL80211_BAND_2GHZ] &&
> +	    ar->hw->wiphy->bands[NL80211_BAND_5GHZ] &&
> +	    ar->hw->wiphy->bands[NL80211_BAND_6GHZ])
> +		ieee80211_hw_set(ar->hw, SINGLE_SCAN_ON_ALL_BANDS);
> +
>   	ieee80211_hw_set(ar->hw, SIGNAL_DBM);
>   	ieee80211_hw_set(ar->hw, SUPPORTS_PS);
>   	ieee80211_hw_set(ar->hw, SUPPORTS_DYNAMIC_PS);
> 
> base-commit: 3f257461ab0ab19806bae2bfde4c3cd88dbf050e
Kalle Valo Sept. 28, 2023, 3:08 p.m. UTC | #2
Wen Gong <quic_wgong@quicinc.com> wrote:

> Currently mac80211 will send 3 scan request for each scan of WCN7850, they
> are 2.4 GHz/5 GHz/6 GHz band scan. Firmware of WCN7850 will cache the RNR
> IE(Reduced Neighbor Report element) which exist in the beacon of 2.4 GHz/5
> GHz of the AP which is co-located with 6 GHz, and then use the cache to
> scan in 6 GHz band scan if the 6 GHz scan is in the same scan with the 2.4
> GHz/5 GHz band, this will helpful to search more AP of 6 GHz. Also it will
> decrease the time cost of scan because firmware will use dual-band scan
> for the 2.4 GHz/5 GHz, it means the 2.4 GHz and 5 GHz scans are doing
> simultaneously.
> 
> Set the flag IEEE80211_HW_SINGLE_SCAN_ON_ALL_BANDS for WCN7850 since it
> supports 2.4 GHz/5 GHz/6 GHz in a single wiphy/ieee80211_hw.
> 
> This does not impact QCN9274, because it is not single_phy, so does not
> have 2.4 GHz/5 GHz/6 GHz in the same wiphy, then it does not match the
> condition and then IEEE80211_HW_SINGLE_SCAN_ON_ALL_BANDS will not set for
> QCN9274.
> 
> Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4
> 
> Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
> Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>

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

a1e09eb35476 wifi: ath12k: enable IEEE80211_HW_SINGLE_SCAN_ON_ALL_BANDS for WCN7850
diff mbox series

Patch

diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c
index 0f2af2f14ef7..d4dc03dc8d11 100644
--- a/drivers/net/wireless/ath/ath12k/mac.c
+++ b/drivers/net/wireless/ath/ath12k/mac.c
@@ -7232,6 +7232,11 @@  static int __ath12k_mac_register(struct ath12k *ar)
 
 	ar->hw->wiphy->interface_modes = ab->hw_params->interface_modes;
 
+	if (ar->hw->wiphy->bands[NL80211_BAND_2GHZ] &&
+	    ar->hw->wiphy->bands[NL80211_BAND_5GHZ] &&
+	    ar->hw->wiphy->bands[NL80211_BAND_6GHZ])
+		ieee80211_hw_set(ar->hw, SINGLE_SCAN_ON_ALL_BANDS);
+
 	ieee80211_hw_set(ar->hw, SIGNAL_DBM);
 	ieee80211_hw_set(ar->hw, SUPPORTS_PS);
 	ieee80211_hw_set(ar->hw, SUPPORTS_DYNAMIC_PS);