|
@@ -2796,11 +2796,18 @@ static QDF_STATUS sap_cac_start_notify(tHalHandle hHal)
|
|
|
for (intf = 0; intf < SAP_MAX_NUM_SESSION; intf++) {
|
|
|
struct sap_context *pSapContext =
|
|
|
pMac->sap.sapCtxList[intf].pSapContext;
|
|
|
+ tCsrRoamProfile *profile;
|
|
|
+
|
|
|
if (((QDF_SAP_MODE == pMac->sap.sapCtxList[intf].sapPersona)
|
|
|
||
|
|
|
(QDF_P2P_GO_MODE == pMac->sap.sapCtxList[intf].sapPersona))
|
|
|
&& pMac->sap.sapCtxList[intf].pSapContext != NULL &&
|
|
|
(false == pSapContext->isCacStartNotified)) {
|
|
|
+ /* Don't start CAC for non-dfs channel, its violation */
|
|
|
+ profile = &pSapContext->csr_roamProfile;
|
|
|
+ if (!wlan_reg_is_dfs_ch(pMac->pdev,
|
|
|
+ profile->operationChannel))
|
|
|
+ continue;
|
|
|
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_MED,
|
|
|
"sapdfs: Signaling eSAP_DFS_CAC_START to HDD for sapctx[%pK]",
|
|
|
pSapContext);
|
|
@@ -2888,6 +2895,8 @@ static QDF_STATUS sap_cac_end_notify(tHalHandle hHal, tCsrRoamInfo *roamInfo)
|
|
|
for (intf = 0; intf < SAP_MAX_NUM_SESSION; intf++) {
|
|
|
struct sap_context *pSapContext =
|
|
|
pMac->sap.sapCtxList[intf].pSapContext;
|
|
|
+ tCsrRoamProfile *profile;
|
|
|
+
|
|
|
if (((QDF_SAP_MODE == pMac->sap.sapCtxList[intf].sapPersona)
|
|
|
||
|
|
|
(QDF_P2P_GO_MODE == pMac->sap.sapCtxList[intf].sapPersona))
|
|
@@ -2895,6 +2904,11 @@ static QDF_STATUS sap_cac_end_notify(tHalHandle hHal, tCsrRoamInfo *roamInfo)
|
|
|
(false == pSapContext->isCacEndNotified) &&
|
|
|
(pSapContext->sapsMachine == eSAP_DFS_CAC_WAIT)) {
|
|
|
pSapContext = pMac->sap.sapCtxList[intf].pSapContext;
|
|
|
+ /* Don't check CAC for non-dfs channel */
|
|
|
+ profile = &pSapContext->csr_roamProfile;
|
|
|
+ if (!wlan_reg_is_dfs_ch(pMac->pdev,
|
|
|
+ profile->operationChannel))
|
|
|
+ continue;
|
|
|
|
|
|
/* If this is an end notification of a pre cac, the
|
|
|
* SAP must not start beaconing and must delete the
|
|
@@ -3242,6 +3256,8 @@ static QDF_STATUS sap_fsm_state_dfs_cac_wait(struct sap_context *sap_ctx,
|
|
|
|
|
|
for (intf = 0; intf < SAP_MAX_NUM_SESSION; intf++) {
|
|
|
struct sap_context *t_sap_ctx;
|
|
|
+ tCsrRoamProfile *profile;
|
|
|
+
|
|
|
t_sap_ctx = mac_ctx->sap.sapCtxList[intf].pSapContext;
|
|
|
if (((QDF_SAP_MODE ==
|
|
|
mac_ctx->sap.sapCtxList[intf].sapPersona) ||
|
|
@@ -3249,8 +3265,12 @@ static QDF_STATUS sap_fsm_state_dfs_cac_wait(struct sap_context *sap_ctx,
|
|
|
mac_ctx->sap.sapCtxList[intf].sapPersona)) &&
|
|
|
t_sap_ctx != NULL &&
|
|
|
t_sap_ctx->sapsMachine != eSAP_DISCONNECTED) {
|
|
|
+ profile = &t_sap_ctx->csr_roamProfile;
|
|
|
+ if (!wlan_reg_is_dfs_ch(mac_ctx->pdev,
|
|
|
+ profile->operationChannel))
|
|
|
+ continue;
|
|
|
/* SAP to be moved to DISCONNECTING state */
|
|
|
- sap_ctx->sapsMachine = eSAP_DISCONNECTING;
|
|
|
+ t_sap_ctx->sapsMachine = eSAP_DISCONNECTING;
|
|
|
/*
|
|
|
* eSAP_DFS_CHANNEL_CAC_RADAR_FOUND:
|
|
|
* A Radar is found on current DFS Channel
|
|
@@ -3460,6 +3480,8 @@ static QDF_STATUS sap_fsm_state_started(struct sap_context *sap_ctx,
|
|
|
*/
|
|
|
for (intf = 0; intf < SAP_MAX_NUM_SESSION; intf++) {
|
|
|
struct sap_context *temp_sap_ctx;
|
|
|
+ tCsrRoamProfile *profile;
|
|
|
+
|
|
|
if (((QDF_SAP_MODE ==
|
|
|
mac_ctx->sap.sapCtxList[intf].sapPersona) ||
|
|
|
(QDF_P2P_GO_MODE ==
|
|
@@ -3467,6 +3489,14 @@ static QDF_STATUS sap_fsm_state_started(struct sap_context *sap_ctx,
|
|
|
mac_ctx->sap.sapCtxList[intf].pSapContext != NULL) {
|
|
|
temp_sap_ctx =
|
|
|
mac_ctx->sap.sapCtxList[intf].pSapContext;
|
|
|
+ /*
|
|
|
+ * Radar won't come on non-dfs channel, so
|
|
|
+ * no need to move them
|
|
|
+ */
|
|
|
+ profile = &temp_sap_ctx->csr_roamProfile;
|
|
|
+ if (!wlan_reg_is_dfs_ch(mac_ctx->pdev,
|
|
|
+ profile->operationChannel))
|
|
|
+ continue;
|
|
|
QDF_TRACE(QDF_MODULE_ID_SAP,
|
|
|
QDF_TRACE_LEVEL_INFO_MED,
|
|
|
FL("sapdfs: Sending CSAIE for sapctx[%pK]"),
|
|
@@ -4505,9 +4535,17 @@ uint8_t sap_get_total_number_sap_intf(tHalHandle hHal)
|
|
|
return intf_count;
|
|
|
}
|
|
|
|
|
|
-/*
|
|
|
+/**
|
|
|
+ * is_concurrent_sap_ready_for_channel_change() - to check all saps are ready
|
|
|
+ * for channel change
|
|
|
+ * @hHal: HAL pointer
|
|
|
+ * @sapContext: sap context for which this function has been called
|
|
|
+ *
|
|
|
* This function will find the concurrent sap context apart from
|
|
|
* passed sap context and return its channel change ready status
|
|
|
+ *
|
|
|
+ *
|
|
|
+ * Return: true if other SAP personas are ready to channel switch else false
|
|
|
*/
|
|
|
bool is_concurrent_sap_ready_for_channel_change(tHalHandle hHal,
|
|
|
struct sap_context *sapContext)
|
|
@@ -4541,3 +4579,54 @@ bool is_concurrent_sap_ready_for_channel_change(tHalHandle hHal,
|
|
|
}
|
|
|
return false;
|
|
|
}
|
|
|
+
|
|
|
+/**
|
|
|
+ * sap_is_conc_sap_doing_scc_dfs() - check if conc SAPs are doing SCC DFS
|
|
|
+ * @hal: pointer to hal
|
|
|
+ * @sap_context: current SAP persona's channel
|
|
|
+ *
|
|
|
+ * If provided SAP's channel is DFS then Loop through each SAP or GO persona and
|
|
|
+ * check if other beaconing entity's channel is same DFS channel. If they are
|
|
|
+ * same then concurrent sap is doing SCC DFS.
|
|
|
+ *
|
|
|
+ * Return: true if two or more beaconing entitity doing SCC DFS else false
|
|
|
+ */
|
|
|
+bool sap_is_conc_sap_doing_scc_dfs(tHalHandle hal,
|
|
|
+ struct sap_context *given_sapctx)
|
|
|
+{
|
|
|
+ tpAniSirGlobal mac = PMAC_STRUCT(hal);
|
|
|
+ struct sap_context *sap_ctx;
|
|
|
+ uint8_t intf = 0, scc_dfs_counter = 0;
|
|
|
+
|
|
|
+ /*
|
|
|
+ * current SAP persona's channel itself is not DFS, so no need to check
|
|
|
+ * what other persona's channel is
|
|
|
+ */
|
|
|
+ if (!wlan_reg_is_dfs_ch(mac->pdev,
|
|
|
+ given_sapctx->csr_roamProfile.operationChannel)) {
|
|
|
+ QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_DEBUG,
|
|
|
+ FL("skip this loop as provided channel is non-dfs"));
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ for (intf = 0; intf < SAP_MAX_NUM_SESSION; intf++) {
|
|
|
+ if ((QDF_SAP_MODE != mac->sap.sapCtxList[intf].sapPersona) &&
|
|
|
+ (QDF_P2P_GO_MODE != mac->sap.sapCtxList[intf].sapPersona))
|
|
|
+ continue;
|
|
|
+ if (!mac->sap.sapCtxList[intf].pSapContext)
|
|
|
+ continue;
|
|
|
+ sap_ctx = mac->sap.sapCtxList[intf].pSapContext;
|
|
|
+ /* if same SAP contexts then skip to next context */
|
|
|
+ if (sap_ctx == given_sapctx)
|
|
|
+ continue;
|
|
|
+ if (given_sapctx->csr_roamProfile.operationChannel ==
|
|
|
+ sap_ctx->csr_roamProfile.operationChannel)
|
|
|
+ scc_dfs_counter++;
|
|
|
+ }
|
|
|
+
|
|
|
+ /* Found atleast two of the beaconing entities doing SCC DFS */
|
|
|
+ if (scc_dfs_counter)
|
|
|
+ return true;
|
|
|
+
|
|
|
+ return false;
|
|
|
+}
|