mbox series

[V3,0/6] bug fixes and enhancements to 6 GHz band support

Message ID 20240424191141.32549-1-quic_pradeepc@quicinc.com
Headers show
Series bug fixes and enhancements to 6 GHz band support | expand

Message

Pradeep Kumar Chitrapu April 24, 2024, 7:11 p.m. UTC
In 6 GHz band, add support for
1. channel 2.
2. Fix packet drop issues.
3. AMPDU aggregation
4. SMPS configuration

Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3

changes in v3:
 - address review comments for fixing ath12k-check issues.

changes in v2:
 - Disable smps for WCN7850 after review comment from Boachen
 - Added Tested-on tag for WCN7850

Pradeep Kumar Chitrapu (6):
  wifi: ath12k: add channel 2 into 6 GHz channel list
  wifi: ath12k: Correct 6 GHz frequency value in rx status
  wifi: ath12k: fix survey dump collection in 6 GHz
  wifi: ath12k: add 6 GHz params in peer assoc command
  wifi: ath12k: refactor smps configuration
  wifi: ath12k: support SMPS configuration for 6 GHz

 drivers/net/wireless/ath/ath12k/core.h  |   2 +-
 drivers/net/wireless/ath/ath12k/dp_rx.c |   9 +-
 drivers/net/wireless/ath/ath12k/mac.c   | 121 ++++++++++++++++++++----
 drivers/net/wireless/ath/ath12k/wmi.c   |  10 +-
 4 files changed, 117 insertions(+), 25 deletions(-)


base-commit: 326f8f68f28b0b831233acfabffb486a5b0f4717

Comments

Jeff Johnson April 25, 2024, 5:34 p.m. UTC | #1
On 4/24/2024 12:11 PM, Pradeep Kumar Chitrapu wrote:
> The frequency in the rx status is currently being filled
> incorrectly for the 6 GHz band. The channel number received is
> invalid in this case, resulting in packet drops. Fix this
> issue by correcting the frequency calculation.
> 
> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
> 
> Fixes: d889913205cf ("wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices")
> Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>

again this should have been propagated from my v2 review
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Jeff Johnson April 25, 2024, 5:45 p.m. UTC | #2
On 4/24/2024 12:11 PM, Pradeep Kumar Chitrapu wrote:
> In 6 GHz band, add support for
> 1. channel 2.
> 2. Fix packet drop issues.
> 3. AMPDU aggregation
> 4. SMPS configuration
> 
> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
> Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3
> 
> changes in v3:
>  - address review comments for fixing ath12k-check issues.

this should be more specific. at a minimum it should indicate which patches in
the series have been modified

> 
> changes in v2:
>  - Disable smps for WCN7850 after review comment from Boachen
>  - Added Tested-on tag for WCN7850
> 
> Pradeep Kumar Chitrapu (6):
>   wifi: ath12k: add channel 2 into 6 GHz channel list
>   wifi: ath12k: Correct 6 GHz frequency value in rx status
>   wifi: ath12k: fix survey dump collection in 6 GHz
>   wifi: ath12k: add 6 GHz params in peer assoc command
>   wifi: ath12k: refactor smps configuration
>   wifi: ath12k: support SMPS configuration for 6 GHz
> 
>  drivers/net/wireless/ath/ath12k/core.h  |   2 +-
>  drivers/net/wireless/ath/ath12k/dp_rx.c |   9 +-
>  drivers/net/wireless/ath/ath12k/mac.c   | 121 ++++++++++++++++++++----
>  drivers/net/wireless/ath/ath12k/wmi.c   |  10 +-
>  4 files changed, 117 insertions(+), 25 deletions(-)
> 
> 
> base-commit: 326f8f68f28b0b831233acfabffb486a5b0f4717
Jeff Johnson April 25, 2024, 5:46 p.m. UTC | #3
On 4/24/2024 12:11 PM, Pradeep Kumar Chitrapu wrote:
> When ath12k receives survey request, choose the 6 GHz band
> when enabled. Without this, survey requests do not include
> any 6 GHz band results, leading to failures in auto channel
> selection.
> 
> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
> 
> Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>

