public inbox for ath12k@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] wifi: ath12k: fix legacy peer association due to missing HT or 6 GHz capabilities
@ 2024-06-12 22:53 Pradeep Kumar Chitrapu
  2024-06-13 15:42 ` Jeff Johnson
  2024-06-19 14:02 ` Kalle Valo
  0 siblings, 2 replies; 6+ messages in thread
From: Pradeep Kumar Chitrapu @ 2024-06-12 22:53 UTC (permalink / raw)
  To: ath12k
  Cc: linux-wireless, Pradeep Kumar Chitrapu, Aditya Kumar Singh,
	Zachary Smith

Currently SMPS configuration failed when the Information
Elements (IEs) did not contain HT or 6 GHz capabilities. This
caused legacy peer association to fail as legacy peers do not
have HT or 6 GHz capabilities. Fix this by not returning an
error when SMPS configuration fails due to the absence of HT
or 6 GHz capabilities.

Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1

Fixes: f0e61dc7ecf9 ("wifi: ath12k: refactor SMPS configuration")
Reported-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
Reported-by: Zachary Smith <dr.z.smith@gmail.com>
Closes: https://lore.kernel.org/all/CAM=znoFPcXrn5GhDmDmo50Syic3-hXpWvD+vkv8KX5o_ZTo8kQ@mail.gmail.com/
Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
---
 drivers/net/wireless/ath/ath12k/mac.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c
