qcacld-3.0: Add SBS logic for gWlanMccToSccSwitchMode as 4

Check mandatory freq for SAP only if STA is present.
Also allow SAP on a freq which can lead to SBS with STA freq and is
in mandatory freq list, if gWlanMccToSccSwitchMode is set to
QDF_MCC_TO_SCC_SWITCH_WITH_FAVORITE_CHANNEL.

Allow ML SAP (SAP+SAP) on valid channels if gWlanMccToSccSwitchMode
is QDF_MCC_TO_SCC_SWITCH_WITH_FAVORITE_CHANNEL.
As QDF_MCC_TO_SCC_SWITCH_WITH_FAVORITE_CHANNEL is only valid for
STA+SAP case.

So if STA is not present skip the mandatory freq and allow ML SAP
on original freq.

Change-Id: I6e8cbc7f944b2fa99c1449c288b9593cc4ad9454
CRs-Fixed: 3114208
This commit is contained in:
Abhishek Singh
2022-01-20 14:28:16 +05:30
کامیت شده توسط Madan Koyyalamudi
والد ca21055f3a
کامیت 5247ffb1e1
2فایلهای تغییر یافته به همراه40 افزوده شده و 2 حذف شده

مشاهده پرونده

@@ -3727,6 +3727,7 @@ void policy_mgr_check_scc_sbs_channel(struct wlan_objmgr_psoc *psoc,
bool same_band_present = false;
bool sbs_mlo_present = false;
bool allow_6ghz = true;
uint8_t sta_count;
pm_ctx = policy_mgr_get_context(psoc);
if (!pm_ctx) {
@@ -3738,6 +3739,9 @@ void policy_mgr_check_scc_sbs_channel(struct wlan_objmgr_psoc *psoc,
if (!policy_mgr_is_hw_dbs_capable(psoc) &&
cc_mode != QDF_MCC_TO_SCC_WITH_PREFERRED_BAND)
return;
sta_count = policy_mgr_mode_specific_connection_count(psoc, PM_STA_MODE,
NULL);
/*
* If same band interface is present, as
* csr_check_concurrent_channel_overlap try to find same band vdev
@@ -3791,9 +3795,10 @@ void policy_mgr_check_scc_sbs_channel(struct wlan_objmgr_psoc *psoc,
*intf_ch_freq = 0;
return;
}
} else if (policy_mgr_is_hw_dbs_capable(psoc) &&
} else if (sta_count &&
policy_mgr_is_hw_dbs_capable(psoc) &&
cc_mode == QDF_MCC_TO_SCC_SWITCH_WITH_FAVORITE_CHANNEL) {
/* Same band with Fav channel */
/* Same band with Fav channel if STA is present */
status = policy_mgr_get_sap_mandatory_channel(psoc,
sap_ch_freq,
intf_ch_freq);

مشاهده پرونده

@@ -2576,7 +2576,39 @@ policy_mgr_get_sap_mandatory_channel(struct wlan_objmgr_psoc *psoc,
return QDF_STATUS_E_FAILURE;
}
/*
* If both freq leads to SBS, and sap_ch_freq is a mandatory freq,
* allow it as they are not interfering.
*/
if (policy_mgr_are_sbs_chan(psoc, sap_ch_freq, *intf_ch_freq)) {
for (i = 0; i < pcl.pcl_len; i++) {
if (pcl.pcl_list[i] == sap_ch_freq) {
policy_mgr_debug("As both freq, %d and %d are SBS, allow sap on mandatory freq %d",
sap_ch_freq, *intf_ch_freq,
sap_ch_freq);
*intf_ch_freq = 0;
return QDF_STATUS_SUCCESS;
}
}
}
/*
* If intf_ch_freq is non-2.4Ghz, First try to get a mandatory freq
* which can cause SBS with intf_ch_freq. i.e if STA is in lower 5Ghz,
* allow higher 5Ghz mandatory freq.
*/
if (!WLAN_REG_IS_24GHZ_CH_FREQ(*intf_ch_freq)) {
for (i = 0; i < pcl.pcl_len; i++) {
if (policy_mgr_are_sbs_chan(psoc, pcl.pcl_list[i],
*intf_ch_freq)) {
sap_new_freq = pcl.pcl_list[i];
goto update_freq;
}
}
}
sap_new_freq = pcl.pcl_list[0];
/* If no SBS Try get SCC freq */
if (WLAN_REG_IS_6GHZ_CHAN_FREQ(sap_ch_freq) ||
(WLAN_REG_IS_5GHZ_CH_FREQ(sap_ch_freq) &&
WLAN_REG_IS_5GHZ_CH_FREQ(*intf_ch_freq))) {
@@ -2588,6 +2620,7 @@ policy_mgr_get_sap_mandatory_channel(struct wlan_objmgr_psoc *psoc,
}
}
update_freq:
*intf_ch_freq = sap_new_freq;
policy_mgr_debug("mandatory channel:%d org sap ch %d", *intf_ch_freq,
sap_ch_freq);