public inbox for ath12k@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] wifi: ath12k: enable service flag for survey dump stats
@ 2024-04-09 17:56 Karthikeyan Kathirvel
  2024-04-10  0:07 ` Jeff Johnson
  0 siblings, 1 reply; 5+ messages in thread
From: Karthikeyan Kathirvel @ 2024-04-09 17:56 UTC (permalink / raw)
  To: ath12k; +Cc: linux-wireless, Thiraviyam Mariyappan, Karthikeyan Kathirvel

From: Thiraviyam Mariyappan <quic_tmariyap@quicinc.com>

The survey dump statistics does not display channel RX and TX time
properly because the survey flag is not enabled in the firmware service
flag.

If firmware supports enable the service flag "bss_chan_info" in
wmi_resource_config to fetch and print the stats for specific pdev.

Enabling WMI_RSRC_CFG_FLAG1_BSS_CHANNEL_INFO_64 does not have any impact
on WCN7850 since this bit is not utilized by the WCN7850 firmware.

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

Signed-off-by: Thiraviyam Mariyappan <quic_tmariyap@quicinc.com>
Signed-off-by: Karthikeyan Kathirvel <quic_kathirve@quicinc.com>
---
 drivers/net/wireless/ath/ath12k/wmi.c | 3 ++-
 drivers/net/wireless/ath/ath12k/wmi.h | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath12k/wmi.c b/drivers/net/wireless/ath/ath12k/wmi.c
index a5575ce9eed4..16504786735a 100644
--- a/drivers/net/wireless/ath/ath12k/wmi.c
+++ b/drivers/net/wireless/ath/ath12k/wmi.c
@@ -3324,7 +3324,8 @@ ath12k_wmi_copy_resource_config(struct ath12k_wmi_resource_config_params *wmi_cf
 	wmi_cfg->bpf_instruction_size = cpu_to_le32(tg_cfg->bpf_instruction_size);
 	wmi_cfg->max_bssid_rx_filters = cpu_to_le32(tg_cfg->max_bssid_rx_filters);
 	wmi_cfg->use_pdev_id = cpu_to_le32(tg_cfg->use_pdev_id);
-	wmi_cfg->flag1 = cpu_to_le32(tg_cfg->atf_config);
+	wmi_cfg->flag1 = cpu_to_le32(tg_cfg->atf_config) |
+				     WMI_RSRC_CFG_FLAG1_BSS_CHANNEL_INFO_64;
 	wmi_cfg->peer_map_unmap_version = cpu_to_le32(tg_cfg->peer_map_unmap_version);
 	wmi_cfg->sched_params = cpu_to_le32(tg_cfg->sched_params);
 	wmi_cfg->twt_ap_pdev_count = cpu_to_le32(tg_cfg->twt_ap_pdev_count);
diff --git a/drivers/net/wireless/ath/ath12k/wmi.h b/drivers/net/wireless/ath/ath12k/wmi.h
index 78afc94a815d..1283d25b5cc4 100644
--- a/drivers/net/wireless/ath/ath12k/wmi.h
+++ b/drivers/net/wireless/ath/ath12k/wmi.h
@@ -2400,6 +2400,7 @@ struct wmi_init_cmd {
 
 #define WMI_RSRC_CFG_HOST_SVC_FLAG_REG_CC_EXT_SUPPORT_BIT 4
 #define WMI_RSRC_CFG_FLAGS2_RX_PEER_METADATA_VERSION		GENMASK(5, 4)
+#define WMI_RSRC_CFG_FLAG1_BSS_CHANNEL_INFO_64	BIT(5)
 
 struct ath12k_wmi_resource_config_params {
 	__le32 tlv_header;

base-commit: b36766befd306a606f287b0c0f0e53d994516acb
-- 
2.34.1



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

* Re: [PATCH] wifi: ath12k: enable service flag for survey dump stats
  2024-04-09 17:56 [PATCH] wifi: ath12k: enable service flag for survey dump stats Karthikeyan Kathirvel
@ 2024-04-10  0:07 ` Jeff Johnson
  2024-04-10  8:50   ` Karthikeyan Kathirvel
  0 siblings, 1 reply; 5+ messages in thread
From: Jeff Johnson @ 2024-04-10  0:07 UTC (permalink / raw)
  To: Karthikeyan Kathirvel, ath12k; +Cc: linux-wireless, Thiraviyam Mariyappan

On 4/9/2024 10:56 AM, Karthikeyan Kathirvel wrote:
> From: Thiraviyam Mariyappan <quic_tmariyap@quicinc.com>
> 
> The survey dump statistics does not display channel RX and TX time
> properly because the survey flag is not enabled in the firmware service
> flag.
> 
> If firmware supports enable the service flag "bss_chan_info" in
> wmi_resource_config to fetch and print the stats for specific pdev.
> 
> Enabling WMI_RSRC_CFG_FLAG1_BSS_CHANNEL_INFO_64 does not have any impact
> on WCN7850 since this bit is not utilized by the WCN7850 firmware.
> 
> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
> 
> Signed-off-by: Thiraviyam Mariyappan <quic_tmariyap@quicinc.com>
> Signed-off-by: Karthikeyan Kathirvel <quic_kathirve@quicinc.com>
> ---
>  drivers/net/wireless/ath/ath12k/wmi.c | 3 ++-
>  drivers/net/wireless/ath/ath12k/wmi.h | 1 +
>  2 files changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/wireless/ath/ath12k/wmi.c b/drivers/net/wireless/ath/ath12k/wmi.c
> index a5575ce9eed4..16504786735a 100644
> --- a/drivers/net/wireless/ath/ath12k/wmi.c
> +++ b/drivers/net/wireless/ath/ath12k/wmi.c
> @@ -3324,7 +3324,8 @@ ath12k_wmi_copy_resource_config(struct ath12k_wmi_resource_config_params *wmi_cf
>  	wmi_cfg->bpf_instruction_size = cpu_to_le32(tg_cfg->bpf_instruction_size);
>  	wmi_cfg->max_bssid_rx_filters = cpu_to_le32(tg_cfg->max_bssid_rx_filters);
>  	wmi_cfg->use_pdev_id = cpu_to_le32(tg_cfg->use_pdev_id);
> -	wmi_cfg->flag1 = cpu_to_le32(tg_cfg->atf_config);
> +	wmi_cfg->flag1 = cpu_to_le32(tg_cfg->atf_config) |
> +				     WMI_RSRC_CFG_FLAG1_BSS_CHANNEL_INFO_64;

shouldn't that | operation be inside the ) ?

>  	wmi_cfg->peer_map_unmap_version = cpu_to_le32(tg_cfg->peer_map_unmap_version);
>  	wmi_cfg->sched_params = cpu_to_le32(tg_cfg->sched_params);
>  	wmi_cfg->twt_ap_pdev_count = cpu_to_le32(tg_cfg->twt_ap_pdev_count);
> diff --git a/drivers/net/wireless/ath/ath12k/wmi.h b/drivers/net/wireless/ath/ath12k/wmi.h
> index 78afc94a815d..1283d25b5cc4 100644
> --- a/drivers/net/wireless/ath/ath12k/wmi.h
> +++ b/drivers/net/wireless/ath/ath12k/wmi.h
> @@ -2400,6 +2400,7 @@ struct wmi_init_cmd {
>  
>  #define WMI_RSRC_CFG_HOST_SVC_FLAG_REG_CC_EXT_SUPPORT_BIT 4
>  #define WMI_RSRC_CFG_FLAGS2_RX_PEER_METADATA_VERSION		GENMASK(5, 4)
> +#define WMI_RSRC_CFG_FLAG1_BSS_CHANNEL_INFO_64	BIT(5)
>  
>  struct ath12k_wmi_resource_config_params {
>  	__le32 tlv_header;
> 
> base-commit: b36766befd306a606f287b0c0f0e53d994516acb



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

* Re: [PATCH] wifi: ath12k: enable service flag for survey dump stats
  2024-04-10  0:07 ` Jeff Johnson
