Преглед на файлове

qcacld-3.0: Add new ini for R-STA secure LTF support

Add new ini "enable_responder_secure_ltf_support" for R-STA
secure LTF support. Enable this ini for R-STA to advertise
secure LTF support in extended capabilities & RSNXE.

Change-Id: I474b06c52c47b5a54dc827031bf9ff7c0d2f7d05
CRs-Fixed: 3283083
Pragaspathi Thilagaraj преди 2 години
родител
ревизия
95cd4fde59
променени са 2 файла, в които са добавени 44 реда и са изтрити 1 реда
  1. 20 0
      components/mlme/core/src/wlan_mlme_main.c
  2. 24 1
      components/mlme/dispatcher/inc/cfg_mlme_wifi_pos.h

+ 20 - 0
components/mlme/core/src/wlan_mlme_main.c

@@ -31,6 +31,7 @@
 #include <wlan_crypto_global_api.h>
 #include <wlan_mlo_mgr_cmn.h>
 #include "wlan_mlme_ucfg_api.h"
+#include "wifi_pos_ucfg_i.h"
 
 #define NUM_OF_SOUNDING_DIMENSIONS     1 /*Nss - 1, (Nss = 2 for 2x2)*/
 
@@ -2339,6 +2340,23 @@ static void mlme_init_wep_cfg(struct wlan_mlme_wep_cfg *wep_params)
 	wep_params->wep_default_key_id = cfg_default(CFG_WEP_DEFAULT_KEYID);
 }
 
+#if defined(WIFI_POS_CONVERGED) && defined(WLAN_FEATURE_RTT_11AZ_SUPPORT)
+static void
+mlme_init_wifi_pos_11az_config(struct wlan_objmgr_psoc *psoc,
+			       struct wlan_mlme_wifi_pos_cfg *wifi_pos_cfg)
+{
+	bool rsta_sec_ltf_enabled =
+			cfg_get(psoc, CFG_RESPONDER_SECURE_LTF_SUPPORT);
+
+	wifi_pos_set_rsta_sec_ltf_cap(rsta_sec_ltf_enabled);
+}
+#else
+static inline void
+mlme_init_wifi_pos_11az_config(struct wlan_objmgr_psoc *psoc,
+			       struct wlan_mlme_wifi_pos_cfg *wifi_pos_cfg)
+{}
+#endif
+
 static void mlme_init_wifi_pos_cfg(struct wlan_objmgr_psoc *psoc,
 				   struct wlan_mlme_wifi_pos_cfg *wifi_pos_cfg)
 {
@@ -2346,6 +2364,8 @@ static void mlme_init_wifi_pos_cfg(struct wlan_objmgr_psoc *psoc,
 		cfg_get(psoc, CFG_FINE_TIME_MEAS_CAPABILITY);
 	wifi_pos_cfg->oem_6g_support_disable =
 		cfg_get(psoc, CFG_OEM_SIXG_SUPPORT_DISABLE);
+
+	mlme_init_wifi_pos_11az_config(psoc, wifi_pos_cfg);
 }
 
 #ifdef FEATURE_WLAN_ESE

+ 24 - 1
components/mlme/dispatcher/inc/cfg_mlme_wifi_pos.h

@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2012-2020 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2022 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
@@ -93,9 +94,31 @@
 		"oem_6g_support_disable", \
 		1, \
 		"oem 6Ghz support Enabled/disabled")
+/*
+ * <ini>
+ * enable_responder_secure_ltf_support - R-STA secure LTF keyseed support
+ * @Min: false
+ * @Max: true
+ * @Default: false
+ *
+ * This ini is used to enable R-STA advertising secure LTF support.
+ *
+ * Related: None
+ *
+ * Supported Feature: WIFI POS
+ *
+ * Usage: Internal/External
+ *
+ * </ini>
+ */
+#define CFG_RESPONDER_SECURE_LTF_SUPPORT CFG_INI_BOOL( \
+		"enable_responder_secure_ltf_support", \
+		false, \
+		"enable Responder secure LTF support")
 
 #define CFG_WIFI_POS_ALL \
 	CFG(CFG_FINE_TIME_MEAS_CAPABILITY) \
-	CFG(CFG_OEM_SIXG_SUPPORT_DISABLE)
+	CFG(CFG_OEM_SIXG_SUPPORT_DISABLE) \
+	CFG(CFG_RESPONDER_SECURE_LTF_SUPPORT)
 
 #endif /* __CFG_MLME_WIFI_POS_H */