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:
@@ -732,14 +732,6 @@ QDF_STATUS pmo_core_psoc_bus_suspend_req(struct wlan_objmgr_psoc *psoc,
|
|||||||
|
|
||||||
psoc_ctx = pmo_psoc_get_priv(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);
|
wow_mode_selected = pmo_core_is_wow_enabled(psoc_ctx);
|
||||||
pmo_info("wow mode selected %d", wow_mode_selected);
|
pmo_info("wow mode selected %d", wow_mode_selected);
|
||||||
|
|
||||||
|
@@ -1788,9 +1788,9 @@ next_adapter:
|
|||||||
return -EAGAIN;
|
return -EAGAIN;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pScanInfo->mScanPending)
|
wlan_abort_scan(pHddCtx->hdd_pdev, INVAL_PDEV_ID,
|
||||||
wlan_abort_scan(pHddCtx->hdd_pdev, INVAL_PDEV_ID,
|
pAdapter->sessionId, INVALID_SCAN_ID, false);
|
||||||
pAdapter->sessionId, INVALID_SCAN_ID, true);
|
|
||||||
status = hdd_get_next_adapter(pHddCtx, pAdapterNode, &pNext);
|
status = hdd_get_next_adapter(pHddCtx, pAdapterNode, &pNext);
|
||||||
pAdapterNode = pNext;
|
pAdapterNode = pNext;
|
||||||
}
|
}
|
||||||
|
@@ -1481,7 +1481,6 @@ typedef struct {
|
|||||||
uint32_t new_hw_mode_index;
|
uint32_t new_hw_mode_index;
|
||||||
struct extended_caps phy_caps;
|
struct extended_caps phy_caps;
|
||||||
qdf_atomic_t scan_id_counter;
|
qdf_atomic_t scan_id_counter;
|
||||||
qdf_atomic_t num_pending_scans;
|
|
||||||
wma_peer_authorized_fp peer_authorized_cb;
|
wma_peer_authorized_fp peer_authorized_cb;
|
||||||
uint32_t wow_unspecified_wake_count;
|
uint32_t wow_unspecified_wake_count;
|
||||||
|
|
||||||
|
@@ -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,
|
QDF_STATUS wma_get_wcnss_software_version(void *p_cds_gctx,
|
||||||
uint8_t *pVersion,
|
uint8_t *pVersion,
|
||||||
uint32_t versionBufferSize);
|
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);
|
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,
|
QDF_STATUS wma_set_peer_param(void *wma_ctx, uint8_t *peer_addr,
|
||||||
uint32_t param_id,
|
uint32_t param_id,
|
||||||
|
@@ -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,
|
return wmi_unified_set_app_type2_params_in_fw_cmd(wma->wmi_handle,
|
||||||
¶ms);
|
¶ms);
|
||||||
|
|
||||||
}
|
}
|
||||||
#endif /* WLAN_FEATURE_EXTWOW_SUPPORT */
|
#endif /* WLAN_FEATURE_EXTWOW_SUPPORT */
|
||||||
|
|
||||||
|
@@ -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_spinlock_create(&wma_handle->wma_hold_req_q_lock);
|
||||||
qdf_atomic_init(&wma_handle->is_wow_bus_suspended);
|
qdf_atomic_init(&wma_handle->is_wow_bus_suspended);
|
||||||
qdf_atomic_init(&wma_handle->scan_id_counter);
|
qdf_atomic_init(&wma_handle->scan_id_counter);
|
||||||
qdf_atomic_init(&wma_handle->num_pending_scans);
|
|
||||||
|
|
||||||
/* Register vdev start response event handler */
|
/* Register vdev start response event handler */
|
||||||
wmi_unified_register_event_handler(wma_handle->wmi_handle,
|
wmi_unified_register_event_handler(wma_handle->wmi_handle,
|
||||||
|
@@ -111,38 +111,6 @@ enum extscan_report_events_type {
|
|||||||
#define WMA_EXTSCAN_MAX_HOTLIST_ENTRIES 10
|
#define WMA_EXTSCAN_MAX_HOTLIST_ENTRIES 10
|
||||||
#endif
|
#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
|
* wma_is_mcc_24G() - check that if device is in 2.4GHz MCC
|
||||||
* @handle: wma handle
|
* @handle: wma handle
|
||||||
@@ -571,8 +539,6 @@ QDF_STATUS wma_start_scan(tp_wma_handle wma_handle,
|
|||||||
goto error1;
|
goto error1;
|
||||||
}
|
}
|
||||||
|
|
||||||
wma_inc_pending_scans(wma_handle);
|
|
||||||
|
|
||||||
WMA_LOGI("scan_id 0x%x, vdev_id %d, p2pScanType %d, msg_type 0x%x",
|
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);
|
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);
|
&cmd);
|
||||||
if (QDF_IS_STATUS_ERROR(qdf_status)) {
|
if (QDF_IS_STATUS_ERROR(qdf_status)) {
|
||||||
WMA_LOGE("wmi_unified_cmd_send returned Error %d", 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");
|
WMA_LOGD("WMA --> WMI_START_SCAN_CMDID");
|
||||||
|
|
||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
|
|
||||||
dec_scans:
|
|
||||||
wma_dec_pending_scans(wma_handle);
|
|
||||||
|
|
||||||
error1:
|
error1:
|
||||||
if (NULL != cmd.chan_list)
|
if (NULL != cmd.chan_list)
|
||||||
qdf_mem_free(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);
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -3274,19 +3274,6 @@ int wma_unified_debug_print_event_handler(void *handle, uint8_t *datap,
|
|||||||
#endif /* BIG_ENDIAN_HOST */
|
#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
|
* wma_is_sap_active() - check sap is active or not
|
||||||
* @handle: wma handle
|
* @handle: wma handle
|
||||||
|
Reference in New Issue
Block a user