@ 2024-04-10  8:50   ` Karthikeyan Kathirvel
  2024-04-10  9:02     ` Kalle Valo
  0 siblings, 1 reply; 5+ messages in thread
From: Karthikeyan Kathirvel @ 2024-04-10  8:50 UTC (permalink / raw)
  To: Jeff Johnson, ath12k; +Cc: linux-wireless, Thiraviyam Mariyappan



On 4/10/2024 5:37 AM, Jeff Johnson wrote:
> On 4/9/2024 10:56 AM, Karthikeyan Kathirvel wrote:
>> From: Thiraviyam Mariyappan <quic_tmariyap@quicinc.com>
>>
>> The survey dump statistics does not display channel RX and TX time
>> properly because the survey flag is not enabled in the firmware service
>> flag.
>>
>> If firmware supports enable the service flag "bss_chan_info" in
>> wmi_resource_config to fetch and print the stats for specific pdev.
>>
>> Enabling WMI_RSRC_CFG_FLAG1_BSS_CHANNEL_INFO_64 does not have any impact
>> on WCN7850 since this bit is not utilized by the WCN7850 firmware.
>>
>> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
>>
>> Signed-off-by: Thiraviyam Mariyappan <quic_tmariyap@quicinc.com>
>> Signed-off-by: Karthikeyan Kathirvel <quic_kathirve@quicinc.com>
>> ---
>>   drivers/net/wireless/ath/ath12k/wmi.c | 3 ++-
>>   drivers/net/wireless/ath/ath12k/wmi.h | 1 +
>>   2 files changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/net/wireless/ath/ath12k/wmi.c b/drivers/net/wireless/ath/ath12k/wmi.c
>> index a5575ce9eed4..16504786735a 100644
>> --- a/drivers/net/wireless/ath/ath12k/wmi.c
>> +++ b/drivers/net/wireless/ath/ath12k/wmi.c
>> @@ -3324,7 +3324,8 @@ ath12k_wmi_copy_resource_config(struct ath12k_wmi_resource_config_params *wmi_cf
>>   	wmi_cfg->bpf_instruction_size = cpu_to_le32(tg_cfg->bpf_instruction_size);
>>   	wmi_cfg->max_bssid_rx_filters = cpu_to_le32(tg_cfg->max_bssid_rx_filters);
>>   	wmi_cfg->use_pdev_id = cpu_to_le32(tg_cfg->use_pdev_id);
>> -	wmi_cfg->flag1 = cpu_to_le32(tg_cfg->atf_config);
>> +	wmi_cfg->flag1 = cpu_to_le32(tg_cfg->atf_config) |
>> +				     WMI_RSRC_CFG_FLAG1_BSS_CHANNEL_INFO_64;
> 
> shouldn't that | operation be inside the ) ?
Yes, will address in next version, thanks for the review Jeff

> 
>>   	wmi_cfg->peer_map_unmap_version = cpu_to_le32(tg_cfg->peer_map_unmap_version);
>>   	wmi_cfg->sched_params = cpu_to_le32(tg_cfg->sched_params);
>>   	wmi_cfg->twt_ap_pdev_count = cpu_to_le32(tg_cfg->twt_ap_pdev_count);
>> diff --git a/drivers/net/wireless/ath/ath12k/wmi.h b/drivers/net/wireless/ath/ath12k/wmi.h
>> index 78afc94a815d..1283d25b5cc4 100644
>> --- a/drivers/net/wireless/ath/ath12k/wmi.h
>> +++ b/drivers/net/wireless/ath/ath12k/wmi.h
>> @@ -2400,6 +2400,7 @@ struct wmi_init_cmd {
>>   
>>   #define WMI_RSRC_CFG_HOST_SVC_FLAG_REG_CC_EXT_SUPPORT_BIT 4
>>   #define WMI_RSRC_CFG_FLAGS2_RX_PEER_METADATA_VERSION		GENMASK(5, 4)
>> +#define WMI_RSRC_CFG_FLAG1_BSS_CHANNEL_INFO_64	BIT(5)
>>   
>>   struct ath12k_wmi_resource_config_params {
>>   	__le32 tlv_header;
>>
>> base-commit: b36766befd306a606f287b0c0f0e53d994516acb
> 


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

* Re: [PATCH] wifi: ath12k: enable service flag for survey dump stats
  2024-04-10  8:50   ` Karthikeyan Kathirvel
@ 2024-04-10  9:02     ` Kalle Valo
  2024-04-10 12:05       ` Karthikeyan Kathirvel
  0 siblings, 1 reply; 5+ messages in thread
From: Kalle Valo @ 2024-04-10  9:02 UTC (permalink / raw)
  To: Karthikeyan Kathirvel
  Cc: Jeff Johnson, ath12k, linux-wireless, Thiraviyam Mariyappan

Karthikeyan Kathirvel <quic_kathirve@quicinc.com> writes:

> On 4/10/2024 5:37 AM, Jeff Johnson wrote:
>> On 4/9/2024 10:56 AM, Karthikeyan Kathirvel wrote:
>>> From: Thiraviyam Mariyappan <quic_tmariyap@quicinc.com>
>>>
>>> The survey dump statistics does not display channel RX and TX time
>>> properly because the survey flag is not enabled in the firmware service
>>> flag.
>>>
>>> If firmware supports enable the service flag "bss_chan_info" in
>>> wmi_resource_config to fetch and print the stats for specific pdev.
>>>
>>> Enabling WMI_RSRC_CFG_FLAG1_BSS_CHANNEL_INFO_64 does not have any impact
>>> on WCN7850 since this bit is not utilized by the WCN7850 firmware.
>>>
>>> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
>>>
>>> Signed-off-by: Thiraviyam Mariyappan <quic_tmariyap@quicinc.com>
>>> Signed-off-by: Karthikeyan Kathirvel <quic_kathirve@quicinc.com>
>>> ---
>>>   drivers/net/wireless/ath/ath12k/wmi.c | 3 ++-
>>>   drivers/net/wireless/ath/ath12k/wmi.h | 1 +
>>>   2 files changed, 3 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/net/wireless/ath/ath12k/wmi.c b/drivers/net/wireless/ath/ath12k/wmi.c
>>> index a5575ce9eed4..16504786735a 100644
>>> --- a/drivers/net/wireless/ath/ath12k/wmi.c
>>> +++ b/drivers/net/wireless/ath/ath12k/wmi.c
>>> @@ -3324,7 +3324,8 @@ ath12k_wmi_copy_resource_config(struct ath12k_wmi_resource_config_params *wmi_cf
>>>   	wmi_cfg->bpf_instruction_size = cpu_to_le32(tg_cfg->bpf_instruction_size);
>>>   	wmi_cfg->max_bssid_rx_filters = cpu_to_le32(tg_cfg->max_bssid_rx_filters);
>>>   	wmi_cfg->use_pdev_id = cpu_to_le32(tg_cfg->use_pdev_id);
>>> -	wmi_cfg->flag1 = cpu_to_le32(tg_cfg->atf_config);
>>> +	wmi_cfg->flag1 = cpu_to_le32(tg_cfg->atf_config) |
>>> +				     WMI_RSRC_CFG_FLAG1_BSS_CHANNEL_INFO_64;
>> shouldn't that | operation be inside the ) ?
> Yes, will address in next version, thanks for the review Jeff

BTW ath12k-check should catch these kind of errors. Didn't it warn about
it or did you just skip running ath12k-check?

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

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


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

* Re: [PATCH] wifi: ath12k: enable service flag for survey dump stats
  2024-04-10  9:02     ` Kalle Valo
@ 2024-04-10 12:05       ` Karthikeyan Kathirvel
  0 siblings, 0 replies; 5+ messages in thread
From: Karthikeyan Kathirvel @ 2024-04-10 12:05 UTC (permalink / raw)
  To: Kalle Valo; +Cc: Jeff Johnson, ath12k, linux-wireless, Thiraviyam Mariyappan



On 4/10/2024 2:32 PM, Kalle Valo wrote:
> Karthikeyan Kathirvel <quic_kathirve@quicinc.com> writes:
> 
>> On 4/10/2024 5:37 AM, Jeff Johnson wrote:
>>> On 4/9/2024 10:56 AM, Karthikeyan Kathirvel wrote:
>>>> From: Thiraviyam Mariyappan <quic_tmariyap@quicinc.com>
>>>>
>>>> The survey dump statistics does not display channel RX and TX time
>>>> properly because the survey flag is not enabled in the firmware service
>>>> flag.
>>>>
>>>> If firmware supports enable the service flag "bss_chan_info" in
>>>> wmi_resource_config to fetch and print the stats for specific pdev.
>>>>
>>>> Enabling WMI_RSRC_CFG_FLAG1_BSS_CHANNEL_INFO_64 does not have any impact
>>>> on WCN7850 since this bit is not utilized by the WCN7850 firmware.
>>>>
>>>> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
>>>>
>>>> Signed-off-by: Thiraviyam Mariyappan <quic_tmariyap@quicinc.com>
>>>> Signed-off-by: Karthikeyan Kathirvel <quic_kathirve@quicinc.com>
>>>> ---
>>>>    drivers/net/wireless/ath/ath12k/wmi.c | 3 ++-
>>>>    drivers/net/wireless/ath/ath12k/wmi.h | 1 +
>>>>    2 files changed, 3 insertions(+), 1 deletion(-)
>>>>
>>>> diff --git a/drivers/net/wireless/ath/ath12k/wmi.c b/drivers/net/wireless/ath/ath12k/wmi.c
>>>> index a5575ce9eed4..16504786735a 100644
>>>> --- a/drivers/net/wireless/ath/ath12k/wmi.c
>>>> +++ b/drivers/net/wireless/ath/ath12k/wmi.c
>>>> @@ -3324,7 +3324,8 @@ ath12k_wmi_copy_resource_config(struct ath12k_wmi_resource_config_params *wmi_cf
>>>>    	wmi_cfg->bpf_instruction_size = cpu_to_le32(tg_cfg->bpf_instruction_size);
>>>>    	wmi_cfg->max_bssid_rx_filters = cpu_to_le32(tg_cfg->max_bssid_rx_filters);
>>>>    	wmi_cfg->use_pdev_id = cpu_to_le32(tg_cfg->use_pdev_id);
>>>> -	wmi_cfg->flag1 = cpu_to_le32(tg_cfg->atf_config);
>>>> +	wmi_cfg->flag1 = cpu_to_le32(tg_cfg->atf_config) |
>>>> +				     WMI_RSRC_CFG_FLAG1_BSS_CHANNEL_INFO_64;
>>> shouldn't that | operation be inside the ) ?
>> Yes, will address in next version, thanks for the review Jeff
> 
> BTW ath12k-check should catch these kind of errors. Didn't it warn about
> it or did you just skip running ath12k-check?
> 
I was using checkpatch.pl alone, now moved to ath12k-check, ath12k-check 
warnings are fixed in "[PATCH v2] wifi: ath12k: enable service flag for 
survey dump stats"


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

end of thread, other threads:[~2024-04-10 12:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-09 17:56 [PATCH] wifi: ath12k: enable service flag for survey dump stats Karthikeyan Kathirvel
2024-04-10  0:07 ` Jeff Johnson
2024-04-10  8:50   ` Karthikeyan Kathirvel
2024-04-10  9:02     ` Kalle Valo
2024-04-10 12:05       ` Karthikeyan Kathirvel

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