summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiangwei Dong <liangwei@codeaurora.org>2016-09-28 04:03:16 -0400
committerqcabuildsw <qcabuildsw@localhost>2016-10-26 15:41:54 -0700
commit87a1ecce028364a0fae700423483656dadccae4c (patch)
tree63f476c24ae3e8827a1a468f2908422a8382a66e
parent7d845118f8c1c50eea768b38b04cac583f2a3533 (diff)
qcacld-3.0: Handle dfs channel switch failure
qcacld-2.0 to qcacld-3.0 propagation We need to stop SAP bss and destroy the SAP session if the channel switch failed. Otherwise, the vdev will leak and it will cause SoftAP start failed in following test. Change-Id: Ieb3a2d62c8698f245f787be3c215ee4365b2e8ba CRs-Fixed: 944741
-rw-r--r--core/sap/src/sap_api_link_cntl.c13
-rw-r--r--core/sap/src/sap_fsm.c6
2 files changed, 15 insertions, 4 deletions
diff --git a/core/sap/src/sap_api_link_cntl.c b/core/sap/src/sap_api_link_cntl.c
index 2447879bcab7..7b249cb746d5 100644
--- a/core/sap/src/sap_api_link_cntl.c
+++ b/core/sap/src/sap_api_link_cntl.c
@@ -1239,13 +1239,18 @@ wlansap_roam_callback(void *ctx, tCsrRoamInfo *csr_roam_info, uint32_t roamId,
csr_roam_info, &qdf_ret_status);
break;
case eCSR_ROAM_RESULT_CHANNEL_CHANGE_FAILURE:
- /*
- * This is much more serious issue, we have to vacate the
+ /* This is much more serious issue, we have to vacate the
* channel due to the presence of radar but our channel change
* failed, stop the BSS operation completely and inform hostapd
*/
- sap_ctx->sapsMachine = eSAP_DISCONNECTED;
- /* Inform cfg80211 and hostapd that BSS is not alive anymore */
+ sap_event.event = eWNI_SME_CHANNEL_CHANGE_RSP;
+ sap_event.params = 0;
+ sap_event.u1 = eCSR_ROAM_INFRA_IND;
+ sap_event.u2 = eCSR_ROAM_RESULT_CHANNEL_CHANGE_FAILURE;
+
+ qdf_status = sap_fsm(sap_ctx, &sap_event);
+ if (!QDF_IS_STATUS_SUCCESS(qdf_status))
+ qdf_ret_status = QDF_STATUS_E_FAILURE;
break;
case eCSR_ROAM_EXT_CHG_CHNL_UPDATE_IND:
qdf_status = sap_signal_hdd_event(sap_ctx, csr_roam_info,
diff --git a/core/sap/src/sap_fsm.c b/core/sap/src/sap_fsm.c
index 54a3dcedab60..ed2e70663118 100644
--- a/core/sap/src/sap_fsm.c
+++ b/core/sap/src/sap_fsm.c
@@ -3970,6 +3970,12 @@ static QDF_STATUS sap_fsm_state_disconnecting(ptSapContext sap_ctx,
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO,
FL("Sending DFS eWNI_SME_CHANNEL_CHANGE_REQ"));
+ } else if (msg == eWNI_SME_CHANNEL_CHANGE_RSP) {
+ QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO,
+ FL("in state %s, event msg %d result %d"),
+ "eSAP_DISCONNECTING ", msg, sap_event->u2);
+ if (sap_event->u2 == eCSR_ROAM_RESULT_CHANNEL_CHANGE_FAILURE)
+ qdf_status = sap_goto_disconnecting(sap_ctx);
} else {
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
FL("in state %s, invalid event msg %d"),