qcacld-3.0: Do not switch channel when target channel is 0

When all the configured channel are in NOL list, the target channel
will be set as 0 and sap will be stopped.
Currently a workqueue is created to stop sap, so channel switch may
still happens if it is called before this workqueue is executed.

Switch channel should be not happened when target channel is 0.

Change-Id: I368830bddcd9363826f6f2c8898b86ece8dd7d89
CRs-Fixed: 2203899
This commit is contained in:
bings 2018-03-21 17:21:40 +08:00 • committed by nshrivas
commit fe10dd1441

View file

@ -2365,6 +2365,11 @@ static QDF_STATUS sap_fsm_state_dfs_cac_wait(struct sap_context *sap_ctx,
wlan_reg_set_channel_params(mac_ctx->pdev,
mac_ctx->sap.SapDfsInfo.target_channel, 0,
&sap_ctx->ch_params);
} else {
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
FL("Invalid target channel %d"),
mac_ctx->sap.SapDfsInfo.target_channel);
return qdf_status;
}
for (intf = 0; intf < SAP_MAX_NUM_SESSION; intf++) {
@ -2584,6 +2589,13 @@ static QDF_STATUS sap_fsm_state_started(struct sap_context *sap_ctx,
qdf_status = sap_goto_disconnecting(sap_ctx);
} else if (eSAP_DFS_CHNL_SWITCH_ANNOUNCEMENT_START == msg) {
uint8_t intf;
if (!mac_ctx->sap.SapDfsInfo.target_channel) {
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
FL("Invalid target channel %d"),
mac_ctx->sap.SapDfsInfo.target_channel);
return qdf_status;
}
/*
* Radar is seen on the current operating channel
* send CSA IE for all associated stations