qcacld-3.0: Use policy_mgr_are_sbs_chan() for valid SBS channels

Use policy_mgr_are_sbs_chan() to check for valid 5/6 Ghz
SBS channel instead of WLAN_REG_IS_FREQUENCY_VALID_5G_SBS
which will only check for 5Ghz SBS channel

Change-Id: I1c2ee1dffac1f4a8619e02ebc342e27af61a63d2
CRs-Fixed: 3047071
Цей коміт міститься в:
Utkarsh Bhatnagar
2021-09-29 14:25:37 +05:30
зафіксовано Madan Koyyalamudi
джерело a269198c3a
коміт ba429d18b8
2 змінених файлів з 22 додано та 23 видалено

Переглянути файл

@@ -1979,15 +1979,13 @@ get_sbs_chlist(struct wlan_objmgr_psoc *psoc,
for (i = 0; i < chlist1_len; i++) {
if (*sbs_num >= size_of_sbs)
return;
if (WLAN_REG_IS_FREQUENCY_VALID_5G_SBS(chan_freq,
chlist1[i]))
if (policy_mgr_are_sbs_chan(psoc, chan_freq, chlist1[i]))
sbs_freqs[(*sbs_num)++] = chlist1[i];
}
for (i = 0; i < chlist2_len; i++) {
if (*sbs_num >= size_of_sbs)
return;
if (WLAN_REG_IS_FREQUENCY_VALID_5G_SBS(chan_freq,
chlist2[i]))
if (policy_mgr_are_sbs_chan(psoc, chan_freq, chlist2[i]))
sbs_freqs[(*sbs_num)++] = chlist2[i];
}
}
@@ -2090,8 +2088,8 @@ get_sub_channels(struct wlan_objmgr_psoc *psoc,
if (policy_mgr_is_hw_sbs_capable(psoc)) {
if (*scc_num > 1) {
if (WLAN_REG_IS_FREQUENCY_VALID_5G_SBS(
scc_freqs[0], scc_freqs[1])) {
if (policy_mgr_are_sbs_chan(psoc, scc_freqs[0],
scc_freqs[1])) {
/* 2/3 home channels with SBS separation */
*sbs_num = 0;
} else {
@@ -3626,9 +3624,9 @@ enum policy_mgr_conc_next_action
else
return PM_NOP;
} else if (band1 == REG_BAND_5G && band2 == REG_BAND_5G) {
if (WLAN_REG_IS_FREQUENCY_VALID_5G_SBS(
pm_conc_connection_list[0].freq,
pm_conc_connection_list[1].freq)) {
if (policy_mgr_are_sbs_chan(psoc,
pm_conc_connection_list[0].freq,
pm_conc_connection_list[1].freq)) {
if (!hw_mode.sbs_cap)
return PM_SBS;
else
@@ -3653,15 +3651,15 @@ enum policy_mgr_conc_next_action
return PM_NOP;
} else if (band1 == REG_BAND_5G && band2 == REG_BAND_5G &&
band3 == REG_BAND_5G) {
if (WLAN_REG_IS_FREQUENCY_VALID_5G_SBS(
pm_conc_connection_list[0].freq,
pm_conc_connection_list[2].freq) &&
WLAN_REG_IS_FREQUENCY_VALID_5G_SBS(
pm_conc_connection_list[1].freq,
pm_conc_connection_list[2].freq) &&
WLAN_REG_IS_FREQUENCY_VALID_5G_SBS(
pm_conc_connection_list[0].freq,
pm_conc_connection_list[1].freq)) {
if (policy_mgr_are_sbs_chan(psoc,
pm_conc_connection_list[0].freq,
pm_conc_connection_list[2].freq) &&
policy_mgr_are_sbs_chan(psoc,
pm_conc_connection_list[1].freq,
pm_conc_connection_list[2].freq) &&
policy_mgr_are_sbs_chan(psoc,
pm_conc_connection_list[0].freq,
pm_conc_connection_list[1].freq)) {
if (!hw_mode.sbs_cap)
return PM_SBS;
else

Переглянути файл

@@ -339,7 +339,8 @@ static void _validate_mcc(bool *status, uint32_t *first_idx,
(*first_idx)++;
}
static void _validate_sbs(bool *status, uint32_t *first_idx,
static void _validate_sbs(struct wlan_objmgr_psoc *psoc,
bool *status, uint32_t *first_idx,
uint32_t *pcl_freqs, uint32_t pcl_len,
qdf_freq_t first_connection_chnl,
qdf_freq_t second_connection_chnl,
@@ -358,9 +359,8 @@ static void _validate_sbs(bool *status, uint32_t *first_idx,
return;
}
for (; *first_idx < pcl_len; (*first_idx)++) {
if (WLAN_REG_IS_FREQUENCY_VALID_5G_SBS(
pcl_freqs[*first_idx],
first_connection_chnl)) {
if (policy_mgr_are_sbs_chan(psoc, pcl_freqs[*first_idx],
first_connection_chnl)) {
found_sbs = true;
} else {
non_sbs_freq = pcl_freqs[*first_idx];
@@ -414,7 +414,7 @@ static void _validate_end(bool *status, uint32_t *first_idx,
reason, reason_length)
#define validate_sbs _validate_sbs( \
&status, &first_idx, pcl_freqs, pcl_len, \
psoc, &status, &first_idx, pcl_freqs, pcl_len, \
first_connection_chnl, second_connection_chnl, \
reason, reason_length)
@@ -431,6 +431,7 @@ static bool wlan_hdd_validate_pcl(struct hdd_context *hdd_ctx,
{
bool status = true;
uint32_t first_idx = 0;
struct wlan_objmgr_psoc *psoc = hdd_ctx->psoc;
if ((pcl_type != PM_NONE) && (pcl_len == 0)) {
snprintf(reason, reason_length, "no of channels = 0");