diff --git a/core/sap/src/sap_api_link_cntl.c b/core/sap/src/sap_api_link_cntl.c index 59423161a29b..547eb9d163fd 100644 --- a/core/sap/src/sap_api_link_cntl.c +++ b/core/sap/src/sap_api_link_cntl.c @@ -223,18 +223,6 @@ wlansap_calculate_chan_from_scan_result(mac_handle_t mac_handle, if (list) QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_DEBUG, FL("num_entries %d"), qdf_list_size(list)); - if (!list || (list && !qdf_list_size(list))) { - sme_err("get scan result failed"); - QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR, - FL("Failed to get scan results")); - if (list) - ucfg_scan_purge_results(list); - /* - * No scan results So, set the operation channel not selected - * to allow the default channel to be set when reporting to HDD - */ - return oper_channel; - } wlansap_send_acs_success_event(sap_ctx, scan_id); diff --git a/core/sap/src/sap_ch_select.c b/core/sap/src/sap_ch_select.c index 167e9277b381..e02b76cb10f0 100644 --- a/core/sap/src/sap_ch_select.c +++ b/core/sap/src/sap_ch_select.c @@ -339,7 +339,8 @@ static void sap_process_avoid_ie(mac_handle_t mac_handle, mac_ctx = MAC_CONTEXT(mac_handle); spect_ch = spect_info->pSpectCh; - qdf_list_peek_front(scan_list, &cur_lst); + if (scan_list) + qdf_list_peek_front(scan_list, &cur_lst); while (cur_lst) { cur_node = qdf_container_of(cur_lst, struct scan_cache_node, node); @@ -1553,7 +1554,8 @@ static void sap_compute_spect_weight(tSapChSelSpectInfo *pSpectInfoParams, */ SET_ACS_BAND(operatingBand, sap_ctx); - qdf_list_peek_front(scan_list, &cur_lst); + if (scan_list) + qdf_list_peek_front(scan_list, &cur_lst); while (cur_lst) { uint32_t ie_len = 0; uint8_t *ie_ptr; @@ -2649,7 +2651,7 @@ uint8_t sap_select_channel(mac_handle_t mac_handle, * If ACS weight is not enabled on noise_floor/channel_free/tx_power, * then skip acs process if no bss found. */ - if (!scan_list && + if ((!scan_list || !qdf_list_size(scan_list)) && !(sap_ctx->auto_channel_select_weight & 0xffff00)) { QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH, FL("No external AP present"));