qcacld-3.0: Refactor more dfs cfg items
Refactor following DFS cfg items CFG_DISABLE_DFS_CH_SWITCH CFG_ENABLE_DFS_PHYERR_FILTEROFFLOAD_NAME CFG_IGNORE_CAC_NAME CFG_DFS_RADAR_PRI_MULTIPLIER_NAME CFG_SAP_TX_LEAKAGE_THRESHOLD_NAME CFG_DFS_BEACON_TX_ENHANCED CFG_DISABLE_DFS_JAPAN_W53 CFG_ENABLE_NON_DFS_CHAN_ON_RADAR Change-Id: I7f39ed0680919c6a383d9b8bae5864f979b6948c CRs-Fixed: 2351995
This commit is contained in:
@@ -587,7 +587,6 @@ typedef struct sap_config {
|
||||
uint32_t ap_table_expiration_time;
|
||||
uint32_t ht_op_mode_fixed;
|
||||
enum QDF_OPMODE persona; /* Tells us which persona, GO or AP */
|
||||
uint8_t disableDFSChSwitch;
|
||||
bool enOverLapCh;
|
||||
#ifdef WLAN_FEATURE_11W
|
||||
bool mfpRequired;
|
||||
@@ -625,7 +624,6 @@ typedef struct sap_config {
|
||||
uint8_t sap_chanswitch_beacon_cnt;
|
||||
uint8_t sap_chanswitch_mode;
|
||||
bool chan_switch_hostapd_rate_enabled;
|
||||
bool dfs_beacon_tx_enhanced;
|
||||
uint16_t reduced_beacon_interval;
|
||||
} tsap_config_t;
|
||||
|
||||
@@ -720,7 +718,6 @@ typedef struct sSapDfsInfo {
|
||||
/* beacon count before channel switch */
|
||||
uint8_t sap_ch_switch_beacon_cnt;
|
||||
uint8_t sap_ch_switch_mode;
|
||||
bool dfs_beacon_tx_enhanced;
|
||||
uint16_t reduced_beacon_interval;
|
||||
} tSapDfsInfo;
|
||||
|
||||
@@ -1268,19 +1265,6 @@ QDF_STATUS wlansap_get_dfs_ignore_cac(mac_handle_t mac_handle,
|
||||
QDF_STATUS wlansap_set_dfs_ignore_cac(mac_handle_t mac_handle,
|
||||
uint8_t ignore_cac);
|
||||
|
||||
/**
|
||||
* wlansap_set_dfs_restrict_japan_w53() - enable/disable dfS for japan
|
||||
* @mac_handle: Opaque handle to the global MAC context
|
||||
* @disable_dfs_w53: Indicates if Japan W53 is disabled when set to 1
|
||||
* Indicates if Japan W53 is enabled when set to 0
|
||||
*
|
||||
* This API is used to enable or disable Japan W53 Band
|
||||
* Return: The QDF_STATUS code associated with performing the operation
|
||||
* QDF_STATUS_SUCCESS: Success
|
||||
*/
|
||||
QDF_STATUS wlansap_set_dfs_restrict_japan_w53(mac_handle_t mac_handle,
|
||||
uint8_t disable_dfs_w53);
|
||||
|
||||
#ifdef FEATURE_AP_MCC_CH_AVOIDANCE
|
||||
QDF_STATUS
|
||||
wlan_sap_set_channel_avoidance(mac_handle_t mac_handle,
|
||||
@@ -1438,18 +1422,6 @@ QDF_STATUS wlansap_acs_chselect(struct sap_context *sap_context,
|
||||
*/
|
||||
uint32_t wlansap_get_chan_width(struct sap_context *sap_ctx);
|
||||
|
||||
/**
|
||||
* wlansap_set_tx_leakage_threshold() - set sap tx leakage threshold.
|
||||
* @mac_handle: Opaque handle to the global MAC context
|
||||
* @tx_leakage_threshold: sap tx leakage threshold
|
||||
*
|
||||
* This function set sap tx leakage threshold.
|
||||
*
|
||||
* Return: QDF_STATUS.
|
||||
*/
|
||||
QDF_STATUS wlansap_set_tx_leakage_threshold(mac_handle_t mac_handle,
|
||||
uint16_t tx_leakage_threshold);
|
||||
|
||||
/*
|
||||
* wlansap_set_invalid_session() - set session ID to invalid
|
||||
* @sap_ctx: pointer to the SAP context
|
||||
|
@@ -419,7 +419,7 @@ wlansap_roam_process_dfs_chansw_update(mac_handle_t mac_handle,
|
||||
uint8_t dfs_beacon_start_req = 0;
|
||||
bool sap_scc_dfs;
|
||||
|
||||
if (sap_ctx->csr_roamProfile.disableDFSChSwitch) {
|
||||
if (mac_ctx->mlme_cfg->dfs_cfg.dfs_disable_channel_switch) {
|
||||
QDF_TRACE(QDF_MODULE_ID_SAP,
|
||||
QDF_TRACE_LEVEL_ERROR,
|
||||
FL("sapdfs: DFS channel switch disabled"));
|
||||
@@ -582,7 +582,7 @@ wlansap_roam_process_dfs_radar_found(tpAniSirGlobal mac_ctx,
|
||||
tWLAN_SAPEvent sap_event;
|
||||
|
||||
if (sap_is_dfs_cac_wait_state(sap_ctx)) {
|
||||
if (sap_ctx->csr_roamProfile.disableDFSChSwitch) {
|
||||
if (mac_ctx->mlme_cfg->dfs_cfg.dfs_disable_channel_switch) {
|
||||
QDF_TRACE(QDF_MODULE_ID_SAP,
|
||||
QDF_TRACE_LEVEL_ERROR,
|
||||
"sapdfs: DFS channel switch disabled");
|
||||
|
@@ -193,7 +193,7 @@ static uint8_t sap_random_channel_sel(struct sap_context *sap_ctx)
|
||||
uint8_t ch_wd;
|
||||
struct wlan_objmgr_pdev *pdev = NULL;
|
||||
struct ch_params *ch_params;
|
||||
uint32_t hw_mode;
|
||||
uint32_t hw_mode, flag = 0;
|
||||
struct mac_context *mac_ctx;
|
||||
struct dfs_acs_info acs_info = {0};
|
||||
|
||||
@@ -226,8 +226,12 @@ static uint8_t sap_random_channel_sel(struct sap_context *sap_ctx)
|
||||
} else {
|
||||
acs_info.acs_mode = false;
|
||||
}
|
||||
|
||||
if (mac_ctx->mlme_cfg->dfs_cfg.dfs_prefer_non_dfs)
|
||||
flag |= DFS_RANDOM_CH_FLAG_NO_DFS_CH;
|
||||
|
||||
if (QDF_IS_STATUS_ERROR(utils_dfs_get_random_channel(
|
||||
pdev, 0, ch_params, &hw_mode, &ch, &acs_info))) {
|
||||
pdev, flag, ch_params, &hw_mode, &ch, &acs_info))) {
|
||||
/* No available channel found */
|
||||
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
|
||||
FL("No available channel found!!!"));
|
||||
@@ -544,34 +548,12 @@ void sap_dfs_set_current_channel(void *ctx)
|
||||
tgt_dfs_get_radars(pdev);
|
||||
}
|
||||
tgt_dfs_set_phyerr_filter_offload(pdev);
|
||||
if (sap_ctx->csr_roamProfile.disableDFSChSwitch)
|
||||
if (mac_ctx->mlme_cfg->dfs_cfg.dfs_disable_channel_switch)
|
||||
tgt_dfs_control(pdev, DFS_SET_USENOL, &use_nol,
|
||||
sizeof(uint32_t), NULL, NULL, &error);
|
||||
}
|
||||
}
|
||||
|
||||
bool sap_dfs_is_w53_invalid(mac_handle_t mac_handle, uint8_t channel_id)
|
||||
{
|
||||
tpAniSirGlobal mac;
|
||||
|
||||
mac = MAC_CONTEXT(mac_handle);
|
||||
if (NULL == mac) {
|
||||
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
|
||||
FL("invalid mac"));
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
* Check for JAPAN W53 Channel operation capability
|
||||
*/
|
||||
if (true == mac->sap.SapDfsInfo.is_dfs_w53_disabled &&
|
||||
true == IS_CHAN_JAPAN_W53(channel_id)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool sap_dfs_is_channel_in_preferred_location(mac_handle_t mac_handle,
|
||||
uint8_t channel_id)
|
||||
{
|
||||
@@ -2826,7 +2808,6 @@ sapconvert_to_csr_profile(tsap_config_t *pconfig_params, eCsrRoamBssType bssType
|
||||
profile->BSSType = eCSR_BSS_TYPE_INFRA_AP;
|
||||
profile->SSIDs.numOfSSIDs = 1;
|
||||
profile->csrPersona = pconfig_params->persona;
|
||||
profile->disableDFSChSwitch = pconfig_params->disableDFSChSwitch;
|
||||
|
||||
qdf_mem_zero(profile->SSIDs.SSIDList[0].SSID.ssId,
|
||||
sizeof(profile->SSIDs.SSIDList[0].SSID.ssId));
|
||||
@@ -3462,7 +3443,7 @@ uint8_t sap_indicate_radar(struct sap_context *sap_ctx)
|
||||
if (sap_ctx->fsm_state == SAP_STARTED)
|
||||
mac->sap.SapDfsInfo.csaIERequired = true;
|
||||
|
||||
if (sap_ctx->csr_roamProfile.disableDFSChSwitch)
|
||||
if (mac->mlme_cfg->dfs_cfg.dfs_disable_channel_switch)
|
||||
return sap_ctx->channel;
|
||||
|
||||
/* set the Radar Found flag in SapDfsInfo */
|
||||
|
@@ -387,21 +387,6 @@ bool sap_is_conc_sap_doing_scc_dfs(mac_handle_t mac_handle,
|
||||
|
||||
uint8_t sap_get_total_number_sap_intf(mac_handle_t mac_handle);
|
||||
|
||||
/**
|
||||
* sap_dfs_is_w53_invalid() - Check to see if invalid W53 operation requested
|
||||
* @mac_handle: Opaque handle to the global MAC context
|
||||
* @channel_id: Channel number to be verified
|
||||
*
|
||||
* This function checks if the passed channel is W53 and, if so, if
|
||||
* SAP W53 operation is allowed.
|
||||
*
|
||||
* Return:
|
||||
* * true - operation is invalid because the channel is W53 and W53
|
||||
* operation has been disabled
|
||||
* * false - operation is valid
|
||||
*/
|
||||
bool sap_dfs_is_w53_invalid(mac_handle_t mac_handle, uint8_t channel_id);
|
||||
|
||||
/**
|
||||
* sap_dfs_is_channel_in_preferred_location() - Verify a channel is valid
|
||||
* with respect to indoor/outdoor location setting
|
||||
|
@@ -721,8 +721,6 @@ QDF_STATUS wlansap_start_bss(struct sap_context *sap_ctx,
|
||||
* Copy the DFS Test Mode setting to pmac for
|
||||
* access in lower layers
|
||||
*/
|
||||
pmac->sap.SapDfsInfo.disable_dfs_ch_switch =
|
||||
pConfig->disableDFSChSwitch;
|
||||
pmac->sap.SapDfsInfo.sap_ch_switch_beacon_cnt =
|
||||
pConfig->sap_chanswitch_beacon_cnt;
|
||||
pmac->sap.SapDfsInfo.sap_ch_switch_mode =
|
||||
@@ -733,8 +731,6 @@ QDF_STATUS wlansap_start_bss(struct sap_context *sap_ctx,
|
||||
sap_ctx->csr_roamProfile.csrPersona;
|
||||
pmac->sap.sapCtxList[sap_ctx->sessionId].sessionID =
|
||||
sap_ctx->sessionId;
|
||||
pmac->sap.SapDfsInfo.dfs_beacon_tx_enhanced =
|
||||
pConfig->dfs_beacon_tx_enhanced;
|
||||
pmac->sap.SapDfsInfo.reduced_beacon_interval =
|
||||
pConfig->reduced_beacon_interval;
|
||||
|
||||
@@ -1857,47 +1853,6 @@ QDF_STATUS wlansap_set_dfs_ignore_cac(mac_handle_t mac_handle,
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
wlansap_set_dfs_restrict_japan_w53(mac_handle_t mac_handle,
|
||||
uint8_t disable_dfs_w53)
|
||||
{
|
||||
tpAniSirGlobal mac = NULL;
|
||||
QDF_STATUS status;
|
||||
enum dfs_reg dfs_region;
|
||||
|
||||
if (NULL != mac_handle) {
|
||||
mac = MAC_CONTEXT(mac_handle);
|
||||
} else {
|
||||
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
|
||||
"%s: Invalid mac_handle pointer", __func__);
|
||||
return QDF_STATUS_E_FAULT;
|
||||
}
|
||||
|
||||
wlan_reg_get_dfs_region(mac->pdev, &dfs_region);
|
||||
|
||||
/*
|
||||
* Set the JAPAN W53 restriction only if the current
|
||||
* regulatory domain is JAPAN.
|
||||
*/
|
||||
if (DFS_MKK_REGION == dfs_region) {
|
||||
mac->sap.SapDfsInfo.is_dfs_w53_disabled = disable_dfs_w53;
|
||||
QDF_TRACE(QDF_MODULE_ID_SAP,
|
||||
QDF_TRACE_LEVEL_INFO_LOW,
|
||||
FL("sapdfs: SET DFS JAPAN W53 DISABLED = %d"),
|
||||
mac->sap.SapDfsInfo.is_dfs_w53_disabled);
|
||||
|
||||
status = QDF_STATUS_SUCCESS;
|
||||
} else {
|
||||
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
|
||||
FL
|
||||
("Regdomain not japan, set disable JP W53 not valid"));
|
||||
|
||||
status = QDF_STATUS_E_FAULT;
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
bool sap_is_auto_channel_select(struct sap_context *sapcontext)
|
||||
{
|
||||
if (NULL == sapcontext) {
|
||||
@@ -2448,25 +2403,6 @@ uint32_t wlansap_get_chan_width(struct sap_context *sap_ctx)
|
||||
return wlan_sap_get_vht_ch_width(sap_ctx);
|
||||
}
|
||||
|
||||
QDF_STATUS wlansap_set_tx_leakage_threshold(mac_handle_t mac_handle,
|
||||
uint16_t tx_leakage_threshold)
|
||||
{
|
||||
tpAniSirGlobal mac;
|
||||
|
||||
if (NULL == mac_handle) {
|
||||
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
|
||||
"%s: Invalid mac_handle pointer", __func__);
|
||||
return QDF_STATUS_E_FAULT;
|
||||
}
|
||||
|
||||
mac = MAC_CONTEXT(mac_handle);
|
||||
tgt_dfs_set_tx_leakage_threshold(mac->pdev, tx_leakage_threshold);
|
||||
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_DEBUG,
|
||||
"%s: leakage_threshold %d", __func__,
|
||||
tx_leakage_threshold);
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
QDF_STATUS wlansap_set_invalid_session(struct sap_context *sap_ctx)
|
||||
{
|
||||
if (NULL == sap_ctx) {
|
||||
|
Reference in New Issue
Block a user