index 2259ce22cc8b..fa9f6656a06f 100644
--- a/drivers/net/wireless/ath/ath12k/mac.c
+++ b/drivers/net/wireless/ath/ath12k/mac.c
@@ -2255,9 +2255,6 @@ static int ath12k_get_smps_from_capa(const struct ieee80211_sta_ht_cap *ht_cap,
 				     const struct ieee80211_he_6ghz_capa *he_6ghz_capa,
 				     int *smps)
 {
-	if (!ht_cap->ht_supported && !he_6ghz_capa->capa)
-		return -EOPNOTSUPP;
-
 	if (ht_cap->ht_supported)
 		*smps = u16_get_bits(ht_cap->cap, IEEE80211_HT_CAP_SM_PS);
 	else
@@ -2277,6 +2274,9 @@ static void ath12k_peer_assoc_h_smps(struct ieee80211_sta *sta,
 	const struct ieee80211_sta_ht_cap *ht_cap = &sta->deflink.ht_cap;
 	int smps;
 
+	if (!ht_cap->ht_supported && !he_6ghz_capa->capa)
+		return;
+
 	if (ath12k_get_smps_from_capa(ht_cap, he_6ghz_capa, &smps))
 		return;
 
@@ -2756,6 +2756,9 @@ static int ath12k_setup_peer_smps(struct ath12k *ar, struct ath12k_vif *arvif,
 {
 	int smps, ret = 0;
 
+	if (!ht_cap->ht_supported && !he_6ghz_capa)
+		return 0;
+
 	ret = ath12k_get_smps_from_capa(ht_cap, he_6ghz_capa, &smps);
 	if (ret < 0)
 		return ret;

base-commit: e72048809ec7355a947415ae6836d2eb7fdcda39
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] wifi: ath12k: fix legacy peer association due to missing HT or 6 GHz capabilities
  2024-06-12 22:53 [PATCH] wifi: ath12k: fix legacy peer association due to missing HT or 6 GHz capabilities Pradeep Kumar Chitrapu
@ 2024-06-13 15:42 ` Jeff Johnson
  2024-06-13 18:59   ` Pradeep Kumar Chitrapu
  2024-06-19 14:02 ` Kalle Valo
  1 sibling, 1 reply; 6+ messages in thread
From: Jeff Johnson @ 2024-06-13 15:42 UTC (permalink / raw)
  To: Pradeep Kumar Chitrapu, ath12k
  Cc: linux-wireless, Aditya Kumar Singh, Zachary Smith

On 6/12/2024 3:53 PM, Pradeep Kumar Chitrapu wrote:
> Currently SMPS configuration failed when the Information
> Elements (IEs) did not contain HT or 6 GHz capabilities. This
> caused legacy peer association to fail as legacy peers do not
> have HT or 6 GHz capabilities. Fix this by not returning an
> error when SMPS configuration fails due to the absence of HT
> or 6 GHz capabilities.
> 
> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
> 
> Fixes: f0e61dc7ecf9 ("wifi: ath12k: refactor SMPS configuration")
> Reported-by: Aditya Kumar Singh <quic_adisi@quicinc.com>

Per checkpatch:
WARNING: Reported-by: should be immediately followed by Closes: with a URL to the report
#17: 
Reported-by: Aditya Kumar Singh <quic_adisi@quicinc.com>

Is there a separate public bug report from Aditya?

> Reported-by: Zachary Smith <dr.z.smith@gmail.com>
> Closes: https://lore.kernel.org/all/CAM=znoFPcXrn5GhDmDmo50Syic3-hXpWvD+vkv8KX5o_ZTo8kQ@mail.gmail.com/
> Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
> ---
>  drivers/net/wireless/ath/ath12k/mac.c | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c
> index 2259ce22cc8b..fa9f6656a06f 100644
> --- a/drivers/net/wireless/ath/ath12k/mac.c
> +++ b/drivers/net/wireless/ath/ath12k/mac.c
> @@ -2255,9 +2255,6 @@ static int ath12k_get_smps_from_capa(const struct ieee80211_sta_ht_cap *ht_cap,
>  				     const struct ieee80211_he_6ghz_capa *he_6ghz_capa,
>  				     int *smps)
>  {
> -	if (!ht_cap->ht_supported && !he_6ghz_capa->capa)
> -		return -EOPNOTSUPP;
> -
>  	if (ht_cap->ht_supported)
>  		*smps = u16_get_bits(ht_cap->cap, IEEE80211_HT_CAP_SM_PS);
>  	else
> @@ -2277,6 +2274,9 @@ static void ath12k_peer_assoc_h_smps(struct ieee80211_sta *sta,
>  	const struct ieee80211_sta_ht_cap *ht_cap = &sta->deflink.ht_cap;
>  	int smps;
>  
> +	if (!ht_cap->ht_supported && !he_6ghz_capa->capa)
> +		return;
> +
>  	if (ath12k_get_smps_from_capa(ht_cap, he_6ghz_capa, &smps))
>  		return;
>  
> @@ -2756,6 +2756,9 @@ static int ath12k_setup_peer_smps(struct ath12k *ar, struct ath12k_vif *arvif,
>  {
>  	int smps, ret = 0;
>  
> +	if (!ht_cap->ht_supported && !he_6ghz_capa)
> +		return 0;
> +
>  	ret = ath12k_get_smps_from_capa(ht_cap, he_6ghz_capa, &smps);
>  	if (ret < 0)
>  		return ret;
> 
> base-commit: e72048809ec7355a947415ae6836d2eb7fdcda39



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] wifi: ath12k: fix legacy peer association due to missing HT or 6 GHz capabilities
  2024-06-13 15:42 ` Jeff Johnson
@ 2024-06-13 18:59   ` Pradeep Kumar Chitrapu
  2024-06-13 22:15     ` Jeff Johnson
  0 siblings, 1 reply; 6+ messages in thread
From: Pradeep Kumar Chitrapu @ 2024-06-13 18:59 UTC (permalink / raw)
  To: Jeff Johnson, ath12k; +Cc: linux-wireless, Aditya Kumar Singh, Zachary Smith



On 6/13/2024 8:42 AM, Jeff Johnson wrote:
> On 6/12/2024 3:53 PM, Pradeep Kumar Chitrapu wrote:
>> Currently SMPS configuration failed when the Information
>> Elements (IEs) did not contain HT or 6 GHz capabilities. This
>> caused legacy peer association to fail as legacy peers do not
>> have HT or 6 GHz capabilities. Fix this by not returning an
>> error when SMPS configuration fails due to the absence of HT
>> or 6 GHz capabilities.
>>
>> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
>>
>> Fixes: f0e61dc7ecf9 ("wifi: ath12k: refactor SMPS configuration")
>> Reported-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
> 
> Per checkpatch:
> WARNING: Reported-by: should be immediately followed by Closes: with a URL to the report
> #17:
> Reported-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
> 
> Is there a separate public bug report from Aditya?
Hi Jeff,
No, this was internal report and does not have weblink associated with 
it. Also, do not want to ignore reportee.

Thanks
Pradeep
> 
>> Reported-by: Zachary Smith <dr.z.smith@gmail.com>
>> Closes: https://lore.kernel.org/all/CAM=znoFPcXrn5GhDmDmo50Syic3-hXpWvD+vkv8KX5o_ZTo8kQ@mail.gmail.com/
>> Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
>> ---
>>   drivers/net/wireless/ath/ath12k/mac.c | 9 ++++++---
>>   1 file changed, 6 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c
>> index 2259ce22cc8b..fa9f6656a06f 100644
>> --- a/drivers/net/wireless/ath/ath12k/mac.c
>> +++ b/drivers/net/wireless/ath/ath12k/mac.c
>> @@ -2255,9 +2255,6 @@ static int ath12k_get_smps_from_capa(const struct ieee80211_sta_ht_cap *ht_cap,
>>   				     const struct ieee80211_he_6ghz_capa *he_6ghz_capa,
>>   				     int *smps)
>>   {
>> -	if (!ht_cap->ht_supported && !he_6ghz_capa->capa)
>> -		return -EOPNOTSUPP;
>> -
>>   	if (ht_cap->ht_supported)
>>   		*smps = u16_get_bits(ht_cap->cap, IEEE80211_HT_CAP_SM_PS);
>>   	else
>> @@ -2277,6 +2274,9 @@ static void ath12k_peer_assoc_h_smps(struct ieee80211_sta *sta,
>>   	const struct ieee80211_sta_ht_cap *ht_cap = &sta->deflink.ht_cap;
>>   	int smps;
>>   
>> +	if (!ht_cap->ht_supported && !he_6ghz_capa->capa)
>> +		return;
>> +
>>   	if (ath12k_get_smps_from_capa(ht_cap, he_6ghz_capa, &smps))
>>   		return;
>>   
>> @@ -2756,6 +2756,9 @@ static int ath12k_setup_peer_smps(struct ath12k *ar, struct ath12k_vif *arvif,
>>   {
>>   	int smps, ret = 0;
>>   
>> +	if (!ht_cap->ht_supported && !he_6ghz_capa)
>> +		return 0;
>> +
>>   	ret = ath12k_get_smps_from_capa(ht_cap, he_6ghz_capa, &smps);
>>   	if (ret < 0)
>>   		return ret;
>>
>> base-commit: e72048809ec7355a947415ae6836d2eb7fdcda39
> 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] wifi: ath12k: fix legacy peer association due to missing HT or 6 GHz capabilities
  2024-06-13 18:59   ` Pradeep Kumar Chitrapu
@ 2024-06-13 22:15     ` Jeff Johnson
  2024-06-17 10:43       ` Kalle Valo
  0 siblings, 1 reply; 6+ messages in thread
From: Jeff Johnson @ 2024-06-13 22:15 UTC (permalink / raw)
  To: Pradeep Kumar Chitrapu, ath12k
  Cc: linux-wireless, Aditya Kumar Singh, Zachary Smith

On 6/13/2024 11:59 AM, Pradeep Kumar Chitrapu wrote:
> 
> 
> On 6/13/2024 8:42 AM, Jeff Johnson wrote:
>> On 6/12/2024 3:53 PM, Pradeep Kumar Chitrapu wrote:
>>> Currently SMPS configuration failed when the Information
>>> Elements (IEs) did not contain HT or 6 GHz capabilities. This
>>> caused legacy peer association to fail as legacy peers do not
>>> have HT or 6 GHz capabilities. Fix this by not returning an
>>> error when SMPS configuration fails due to the absence of HT
>>> or 6 GHz capabilities.
>>>
>>> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
>>>
>>> Fixes: f0e61dc7ecf9 ("wifi: ath12k: refactor SMPS configuration")
>>> Reported-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
>>
>> Per checkpatch:
>> WARNING: Reported-by: should be immediately followed by Closes: with a URL to the report
>> #17:
>> Reported-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
>>
>> Is there a separate public bug report from Aditya?
> Hi Jeff,
> No, this was internal report and does not have weblink associated with 
> it. Also, do not want to ignore reportee.

I'm unsure what do do here since there is a requirement that an acknowledged
reporter have a public link to the bug report.

Note that normally internally reported issues are not acknowledged in this manner.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] wifi: ath12k: fix legacy peer association due to missing HT or 6 GHz capabilities
  2024-06-13 22:15     ` Jeff Johnson
@ 2024-06-17 10:43       ` Kalle Valo
  0 siblings, 0 replies; 6+ messages in thread
From: Kalle Valo @ 2024-06-17 10:43 UTC (permalink / raw)
  To: Jeff Johnson
  Cc: Pradeep Kumar Chitrapu, ath12k, linux-wireless,
	Aditya Kumar Singh, Zachary Smith

Jeff Johnson <quic_jjohnson@quicinc.com> writes:

> On 6/13/2024 11:59 AM, Pradeep Kumar Chitrapu wrote:
>
>> 
>> 
>> On 6/13/2024 8:42 AM, Jeff Johnson wrote:
>>> On 6/12/2024 3:53 PM, Pradeep Kumar Chitrapu wrote:
>>>> Currently SMPS configuration failed when the Information
>>>> Elements (IEs) did not contain HT or 6 GHz capabilities. This
>>>> caused legacy peer association to fail as legacy peers do not
>>>> have HT or 6 GHz capabilities. Fix this by not returning an
>>>> error when SMPS configuration fails due to the absence of HT
>>>> or 6 GHz capabilities.
>>>>
>>>> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
>>>>
>>>> Fixes: f0e61dc7ecf9 ("wifi: ath12k: refactor SMPS configuration")
>>>> Reported-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
>>>
>>> Per checkpatch:
>>> WARNING: Reported-by: should be immediately followed by Closes:
>>> with a URL to the report
>>> #17:
>>> Reported-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
>>>
>>> Is there a separate public bug report from Aditya?
>> Hi Jeff,
>> No, this was internal report and does not have weblink associated with 
>> it. Also, do not want to ignore reportee.
>
> I'm unsure what do do here since there is a requirement that an acknowledged
> reporter have a public link to the bug report.

I think it's ok to ignore this checkpatch warning. Reported-by without a
closes tag should be fine.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] wifi: ath12k: fix legacy peer association due to missing HT or 6 GHz capabilities
  2024-06-12 22:53 [PATCH] wifi: ath12k: fix legacy peer association due to missing HT or 6 GHz capabilities Pradeep Kumar Chitrapu
  2024-06-13 15:42 ` Jeff Johnson
@ 2024-06-19 14:02 ` Kalle Valo
  1 sibling, 0 replies; 6+ messages in thread
From: Kalle Valo @ 2024-06-19 14:02 UTC (permalink / raw)
  To: Pradeep Kumar Chitrapu
  Cc: ath12k, linux-wireless, Pradeep Kumar Chitrapu,
	Aditya Kumar Singh, Zachary Smith

Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com> wrote:

> Currently SMPS configuration failed when the Information
> Elements (IEs) did not contain HT or 6 GHz capabilities. This
> caused legacy peer association to fail as legacy peers do not
> have HT or 6 GHz capabilities. Fix this by not returning an
> error when SMPS configuration fails due to the absence of HT
> or 6 GHz capabilities.
> 
> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
> 
> Fixes: f0e61dc7ecf9 ("wifi: ath12k: refactor SMPS configuration")
> Reported-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
> Reported-by: Zachary Smith <dr.z.smith@gmail.com>
> Closes: https://lore.kernel.org/all/CAM=znoFPcXrn5GhDmDmo50Syic3-hXpWvD+vkv8KX5o_ZTo8kQ@mail.gmail.com/
> Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
> Reported-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>

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

3005c63a3673 wifi: ath12k: fix legacy peer association due to missing HT or 6 GHz capabilities

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20240612225336.2303119-1-quic_pradeepc@quicinc.com/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-06-19 14:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-12 22:53 [PATCH] wifi: ath12k: fix legacy peer association due to missing HT or 6 GHz capabilities Pradeep Kumar Chitrapu
2024-06-13 15:42 ` Jeff Johnson
2024-06-13 18:59   ` Pradeep Kumar Chitrapu
2024-06-13 22:15     ` Jeff Johnson
2024-06-17 10:43       ` Kalle Valo
2024-06-19 14:02 ` Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox