qcacld-3.0: Move second DFS AP to CAC wait

If the first DFS AP is in CAC progress and second
AP starts on DFS chan, move the second AP to CAC
wait state as well.
Otherwise, when CAC end, the second AP will always
stay in "WLAN_VDEV_S_START" state and can not
handle CAC end event.

Change-Id: I440ce3339dd2afb62bdb574f2f785d733a980933
CRs-Fixed: 2426714
这个提交包含在:
Liangwei Dong
2019-04-02 06:44:54 -04:00
提交者 nshrivas
父节点 4710404f78
当前提交 bf6e36876e

查看文件

@@ -2270,6 +2270,30 @@ static QDF_STATUS sap_goto_starting(struct sap_context *sap_ctx,
return qdf_status; return qdf_status;
} }
#ifdef CONFIG_VDEV_SM
/**
* sap_move_to_cac_wait_state() - move to cac wait state
* @sap_ctx: SAP context
*
* Return: QDF_STATUS
*/
static QDF_STATUS sap_move_to_cac_wait_state(struct sap_context *sap_ctx)
{
QDF_STATUS status;
status =
wlan_vdev_mlme_sm_deliver_evt(sap_ctx->vdev,
WLAN_VDEV_SM_EV_DFS_CAC_WAIT,
0, NULL);
return status;
}
#else
static inline QDF_STATUS sap_move_to_cac_wait_state(struct sap_context *sap_ctx)
{
return QDF_STATUS_SUCCESS;
}
#endif
/** /**
* sap_fsm_cac_start() - start cac wait timer * sap_fsm_cac_start() - start cac wait timer
* @sap_ctx: SAP context * @sap_ctx: SAP context
@@ -2292,6 +2316,8 @@ static QDF_STATUS sap_fsm_cac_start(struct sap_context *sap_ctx,
FL("sapdfs: starting dfs cac timer on sapctx[%pK]"), FL("sapdfs: starting dfs cac timer on sapctx[%pK]"),
sap_ctx); sap_ctx);
sap_start_dfs_cac_timer(sap_ctx); sap_start_dfs_cac_timer(sap_ctx);
} else {
sap_move_to_cac_wait_state(sap_ctx);
} }
return sap_cac_start_notify(mac_handle); return sap_cac_start_notify(mac_handle);
@@ -3752,30 +3778,6 @@ static int sap_stop_dfs_cac_timer(struct sap_context *sap_ctx)
return 0; return 0;
} }
#ifdef CONFIG_VDEV_SM
/**
* sap_move_to_cac_wait_state() - move to cac wait state
* @sap_ctx: SAP context
*
* Return: QDF_STATUS
*/
static QDF_STATUS sap_move_to_cac_wait_state(struct sap_context *sap_ctx)
{
QDF_STATUS status;
status =
wlan_vdev_mlme_sm_deliver_evt(sap_ctx->vdev,
WLAN_VDEV_SM_EV_DFS_CAC_WAIT,
0, NULL);
return status;
}
#else
static inline QDF_STATUS sap_move_to_cac_wait_state(struct sap_context *sap_ctx)
{
return QDF_STATUS_SUCCESS;
}
#endif
/* /*
* Function to start the DFS CAC Timer * Function to start the DFS CAC Timer
* when SAP is started on a DFS channel * when SAP is started on a DFS channel