diff options
| author | Kanchanapally, Vidyullatha <vkanchan@qti.qualcomm.com> | 2015-04-15 15:06:06 +0530 |
|---|---|---|
| committer | AnjaneeDevi Kapparapu <c_akappa@qti.qualcomm.com> | 2015-04-20 15:57:21 +0530 |
| commit | cc646cab58f0584ea7af60c80a5698cd8dd96a4e (patch) | |
| tree | 0426d4060c74afe50e93a88048ba513a0374cbdc | |
| parent | e8ced22afa857c77ee214e3fc9b34637564bff4c (diff) | |
qcacld: Abort scan on P2P-GO when doing a stop ap
This fix aborts scan on P2P-GO interface before doing a stop ap.
Without this it is possible that the pending scan will not allow
stop ap to complete within timeout.
Also, this fix modifies the value of abort scan timeout in HDD to
the value of timeout in WMA plus one second in order to ensure
that HDD timeouts out only after a timeout in WMA and a proper
cleanup is done.
Change-Id: Ia4cb21e399ac2a6f2be2280ee5a5c511c739f4ac
CRs-Fixed: 821856
| -rw-r--r-- | CORE/HDD/inc/wlan_hdd_main.h | 2 | ||||
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_cfg80211.c | 5 | ||||
| -rw-r--r-- | CORE/MAC/inc/sirApi.h | 3 | ||||
| -rw-r--r-- | CORE/SERVICES/WMA/wma.c | 8 | ||||
| -rw-r--r-- | CORE/SERVICES/WMA/wma.h | 1 |
5 files changed, 12 insertions, 7 deletions
diff --git a/CORE/HDD/inc/wlan_hdd_main.h b/CORE/HDD/inc/wlan_hdd_main.h index 94763529387e..42514b85fe79 100644 --- a/CORE/HDD/inc/wlan_hdd_main.h +++ b/CORE/HDD/inc/wlan_hdd_main.h @@ -109,7 +109,7 @@ This value should be larger than the timeout used by WDI to wait for a response from WCNSS */ #define WLAN_WAIT_TIME_SESSIONOPENCLOSE 15000 -#define WLAN_WAIT_TIME_ABORTSCAN 2000 +#define WLAN_WAIT_TIME_ABORTSCAN (SIR_HW_DEF_SCAN_MAX_DURATION + 1000) #define WLAN_WAIT_TIME_EXTSCAN 1000 #define WLAN_WAIT_TIME_LL_STATS 5000 diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c index 23e45c2ccbd2..6b331285383e 100644 --- a/CORE/HDD/src/wlan_hdd_cfg80211.c +++ b/CORE/HDD/src/wlan_hdd_cfg80211.c @@ -9582,10 +9582,13 @@ static int wlan_hdd_cfg80211_stop_ap (struct wiphy *wiphy, staAdapter = pAdapterNode->pAdapter; if (WLAN_HDD_INFRA_STATION == staAdapter->device_mode || - (WLAN_HDD_P2P_CLIENT == staAdapter->device_mode)) { + (WLAN_HDD_P2P_CLIENT == staAdapter->device_mode) || + (WLAN_HDD_P2P_GO == staAdapter->device_mode)) { pScanInfo = &staAdapter->scan_info; if (pScanInfo && pScanInfo->mScanPending) { + hddLog(LOG1, FL("Aborting pending scan for device mode:%d"), + staAdapter->device_mode); INIT_COMPLETION(pScanInfo->abortscan_event_var); hdd_abort_mac_scan(staAdapter->pHddCtx, staAdapter->sessionId, eCSR_SCAN_ABORT_DEFAULT); diff --git a/CORE/MAC/inc/sirApi.h b/CORE/MAC/inc/sirApi.h index ddff8936fc1d..6ebb733baa0f 100644 --- a/CORE/MAC/inc/sirApi.h +++ b/CORE/MAC/inc/sirApi.h @@ -60,6 +60,9 @@ #define P2P_SEARCH_DWELL_TIME_INCREASE 20 #define P2P_SOCIAL_CHANNELS 3 +// Maximum scan duration before timeout +#define SIR_HW_DEF_SCAN_MAX_DURATION 30000 /* 30 secs */ + /* Max number of channels are 165, but to access 165th element of array, *array of 166 is required. */ diff --git a/CORE/SERVICES/WMA/wma.c b/CORE/SERVICES/WMA/wma.c index 5db0889d16d8..0b2bc8a8d0b7 100644 --- a/CORE/SERVICES/WMA/wma.c +++ b/CORE/SERVICES/WMA/wma.c @@ -7484,7 +7484,7 @@ VOS_STATUS wma_get_buf_start_scan_cmd(tp_wma_handle wma_handle, cmd->idle_time = WMA_SCAN_IDLE_TIME_DEFAULT; /* Large timeout value for full scan cycle, 30 seconds */ - cmd->max_scan_time = WMA_HW_DEF_SCAN_MAX_DURATION; + cmd->max_scan_time = SIR_HW_DEF_SCAN_MAX_DURATION; /* do not add OFDM rates in 11B mode */ if (scan_req->dot11mode != WNI_CFG_DOT11_MODE_11B) @@ -7930,7 +7930,7 @@ VOS_STATUS wma_start_scan(tp_wma_handle wma_handle, if (msg_type == WDA_START_SCAN_OFFLOAD_REQ) { /* Start the timer for scan completion */ vos_status = vos_timer_start(&wma_handle->wma_scan_comp_timer, - WMA_HW_DEF_SCAN_MAX_DURATION); + SIR_HW_DEF_SCAN_MAX_DURATION); if (vos_status != VOS_STATUS_SUCCESS ) { WMA_LOGE("Failed to start the scan completion timer"); vos_status = VOS_STATUS_E_FAILURE; @@ -9123,7 +9123,7 @@ v_VOID_t wma_roam_scan_fill_scan_params(tp_wma_handle wma_handle, VOS_MAX(scan_params->dwell_time_active / roam_req->nProbes, 1) : 0; scan_params->probe_spacing_time = 0; scan_params->probe_delay = 0; - scan_params->max_scan_time = WMA_HW_DEF_SCAN_MAX_DURATION; /* 30 seconds for full scan cycle */ + scan_params->max_scan_time = SIR_HW_DEF_SCAN_MAX_DURATION; /* 30 seconds for full scan cycle */ scan_params->idle_time = scan_params->min_rest_time; scan_params->n_probes = roam_req->nProbes; if (roam_req->allowDFSChannelRoam == SIR_ROAMING_DFS_CHANNEL_DISABLED) { @@ -9155,7 +9155,7 @@ v_VOID_t wma_roam_scan_fill_scan_params(tp_wma_handle wma_handle, scan_params->repeat_probe_time = 0; scan_params->probe_spacing_time = 0; scan_params->probe_delay = 0; - scan_params->max_scan_time = WMA_HW_DEF_SCAN_MAX_DURATION; + scan_params->max_scan_time = SIR_HW_DEF_SCAN_MAX_DURATION; scan_params->idle_time = scan_params->min_rest_time; scan_params->burst_duration = 0; scan_params->n_probes = 0; diff --git a/CORE/SERVICES/WMA/wma.h b/CORE/SERVICES/WMA/wma.h index 1ec3d402d5ec..8eca27dfe391 100644 --- a/CORE/SERVICES/WMA/wma.h +++ b/CORE/SERVICES/WMA/wma.h @@ -142,7 +142,6 @@ #define WMA_HOST_ROAM_SCAN_REQID_PREFIX 0xA800 /* Prefix used by scan requestor id on host */ #define WMA_HOST_SCAN_REQUESTOR_ID_PREFIX 0xA000 -#define WMA_HW_DEF_SCAN_MAX_DURATION 30000 /* 30 secs */ /* Max offchannel duration */ #define WMA_BURST_SCAN_MAX_NUM_OFFCHANNELS (3) |
