From 239469eb1d5e3516146d684468de1c4fd2011997 Mon Sep 17 00:00:00 2001 From: Purushottam Kushwaha Date: Mon, 16 Oct 2023 15:51:08 +0530 Subject: [PATCH] Define new command in qca_tsf_cmd to get AP channel switch TSF time Define a new command QCA_TSF_SYNC_GET_CSA_TIMESTAMP in qca_tsf_cmd to retrieve the TSF time value at which the AP will move and starts beaconing on a new channel. Userspace queries this TSF after receiving NL80211_CMD_CH_SWITCH_STARTED_NOTIFY event on the AP interface. This TSF can be communicated via an OOB mechanism to connected STAs which may fail to receive the CSA frames due to channel congestion. Signed-off-by: Purushottam Kushwaha --- src/common/qca-vendor.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/common/qca-vendor.h b/src/common/qca-vendor.h index 7620f0367..cfb8a0677 100644 --- a/src/common/qca-vendor.h +++ b/src/common/qca-vendor.h @@ -2179,7 +2179,8 @@ enum qca_access_policy { * &enum qca_tsf_cmd. * @QCA_WLAN_VENDOR_ATTR_TSF_TIMER_VALUE: Optional (u64) * This attribute contains TSF timer value. This attribute is only available - * in %QCA_TSF_GET or %QCA_TSF_SYNC_GET response. + * in %QCA_TSF_GET, %QCA_TSF_SYNC_GET or %QCA_TSF_SYNC_GET_CSA_TIMESTAMP + * response. * @QCA_WLAN_VENDOR_ATTR_TSF_SOC_TIMER_VALUE: Optional (u64) * This attribute contains SOC timer value at TSF capture. This attribute is * only available in %QCA_TSF_GET or %QCA_TSF_SYNC_GET response. @@ -2223,6 +2224,12 @@ enum qca_vendor_attr_tsf_cmd { * userspace can query the TSF and host time mapping via the %QCA_TSF_GET * command. * @QCA_TSF_SYNC_STOP: Stop periodic TSF sync feature. + * @QCA_TSF_SYNC_GET_CSA_TIMESTAMP: Get TSF timestamp when AP will move and + * starts beaconing on a new channel. The driver synchronously responds with the + * TSF value using attribute %QCA_WLAN_VENDOR_ATTR_TSF_TIMER_VALUE. Userspace + * gets the valid CSA TSF after receiving %NL80211_CMD_CH_SWITCH_STARTED_NOTIFY + * on the AP interface. This TSF can be sent via OOB mechanism to connected + * clients. */ enum qca_tsf_cmd { QCA_TSF_CAPTURE, @@ -2232,6 +2239,7 @@ enum qca_tsf_cmd { QCA_TSF_AUTO_REPORT_DISABLE, QCA_TSF_SYNC_START, QCA_TSF_SYNC_STOP, + QCA_TSF_SYNC_GET_CSA_TIMESTAMP, }; /**