qcacld-3.0: Replace wlan_reg_get_channel_state_for_freq

Replace all occurrences of
wlan_reg_get_channel_state_for_freq with
wlan_reg_get_channel_state_for_pwrmode and use extra
parameter as REG_CURRENT_PWR_MODE.

Change-Id: I7f7e4e700091918eeebc87ccbbc85ececdd9bf52
CRs-Fixed: 3145011
This commit is contained in:
Divyajyothi Goparaju
2022-08-25 18:46:55 +05:30
committed by Madan Koyyalamudi
부모 6f1f0f2272
커밋 3498515802
22개의 변경된 파일126개의 추가작업 그리고 78개의 파일을 삭제

파일 보기

@@ -467,13 +467,15 @@ wlansap_roam_process_ch_change_success(struct mac_context *mac_ctx,
sap_ctx->ch_params.ch_width, 0) == CHANNEL_STATE_DFS)
is_ch_dfs = true;
} else if (sap_ctx->ch_params.ch_width == CH_WIDTH_80P80MHZ) {
if (wlan_reg_get_channel_state_for_freq(
if (wlan_reg_get_channel_state_for_pwrmode(
mac_ctx->pdev,
target_chan_freq) ==
target_chan_freq,
REG_CURRENT_PWR_MODE) ==
CHANNEL_STATE_DFS ||
wlan_reg_get_channel_state_for_freq(
wlan_reg_get_channel_state_for_pwrmode(
mac_ctx->pdev,
sap_ctx->ch_params.mhz_freq_seg1) ==
sap_ctx->ch_params.mhz_freq_seg1,
REG_CURRENT_PWR_MODE) ==
CHANNEL_STATE_DFS)
is_ch_dfs = true;
} else {

파일 보기

@@ -503,13 +503,15 @@ is_wlansap_cac_required_for_chan(struct mac_context *mac_ctx,
ch_params->ch_width, 0) == CHANNEL_STATE_DFS)
is_ch_dfs = true;
} else if (ch_params->ch_width == CH_WIDTH_80P80MHZ) {
if (wlan_reg_get_channel_state_for_freq(
if (wlan_reg_get_channel_state_for_pwrmode(
mac_ctx->pdev,
chan_freq) ==
chan_freq,
REG_CURRENT_PWR_MODE) ==
CHANNEL_STATE_DFS ||
wlan_reg_get_channel_state_for_freq(
wlan_reg_get_channel_state_for_pwrmode(
mac_ctx->pdev,
ch_params->mhz_freq_seg1) ==
ch_params->mhz_freq_seg1,
REG_CURRENT_PWR_MODE) ==
CHANNEL_STATE_DFS)
is_ch_dfs = true;
} else {
@@ -848,8 +850,9 @@ uint32_t sap_select_default_oper_chan(struct mac_context *mac_ctx,
for (i = 0; i < acs_cfg->ch_list_count; i++) {
enum channel_state state =
wlan_reg_get_channel_state_for_freq(
mac_ctx->pdev, acs_cfg->freq_list[i]);
wlan_reg_get_channel_state_for_pwrmode(
mac_ctx->pdev, acs_cfg->freq_list[i],
REG_CURRENT_PWR_MODE);
if (!freq0 && state == CHANNEL_STATE_ENABLE &&
WLAN_REG_IS_5GHZ_CH_FREQ(acs_cfg->freq_list[i])) {
freq0 = acs_cfg->freq_list[i];
@@ -2055,8 +2058,9 @@ void sap_append_cac_history(struct mac_context *mac_ctx,
chan_cfreq = bonded_chan_ptr->start_freq;
while (chan_cfreq <= bonded_chan_ptr->end_freq) {
state = wlan_reg_get_channel_state_for_freq(
mac_ctx->pdev, chan_cfreq);
state = wlan_reg_get_channel_state_for_pwrmode(
mac_ctx->pdev, chan_cfreq,
REG_CURRENT_PWR_MODE);
if (state == CHANNEL_STATE_INVALID) {
sap_debug("invalid ch freq %d",
chan_cfreq);
@@ -3566,13 +3570,15 @@ static QDF_STATUS sap_fsm_state_starting(struct sap_context *sap_ctx,
mac_ctx->pdev, sap_chan_freq,
CH_WIDTH_160MHZ) == CHANNEL_STATE_DFS;
} else if (sap_ctx->ch_params.ch_width == CH_WIDTH_80P80MHZ) {
if (wlan_reg_get_channel_state_for_freq(
if (wlan_reg_get_channel_state_for_pwrmode(
mac_ctx->pdev,
sap_chan_freq) ==
sap_chan_freq,
REG_CURRENT_PWR_MODE) ==
CHANNEL_STATE_DFS ||
wlan_reg_get_channel_state_for_freq(
wlan_reg_get_channel_state_for_pwrmode(
mac_ctx->pdev,
ch_cfreq1) ==
ch_cfreq1,
REG_CURRENT_PWR_MODE) ==
CHANNEL_STATE_DFS)
is_dfs = true;
} else {
@@ -3749,9 +3755,10 @@ static QDF_STATUS sap_fsm_state_started(struct sap_context *sap_ctx,
sap_debug("vdev %d freq %d (state %d) is not DFS or disabled so continue",
temp_sap_ctx->sessionId,
temp_sap_ctx->chan_freq,
wlan_reg_get_channel_state_for_freq(
wlan_reg_get_channel_state_for_pwrmode(
mac_ctx->pdev,
temp_sap_ctx->chan_freq));
temp_sap_ctx->chan_freq,
REG_CURRENT_PWR_MODE));
continue;
}
sap_debug("vdev %d switch freq %d -> %d",

파일 보기

@@ -1512,8 +1512,9 @@ QDF_STATUS wlansap_set_channel_change_with_csa(struct sap_context *sap_ctx,
sap_get_csa_reason_str(sap_ctx->csa_reason),
sap_ctx->csa_reason, strict, sap_ctx->sessionId);
state = wlan_reg_get_channel_state_for_freq(mac->pdev,
target_chan_freq);
state = wlan_reg_get_channel_state_for_pwrmode(mac->pdev,
target_chan_freq,
REG_CURRENT_PWR_MODE);
if (state == CHANNEL_STATE_DISABLE || state == CHANNEL_STATE_INVALID) {
sap_nofl_debug("invalid target freq %d state %d",
target_chan_freq, state);
@@ -3249,7 +3250,9 @@ static uint32_t wlansap_get_2g_first_safe_chan_freq(struct sap_context *sap_ctx)
acs_list_count = sap_ctx->acs_cfg->master_ch_list_count;
for (i = 0; i < NUM_CHANNELS; i++) {
freq = cur_chan_list[i].center_freq;
state = wlan_reg_get_channel_state_for_freq(pdev, freq);
state = wlan_reg_get_channel_state_for_pwrmode(
pdev, freq,
REG_CURRENT_PWR_MODE);
if (state != CHANNEL_STATE_DISABLE &&
state != CHANNEL_STATE_PASSIVE &&
state != CHANNEL_STATE_INVALID &&