From 307e0288a6f93b22be4cd3bb6f6d8226eeae1ac9 Mon Sep 17 00:00:00 2001 From: Subrat Dash Date: Sat, 8 Aug 2020 12:43:49 +0530 Subject: [PATCH] qcacld-3.0: Fix tsf cap failure when SAP starts on DFS channel When DFS channel is used WMI_VDEV_TSF_TSTAMP_ACTION_CMDID is sent to fw before vdev is in up state. It leads the tsf capture to enter into HDD_TS_STATUS_WAITING state as the fw returns invalid tsf in the TSF report event. The tsf capture has to be restarted to recover from this state. Fix this by Calling hdd_stop_tsf_sync() while entering into CAC, the subsequent call to hdd_start_tsf_sync() will restart the tsf capture. CRs-Fixed: 2750676 Change-Id: Ie2fdf719d4b57035bf6fcc11824a894a1e313e23 --- core/hdd/src/wlan_hdd_hostapd.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c index 10af574ccc91..b25d6d543ab6 100644 --- a/core/hdd/src/wlan_hdd_hostapd.c +++ b/core/hdd/src/wlan_hdd_hostapd.c @@ -2085,6 +2085,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(struct sap_event *sap_event, } qdf_atomic_set(&adapter->ch_switch_in_progress, 0); + hdd_stop_tsf_sync(adapter); break; case eSAP_DFS_CAC_INTERRUPTED: /* @@ -5959,7 +5960,6 @@ static int __wlan_hdd_cfg80211_stop_ap(struct wiphy *wiphy, } } clear_bit(SOFTAP_BSS_STARTED, &adapter->event_flags); - hdd_stop_tsf_sync(adapter); /*BSS stopped, clear the active sessions for this device mode*/ policy_mgr_decr_session_set_pcl(hdd_ctx->psoc, @@ -6651,8 +6651,6 @@ static int __wlan_hdd_cfg80211_start_ap(struct wiphy *wiphy, goto err_start_bss; } - hdd_start_tsf_sync(adapter); - if (wdev->chandef.chan->center_freq != params->chandef.chan->center_freq) params->chandef = wdev->chandef;