qcacld-3.0: Cleanup usage of phyMode from csr_roam_profile

In the SAP module, remove the usage of phyMode from
csr_roam_profile. The SAP module uses phyMode from
the sap_ctx directly.

Change-Id: I6ca484901f29dfa35405dcdcb88e25cc09f498d6
CRs-Fixed: 2998982
This commit is contained in:
Surya Prakash Sivaraj
2021-07-23 19:21:29 +05:30
gecommit door Madan Koyyalamudi
bovenliggende 54fcc092f8
commit 2958513686
4 gewijzigde bestanden met toevoegingen van 34 en 37 verwijderingen

Bestand weergeven

@@ -476,7 +476,7 @@ static bool sap_chan_sel_init(mac_handle_t mac_handle,
/* OFDM rates are not supported on frequency 2484 */
if (*pChans == 2484 &&
eCSR_DOT11_MODE_11b != sap_ctx->csr_roamProfile.phyMode)
eCSR_DOT11_MODE_11b != sap_ctx->phyMode)
continue;
/* Skip DSRC channels */

Bestand weergeven

@@ -848,7 +848,7 @@ sap_validate_chan(struct sap_context *sap_context,
con_ch_freq = sme_check_concurrent_channel_overlap(
mac_handle,
sap_context->chan_freq,
sap_context->csr_roamProfile.phyMode,
sap_context->phyMode,
sap_context->cc_switch_mode);
sap_debug("After check overlap: sap freq %d con freq:%d",
sap_context->chan_freq, con_ch_freq);
@@ -2420,30 +2420,31 @@ static void sap_validate_chanmode_and_chwidth(struct mac_context *mac_ctx,
enum phy_ch_width orig_ch_width;
orig_ch_width = sap_ctx->ch_params.ch_width;
orig_phymode = sap_ctx->csr_roamProfile.phyMode;
orig_phymode = sap_ctx->phyMode;
if (WLAN_REG_IS_5GHZ_CH_FREQ(sap_ctx->chan_freq) &&
(sap_ctx->csr_roamProfile.phyMode == eCSR_DOT11_MODE_11g ||
sap_ctx->csr_roamProfile.phyMode ==
eCSR_DOT11_MODE_11g_ONLY)) {
(sap_ctx->phyMode == eCSR_DOT11_MODE_11g ||
sap_ctx->phyMode == eCSR_DOT11_MODE_11g_ONLY)) {
sap_ctx->csr_roamProfile.phyMode = eCSR_DOT11_MODE_11a;
sap_ctx->phyMode = eCSR_DOT11_MODE_11a;
} else if (WLAN_REG_IS_24GHZ_CH_FREQ(sap_ctx->chan_freq) &&
(sap_ctx->csr_roamProfile.phyMode == eCSR_DOT11_MODE_11a)) {
(sap_ctx->phyMode == eCSR_DOT11_MODE_11a)) {
sap_ctx->csr_roamProfile.phyMode = eCSR_DOT11_MODE_11g;
sap_ctx->phyMode = eCSR_DOT11_MODE_11g;
}
if (sap_ctx->ch_params.ch_width > CH_WIDTH_20MHZ &&
(sap_ctx->csr_roamProfile.phyMode == eCSR_DOT11_MODE_abg ||
sap_ctx->csr_roamProfile.phyMode == eCSR_DOT11_MODE_11a ||
sap_ctx->csr_roamProfile.phyMode == eCSR_DOT11_MODE_11g ||
sap_ctx->csr_roamProfile.phyMode == eCSR_DOT11_MODE_11b)) {
(sap_ctx->phyMode == eCSR_DOT11_MODE_abg ||
sap_ctx->phyMode == eCSR_DOT11_MODE_11a ||
sap_ctx->phyMode == eCSR_DOT11_MODE_11g ||
sap_ctx->phyMode == eCSR_DOT11_MODE_11b)) {
sap_ctx->ch_params.ch_width = CH_WIDTH_20MHZ;
wlan_reg_set_channel_params_for_freq(mac_ctx->pdev,
sap_ctx->chan_freq,
sap_ctx->ch_params.sec_ch_offset,
&sap_ctx->ch_params);
} else if (sap_ctx->ch_params.ch_width > CH_WIDTH_40MHZ &&
sap_ctx->csr_roamProfile.phyMode == eCSR_DOT11_MODE_11n) {
sap_ctx->phyMode == eCSR_DOT11_MODE_11n) {
sap_ctx->ch_params.ch_width = CH_WIDTH_40MHZ;
wlan_reg_set_channel_params_for_freq(mac_ctx->pdev,
sap_ctx->chan_freq,
@@ -2452,11 +2453,11 @@ static void sap_validate_chanmode_and_chwidth(struct mac_context *mac_ctx,
}
if (orig_ch_width != sap_ctx->ch_params.ch_width ||
orig_phymode != sap_ctx->csr_roamProfile.phyMode)
orig_phymode != sap_ctx->phyMode)
sap_info("Freq %d Updated BW %d -> %d , phymode %d -> %d",
sap_ctx->chan_freq, orig_ch_width,
sap_ctx->ch_params.ch_width,
orig_phymode, sap_ctx->csr_roamProfile.phyMode);
orig_phymode, sap_ctx->phyMode);
}
/**
@@ -2522,7 +2523,7 @@ static QDF_STATUS sap_goto_starting(struct sap_context *sap_ctx,
/* Channel selected. Now can sap_goto_starting */
sap_ctx->fsm_state = SAP_STARTING;
sap_debug("from state %s => %s phyMode %d, bw %d",
"SAP_INIT", "SAP_STARTING", sap_ctx->csr_roamProfile.phyMode,
"SAP_INIT", "SAP_STARTING", sap_ctx->phyMode,
sap_ctx->ch_params.ch_width);
/* Specify the channel */
sap_ctx->csr_roamProfile.ChannelInfo.numOfChannels =

Bestand weergeven

@@ -171,6 +171,7 @@ struct sap_context {
uint32_t nStaWPARSnReqIeLength;
uint8_t pStaWpaRsnReqIE[MAX_ASSOC_IND_IE_LEN];
eCsrPhyMode phyMode;
uint32_t *freq_list;
uint8_t num_of_channel;
uint16_t ch_width_orig;

Bestand weergeven

@@ -459,7 +459,7 @@ uint16_t wlansap_check_cc_intf(struct sap_context *sap_ctx)
sap_err("Invalid MAC context");
return 0;
}
phy_mode = sap_ctx->csr_roamProfile.phyMode;
phy_mode = sap_ctx->phyMode;
intf_ch_freq = sme_check_concurrent_channel_overlap(
MAC_HANDLE(mac),
sap_ctx->chan_freq,
@@ -569,7 +569,7 @@ eCsrPhyMode wlan_sap_get_phymode(struct sap_context *sap_ctx)
sap_err("Invalid SAP pointer from ctx");
return 0;
}
return sap_ctx->csr_roamProfile.phyMode;
return sap_ctx->phyMode;
}
enum phy_ch_width wlan_sap_get_concurrent_bw(struct wlan_objmgr_pdev *pdev,
@@ -676,7 +676,7 @@ static bool wlan_sap_validate_channel_switch(mac_handle_t mac_handle,
return sme_validate_sap_channel_switch(
mac_handle,
sap_ch_freq,
sap_context->csr_roamProfile.phyMode,
sap_context->phyMode,
sap_context->cc_switch_mode,
sap_context->sessionId);
}
@@ -758,6 +758,7 @@ QDF_STATUS wlansap_start_bss(struct sap_context *sap_ctx,
sap_ctx->dfs_cac_offload = config->dfs_cac_offload;
sap_ctx->isCacEndNotified = false;
sap_ctx->is_chan_change_inprogress = false;
sap_ctx->phyMode = config->SapHw_mode;
/* Set the BSSID to your "self MAC Addr" read the mac address
from Configuation ITEM received from HDD */
@@ -1258,7 +1259,7 @@ wlansap_get_csa_chanwidth_from_phymode(struct sap_context *sap_context,
*tgt_ch_params = ch_params;
sap_nofl_debug("freq %d bw %d (phymode %d, con bw %d, tgt bw %d)",
chan_freq, ch_width,
sap_context->csr_roamProfile.phyMode,
sap_context->phyMode,
concurrent_bw,
tgt_ch_params ? tgt_ch_params->ch_width : CH_WIDTH_MAX);
@@ -1826,7 +1827,7 @@ QDF_STATUS wlansap_channel_change_request(struct sap_context *sap_ctx,
return QDF_STATUS_E_FAULT;
}
phy_mode = sap_ctx->csr_roamProfile.phyMode;
phy_mode = sap_ctx->phyMode;
/* Update phy_mode if the target channel is in the other band */
if (WLAN_REG_IS_5GHZ_CH_FREQ(target_chan_freq) &&
@@ -1838,6 +1839,7 @@ QDF_STATUS wlansap_channel_change_request(struct sap_context *sap_ctx,
phy_mode = eCSR_DOT11_MODE_11g;
sap_ctx->csr_roamProfile.phyMode = phy_mode;
sap_ctx->phyMode = phy_mode;
if (sap_ctx->csr_roamProfile.ChannelInfo.numOfChannels == 0 ||
!sap_ctx->csr_roamProfile.ChannelInfo.freq_list) {
@@ -2510,6 +2512,7 @@ QDF_STATUS wlansap_acs_chselect(struct sap_context *sap_context,
sap_context->acs_cfg = &config->acs_cfg;
sap_context->ch_width_orig = config->acs_cfg.ch_width;
sap_context->csr_roamProfile.phyMode = config->acs_cfg.hw_mode;
sap_context->phyMode = config->acs_cfg.hw_mode;
/*
* Now, configure the scan and ACS channel params
@@ -2613,18 +2616,12 @@ wlansap_get_max_bw_by_phymode(struct sap_context *sap_ctx)
return CH_WIDTH_20MHZ;
}
if (sap_ctx->csr_roamProfile.phyMode ==
eCSR_DOT11_MODE_11ac ||
sap_ctx->csr_roamProfile.phyMode ==
eCSR_DOT11_MODE_11ac_ONLY ||
sap_ctx->csr_roamProfile.phyMode ==
eCSR_DOT11_MODE_11ax ||
sap_ctx->csr_roamProfile.phyMode ==
eCSR_DOT11_MODE_11ax_ONLY ||
CSR_IS_DOT11_PHY_MODE_11BE(
sap_ctx->csr_roamProfile.phyMode) ||
CSR_IS_DOT11_PHY_MODE_11BE_ONLY(
sap_ctx->csr_roamProfile.phyMode)) {
if (sap_ctx->phyMode == eCSR_DOT11_MODE_11ac ||
sap_ctx->phyMode == eCSR_DOT11_MODE_11ac_ONLY ||
sap_ctx->phyMode == eCSR_DOT11_MODE_11ax ||
sap_ctx->phyMode == eCSR_DOT11_MODE_11ax_ONLY ||
CSR_IS_DOT11_PHY_MODE_11BE(sap_ctx->phyMode) ||
CSR_IS_DOT11_PHY_MODE_11BE_ONLY(sap_ctx->phyMode)) {
max_fw_bw = sme_get_vht_ch_width();
if (max_fw_bw >= WNI_CFG_VHT_CHANNEL_WIDTH_160MHZ)
ch_width = CH_WIDTH_160MHZ;
@@ -2634,10 +2631,8 @@ wlansap_get_max_bw_by_phymode(struct sap_context *sap_ctx)
ch_width = QDF_MAX(
wlansap_get_target_eht_phy_ch_width(),
ch_width);
} else if (sap_ctx->csr_roamProfile.phyMode ==
eCSR_DOT11_MODE_11n ||
sap_ctx->csr_roamProfile.phyMode ==
eCSR_DOT11_MODE_11n_ONLY) {
} else if (sap_ctx->phyMode == eCSR_DOT11_MODE_11n ||
sap_ctx->phyMode == eCSR_DOT11_MODE_11n_ONLY) {
ch_width = CH_WIDTH_40MHZ;
} else {
/* For legacy 11a mode return 20MHz */
@@ -3251,7 +3246,7 @@ qdf_freq_t wlansap_get_chan_band_restrict(struct sap_context *sap_ctx,
}
cc_mode = sap_ctx->cc_switch_mode;
phy_mode = sap_ctx->csr_roamProfile.phyMode;
phy_mode = sap_ctx->phyMode;
intf_ch_freq = sme_check_concurrent_channel_overlap(
MAC_HANDLE(mac),
restart_freq,