diff --git a/components/pmo/core/src/wlan_pmo_suspend_resume.c b/components/pmo/core/src/wlan_pmo_suspend_resume.c index 65e3a20e81c7..90300c2e5588 100644 --- a/components/pmo/core/src/wlan_pmo_suspend_resume.c +++ b/components/pmo/core/src/wlan_pmo_suspend_resume.c @@ -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); diff --git a/core/hdd/src/wlan_hdd_power.c b/core/hdd/src/wlan_hdd_power.c index 176b57323e61..d7ac3884d830 100644 --- a/core/hdd/src/wlan_hdd_power.c +++ b/core/hdd/src/wlan_hdd_power.c @@ -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; } diff --git a/core/wma/inc/wma.h b/core/wma/inc/wma.h index 3fdcaa8d59dd..418d0567aafb 100644 --- a/core/wma/inc/wma.h +++ b/core/wma/inc/wma.h @@ -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; diff --git a/core/wma/inc/wma_api.h b/core/wma/inc/wma_api.h index e13a1ebd5a50..db132e794718 100644 --- a/core/wma/inc/wma_api.h +++ b/core/wma/inc/wma_api.h @@ -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, diff --git a/core/wma/src/wma_features.c b/core/wma/src/wma_features.c index 3dbe7b4b3ce8..58f990dcf265 100644 --- a/core/wma/src/wma_features.c +++ b/core/wma/src/wma_features.c @@ -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, ¶ms); - } #endif /* WLAN_FEATURE_EXTWOW_SUPPORT */ diff --git a/core/wma/src/wma_main.c b/core/wma/src/wma_main.c index 6a8e431981b8..a2ef92096eec 100644 --- a/core/wma/src/wma_main.c +++ b/core/wma/src/wma_main.c @@ -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, diff --git a/core/wma/src/wma_scan_roam.c b/core/wma/src/wma_scan_roam.c index f496a939b4a9..ede3beb966a3 100644 --- a/core/wma/src/wma_scan_roam.c +++ b/core/wma/src/wma_scan_roam.c @@ -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; } diff --git a/core/wma/src/wma_utils.c b/core/wma/src/wma_utils.c index 7473d75d5462..77e6edf297ab 100644 --- a/core/wma/src/wma_utils.c +++ b/core/wma/src/wma_utils.c @@ -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