Loading os_if/linux/wlan_cfg80211.h +4 −0 Original line number Diff line number Diff line /* * Copyright (c) 2016-2020 The Linux Foundation. All rights reserved. * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the Loading Loading @@ -140,6 +141,8 @@ * MBSSID TX VDEV status index * @QCA_NL80211_VENDOR_SUBCMD_CONFIG_TWT_INDEX: TWT config index * @QCA_NL80211_VENDOR_SUBCMD_PEER_CFR_CAPTURE_CFG_INDEX: CFR data event index * @QCA_NL80211_VENDOR_SUBCMD_DRIVER_DISCONNECT_REASON_INDEX: * Driver disconnect reason index */ enum qca_nl80211_vendor_subcmds_index { Loading Loading @@ -232,6 +235,7 @@ enum qca_nl80211_vendor_subcmds_index { QCA_NL80211_VENDOR_SUBCMD_UPDATE_SSID_INDEX, QCA_NL80211_VENDOR_SUBCMD_WIFI_FW_STATS_INDEX, QCA_NL80211_VENDOR_SUBCMD_MBSSID_TX_VDEV_STATUS_INDEX, QCA_NL80211_VENDOR_SUBCMD_DRIVER_DISCONNECT_REASON_INDEX, #ifdef WLAN_SUPPORT_TWT QCA_NL80211_VENDOR_SUBCMD_CONFIG_TWT_INDEX, #endif Loading umac/cmn_services/cmn_defs/inc/wlan_cmn_ieee80211.h +6 −1 Original line number Diff line number Diff line /* * Copyright (c) 2017-2020 The Linux Foundation. All rights reserved. * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the Loading Loading @@ -1400,11 +1400,16 @@ struct wlan_ie_vhtop { uint16_t vhtop_basic_mcs_set; } qdf_packed; #define WLAN_HE_PHYCAP_SU_BFER_OFFSET 3 #define WLAN_HE_PHYCAP_SU_BFER_IDX 7 #define WLAN_HE_PHYCAP_SU_BFER_BITS 1 #define WLAN_HE_PHYCAP_160_SUPPORT BIT(2) #define WLAN_HE_PHYCAP_80_80_SUPPORT BIT(3) #define WLAN_HE_MACCAP_LEN 6 #define WLAN_HE_PHYCAP_LEN 11 #define WLAN_HE_MAX_MCS_MAPS 3 /** * struct wlan_ie_hecaps - HT capabilities * @elem_id: HE caps IE Loading umac/mlme/connection_mgr/core/src/wlan_cm_bss_scoring.c +36 −1 Original line number Diff line number Diff line /* * Copyright (c) 2017-2021, The Linux Foundation. All rights reserved. * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above Loading Loading @@ -1416,6 +1417,7 @@ static int cm_calculate_bss_score(struct wlan_objmgr_psoc *psoc, bool same_bucket = false; bool ap_su_beam_former = false; struct wlan_ie_vhtcaps *vht_cap; struct wlan_ie_hecaps *he_cap; struct scoring_cfg *score_config; struct weight_cfg *weight_config; uint32_t sta_nss; Loading Loading @@ -1504,8 +1506,17 @@ static int cm_calculate_bss_score(struct wlan_objmgr_psoc *psoc, score_config->rssi_score.bad_rssi_bucket_size); vht_cap = (struct wlan_ie_vhtcaps *)util_scan_entry_vhtcap(entry); if (vht_cap && vht_cap->su_beam_former) he_cap = (struct wlan_ie_hecaps *)util_scan_entry_hecap(entry); if (vht_cap && vht_cap->su_beam_former) { ap_su_beam_former = true; } else if (he_cap && QDF_GET_BITS(*(he_cap->he_phy_cap.phy_cap_bytes + WLAN_HE_PHYCAP_SU_BFER_OFFSET), WLAN_HE_PHYCAP_SU_BFER_IDX, WLAN_HE_PHYCAP_SU_BFER_BITS)) { ap_su_beam_former = true; } if (phy_config->beamformee_cap && is_vht && ap_su_beam_former && (entry->rssi_raw > rssi_pref_5g_rssi_thresh) && !same_bucket) Loading Loading @@ -1897,6 +1908,30 @@ bool wlan_cm_get_check_6ghz_security(struct wlan_objmgr_psoc *psoc) return mlme_psoc_obj->psoc_cfg.score_config.check_6ghz_security; } void wlan_cm_set_standard_6ghz_conn_policy(struct wlan_objmgr_psoc *psoc, bool value) { struct psoc_mlme_obj *mlme_psoc_obj; mlme_psoc_obj = wlan_psoc_mlme_get_cmpt_obj(psoc); if (!mlme_psoc_obj) return; mlme_debug("6ghz standard connection policy val %x", value); mlme_psoc_obj->psoc_cfg.score_config.standard_6ghz_conn_policy = value; } bool wlan_cm_get_standard_6ghz_conn_policy(struct wlan_objmgr_psoc *psoc) { struct psoc_mlme_obj *mlme_psoc_obj; mlme_psoc_obj = wlan_psoc_mlme_get_cmpt_obj(psoc); if (!mlme_psoc_obj) return false; return mlme_psoc_obj->psoc_cfg.score_config.standard_6ghz_conn_policy; } void wlan_cm_set_6ghz_key_mgmt_mask(struct wlan_objmgr_psoc *psoc, uint32_t value) { Loading umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_bss_score_param.h +27 −0 Original line number Diff line number Diff line /* * Copyright (c) 2017-2020, The Linux Foundation. All rights reserved. * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above Loading Loading @@ -129,6 +130,7 @@ struct per_slot_score { * @check_assoc_disallowed: Should assoc be disallowed if MBO OCE IE indicate so * @vendor_roam_score_algorithm: Preferred ETP vendor roam score algorithm * @check_6ghz_security: check security for 6Ghz candidate * @standard_6ghz_conn_policy: check for 6 GHz standard connection policy * @key_mgmt_mask_6ghz: user configurable mask for 6ghz AKM */ struct scoring_cfg { Loading @@ -143,6 +145,7 @@ struct scoring_cfg { bool check_assoc_disallowed; bool vendor_roam_score_algorithm; uint8_t check_6ghz_security; uint8_t standard_6ghz_conn_policy:1; uint32_t key_mgmt_mask_6ghz; }; Loading Loading @@ -291,6 +294,18 @@ void wlan_cm_set_6ghz_key_mgmt_mask(struct wlan_objmgr_psoc *psoc, */ uint32_t wlan_cm_get_6ghz_key_mgmt_mask(struct wlan_objmgr_psoc *psoc); void wlan_cm_set_standard_6ghz_conn_policy(struct wlan_objmgr_psoc *psoc, bool value); /** * wlan_cm_get_standard_6ghz_conn_policy() - Get 6Ghz standard connection * policy * @psoc: pointer to psoc object * * Return: value */ bool wlan_cm_get_standard_6ghz_conn_policy(struct wlan_objmgr_psoc *psoc); #else static inline bool wlan_cm_6ghz_allowed_for_akm(struct wlan_objmgr_psoc *psoc, Loading @@ -314,6 +329,18 @@ bool wlan_cm_get_check_6ghz_security(struct wlan_objmgr_psoc *psoc) return false; } static inline void wlan_cm_set_standard_6ghz_conn_policy(struct wlan_objmgr_psoc *psoc, uint32_t value) { } static inline bool wlan_cm_get_standard_6ghz_conn_policy(struct wlan_objmgr_psoc *psoc) { return false; } static inline void wlan_cm_set_6ghz_key_mgmt_mask(struct wlan_objmgr_psoc *psoc, uint32_t value) {} Loading umac/scan/core/src/wlan_scan_cache_db.c +3 −2 Original line number Diff line number Diff line /* * Copyright (c) 2017-2020 The Linux Foundation. All rights reserved. * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the Loading Loading @@ -1166,7 +1166,8 @@ QDF_STATUS __scm_handle_bcn_probe(struct scan_bcn_probe_event *bcn) * enabled. wlan_cm_get_check_6ghz_security API returns true if * neither Safe mode nor RF test mode are enabled. */ if (!scm_is_bss_allowed_for_country(psoc, scan_entry) && if (!wlan_cm_get_standard_6ghz_conn_policy(psoc) && !scm_is_bss_allowed_for_country(psoc, scan_entry) && wlan_cm_get_check_6ghz_security(psoc)) { scm_info_rl( "Drop frame from "QDF_MAC_ADDR_FMT Loading Loading
os_if/linux/wlan_cfg80211.h +4 −0 Original line number Diff line number Diff line /* * Copyright (c) 2016-2020 The Linux Foundation. All rights reserved. * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the Loading Loading @@ -140,6 +141,8 @@ * MBSSID TX VDEV status index * @QCA_NL80211_VENDOR_SUBCMD_CONFIG_TWT_INDEX: TWT config index * @QCA_NL80211_VENDOR_SUBCMD_PEER_CFR_CAPTURE_CFG_INDEX: CFR data event index * @QCA_NL80211_VENDOR_SUBCMD_DRIVER_DISCONNECT_REASON_INDEX: * Driver disconnect reason index */ enum qca_nl80211_vendor_subcmds_index { Loading Loading @@ -232,6 +235,7 @@ enum qca_nl80211_vendor_subcmds_index { QCA_NL80211_VENDOR_SUBCMD_UPDATE_SSID_INDEX, QCA_NL80211_VENDOR_SUBCMD_WIFI_FW_STATS_INDEX, QCA_NL80211_VENDOR_SUBCMD_MBSSID_TX_VDEV_STATUS_INDEX, QCA_NL80211_VENDOR_SUBCMD_DRIVER_DISCONNECT_REASON_INDEX, #ifdef WLAN_SUPPORT_TWT QCA_NL80211_VENDOR_SUBCMD_CONFIG_TWT_INDEX, #endif Loading
umac/cmn_services/cmn_defs/inc/wlan_cmn_ieee80211.h +6 −1 Original line number Diff line number Diff line /* * Copyright (c) 2017-2020 The Linux Foundation. All rights reserved. * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the Loading Loading @@ -1400,11 +1400,16 @@ struct wlan_ie_vhtop { uint16_t vhtop_basic_mcs_set; } qdf_packed; #define WLAN_HE_PHYCAP_SU_BFER_OFFSET 3 #define WLAN_HE_PHYCAP_SU_BFER_IDX 7 #define WLAN_HE_PHYCAP_SU_BFER_BITS 1 #define WLAN_HE_PHYCAP_160_SUPPORT BIT(2) #define WLAN_HE_PHYCAP_80_80_SUPPORT BIT(3) #define WLAN_HE_MACCAP_LEN 6 #define WLAN_HE_PHYCAP_LEN 11 #define WLAN_HE_MAX_MCS_MAPS 3 /** * struct wlan_ie_hecaps - HT capabilities * @elem_id: HE caps IE Loading
umac/mlme/connection_mgr/core/src/wlan_cm_bss_scoring.c +36 −1 Original line number Diff line number Diff line /* * Copyright (c) 2017-2021, The Linux Foundation. All rights reserved. * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above Loading Loading @@ -1416,6 +1417,7 @@ static int cm_calculate_bss_score(struct wlan_objmgr_psoc *psoc, bool same_bucket = false; bool ap_su_beam_former = false; struct wlan_ie_vhtcaps *vht_cap; struct wlan_ie_hecaps *he_cap; struct scoring_cfg *score_config; struct weight_cfg *weight_config; uint32_t sta_nss; Loading Loading @@ -1504,8 +1506,17 @@ static int cm_calculate_bss_score(struct wlan_objmgr_psoc *psoc, score_config->rssi_score.bad_rssi_bucket_size); vht_cap = (struct wlan_ie_vhtcaps *)util_scan_entry_vhtcap(entry); if (vht_cap && vht_cap->su_beam_former) he_cap = (struct wlan_ie_hecaps *)util_scan_entry_hecap(entry); if (vht_cap && vht_cap->su_beam_former) { ap_su_beam_former = true; } else if (he_cap && QDF_GET_BITS(*(he_cap->he_phy_cap.phy_cap_bytes + WLAN_HE_PHYCAP_SU_BFER_OFFSET), WLAN_HE_PHYCAP_SU_BFER_IDX, WLAN_HE_PHYCAP_SU_BFER_BITS)) { ap_su_beam_former = true; } if (phy_config->beamformee_cap && is_vht && ap_su_beam_former && (entry->rssi_raw > rssi_pref_5g_rssi_thresh) && !same_bucket) Loading Loading @@ -1897,6 +1908,30 @@ bool wlan_cm_get_check_6ghz_security(struct wlan_objmgr_psoc *psoc) return mlme_psoc_obj->psoc_cfg.score_config.check_6ghz_security; } void wlan_cm_set_standard_6ghz_conn_policy(struct wlan_objmgr_psoc *psoc, bool value) { struct psoc_mlme_obj *mlme_psoc_obj; mlme_psoc_obj = wlan_psoc_mlme_get_cmpt_obj(psoc); if (!mlme_psoc_obj) return; mlme_debug("6ghz standard connection policy val %x", value); mlme_psoc_obj->psoc_cfg.score_config.standard_6ghz_conn_policy = value; } bool wlan_cm_get_standard_6ghz_conn_policy(struct wlan_objmgr_psoc *psoc) { struct psoc_mlme_obj *mlme_psoc_obj; mlme_psoc_obj = wlan_psoc_mlme_get_cmpt_obj(psoc); if (!mlme_psoc_obj) return false; return mlme_psoc_obj->psoc_cfg.score_config.standard_6ghz_conn_policy; } void wlan_cm_set_6ghz_key_mgmt_mask(struct wlan_objmgr_psoc *psoc, uint32_t value) { Loading
umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_bss_score_param.h +27 −0 Original line number Diff line number Diff line /* * Copyright (c) 2017-2020, The Linux Foundation. All rights reserved. * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above Loading Loading @@ -129,6 +130,7 @@ struct per_slot_score { * @check_assoc_disallowed: Should assoc be disallowed if MBO OCE IE indicate so * @vendor_roam_score_algorithm: Preferred ETP vendor roam score algorithm * @check_6ghz_security: check security for 6Ghz candidate * @standard_6ghz_conn_policy: check for 6 GHz standard connection policy * @key_mgmt_mask_6ghz: user configurable mask for 6ghz AKM */ struct scoring_cfg { Loading @@ -143,6 +145,7 @@ struct scoring_cfg { bool check_assoc_disallowed; bool vendor_roam_score_algorithm; uint8_t check_6ghz_security; uint8_t standard_6ghz_conn_policy:1; uint32_t key_mgmt_mask_6ghz; }; Loading Loading @@ -291,6 +294,18 @@ void wlan_cm_set_6ghz_key_mgmt_mask(struct wlan_objmgr_psoc *psoc, */ uint32_t wlan_cm_get_6ghz_key_mgmt_mask(struct wlan_objmgr_psoc *psoc); void wlan_cm_set_standard_6ghz_conn_policy(struct wlan_objmgr_psoc *psoc, bool value); /** * wlan_cm_get_standard_6ghz_conn_policy() - Get 6Ghz standard connection * policy * @psoc: pointer to psoc object * * Return: value */ bool wlan_cm_get_standard_6ghz_conn_policy(struct wlan_objmgr_psoc *psoc); #else static inline bool wlan_cm_6ghz_allowed_for_akm(struct wlan_objmgr_psoc *psoc, Loading @@ -314,6 +329,18 @@ bool wlan_cm_get_check_6ghz_security(struct wlan_objmgr_psoc *psoc) return false; } static inline void wlan_cm_set_standard_6ghz_conn_policy(struct wlan_objmgr_psoc *psoc, uint32_t value) { } static inline bool wlan_cm_get_standard_6ghz_conn_policy(struct wlan_objmgr_psoc *psoc) { return false; } static inline void wlan_cm_set_6ghz_key_mgmt_mask(struct wlan_objmgr_psoc *psoc, uint32_t value) {} Loading
umac/scan/core/src/wlan_scan_cache_db.c +3 −2 Original line number Diff line number Diff line /* * Copyright (c) 2017-2020 The Linux Foundation. All rights reserved. * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the Loading Loading @@ -1166,7 +1166,8 @@ QDF_STATUS __scm_handle_bcn_probe(struct scan_bcn_probe_event *bcn) * enabled. wlan_cm_get_check_6ghz_security API returns true if * neither Safe mode nor RF test mode are enabled. */ if (!scm_is_bss_allowed_for_country(psoc, scan_entry) && if (!wlan_cm_get_standard_6ghz_conn_policy(psoc) && !scm_is_bss_allowed_for_country(psoc, scan_entry) && wlan_cm_get_check_6ghz_security(psoc)) { scm_info_rl( "Drop frame from "QDF_MAC_ADDR_FMT Loading