again not propagated from v2
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Jeff Johnson April 25, 2024, 5:57 p.m. UTC | #4
On 4/24/2024 12:11 PM, Pradeep Kumar Chitrapu wrote:
> Move fetching smps value to a new function and use u16_get_bits

v2 comment not addressed:
s/smps/SMPS/ here and in the next line

> to extract smps value from capabilities. This will help in
> extending the functionality when SMPS support in 6 GHz band gets
> added in subsequent patches.
> 
> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
> 
> Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
> ---
>  drivers/net/wireless/ath/ath12k/mac.c | 32 ++++++++++++++++-----------
>  1 file changed, 19 insertions(+), 13 deletions(-)
> 
> diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c
> index 8836dc67f7e0..65688e55c285 100644
> --- a/drivers/net/wireless/ath/ath12k/mac.c
> +++ b/drivers/net/wireless/ath/ath12k/mac.c
> @@ -2086,18 +2086,29 @@ static void ath12k_peer_assoc_h_he_6ghz(struct ath12k *ar,
>  				     ampdu_factor)) - 1;
>  }
>  
> +static inline int ath12k_get_smps_from_capa(const struct ieee80211_sta_ht_cap *ht_cap,

v2 comment not addressed:
remove inline

> +					    int *smps)
> +{
> +	if (!ht_cap->ht_supported)
> +		return -EOPNOTSUPP;
> +
> +	*smps = u16_get_bits(ht_cap->cap, IEEE80211_HT_CAP_SM_PS);
> +
> +	if (*smps >= ARRAY_SIZE(ath12k_smps_map))
> +		return -EINVAL;
> +
> +	return 0;
> +}
> +
>  static void ath12k_peer_assoc_h_smps(struct ieee80211_sta *sta,
>  				     struct ath12k_wmi_peer_assoc_arg *arg)
>  {
>  	const struct ieee80211_sta_ht_cap *ht_cap = &sta->deflink.ht_cap;
>  	int smps;
>  
> -	if (!ht_cap->ht_supported)
> +	if (ath12k_get_smps_from_capa(ht_cap, &smps))
>  		return;
>  
> -	smps = ht_cap->cap & IEEE80211_HT_CAP_SM_PS;
> -	smps >>= IEEE80211_HT_CAP_SM_PS_SHIFT;
> -
>  	switch (smps) {
>  	case WLAN_HT_CAP_SM_PS_STATIC:
>  		arg->static_mimops_flag = true;
> @@ -2571,16 +2582,11 @@ static int ath12k_setup_peer_smps(struct ath12k *ar, struct ath12k_vif *arvif,
>  				  const u8 *addr,
>  				  const struct ieee80211_sta_ht_cap *ht_cap)
>  {
> -	int smps;
> +	int smps, ret = 0;
>  
> -	if (!ht_cap->ht_supported)
> -		return 0;
> -
> -	smps = ht_cap->cap & IEEE80211_HT_CAP_SM_PS;
> -	smps >>= IEEE80211_HT_CAP_SM_PS_SHIFT;
> -
> -	if (smps >= ARRAY_SIZE(ath12k_smps_map))
> -		return -EINVAL;
> +	ret = ath12k_get_smps_from_capa(ht_cap, &smps);
> +	if (ret < 0)
> +		return ret;
>  
>  	return ath12k_wmi_set_peer_param(ar, addr, arvif->vdev_id,
>  					 WMI_PEER_MIMO_PS_STATE,
Pradeep Kumar Chitrapu April 25, 2024, 8:06 p.m. UTC | #5
On 4/25/2024 10:45 AM, Jeff Johnson wrote:
> On 4/24/2024 12:11 PM, Pradeep Kumar Chitrapu wrote:
>> In 6 GHz band, add support for
>> 1. channel 2.
>> 2. Fix packet drop issues.
>> 3. AMPDU aggregation
>> 4. SMPS configuration
>>
>> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
>> Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3
>>
>> changes in v3:
>>   - address review comments for fixing ath12k-check issues.
> 
> this should be more specific. at a minimum it should indicate which patches in
> the series have been modified
> 
Thanks Jeff, I will add acked-by and also address te other comments in 
this series
in next revision.