qcacld-3.0: Allow only 2 port concurrency in non DBS

Currently, host driver defines all concurrency with iface
combination structure and updates it by wiphy to userspace.
But non DBS target does not support the 3 port concurrencies.

So, to fix this, add the check for DBS target and for non DBS
targets filter out 2 port concurrencies from iface combinations
and update it to userspace.

Change-Id: I2bbe44f6cdfa1b49e3dbd9efe8b9bc45ddbed0ab
CRs-Fixed: 3583702
This commit is contained in:
Rahul Gusain
2023-08-11 00:24:43 +05:30
gecommit door Rahul Choudhary
bovenliggende cb82c1f789
commit d934844b59
3 gewijzigde bestanden met toevoegingen van 125 en 5 verwijderingen

Bestand weergeven

@@ -387,4 +387,13 @@ ucfg_policy_mgr_get_indoor_chnl_marking(struct wlan_objmgr_psoc *psoc,
bool
ucfg_policy_mgr_get_sta_sap_scc_on_indoor_chnl(struct wlan_objmgr_psoc *psoc);
/**
* ucfg_policy_mgr_is_fw_supports_dbs() - to check whether FW supports DBS or
* not
* @psoc: pointer to psoc
*
* Return: true if DBS is supported else false
*/
bool ucfg_policy_mgr_is_fw_supports_dbs(struct wlan_objmgr_psoc *psoc);
#endif //__WLAN_POLICY_MGR_UCFG

Bestand weergeven

@@ -332,3 +332,8 @@ ucfg_policy_mgr_get_sta_sap_scc_on_indoor_chnl(struct wlan_objmgr_psoc *psoc)
return policy_mgr_get_sta_sap_scc_allowed_on_indoor_chnl(psoc) ?
true : false;
}
bool ucfg_policy_mgr_is_fw_supports_dbs(struct wlan_objmgr_psoc *psoc)
{
return policy_mgr_find_if_fw_supports_dbs(psoc);
}

Bestand weergeven

