From c4e6b83afe93e7ab0eebadfd3753d0a402eda15c Mon Sep 17 00:00:00 2001 From: Surya Prakash Sivaraj Date: Mon, 15 Nov 2021 23:22:41 +0530 Subject: [PATCH] qcacmn: Update preauth candidate entry to scan table During SAE roam auth offload, update the beacon/probe response frame coming from the FW via WMI_ROAM_FRAME_EVENTID into the scan db. When the bss info of the preauth candidate is unavailable in the host/kernel scan entry, supplicant fails to determine the proper SAE PWE config of the peer and the commit request fails. Change-Id: I8537147104f30b74ffb2e87946f2e5f4b129f0df CRs-Fixed: 3075460 --- .../cmn_defs/inc/wlan_cmn_ieee80211.h | 2 ++ umac/scan/dispatcher/inc/wlan_scan_utils_api.h | 17 +++++++++++++++++ umac/scan/dispatcher/src/wlan_scan_utils_api.c | 14 ++++++++++++++ wmi/inc/wmi_unified_param.h | 1 + wmi/inc/wmi_unified_priv.h | 4 ++++ wmi/src/wmi_unified_tlv.c | 2 ++ 6 files changed, 40 insertions(+) diff --git a/umac/cmn_services/cmn_defs/inc/wlan_cmn_ieee80211.h b/umac/cmn_services/cmn_defs/inc/wlan_cmn_ieee80211.h index dbb9f74590..f3b4063e7f 100644 --- a/umac/cmn_services/cmn_defs/inc/wlan_cmn_ieee80211.h +++ b/umac/cmn_services/cmn_defs/inc/wlan_cmn_ieee80211.h @@ -271,6 +271,8 @@ #define WLAN_MAX_MUEDCA_IE_LEN 14 #define WLAN_MAX_HE_6G_CAP_IE_LEN 3 #define WLAN_MAX_HEOP_IE_LEN 16 +#define WLAN_HEOP_OUI_TYPE "\x24" +#define WLAN_HEOP_OUI_SIZE 1 /* HT capability flags */ #define WLAN_HTCAP_C_ADVCODING 0x0001 diff --git a/umac/scan/dispatcher/inc/wlan_scan_utils_api.h b/umac/scan/dispatcher/inc/wlan_scan_utils_api.h index 630039115f..cc576e34d3 100644 --- a/umac/scan/dispatcher/inc/wlan_scan_utils_api.h +++ b/umac/scan/dispatcher/inc/wlan_scan_utils_api.h @@ -1,5 +1,6 @@ /* * Copyright (c) 2017-2021 The Linux Foundation. All rights reserved. + * Copyright (c) 2021 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 @@ -1813,4 +1814,20 @@ static inline bool util_scan_is_null_ssid(struct wlan_ssid *ssid) return false; } +/** + * util_scan_get_6g_oper_channel() - function to get primary channel + * from he op IE + * he_op_ie : ie pointer + * + * Return : primary channel or 0 if 6g params is not present. + */ +#ifdef CONFIG_BAND_6GHZ +uint8_t util_scan_get_6g_oper_channel(uint8_t *he_op_ie); +#else +static inline uint8_t +util_scan_get_6g_oper_channel(uint8_t *he_op_ie) +{ + return 0; +} +#endif #endif diff --git a/umac/scan/dispatcher/src/wlan_scan_utils_api.c b/umac/scan/dispatcher/src/wlan_scan_utils_api.c index d7a423ed22..6f2f57b3b6 100644 --- a/umac/scan/dispatcher/src/wlan_scan_utils_api.c +++ b/umac/scan/dispatcher/src/wlan_scan_utils_api.c @@ -1,5 +1,6 @@ /* * Copyright (c) 2017-2021 The Linux Foundation. All rights reserved. + * Copyright (c) 2021 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 @@ -393,6 +394,19 @@ util_scan_get_phymode_6g(struct wlan_objmgr_pdev *pdev, return phymode; } + +uint8_t +util_scan_get_6g_oper_channel(uint8_t *he_op_ie) +{ + struct he_oper_6g_param *he_6g_params; + + he_6g_params = util_scan_get_he_6g_params(he_op_ie); + if (!he_6g_params) + return 0; + + return he_6g_params->primary_channel; +} + #else static QDF_STATUS util_scan_get_chan_from_he_6g_params(struct wlan_objmgr_pdev *pdev, diff --git a/wmi/inc/wmi_unified_param.h b/wmi/inc/wmi_unified_param.h index 4b93a6f536..17147d8719 100644 --- a/wmi/inc/wmi_unified_param.h +++ b/wmi/inc/wmi_unified_param.h @@ -4721,6 +4721,7 @@ typedef enum { wmi_mlo_link_set_active_resp_eventid, #endif wmi_pdev_fips_extend_event_id, + wmi_roam_frame_event_id, wmi_events_max, } wmi_conv_event_id; diff --git a/wmi/inc/wmi_unified_priv.h b/wmi/inc/wmi_unified_priv.h index bd7877401c..bb23a3197e 100644 --- a/wmi/inc/wmi_unified_priv.h +++ b/wmi/inc/wmi_unified_priv.h @@ -447,6 +447,10 @@ QDF_STATUS (*extract_roam_pmkid_request)(wmi_unified_t wmi_handle, uint8_t *event, uint32_t data_len, struct roam_pmkid_req_event **list); +QDF_STATUS +(*extract_roam_candidate_frame)(wmi_unified_t wmi_handle, + uint8_t *event, uint32_t data_len, + struct roam_scan_candidate_frame *data); #endif #ifdef FEATURE_MEC_OFFLOAD QDF_STATUS diff --git a/wmi/src/wmi_unified_tlv.c b/wmi/src/wmi_unified_tlv.c index 98c4e3dd53..019618b441 100644 --- a/wmi/src/wmi_unified_tlv.c +++ b/wmi/src/wmi_unified_tlv.c @@ -17600,6 +17600,8 @@ event_ids[wmi_roam_scan_chan_list_id] = event_ids[wmi_mlo_link_set_active_resp_eventid] = WMI_MLO_LINK_SET_ACTIVE_RESP_EVENTID; #endif + event_ids[wmi_roam_frame_event_id] = + WMI_ROAM_FRAME_EVENTID; } #ifdef WLAN_FEATURE_LINK_LAYER_STATS