qcacld-3.0: Add vdev state machine for CSA and radar
Add vdev state machine for Channel change and to handle radar indication. Change-Id: Ib5a5476510ffe55611325c98dd9779261c7bd9a3 CRs-Fixed: 2316574
This commit is contained in:
@@ -1191,6 +1191,14 @@ wlansap_roam_callback(void *ctx, struct csr_roam_info *csr_roam_info,
|
||||
wlansap_roam_process_dfs_radar_found(mac_ctx, sap_ctx,
|
||||
&qdf_ret_status);
|
||||
break;
|
||||
case eCSR_ROAM_RESULT_CSA_RESTART_RSP:
|
||||
qdf_ret_status = wlansap_dfs_send_csa_ie_request(sap_ctx);
|
||||
|
||||
if (!QDF_IS_STATUS_SUCCESS(qdf_ret_status))
|
||||
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH,
|
||||
FL("CSR roam_result = eCSR_ROAM_RESULT_CSA_RESTART_RSP %d"),
|
||||
roam_result);
|
||||
break;
|
||||
case eCSR_ROAM_RESULT_DFS_CHANSW_UPDATE_SUCCESS:
|
||||
wlansap_roam_process_dfs_chansw_update(hal, sap_ctx,
|
||||
&qdf_ret_status);
|
||||
|
@@ -2262,7 +2262,11 @@ sap_fsm_state_init(struct sap_context *sap_ctx,
|
||||
QDF_TRACE_LEVEL_ERROR,
|
||||
FL("sap_goto_starting failed"));
|
||||
} else if (msg == eSAP_DFS_CHANNEL_CAC_START) {
|
||||
#ifndef CONFIG_VDEV_SM
|
||||
#ifdef CONFIG_VDEV_SM
|
||||
sap_ctx->fsm_state = SAP_STARTING;
|
||||
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_MED,
|
||||
FL("from state SAP_INIT => SAP_STARTING"));
|
||||
#else
|
||||
/*
|
||||
* No need of state check here, caller is expected to perform
|
||||
* the checks before sending the event
|
||||
@@ -2681,12 +2685,19 @@ static QDF_STATUS sap_fsm_state_started(struct sap_context *sap_ctx,
|
||||
QDF_TRACE_LEVEL_INFO_MED,
|
||||
FL("sapdfs: Sending CSAIE for sapctx[%pK]"),
|
||||
temp_sap_ctx);
|
||||
#ifdef CONFIG_VDEV_SM
|
||||
qdf_status = sme_csa_restart(mac_ctx,
|
||||
temp_sap_ctx->sessionId);
|
||||
#else
|
||||
|
||||
qdf_status =
|
||||
wlansap_dfs_send_csa_ie_request(temp_sap_ctx);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
} else if (eSAP_CHANNEL_SWITCH_ANNOUNCEMENT_START == msg) {
|
||||
}
|
||||
#ifndef CONFIG_VDEV_SM
|
||||
else if (eSAP_CHANNEL_SWITCH_ANNOUNCEMENT_START == msg) {
|
||||
enum QDF_OPMODE persona;
|
||||
|
||||
if (!sap_ctx) {
|
||||
@@ -2704,7 +2715,9 @@ static QDF_STATUS sap_fsm_state_started(struct sap_context *sap_ctx,
|
||||
|
||||
if ((QDF_SAP_MODE == persona) || (QDF_P2P_GO_MODE == persona))
|
||||
qdf_status = wlansap_dfs_send_csa_ie_request(sap_ctx);
|
||||
} else {
|
||||
}
|
||||
#endif
|
||||
else {
|
||||
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
|
||||
FL("in state %s, invalid event msg %d"),
|
||||
"SAP_STARTED", msg);
|
||||
|
@@ -42,8 +42,9 @@ typedef enum {
|
||||
eSAP_DFS_CHANNEL_CAC_END,
|
||||
eSAP_DFS_CHNL_SWITCH_ANNOUNCEMENT_START,
|
||||
eSAP_OPERATING_CHANNEL_CHANGED,
|
||||
#ifndef CONFIG_VDEV_SM
|
||||
eSAP_CHANNEL_SWITCH_ANNOUNCEMENT_START,
|
||||
|
||||
#endif
|
||||
eSAP_NO_MSG
|
||||
} eSapMsg_t;
|
||||
|
||||
|
@@ -1264,8 +1264,9 @@ QDF_STATUS wlansap_set_channel_change_with_csa(struct sap_context *sapContext,
|
||||
enum phy_ch_width target_bw,
|
||||
bool strict)
|
||||
{
|
||||
|
||||
#ifndef CONFIG_VDEV_SM
|
||||
tWLAN_SAPEvent sapEvent;
|
||||
#endif
|
||||
tpAniSirGlobal pMac = NULL;
|
||||
void *hHal = NULL;
|
||||
bool valid;
|
||||
@@ -1394,7 +1395,9 @@ QDF_STATUS wlansap_set_channel_change_with_csa(struct sap_context *sapContext,
|
||||
pMac->sap.SapDfsInfo.cac_state =
|
||||
eSAP_DFS_DO_NOT_SKIP_CAC;
|
||||
sap_cac_reset_notify(hHal);
|
||||
|
||||
#ifdef CONFIG_VDEV_SM
|
||||
sme_csa_restart(hHal, sapContext->sessionId);
|
||||
#else
|
||||
/*
|
||||
* Post the eSAP_CHANNEL_SWITCH_ANNOUNCEMENT_START
|
||||
* to SAP state machine to process the channel
|
||||
@@ -1407,7 +1410,7 @@ QDF_STATUS wlansap_set_channel_change_with_csa(struct sap_context *sapContext,
|
||||
sapEvent.u2 = 0;
|
||||
|
||||
sap_fsm(sapContext, &sapEvent);
|
||||
|
||||
#endif
|
||||
} else {
|
||||
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
|
||||
"%s: Failed to request Channel Change, since SAP is not in SAP_STARTED state",
|
||||
|
Reference in New Issue
Block a user