qcacld-3.0: Force SAP on default channel
Currently the driver fails the ACS process if no channel is found suitable for SAP by ACS and thus hotspot cannot be enabled. Fix is to force SAP to come up on some default channel, this behaviour would be controlled via an ini to that customers can choose whether to opt for this behaviour or not. Change-Id: I8a63cf0c5d42802e33f4ad67a33d148a4da54d2a CRs-Fixed: 2658297
Šī revīzija ir iekļauta:

revīziju iesūtīja
nshrivas

vecāks
b4b63306e4
revīzija
18aa9fa4a4
@@ -319,21 +319,24 @@ QDF_STATUS wlansap_pre_start_bss_acs_scan_callback(mac_handle_t mac_handle,
|
||||
|
||||
wlan_sap_filter_non_preferred_channels(mac_ctx->pdev, sap_ctx);
|
||||
if (!sap_ctx->acs_cfg->ch_list_count) {
|
||||
sap_err("No channel left for SAP operation, hotspot fail");
|
||||
sap_ctx->chan_freq = SAP_CHANNEL_NOT_SELECTED;
|
||||
sap_ctx->acs_cfg->pri_ch_freq = SAP_CHANNEL_NOT_SELECTED;
|
||||
sap_config_acs_result(mac_handle, sap_ctx, 0);
|
||||
oper_channel =
|
||||
sap_select_default_oper_chan(mac_ctx,
|
||||
sap_ctx->acs_cfg);
|
||||
sap_ctx->chan_freq = oper_channel;
|
||||
sap_ctx->acs_cfg->pri_ch_freq = oper_channel;
|
||||
sap_config_acs_result(mac_handle, sap_ctx,
|
||||
sap_ctx->acs_cfg->ht_sec_ch_freq);
|
||||
sap_ctx->sap_state = eSAP_ACS_CHANNEL_SELECTED;
|
||||
sap_ctx->sap_status = eSAP_START_BSS_CHANNEL_NOT_SELECTED;
|
||||
sap_ctx->sap_status = eSAP_STATUS_SUCCESS;
|
||||
goto close_session;
|
||||
|
||||
}
|
||||
if (eCSR_SCAN_SUCCESS != scan_status) {
|
||||
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
|
||||
FL("CSR scan_status = eCSR_SCAN_ABORT/FAILURE (%d), choose default channel"),
|
||||
scan_status);
|
||||
oper_channel =
|
||||
sap_select_default_oper_chan(sap_ctx->acs_cfg);
|
||||
sap_select_default_oper_chan(mac_ctx,
|
||||
sap_ctx->acs_cfg);
|
||||
wlansap_set_acs_ch_freq(sap_ctx, oper_channel);
|
||||
sap_ctx->acs_cfg->pri_ch_freq = oper_channel;
|
||||
sap_config_acs_result(mac_handle, sap_ctx,
|
||||
@@ -351,7 +354,8 @@ QDF_STATUS wlansap_pre_start_bss_acs_scan_callback(mac_handle_t mac_handle,
|
||||
if (oper_channel == SAP_CHANNEL_NOT_SELECTED) {
|
||||
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO,
|
||||
FL("No suitable channel, so select default channel"));
|
||||
oper_channel = sap_select_default_oper_chan(sap_ctx->acs_cfg);
|
||||
oper_channel = sap_select_default_oper_chan(mac_ctx,
|
||||
sap_ctx->acs_cfg);
|
||||
}
|
||||
|
||||
wlansap_set_acs_ch_freq(sap_ctx, oper_channel);
|
||||
|
@@ -666,13 +666,24 @@ sap_chan_bond_dfs_sub_chan(struct sap_context *sap_context,
|
||||
return false;
|
||||
}
|
||||
|
||||
uint32_t sap_select_default_oper_chan(struct sap_acs_cfg *acs_cfg)
|
||||
uint32_t sap_select_default_oper_chan(struct mac_context *mac_ctx,
|
||||
struct sap_acs_cfg *acs_cfg)
|
||||
{
|
||||
uint16_t i;
|
||||
|
||||
if (!acs_cfg || !acs_cfg->freq_list || !acs_cfg->ch_list_count)
|
||||
if (!acs_cfg)
|
||||
return 0;
|
||||
|
||||
if (!acs_cfg->ch_list_count || !acs_cfg->freq_list) {
|
||||
if (mac_ctx->mlme_cfg->acs.force_sap_start) {
|
||||
sap_debug("SAP forced, freq selected %d",
|
||||
acs_cfg->master_freq_list[0]);
|
||||
return acs_cfg->master_freq_list[0];
|
||||
} else {
|
||||
sap_debug("No channel left for operation");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
/*
|
||||
* There could be both 2.4Ghz and 5ghz channels present in the list
|
||||
* based upon the Hw mode received from hostapd, it is always better
|
||||
@@ -954,7 +965,7 @@ QDF_STATUS sap_channel_sel(struct sap_context *sap_context)
|
||||
FL("SAP Configuring default ch, Ch_freq=%d"),
|
||||
sap_context->chan_freq);
|
||||
default_op_freq = sap_select_default_oper_chan(
|
||||
sap_context->acs_cfg);
|
||||
mac_ctx, sap_context->acs_cfg);
|
||||
wlansap_set_acs_ch_freq(sap_context, default_op_freq);
|
||||
|
||||
if (sap_context->freq_list) {
|
||||
|
@@ -452,6 +452,7 @@ static inline uint8_t sap_indicate_radar(struct sap_context *sap_ctx)
|
||||
|
||||
/**
|
||||
* sap_select_default_oper_chan() - Select AP mode default operating channel
|
||||
* @mac_ctx: mac context
|
||||
* @acs_cfg: pointer to ACS config info
|
||||
*
|
||||
* Select AP mode default operating channel based on ACS hw mode and channel
|
||||
@@ -460,7 +461,8 @@ static inline uint8_t sap_indicate_radar(struct sap_context *sap_ctx)
|
||||
*
|
||||
* Return: Selected operating channel frequency
|
||||
*/
|
||||
uint32_t sap_select_default_oper_chan(struct sap_acs_cfg *acs_cfg);
|
||||
uint32_t sap_select_default_oper_chan(struct mac_context *mac_ctx,
|
||||
struct sap_acs_cfg *acs_cfg);
|
||||
|
||||
/*
|
||||
* sap_is_dfs_cac_wait_state() - check if sap is in cac wait state
|
||||
|
Atsaukties uz šo jaunā problēmā
Block a user