linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] wifi: ath11k: Set ext passive scan flag to adjust passive scan start time
@ 2022-12-22 13:17 Tamizh Chelvam Raja
  2023-01-02 10:19 ` Vasanthakumar Thiagarajan
  2023-02-17 15:57 ` Kalle Valo
  0 siblings, 2 replies; 5+ messages in thread
From: Tamizh Chelvam Raja @ 2022-12-22 13:17 UTC (permalink / raw)
  To: ath11k; +Cc: linux-wireless, Tamizh Chelvam Raja

Set the WMI_SCAN_FLAG_EXT_PASSIVE_SCAN_START_TIME_ENHANCE flag
while sending the scan command.  If this flag is enabled when the
incoming scan request comes with a strict start time and its duration
overlaps with next TBTT, then target adjust the start time accordingly
for passive scan. Target supporting this feature will advertise
WMI_TLV_SERVICE_PASSIVE_SCAN_START_TIME_ENHANCE.

Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.4.0.1-01467-QCAHKSWPL_SILICONZ-1

Signed-off-by: Tamizh Chelvam Raja <quic_tamizhr@quicinc.com>
---
 drivers/net/wireless/ath/ath11k/wmi.c | 7 +++++++
 drivers/net/wireless/ath/ath11k/wmi.h | 3 +++
 2 files changed, 10 insertions(+)

