qcacld-3.0: Fix treating channel id as frequency issue for SAP

There are CSA IE/beacon template cmd with duplicate IE COUNT: 10.
And interval of 2nd IE COUNT: 10 and IE COUNT: 9 is much less than
100 ms.
Radar is triggered,  tried to switch to channel 11, but set
target chan id 11 as frequency 11 wrongly,   frequency 11 is illegal
and disabled, then switch to new freq: 2412 again.

Change-Id: Id2e5823795ae2f61e6d7cbbbc91c4f485ddeceb3
CRs-Fixed: 2838113
This commit is contained in:
Jianmin Zhu
2020-12-15 08:46:17 +08:00
zatwierdzone przez snandini
rodzic 51da526660
commit e0fc4e83f2
5 zmienionych plików z 30 dodań i 29 usunięć

Wyświetl plik

@@ -848,16 +848,17 @@ QDF_STATUS wlan_sap_set_pre_cac_status(struct sap_context *sap_ctx,
bool status);
/**
* wlan_sap_set_chan_before_pre_cac() - Save the channel before pre cac
* wlan_sap_set_chan_freq_before_pre_cac() - Save the channel before pre cac
* @sap_ctx: SAP context
* @chan_before_pre_cac: Channel before pre cac
* @freq_before_pre_cac: Channel frequency before pre cac
*
* Saves the channel that was in use before pre cac operation
* Saves the channel frequency that was in use before pre cac operation
*
* Return: QDF_STATUS
*/
QDF_STATUS wlan_sap_set_chan_before_pre_cac(struct sap_context *sap_ctx,
uint8_t chan_before_pre_cac);
QDF_STATUS
wlan_sap_set_chan_freq_before_pre_cac(struct sap_context *sap_ctx,
qdf_freq_t freq_before_pre_cac);
#else
static inline QDF_STATUS
wlan_sap_set_pre_cac_status(struct sap_context *sap_ctx, bool status)
@@ -866,8 +867,8 @@ wlan_sap_set_pre_cac_status(struct sap_context *sap_ctx, bool status)
}
static inline QDF_STATUS
wlan_sap_set_chan_before_pre_cac(struct sap_context *sap_ctx,
uint8_t chan_before_pre_cac)
wlan_sap_set_chan_freq_before_pre_cac(struct sap_context *sap_ctx,
qdf_freq_t freq_before_pre_cac)
{
return QDF_STATUS_SUCCESS;
}

Wyświetl plik

@@ -1119,7 +1119,7 @@ QDF_STATUS sap_set_session_param(mac_handle_t mac_handle,
sapctx->sessionId = session_id;
sapctx->is_pre_cac_on = false;
sapctx->pre_cac_complete = false;
sapctx->chan_before_pre_cac = 0;
sapctx->freq_before_pre_cac = 0;
/* When SSR, SAP will restart, clear the old context,sessionId */
for (i = 0; i < SAP_MAX_NUM_SESSION; i++) {
@@ -3538,10 +3538,10 @@ qdf_freq_t sap_indicate_radar(struct sap_context *sap_ctx)
/* set the Radar Found flag in SapDfsInfo */
mac->sap.SapDfsInfo.sap_radar_found_status = true;
if (sap_ctx->chan_before_pre_cac) {
sap_info("sapdfs: set chan before pre cac %d as target chan",
sap_ctx->chan_before_pre_cac);
return sap_ctx->chan_before_pre_cac;
if (sap_ctx->freq_before_pre_cac) {
sap_info("sapdfs: set chan freq before pre cac %d as target chan",
sap_ctx->freq_before_pre_cac);
return sap_ctx->freq_before_pre_cac;
}
if (sap_ctx->vendor_acs_dfs_lte_enabled && (QDF_STATUS_SUCCESS ==

Wyświetl plik

@@ -221,7 +221,7 @@ struct sap_context {
bool vendor_acs_dfs_lte_enabled;
uint8_t dfs_vendor_channel;
uint8_t dfs_vendor_chan_bw;
uint8_t chan_before_pre_cac;
qdf_freq_t freq_before_pre_cac;
uint16_t beacon_tx_rate;
enum sap_acs_dfs_mode dfs_mode;
wlan_scan_requester req_id;

Wyświetl plik

@@ -1587,15 +1587,16 @@ QDF_STATUS wlan_sap_set_pre_cac_status(struct sap_context *sap_ctx,
return QDF_STATUS_SUCCESS;
}
QDF_STATUS wlan_sap_set_chan_before_pre_cac(struct sap_context *sap_ctx,
uint8_t chan_before_pre_cac)
QDF_STATUS
wlan_sap_set_chan_freq_before_pre_cac(struct sap_context *sap_ctx,
qdf_freq_t freq_before_pre_cac)
{
if (!sap_ctx) {
sap_err("Invalid SAP pointer");
return QDF_STATUS_E_FAULT;
}
sap_ctx->chan_before_pre_cac = chan_before_pre_cac;
sap_ctx->freq_before_pre_cac = freq_before_pre_cac;
return QDF_STATUS_SUCCESS;
}
#endif /* FEATURE_SAP_COND_CHAN_SWITCH */