Răsfoiți Sursa

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
Surya Prakash Sivaraj 3 ani în urmă
părinte
comite
c4e6b83afe

+ 2 - 0
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

+ 17 - 0
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

+ 14 - 0
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,

+ 1 - 0
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;
 

+ 4 - 0
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

+ 2 - 0
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