summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNishank Aggarwal <naggar@codeaurora.org>2016-08-02 15:38:16 +0530
committerqcabuildsw <qcabuildsw@localhost>2016-09-02 17:23:42 -0700
commitf9068320ec451c2cc0568165f7bdf0be8900b4e2 (patch)
treef51a9914141875cf1b117b1836be815fc22c8562
parent8353e521d92ac9bf302fc1c90446210ecd2bc2fd (diff)
qcacld-3.0: Fix to restart SAP on preferred channel
qcacld-2.0 to qcacld-3.0 propagation In some case when complete preferred channel list is unsafe, SAP won't be able to pick any channel as operating channel. This will lead to SAP start failure. Fix this issue by making first channel from preferred channel list as operating channel. Change-Id: Id2bd177b15bd7089250a49019a9c751a691dac01 CRs-Fixed: 1026420
-rw-r--r--core/sap/src/sap_api_link_cntl.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/core/sap/src/sap_api_link_cntl.c b/core/sap/src/sap_api_link_cntl.c
index 860449492622..3a9dca9b1928 100644
--- a/core/sap/src/sap_api_link_cntl.c
+++ b/core/sap/src/sap_api_link_cntl.c
@@ -160,7 +160,16 @@ QDF_STATUS wlansap_scan_callback(tHalHandle hal_handle,
__func__, scan_id);
#endif
operChannel = sap_select_channel(hal_handle, sap_ctx, result);
+ if (!operChannel) {
+ QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH,
+ "No channel was selected from preferred channel for Operating channel");
+
+ operChannel = sap_ctx->acs_cfg->start_ch;
+ QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH,
+ "Selecting operating channel as starting channel from preferred channel list: %d",
+ operChannel);
+ }
sme_scan_result_purge(hal_handle, result);
break;
@@ -364,6 +373,16 @@ wlansap_pre_start_bss_acs_scan_callback(tHalHandle hal_handle, void *pcontext,
}
#endif
oper_channel = sap_select_channel(hal_handle, sap_ctx, presult);
+ if (!oper_channel) {
+ QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH,
+ "No channel was selected from preferred channel for Operating channel");
+
+ oper_channel = sap_ctx->acs_cfg->start_ch;
+
+ QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH,
+ "Selecting operating channel as starting channel from preferred channel list: %d",
+ oper_channel);
+ }
sme_scan_result_purge(hal_handle, presult);
}