2024-02-11 14:57:25

by Nicolas Escande

[permalink] [raw]
Subject: [PATCH 0/2] CLeanup scan_flags from struct ath12k_wmi_scan_req_arg

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/[email protected]/

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



2024-02-11 14:57:26

by Nicolas Escande

[permalink] [raw]
Subject: [PATCH 1/2] wifi: ath12k: Do not use scan_flags from struct ath12k_wmi_scan_req_arg

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/[email protected]/

Tested-on: QCN9274 hw2.0 PCI CI_WLAN.WBE.1.3-02907.1-QCAHKSWPL_SILICONZ-10

Signed-off-by: Nicolas Escande <[email protected]>

---
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


2024-02-12 18:51:11

by Jeff Johnson

[permalink] [raw]
Subject: Re: [PATCH 1/2] wifi: ath12k: Do not use scan_flags from struct ath12k_wmi_scan_req_arg

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/[email protected]/
>
> Tested-on: QCN9274 hw2.0 PCI CI_WLAN.WBE.1.3-02907.1-QCAHKSWPL_SILICONZ-10
>
> Signed-off-by: Nicolas Escande <[email protected]>
Acked-by: Jeff Johnson <[email protected]>


2024-02-14 08:17:17

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH 1/2] wifi: ath12k: Do not use scan_flags from struct ath12k_wmi_scan_req_arg

Nicolas Escande <[email protected]> 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/[email protected]/
>
> Tested-on: QCN9274 hw2.0 PCI CI_WLAN.WBE.1.3-02907.1-QCAHKSWPL_SILICONZ-10
>
> Signed-off-by: Nicolas Escande <[email protected]>
> Acked-by: Jeff Johnson <[email protected]>
> Signed-off-by: Kalle Valo <[email protected]>

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/[email protected]/

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