qcacld-3.0: Do not wait for scan cancel during suspend

In the suspend path, the code waits for all active/pending scans to be
cancelled before continuing the suspend. Instead, for better power
savings, abort all active/pending scans during suspend and immediately
continue the suspend process.

Change-Id: I16a5429c00034fe58fb4c70a8dacda666ac54227
CRs-Fixed: 2073229
This commit is contained in:
Dustin Brown
2017-07-07 13:08:51 -07:00
committed by snandini
parent 9cc71e6783
commit c86d5368b0
8 changed files with 4 additions and 70 deletions

View File

@@ -732,14 +732,6 @@ QDF_STATUS pmo_core_psoc_bus_suspend_req(struct wlan_objmgr_psoc *psoc,
psoc_ctx = pmo_psoc_get_priv(psoc);
/* TODO - scan manager need to provide the below public api
if (wma_check_scan_in_progress(handle)) {
pmo_err("Scan in progress. Aborting suspend");
status = QDF_STATUS_E_NULL_VALUE;
goto out;
}
*/
wow_mode_selected = pmo_core_is_wow_enabled(psoc_ctx);
pmo_info("wow mode selected %d", wow_mode_selected);

View File

@@ -1788,9 +1788,9 @@ next_adapter:
return -EAGAIN;
}
if (pScanInfo->mScanPending)
wlan_abort_scan(pHddCtx->hdd_pdev, INVAL_PDEV_ID,
pAdapter->sessionId, INVALID_SCAN_ID, true);
wlan_abort_scan(pHddCtx->hdd_pdev, INVAL_PDEV_ID,
pAdapter->sessionId, INVALID_SCAN_ID, false);
status = hdd_get_next_adapter(pHddCtx, pAdapterNode, &pNext);
pAdapterNode = pNext;
}

View File

@@ -1481,7 +1481,6 @@ typedef struct {
uint32_t new_hw_mode_index;
struct extended_caps phy_caps;
qdf_atomic_t scan_id_counter;
qdf_atomic_t num_pending_scans;
wma_peer_authorized_fp peer_authorized_cb;
uint32_t wow_unspecified_wake_count;

View File

@@ -134,8 +134,6 @@ QDF_STATUS wma_set_htconfig(uint8_t vdev_id, uint16_t ht_capab, int value);
QDF_STATUS wma_get_wcnss_software_version(void *p_cds_gctx,
uint8_t *pVersion,
uint32_t versionBufferSize);
bool wma_check_scan_in_progress(WMA_HANDLE handle);
void wma_set_peer_authorized_cb(void *wma_ctx, wma_peer_authorized_fp auth_cb);
QDF_STATUS wma_set_peer_param(void *wma_ctx, uint8_t *peer_addr,
uint32_t param_id,

View File

@@ -3641,7 +3641,6 @@ QDF_STATUS wma_set_app_type2_params_in_fw(tp_wma_handle wma,
return wmi_unified_set_app_type2_params_in_fw_cmd(wma->wmi_handle,
&params);
}
#endif /* WLAN_FEATURE_EXTWOW_SUPPORT */

View File

@@ -2399,7 +2399,6 @@ QDF_STATUS wma_open(struct wlan_objmgr_psoc *psoc, void *cds_context,
qdf_spinlock_create(&wma_handle->wma_hold_req_q_lock);
qdf_atomic_init(&wma_handle->is_wow_bus_suspended);
qdf_atomic_init(&wma_handle->scan_id_counter);
qdf_atomic_init(&wma_handle->num_pending_scans);
/* Register vdev start response event handler */
wmi_unified_register_event_handler(wma_handle->wmi_handle,

View File

@@ -111,38 +111,6 @@ enum extscan_report_events_type {
#define WMA_EXTSCAN_MAX_HOTLIST_ENTRIES 10
#endif
/**
* wma_dec_pending_scans() - Decrements the number of pending scans
* @wma: The WMA handle to operate on
*
* Return: none
*/
static void wma_dec_pending_scans(tp_wma_handle wma)
{
int32_t scan_cnt = qdf_atomic_read(&wma->num_pending_scans);
if (scan_cnt <= 0) {
WMA_LOGE("Stopping pending scan, but no scans were pending!");
return;
}
qdf_atomic_dec(&wma->num_pending_scans);
WMA_LOGD("Ending pending scan: %d <- %d", scan_cnt, scan_cnt - 1);
}
/**
* wma_inc_pending_scans() - Increments the number of pending scans
* @wma: The WMA handle to operate on
*
* Return: none
*/
static void wma_inc_pending_scans(tp_wma_handle wma)
{
int32_t scan_cnt = qdf_atomic_inc_return(&wma->num_pending_scans);
WMA_LOGD("Starting pending scan: %d -> %d", scan_cnt - 1, scan_cnt);
}
/**
* wma_is_mcc_24G() - check that if device is in 2.4GHz MCC
* @handle: wma handle
@@ -571,8 +539,6 @@ QDF_STATUS wma_start_scan(tp_wma_handle wma_handle,
goto error1;
}
wma_inc_pending_scans(wma_handle);
WMA_LOGI("scan_id 0x%x, vdev_id %d, p2pScanType %d, msg_type 0x%x",
cmd.scan_id, cmd.vdev_id, scan_req->p2pScanType, msg_type);
@@ -592,16 +558,13 @@ QDF_STATUS wma_start_scan(tp_wma_handle wma_handle,
&cmd);
if (QDF_IS_STATUS_ERROR(qdf_status)) {
WMA_LOGE("wmi_unified_cmd_send returned Error %d", qdf_status);
goto dec_scans;
goto error1;
}
WMA_LOGD("WMA --> WMI_START_SCAN_CMDID");
return QDF_STATUS_SUCCESS;
dec_scans:
wma_dec_pending_scans(wma_handle);
error1:
if (NULL != cmd.chan_list)
qdf_mem_free(cmd.chan_list);
@@ -5364,9 +5327,6 @@ int wma_scan_event_callback(WMA_HANDLE handle, uint8_t *data,
wma_send_msg(wma_handle, WMA_RX_SCAN_EVENT, (void *)scan_event, 0);
if ((wmi_event->event & WMA_SCAN_END_EVENT) > 0)
wma_dec_pending_scans(wma_handle);
return 0;
}

View File

@@ -3274,19 +3274,6 @@ int wma_unified_debug_print_event_handler(void *handle, uint8_t *datap,
#endif /* BIG_ENDIAN_HOST */
}
/**
* wma_check_scan_in_progress() - check scan is progress or not
* @handle: wma handle
*
* Return: true/false
*/
bool wma_check_scan_in_progress(WMA_HANDLE handle)
{
tp_wma_handle wma = handle;
return qdf_atomic_read(&wma->num_pending_scans) > 0;
}
/**
* wma_is_sap_active() - check sap is active or not
* @handle: wma handle