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
This commit is contained in:
Liangwei Dong 2016-09-28 04:03:16 -04:00 • committed by qcabuildsw
commit 87a1ecce02
2 changed files with 15 additions and 4 deletions

View file

@ -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,

View file

@ -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"),