@@ -799,7 +799,7 @@ static const struct ieee80211_iface_limit
static const struct ieee80211_iface_limit
wlan_hdd_mon_iface_limit[] = {
{
.max = 3,
.max = 2,
.types = BIT(NL80211_IFTYPE_MONITOR),
},
};
@@ -932,7 +932,7 @@ static struct ieee80211_iface_combination
/* Monitor */
{
.limits = wlan_hdd_mon_iface_limit,
.max_interfaces = 3,
.max_interfaces = 2,
.num_different_channels = 2,
.n_limits = ARRAY_SIZE(wlan_hdd_mon_iface_limit),
},
@@ -960,6 +960,103 @@ static struct ieee80211_iface_combination
#endif /* WLAN_FEATURE_NAN */
};
/* 1 and 2 port concurrencies */
static struct ieee80211_iface_combination
wlan_hdd_derived_combination[] = {
/* STA */
{
.limits = wlan_hdd_sta_iface_limit,
.num_different_channels = 2,
.max_interfaces = 2,
.n_limits = ARRAY_SIZE(wlan_hdd_sta_iface_limit),
},
/* AP */
{
.limits = wlan_hdd_ap_iface_limit,
.num_different_channels = 2,
.max_interfaces = (QDF_MAX_NO_OF_SAP_MODE),
.n_limits = ARRAY_SIZE(wlan_hdd_ap_iface_limit),
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0)) || \
defined(CFG80211_BEACON_INTERVAL_BACKPORT)
.beacon_int_min_gcd = 1,
#endif
},
#ifndef WLAN_FEATURE_NO_P2P_CONCURRENCY
/* P2P */
{
.limits = wlan_hdd_p2p_iface_limit,
.num_different_channels = 2,
.max_interfaces = 2,
.n_limits = ARRAY_SIZE(wlan_hdd_p2p_iface_limit),
},
/* SAP + P2P */
{
.limits = wlan_hdd_sap_p2p_iface_limit,
.num_different_channels = 2,
/* 1-SAP + 1-P2P */
.max_interfaces = 2,
.n_limits = ARRAY_SIZE(wlan_hdd_sap_p2p_iface_limit),
.beacon_int_infra_match = true,
},
/* P2P + P2P */
{
.limits = wlan_hdd_p2p_p2p_iface_limit,
.num_different_channels = 2,
/* 2-P2P */
.max_interfaces = 2,
.n_limits = ARRAY_SIZE(wlan_hdd_p2p_p2p_iface_limit),
.beacon_int_infra_match = true,
},
#endif
/* STA + P2P */
{
.limits = wlan_hdd_sta_p2p_iface_limit,
.num_different_channels = 2,
.max_interfaces = 2,
.n_limits = ARRAY_SIZE(wlan_hdd_sta_p2p_iface_limit),
.beacon_int_infra_match = true,
},
#ifndef WLAN_FEATURE_NO_STA_SAP_CONCURRENCY
/* STA + SAP */
{
.limits = wlan_hdd_sta_ap_iface_limit,
.num_different_channels = 2,
.max_interfaces = 2,
.n_limits = ARRAY_SIZE(wlan_hdd_sta_ap_iface_limit),
.beacon_int_infra_match = true,
},
#endif /* WLAN_FEATURE_NO_STA_SAP_CONCURRENCY */
/* Monitor */
{
.limits = wlan_hdd_mon_iface_limit,
.max_interfaces = 2,
.num_different_channels = 2,
.n_limits = ARRAY_SIZE(wlan_hdd_mon_iface_limit),
},
#if defined(WLAN_FEATURE_NAN) && \
(LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0))
#ifndef WLAN_FEATURE_NO_STA_NAN_CONCURRENCY
/* NAN + STA */
{
.limits = wlan_hdd_sta_nan_iface_limit,
.max_interfaces = 2,
.num_different_channels = 2,
.n_limits = ARRAY_SIZE(wlan_hdd_sta_nan_iface_limit),
},
#endif /* WLAN_FEATURE_NO_STA_NAN_CONCURRENCY */
#ifndef WLAN_FEATURE_NO_SAP_NAN_CONCURRENCY
/* NAN + SAP */
{
.limits = wlan_hdd_sap_nan_iface_limit,
.num_different_channels = 2,
.max_interfaces = 2,
.n_limits = ARRAY_SIZE(wlan_hdd_sap_nan_iface_limit),
.beacon_int_infra_match = true,
},
#endif /* !WLAN_FEATURE_NO_SAP_NAN_CONCURRENCY */
#endif /* WLAN_FEATURE_NAN */
};
static struct cfg80211_ops wlan_hdd_cfg80211_ops;
#ifdef WLAN_NL80211_TESTMODE
@@ -21100,6 +21197,7 @@ void wlan_hdd_update_wiphy(struct hdd_context *hdd_ctx)
uint8_t allow_mcc_go_diff_bi = 0, enable_mcc = 0;
bool is_bigtk_supported;
bool is_ocv_supported;
uint8_t iface_num;
if (!wiphy) {
hdd_err("Invalid wiphy");
@@ -21167,9 +21265,17 @@ void wlan_hdd_update_wiphy(struct hdd_context *hdd_ctx)
beacon_int_infra_match = true;
}
}
wiphy->n_iface_combinations =
ARRAY_SIZE(wlan_hdd_iface_combination);
wiphy->iface_combinations = wlan_hdd_iface_combination;
if (!ucfg_policy_mgr_is_fw_supports_dbs(hdd_ctx->psoc)) {
wiphy->iface_combinations =
wlan_hdd_derived_combination;
iface_num = ARRAY_SIZE(wlan_hdd_derived_combination);
} else {
wiphy->iface_combinations = wlan_hdd_iface_combination;
iface_num = ARRAY_SIZE(wlan_hdd_iface_combination);
}
wiphy->n_iface_combinations = iface_num;
}
mac_spoofing_enabled = ucfg_scan_is_mac_spoofing_enabled(hdd_ctx->psoc);