qcacmn: Add support to enable/disable responder 11az ranging

Enable/Disable responder 11az ranging based on the below ini:
"enable_responder_11az_support"

With "enable_responder_11az_support" disabled, the below ext
cap advertisement will be disabled:
Non-TB Ranging Responder
TB Ranging Responder

and below vendor capabilities advertisment will be disabled:
QCA_WLAN_VENDOR_FEATURE_PROT_RANGE_NEGO_AND_MEASURE_AP
QCA_WLAN_VENDOR_FEATURE_SECURE_LTF_AP

Change-Id: I82eb70615f8daf82e98e7600418e07fad0672b76
CRs-Fixed: 3296410
This commit is contained in:
Pragaspathi Thilagaraj
2022-09-21 12:33:58 +05:30
zatwierdzone przez Madan Koyyalamudi
rodzic 1d0d789fe0
commit d95e7863cd
5 zmienionych plików z 71 dodań i 5 usunięć

Wyświetl plik

@@ -39,6 +39,12 @@ void
wlan_wifi_pos_cfg80211_set_wiphy_ext_feature(struct wiphy *wiphy,
struct wlan_objmgr_psoc *psoc)
{
bool enable_rsta_11az_ranging;
enable_rsta_11az_ranging = ucfg_wifi_pos_get_rsta_11az_ranging_cap();
if (!enable_rsta_11az_ranging)
return;
if (wlan_psoc_nif_fw_ext_cap_get(psoc, WLAN_RTT_11AZ_NTB_SUPPORT)) {
wlan_extended_caps_iface[WLAN_EXT_RANGING_CAP_IDX] |=
WLAN_EXT_CAPA11_NTB_RANGING_RESPONDER;
@@ -82,21 +88,27 @@ wlan_wifi_pos_set_feature_flags(uint8_t *feature_flags,
void wlan_wifi_pos_cfg80211_set_features(struct wlan_objmgr_psoc *psoc,
uint8_t *feature_flags)
{
bool rsta_secure_ltf_support;
bool rsta_secure_ltf_support, enable_rsta_11az_ranging;
enable_rsta_11az_ranging = ucfg_wifi_pos_get_rsta_11az_ranging_cap();
rsta_secure_ltf_support = enable_rsta_11az_ranging &&
wifi_pos_get_rsta_sec_ltf_cap();
if (wlan_psoc_nif_fw_ext2_cap_get(psoc,
WLAN_RTT_11AZ_MAC_PHY_SEC_SUPPORT)) {
wlan_wifi_pos_set_feature_flags(feature_flags,
QCA_WLAN_VENDOR_FEATURE_SECURE_LTF_STA);
rsta_secure_ltf_support = wifi_pos_get_rsta_sec_ltf_cap();
if (rsta_secure_ltf_support)
wlan_wifi_pos_set_feature_flags(feature_flags,
QCA_WLAN_VENDOR_FEATURE_SECURE_LTF_AP);
}
if (wlan_psoc_nif_fw_ext2_cap_get(psoc,
WLAN_RTT_11AZ_MAC_SEC_SUPPORT))
WLAN_RTT_11AZ_MAC_SEC_SUPPORT)) {
wlan_wifi_pos_set_feature_flags(feature_flags,
QCA_WLAN_VENDOR_FEATURE_PROT_RANGE_NEGO_AND_MEASURE_STA);
if (rsta_secure_ltf_support)
wlan_wifi_pos_set_feature_flags(feature_flags,
QCA_WLAN_VENDOR_FEATURE_PROT_RANGE_NEGO_AND_MEASURE_AP);
}
}
#endif