* [PATCH 0/2] CLeanup scan_flags from struct ath12k_wmi_scan_req_arg
@ 2024-02-11 14:55 Nicolas Escande
2024-02-11 14:55 ` [PATCH 1/2] wifi: ath12k: Do not use " Nicolas Escande
2024-02-11 14:55 ` [PATCH 2/2] wifi: ath12k: Remove unused " Nicolas Escande
0 siblings, 2 replies; 6+ messages in thread
From: Nicolas Escande @ 2024-02-11 14:55 UTC (permalink / raw)
To: ath12k; +Cc: linux-wireless
As previously done for ath11k (see [1] lets fixup struct ath12k_wmi_scan_req_arg
to remove the scan_flags member. This prevent future use of out of sync
WMI_SCAN_XXX defines & their corresponding scan_f_xxx corresponding bitfields
[1] https://lore.kernel.org/all/20240209113536.266822-1-nico.escande@gmail.com/
Nicolas Escande (2):
wifi: ath12k: do not use scan_flags from struct
wifi: ath12k: Remove unused scan_flags from struct
drivers/net/wireless/ath/ath12k/mac.c | 4 +-
drivers/net/wireless/ath/ath12k/wmi.c | 2 +-
drivers/net/wireless/ath/ath12k/wmi.h | 55 ++++++++++++---------------
3 files changed, 28 insertions(+), 33 deletions(-)
--
2.43.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/2] wifi: ath12k: Do not use scan_flags from struct ath12k_wmi_scan_req_arg
2024-02-11 14:55 [PATCH 0/2] CLeanup scan_flags from struct ath12k_wmi_scan_req_arg Nicolas Escande
@ 2024-02-11 14:55 ` Nicolas Escande
2024-02-12 18:50 ` Jeff Johnson
2024-02-14 8:17 ` Kalle Valo
2024-02-11 14:55 ` [PATCH 2/2] wifi: ath12k: Remove unused " Nicolas Escande
1 sibling, 2 replies; 6+ messages in thread
From: Nicolas Escande @ 2024-02-11 14:55 UTC (permalink / raw)
To: ath12k; +Cc: linux-wireless
As discussed in [1] to fix the mismatch between the WMI_SCAN_XXX macros &
their corresponding scan_f_xxx bitfield equivalent, lets stop using the
scan_flags in the union altogether.
[1] https://lore.kernel.org/all/4be7d62e-cb59-462d-aac2-94e27efc22ff@quicinc.com/
Tested-on: QCN9274 hw2.0 PCI CI_WLAN.WBE.1.3-02907.1-QCAHKSWPL_SILICONZ-10
Signed-off-by: Nicolas Escande <nico.escande@gmail.com>
---
drivers/net/wireless/ath/ath12k/mac.c | 4 ++--
drivers/net/wireless/ath/ath12k/wmi.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c
index a737a09a0b9c..7d3f5321a36d 100644
--- a/drivers/net/wireless/ath/ath12k/mac.c
+++ b/drivers/net/wireless/ath/ath12k/mac.c
@@ -3201,7 +3201,7 @@ static int ath12k_mac_op_hw_scan(struct ieee80211_hw *hw,
for (i = 0; i < arg.num_ssids; i++)
arg.ssid[i] = req->ssids[i];
} else {
- arg.scan_flags |= WMI_SCAN_FLAG_PASSIVE;
+ arg.scan_f_passive = 1;
}
if (req->n_channels) {
@@ -7555,7 +7555,7 @@ static int ath12k_mac_op_remain_on_channel(struct ieee80211_hw *hw,
arg.dwell_time_active = scan_time_msec;
arg.dwell_time_passive = scan_time_msec;
arg.max_scan_time = scan_time_msec;
- arg.scan_flags |= WMI_SCAN_FLAG_PASSIVE;
+ arg.scan_f_passive = 1;
arg.burst_duration = duration;
ret = ath12k_start_scan(ar, &arg);
diff --git a/drivers/net/wireless/ath/ath12k/wmi.c b/drivers/net/wireless/ath/ath12k/wmi.c
index 84d7d6584fba..2c2a010d88df 100644
--- a/drivers/net/wireless/ath/ath12k/wmi.c
+++ b/drivers/net/wireless/ath/ath12k/wmi.c
@@ -2194,7 +2194,7 @@ void ath12k_wmi_start_scan_init(struct ath12k *ar,
WMI_SCAN_EVENT_BSS_CHANNEL |
WMI_SCAN_EVENT_FOREIGN_CHAN |
WMI_SCAN_EVENT_DEQUEUED;
- arg->scan_flags |= WMI_SCAN_CHAN_STAT_EVENT;
+ arg->scan_f_chan_stat_evnt = 1;
arg->num_bssid = 1;
/* fill bssid_list[0] with 0xff, otherwise bssid and RA will be
--
2.43.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] wifi: ath12k: Remove unused scan_flags from struct ath12k_wmi_scan_req_arg
2024-02-11 14:55 [PATCH 0/2] CLeanup scan_flags from struct ath12k_wmi_scan_req_arg Nicolas Escande
2024-02-11 14:55 ` [PATCH 1/2] wifi: ath12k: Do not use " Nicolas Escande
@ 2024-02-11 14:55 ` Nicolas Escande
2024-02-12 18:50 ` Jeff Johnson
1 sibling, 1 reply; 6+ messages in thread
From: Nicolas Escande @ 2024-02-11 14:55 UTC (permalink / raw)
To: ath12k; +Cc: linux-wireless
As we did for ath11k lets remove the unused scan_flags from struct
ath12k_wmi_scan_req_arg. This will prevent us from using out of sync values
between WMI_SCAN_XXX & scan_f_xxx bitfield.
While at it remove the underlying wrapping struct/union construct as it serves
no purpose anymore.
Signed-off-by: Nicolas Escande <nico.escande@gmail.com>
---
drivers/net/wireless/ath/ath12k/wmi.h | 55 ++++++++++++---------------
1 file changed, 25 insertions(+), 30 deletions(-)
diff --git a/drivers/net/wireless/ath/ath12k/wmi.h b/drivers/net/wireless/ath/ath12k/wmi.h
index 4bd1d0f270a1..892f21f95ee5 100644
--- a/drivers/net/wireless/ath/ath12k/wmi.h
+++ b/drivers/net/wireless/ath/ath12k/wmi.h
@@ -3311,36 +3311,31 @@ struct ath12k_wmi_scan_req_arg {
u32 idle_time;
u32 max_scan_time;
u32 probe_delay;
- union {
- struct {
- u32 scan_f_passive:1,
- scan_f_bcast_probe:1,
- scan_f_cck_rates:1,
- scan_f_ofdm_rates:1,
- scan_f_chan_stat_evnt:1,
- scan_f_filter_prb_req:1,
- scan_f_bypass_dfs_chn:1,
- scan_f_continue_on_err: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,
- scan_f_2ghz:1,
- scan_f_5ghz:1,
- scan_f_80mhz:1;
- };
- u32 scan_flags;
- };
+ u32 scan_f_passive:1,
+ scan_f_bcast_probe:1,
+ scan_f_cck_rates:1,
+ scan_f_ofdm_rates:1,
+ scan_f_chan_stat_evnt:1,
+ scan_f_filter_prb_req:1,
+ scan_f_bypass_dfs_chn:1,
+ scan_f_continue_on_err: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,
+ scan_f_2ghz:1,
+ scan_f_5ghz:1,
+ scan_f_80mhz:1;
enum scan_dwelltime_adaptive_mode adaptive_dwell_time_mode;
u32 burst_duration;
u32 num_chan;
--
2.43.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] wifi: ath12k: Do not use scan_flags from struct ath12k_wmi_scan_req_arg
2024-02-11 14:55 ` [PATCH 1/2] wifi: ath12k: Do not use " Nicolas Escande
@ 2024-02-12 18:50 ` Jeff Johnson
2024-02-14 8:17 ` Kalle Valo
1 sibling, 0 replies; 6+ messages in thread
From: Jeff Johnson @ 2024-02-12 18:50 UTC (permalink / raw)
To: Nicolas Escande, ath12k; +Cc: linux-wireless
On 2/11/2024 6:55 AM, Nicolas Escande wrote:
> As discussed in [1] to fix the mismatch between the WMI_SCAN_XXX macros &
> their corresponding scan_f_xxx bitfield equivalent, lets stop using the
> scan_flags in the union altogether.
>
> [1] https://lore.kernel.org/all/4be7d62e-cb59-462d-aac2-94e27efc22ff@quicinc.com/
>
> Tested-on: QCN9274 hw2.0 PCI CI_WLAN.WBE.1.3-02907.1-QCAHKSWPL_SILICONZ-10
>
> Signed-off-by: Nicolas Escande <nico.escande@gmail.com>
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] wifi: ath12k: Remove unused scan_flags from struct ath12k_wmi_scan_req_arg
2024-02-11 14:55 ` [PATCH 2/2] wifi: ath12k: Remove unused " Nicolas Escande
@ 2024-02-12 18:50 ` Jeff Johnson
0 siblings, 0 replies; 6+ messages in thread
From: Jeff Johnson @ 2024-02-12 18:50 UTC (permalink / raw)
To: Nicolas Escande, ath12k; +Cc: linux-wireless
On 2/11/2024 6:55 AM, Nicolas Escande wrote:
> As we did for ath11k lets remove the unused scan_flags from struct
> ath12k_wmi_scan_req_arg. This will prevent us from using out of sync values
> between WMI_SCAN_XXX & scan_f_xxx bitfield.
> While at it remove the underlying wrapping struct/union construct as it serves
> no purpose anymore.
>
> Signed-off-by: Nicolas Escande <nico.escande@gmail.com>
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] wifi: ath12k: Do not use scan_flags from struct ath12k_wmi_scan_req_arg
2024-02-11 14:55 ` [PATCH 1/2] wifi: ath12k: Do not use " Nicolas Escande
2024-02-12 18:50 ` Jeff Johnson
@ 2024-02-14 8:17 ` Kalle Valo
1 sibling, 0 replies; 6+ messages in thread
From: Kalle Valo @ 2024-02-14 8:17 UTC (permalink / raw)
To: Nicolas Escande; +Cc: ath12k, linux-wireless
Nicolas Escande <nico.escande@gmail.com> wrote:
> As discussed in [1] to fix the mismatch between the WMI_SCAN_XXX macros &
> their corresponding scan_f_xxx bitfield equivalent, lets stop using the
> scan_flags in the union altogether.
>
> [1] https://lore.kernel.org/all/4be7d62e-cb59-462d-aac2-94e27efc22ff@quicinc.com/
>
> Tested-on: QCN9274 hw2.0 PCI CI_WLAN.WBE.1.3-02907.1-QCAHKSWPL_SILICONZ-10
>
> Signed-off-by: Nicolas Escande <nico.escande@gmail.com>
> Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
2 patches applied to ath-next branch of ath.git, thanks.
bcdb44f30be9 wifi: ath12k: Do not use scan_flags from struct ath12k_wmi_scan_req_arg
80fd22d7d41a wifi: ath12k: Remove unused scan_flags from struct ath12k_wmi_scan_req_arg
--
https://patchwork.kernel.org/project/linux-wireless/patch/20240211145548.1939610-2-nico.escande@gmail.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-02-14 8:17 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-11 14:55 [PATCH 0/2] CLeanup scan_flags from struct ath12k_wmi_scan_req_arg Nicolas Escande
2024-02-11 14:55 ` [PATCH 1/2] wifi: ath12k: Do not use " Nicolas Escande
2024-02-12 18:50 ` Jeff Johnson
2024-02-14 8:17 ` Kalle Valo
2024-02-11 14:55 ` [PATCH 2/2] wifi: ath12k: Remove unused " Nicolas Escande
2024-02-12 18:50 ` Jeff Johnson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox