mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] wifi: ath12k: fix layout of scan_flags in struct ath12k_wmi_scan_req_arg
@ 2023-11-27 18:04 Nicolas Escande
  2023-11-27 20:20 ` Jeff Johnson
  0 siblings, 1 reply; 2+ messages in thread
From: Nicolas Escande @ 2023-11-27 18:04 UTC (permalink / raw)
  To: Kalle Valo, Jeff Johnson; +Cc: linux-wireless, linux-kernel, Nicolas Escande

There is a layout mismatch between the bitfield representing scan_flags in
struct ath12k_wmi_scan_req_arg & the bits as defined in the WMI_SCAN_XXX
macros. Fix it by making the biefield match de #define values.

I especialy checked by adding WMI_SCAN_FLAG_FORCE_ACTIVE_ON_DFS to
scan_flags and the firmware started to unconditionnaly send probe request
on DFS channels during scan.

Tested-on: QCN9274 hw2.0 PCI CI_WLAN.WBE.1.2.1-00148.1-QCAHKSWPL_SILICONZ-7

Signed-off-by: Nicolas Escande <nico.escande@gmail.com>
---
 drivers/net/wireless/ath/ath12k/wmi.h | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/ath/ath12k/wmi.h b/drivers/net/wireless/ath/ath12k/wmi.h
index 629373d67421..2b5b46f8898e 100644
--- a/drivers/net/wireless/ath/ath12k/wmi.h
+++ b/drivers/net/wireless/ath/ath12k/wmi.h
@@ -3307,17 +3307,17 @@ struct ath12k_wmi_scan_req_arg {
 			    scan_f_filter_prb_req:1,
 			    scan_f_bypass_dfs_chn:1,
 			    scan_f_continue_on_err:1,
+			    scan_f_promisc_mode:1,
+			    scan_f_force_active_dfs_chn:1,
+			    scan_f_add_tpc_ie_in_probe:1,
+			    scan_f_add_ds_ie_in_probe:1,
+			    scan_f_add_spoofed_mac_in_probe:1,
 			    scan_f_offchan_mgmt_tx:1,
 			    scan_f_offchan_data_tx:1,
-			    scan_f_promisc_mode:1,
 			    scan_f_capture_phy_err:1,
 			    scan_f_strict_passive_pch:1,
 			    scan_f_half_rate:1,
 			    scan_f_quarter_rate:1,
-			    scan_f_force_active_dfs_chn:1,
-			    scan_f_add_tpc_ie_in_probe:1,
-			    scan_f_add_ds_ie_in_probe:1,
-			    scan_f_add_spoofed_mac_in_probe:1,
 			    scan_f_add_rand_seq_in_probe:1,
 			    scan_f_en_ie_whitelist_in_probe:1,
 			    scan_f_forced:1,
-- 
2.43.0


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

* Re: [PATCH] wifi: ath12k: fix layout of scan_flags in struct ath12k_wmi_scan_req_arg
  2023-11-27 18:04 [PATCH] wifi: ath12k: fix layout of scan_flags in struct ath12k_wmi_scan_req_arg Nicolas Escande
@ 2023-11-27 20:20 ` Jeff Johnson
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Johnson @ 2023-11-27 20:20 UTC (permalink / raw)
  To: Nicolas Escande, Kalle Valo; +Cc: linux-wireless, linux-kernel, ath12k

On 11/27/2023 10:04 AM, Nicolas Escande wrote:
> There is a layout mismatch between the bitfield representing scan_flags in
> struct ath12k_wmi_scan_req_arg & the bits as defined in the WMI_SCAN_XXX
> macros. Fix it by making the biefield match de #define values.
> 
> I especialy checked by adding WMI_SCAN_FLAG_FORCE_ACTIVE_ON_DFS to
> scan_flags and the firmware started to unconditionnaly send probe request
> on DFS channels during scan.
> 
> Tested-on: QCN9274 hw2.0 PCI CI_WLAN.WBE.1.2.1-00148.1-QCAHKSWPL_SILICONZ-7
> 
> Signed-off-by: Nicolas Escande <nico.escande@gmail.com>
> ---
>  drivers/net/wireless/ath/ath12k/wmi.h | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/net/wireless/ath/ath12k/wmi.h b/drivers/net/wireless/ath/ath12k/wmi.h
> index 629373d67421..2b5b46f8898e 100644
> --- a/drivers/net/wireless/ath/ath12k/wmi.h
> +++ b/drivers/net/wireless/ath/ath12k/wmi.h
> @@ -3307,17 +3307,17 @@ struct ath12k_wmi_scan_req_arg {
>  			    scan_f_filter_prb_req:1,
>  			    scan_f_bypass_dfs_chn:1,
>  			    scan_f_continue_on_err:1,
> +			    scan_f_promisc_mode:1,
> +			    scan_f_force_active_dfs_chn:1,
> +			    scan_f_add_tpc_ie_in_probe:1,
> +			    scan_f_add_ds_ie_in_probe:1,
> +			    scan_f_add_spoofed_mac_in_probe:1,
>  			    scan_f_offchan_mgmt_tx:1,
>  			    scan_f_offchan_data_tx:1,
> -			    scan_f_promisc_mode:1,
>  			    scan_f_capture_phy_err:1,
>  			    scan_f_strict_passive_pch:1,
>  			    scan_f_half_rate:1,
>  			    scan_f_quarter_rate:1,
> -			    scan_f_force_active_dfs_chn:1,
> -			    scan_f_add_tpc_ie_in_probe:1,
> -			    scan_f_add_ds_ie_in_probe:1,
> -			    scan_f_add_spoofed_mac_in_probe:1,
>  			    scan_f_add_rand_seq_in_probe:1,
>  			    scan_f_en_ie_whitelist_in_probe:1,
>  			    scan_f_forced:1,

+ath12k mailing list

Repeating my same message from the ath11k patch:

You are convoluting two different data structures.

struct ath12k_wmi_scan_req_arg is used to represent a scan request
within the host driver. This does not use the WMI_SCAN_XXX macros.

struct wmi_start_scan_cmd is used to represent the scan request command
sent to firmware. This struct uses the WMI_SCAN_XXX macros to fill some
members of this struct in ath12k_wmi_copy_scan_event_cntrl_flags().

So your change has no effect on the driver operation and incorrectly
tries to foist the firmware definition upon the host internal
representation.

So NAK to this patch.

/jeff

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

end of thread, other threads:[~2023-11-27 20:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-27 18:04 [PATCH] wifi: ath12k: fix layout of scan_flags in struct ath12k_wmi_scan_req_arg Nicolas Escande
2023-11-27 20:20 ` Jeff Johnson

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

all inboxes | Powered by JetHome®