qcacld-3.0: Fix AP state mismatch between hostapd and driver
AGO/AP is started and beaconing, but the hostapd_cli status cmd still show "dfs". This will happen when the STA connected on DFS channel and AGO/AP is starting on same DFS channel. By design the AGO/AP CAC is skipped due to STA+SAP DFS concurrency. If we skip CAC timer, we will need to indicate the CAC event even though driver doesn't perform CAC, otherwise hostapd will stuck in "DFS" state. Change-Id: I7961d0b976fd84fc1f29449d98eb150d1463a92f CRs-Fixed: 2733624
This commit is contained in:
@@ -2483,6 +2483,43 @@ static QDF_STATUS sap_fsm_handle_start_failure(struct sap_context *sap_ctx,
|
|||||||
return qdf_status;
|
return qdf_status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* sap_propagate_cac_events() - Indicate CAC START/END event
|
||||||
|
* @sap_ctx: SAP context
|
||||||
|
*
|
||||||
|
* This function is to indicate CAC START/END event if CAC process
|
||||||
|
* is skipped.
|
||||||
|
*
|
||||||
|
* Return: void
|
||||||
|
*/
|
||||||
|
static void sap_propagate_cac_events(struct sap_context *sap_ctx)
|
||||||
|
{
|
||||||
|
QDF_STATUS qdf_status;
|
||||||
|
|
||||||
|
qdf_status = sap_signal_hdd_event(sap_ctx, NULL,
|
||||||
|
eSAP_DFS_CAC_START,
|
||||||
|
(void *)
|
||||||
|
eSAP_STATUS_SUCCESS);
|
||||||
|
if (qdf_status != QDF_STATUS_SUCCESS) {
|
||||||
|
QDF_TRACE(QDF_MODULE_ID_SAP,
|
||||||
|
QDF_TRACE_LEVEL_DEBUG,
|
||||||
|
"failed to indicate CAC START vdev %d",
|
||||||
|
sap_ctx->sessionId);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
qdf_status = sap_signal_hdd_event(sap_ctx, NULL,
|
||||||
|
eSAP_DFS_CAC_END,
|
||||||
|
(void *)
|
||||||
|
eSAP_STATUS_SUCCESS);
|
||||||
|
if (qdf_status != QDF_STATUS_SUCCESS) {
|
||||||
|
QDF_TRACE(QDF_MODULE_ID_SAP,
|
||||||
|
QDF_TRACE_LEVEL_DEBUG,
|
||||||
|
"failed to indicate CAC End vdev %d",
|
||||||
|
sap_ctx->sessionId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* sap_fsm_state_starting() - utility function called from sap fsm
|
* sap_fsm_state_starting() - utility function called from sap fsm
|
||||||
* @sap_ctx: SAP context
|
* @sap_ctx: SAP context
|
||||||
@@ -2588,6 +2625,16 @@ static QDF_STATUS sap_fsm_state_starting(struct sap_context *sap_ctx,
|
|||||||
QDF_TRACE(QDF_MODULE_ID_SAP,
|
QDF_TRACE(QDF_MODULE_ID_SAP,
|
||||||
QDF_TRACE_LEVEL_INFO_HIGH,
|
QDF_TRACE_LEVEL_INFO_HIGH,
|
||||||
FL("skip cac timer"));
|
FL("skip cac timer"));
|
||||||
|
/*
|
||||||
|
* If hostapd starts AP on dfs channel,
|
||||||
|
* hostapd will wait for CAC START/CAC END
|
||||||
|
* event and finish AP start process.
|
||||||
|
* If we skip CAC timer, we will need to
|
||||||
|
* indicate the CAC event even though driver
|
||||||
|
* doesn't perform CAC.
|
||||||
|
*/
|
||||||
|
sap_propagate_cac_events(sap_ctx);
|
||||||
|
|
||||||
wlansap_start_beacon_req(sap_ctx);
|
wlansap_start_beacon_req(sap_ctx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user