diff --git a/drivers/net/wireless/ath/ath11k/wmi.c b/drivers/net/wireless/ath/ath11k/wmi.c
index 2a8a3e3dcff6..c786c5097ae3 100644
--- a/drivers/net/wireless/ath/ath11k/wmi.c
+++ b/drivers/net/wireless/ath/ath11k/wmi.c
@@ -2068,6 +2068,11 @@ void ath11k_wmi_start_scan_init(struct ath11k *ar,
 				  WMI_SCAN_EVENT_FOREIGN_CHAN |
 				  WMI_SCAN_EVENT_DEQUEUED;
 	arg->scan_flags |= WMI_SCAN_CHAN_STAT_EVENT;
+
+	if (test_bit(WMI_TLV_SERVICE_PASSIVE_SCAN_START_TIME_ENHANCE,
+		     ar->ab->wmi_ab.svc_map))
+		arg->scan_ctrl_flags_ext |= WMI_SCAN_FLAG_EXT_PASSIVE_SCAN_START_TIME_ENHANCE;
+
 	arg->num_bssid = 1;
 
 	/* fill bssid_list[0] with 0xff, otherwise bssid and RA will be
@@ -2149,6 +2154,8 @@ ath11k_wmi_copy_scan_event_cntrl_flags(struct wmi_start_scan_cmd *cmd,
 	/* for adaptive scan mode using 3 bits (21 - 23 bits) */
 	WMI_SCAN_SET_DWELL_MODE(cmd->scan_ctrl_flags,
 				param->adaptive_dwell_time_mode);
+
+	cmd->scan_ctrl_flags_ext = param->scan_ctrl_flags_ext;
 }
 
 int ath11k_wmi_send_scan_start_cmd(struct ath11k *ar,
diff --git a/drivers/net/wireless/ath/ath11k/wmi.h b/drivers/net/wireless/ath/ath11k/wmi.h
index 8f2c07d70a4a..5583582b8afa 100644
--- a/drivers/net/wireless/ath/ath11k/wmi.h
+++ b/drivers/net/wireless/ath/ath11k/wmi.h
@@ -2092,6 +2092,7 @@ enum wmi_tlv_service {
 	WMI_TLV_SERVICE_EXT2_MSG = 220,
 	WMI_TLV_SERVICE_PEER_POWER_SAVE_DURATION_SUPPORT = 246,
 	WMI_TLV_SERVICE_SRG_SRP_SPATIAL_REUSE_SUPPORT = 249,
+	WMI_TLV_SERVICE_PASSIVE_SCAN_START_TIME_ENHANCE = 263,
 
 	/* The second 128 bits */
 	WMI_MAX_EXT_SERVICE = 256,
@@ -3222,6 +3223,7 @@ struct  wmi_start_scan_cmd {
 
 #define WMI_SCAN_DWELL_MODE_MASK 0x00E00000
 #define WMI_SCAN_DWELL_MODE_SHIFT        21
+#define WMI_SCAN_FLAG_EXT_PASSIVE_SCAN_START_TIME_ENHANCE   0x00000800
 
 enum {
 	WMI_SCAN_DWELL_MODE_DEFAULT      = 0,
@@ -3269,6 +3271,7 @@ struct scan_req_params {
 		};
 		u32 scan_events;
 	};
+	u32 scan_ctrl_flags_ext;
 	u32 dwell_time_active;
 	u32 dwell_time_active_2g;
 	u32 dwell_time_passive;
-- 
2.17.1


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

* Re: [PATCH] wifi: ath11k: Set ext passive scan flag to adjust passive scan start time
  2022-12-22 13:17 [PATCH] wifi: ath11k: Set ext passive scan flag to adjust passive scan start time Tamizh Chelvam Raja
@ 2023-01-02 10:19 ` Vasanthakumar Thiagarajan
  2023-01-04  4:56   ` Tamizh Chelvam Raja
  2023-02-17 15:57 ` Kalle Valo
  1 sibling, 1 reply; 5+ messages in thread
From: Vasanthakumar Thiagarajan @ 2023-01-02 10:19 UTC (permalink / raw)
  To: Tamizh Chelvam Raja, ath11k; +Cc: linux-wireless



On 12/22/2022 6:47 PM, Tamizh Chelvam Raja wrote:
> Set the WMI_SCAN_FLAG_EXT_PASSIVE_SCAN_START_TIME_ENHANCE flag
> while sending the scan command.  If this flag is enabled when the
> incoming scan request comes with a strict start time and its duration
> overlaps with next TBTT, then target adjust the start time accordingly
> for passive scan. Target supporting this feature will advertise
> WMI_TLV_SERVICE_PASSIVE_SCAN_START_TIME_ENHANCE.
> 
> Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.4.0.1-01467-QCAHKSWPL_SILICONZ-1
> 

If this change fixes any user visible issue, better to include that details.

Other than that, the patch looks good to me.

Vasanth

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

* Re: [PATCH] wifi: ath11k: Set ext passive scan flag to adjust passive scan start time
  2023-01-02 10:19 ` Vasanthakumar Thiagarajan
@ 2023-01-04  4:56   ` Tamizh Chelvam Raja
  2023-01-04  6:54     ` Vasanthakumar Thiagarajan
  0 siblings, 1 reply; 5+ messages in thread
From: Tamizh Chelvam Raja @ 2023-01-04  4:56 UTC (permalink / raw)
  To: Vasanthakumar Thiagarajan, ath11k; +Cc: linux-wireless

On 1/2/2023 3:49 PM, Vasanthakumar Thiagarajan wrote:
> 
> 
> On 12/22/2022 6:47 PM, Tamizh Chelvam Raja wrote:
>> Set the WMI_SCAN_FLAG_EXT_PASSIVE_SCAN_START_TIME_ENHANCE flag
>> while sending the scan command.  If this flag is enabled when the
>> incoming scan request comes with a strict start time and its duration
>> overlaps with next TBTT, then target adjust the start time accordingly
>> for passive scan. Target supporting this feature will advertise
>> WMI_TLV_SERVICE_PASSIVE_SCAN_START_TIME_ENHANCE.
>>
>> Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.4.0.1-01467-QCAHKSWPL_SILICONZ-1
>>
> 
> If this change fixes any user visible issue, better to include that details.
> 
There are no user visible issues without this change.


-- 
Regards,
Tamizh

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

* Re: [PATCH] wifi: ath11k: Set ext passive scan flag to adjust passive scan start time
  2023-01-04  4:56   ` Tamizh Chelvam Raja
@ 2023-01-04  6:54     ` Vasanthakumar Thiagarajan
  0 siblings, 0 replies; 5+ messages in thread
From: Vasanthakumar Thiagarajan @ 2023-01-04  6:54 UTC (permalink / raw)
  To: Tamizh Chelvam Raja, ath11k; +Cc: linux-wireless



On 1/4/2023 10:26 AM, Tamizh Chelvam Raja wrote:
> On 1/2/2023 3:49 PM, Vasanthakumar Thiagarajan wrote:
>>
>>
>> On 12/22/2022 6:47 PM, Tamizh Chelvam Raja wrote:
>>> Set the WMI_SCAN_FLAG_EXT_PASSIVE_SCAN_START_TIME_ENHANCE flag
>>> while sending the scan command.  If this flag is enabled when the
>>> incoming scan request comes with a strict start time and its duration
>>> overlaps with next TBTT, then target adjust the start time accordingly
>>> for passive scan. Target supporting this feature will advertise
>>> WMI_TLV_SERVICE_PASSIVE_SCAN_START_TIME_ENHANCE.
>>>
>>> Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.4.0.1-01467-QCAHKSWPL_SILICONZ-1
>>>
>>
>> If this change fixes any user visible issue, better to include that details.
>>
> There are no user visible issues without this change.
> 
> 

Fine, thanks!

Vasanth

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

* Re: [PATCH] wifi: ath11k: Set ext passive scan flag to adjust passive scan start time
  2022-12-22 13:17 [PATCH] wifi: ath11k: Set ext passive scan flag to adjust passive scan start time Tamizh Chelvam Raja
  2023-01-02 10:19 ` Vasanthakumar Thiagarajan
@ 2023-02-17 15:57 ` Kalle Valo
  1 sibling, 0 replies; 5+ messages in thread
From: Kalle Valo @ 2023-02-17 15:57 UTC (permalink / raw)
  To: Tamizh Chelvam Raja; +Cc: ath11k, linux-wireless, Tamizh Chelvam Raja

Tamizh Chelvam Raja <quic_tamizhr@quicinc.com> wrote:

> Set the WMI_SCAN_FLAG_EXT_PASSIVE_SCAN_START_TIME_ENHANCE flag
> while sending the scan command.  If this flag is enabled when the
> incoming scan request comes with a strict start time and its duration
> overlaps with next TBTT, then target adjust the start time accordingly
> for passive scan. Target supporting this feature will advertise
> WMI_TLV_SERVICE_PASSIVE_SCAN_START_TIME_ENHANCE.
> 
> Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.4.0.1-01467-QCAHKSWPL_SILICONZ-1
> 
> Signed-off-by: Tamizh Chelvam Raja <quic_tamizhr@quicinc.com>
> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>

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

cf8f3d4deb02 wifi: ath11k: Set ext passive scan flag to adjust passive scan start time

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

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


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

end of thread, other threads:[~2023-02-17 15:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-22 13:17 [PATCH] wifi: ath11k: Set ext passive scan flag to adjust passive scan start time Tamizh Chelvam Raja
2023-01-02 10:19 ` Vasanthakumar Thiagarajan
2023-01-04  4:56   ` Tamizh Chelvam Raja
2023-01-04  6:54     ` Vasanthakumar Thiagarajan
2023-02-17 15:57 ` Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).