Ver Fonte

qcacld-3.0: Add support to enable/disable FILS_DISCV_FRAMES TX

Host adds support to send enable/disable wfa config for FILS_DISCV_FRAMES
to firmware.

Change-Id: I0143b158b5f62b42c0d4c3d8a34a7ec7b1ec994b
CRs-Fixed: 2801144
Abhishek Ambure há 4 anos atrás
pai
commit
595846e6db

+ 17 - 0
components/umac/mlme/wfa_config/dispatcher/src/wlan_wfa_tgt_if_tx_api.c

@@ -25,6 +25,7 @@
 #include "wlan_mlme_ucfg_api.h"
 #include "wlan_wfa_tgt_if_tx_api.h"
 #include "wlan_mlme_public_struct.h"
+#include "wlan_vdev_mgr_tgt_if_tx_api.h"
 #include "wma.h"
 
 static inline struct wlan_wfa_cmd_tx_ops *
@@ -57,12 +58,28 @@ wlan_send_wfatest_cmd(struct wlan_objmgr_vdev *vdev,
 {
 	QDF_STATUS status = QDF_STATUS_E_FAILURE;
 	struct wlan_wfa_cmd_tx_ops *tx_ops;
+	struct vdev_mlme_obj *mlme_obj;
+	struct config_fils_params param = {0};
 
 	if (!vdev || !wmi_wfatest) {
 		mlme_legacy_err("vdev or test params is NULL");
 		return status;
 	}
 
+	if (wmi_wfatest->cmd == WFA_FILS_DISCV_FRAMES) {
+		mlme_obj = wlan_vdev_mlme_get_cmpt_obj(vdev);
+		if (!mlme_obj) {
+			wma_err("failed to get mlme_obj");
+			return QDF_STATUS_E_INVAL;
+		}
+
+		param.vdev_id = wmi_wfatest->vdev_id;
+		if (wmi_wfatest->value)
+			param.fd_period = DEFAULT_FILS_DISCOVERY_PERIOD;
+
+		return tgt_vdev_mgr_fils_enable_send(mlme_obj, &param);
+	}
+
 	tx_ops = wlan_wfatest_get_tx_ops_from_vdev(vdev);
 	if (!tx_ops || !tx_ops->send_wfa_test_cmd) {
 		mlme_legacy_err("Failed to send WFA test cmd");

+ 19 - 0
core/hdd/src/wlan_hdd_cfg80211.c

@@ -7045,6 +7045,8 @@ wlan_hdd_wifi_test_config_policy[
 			.type = NLA_NESTED},
 		[QCA_WLAN_VENDOR_ATTR_WIFI_TEST_CONFIG_IGNORE_SA_QUERY_TIMEOUT] = {
 			.type = NLA_U8},
+		[QCA_WLAN_VENDOR_ATTR_WIFI_TEST_CONFIG_FILS_DISCOVERY_FRAMES_TX] = {
+			.type = NLA_U8},
 };
 
 /**
@@ -10283,6 +10285,23 @@ __wlan_hdd_cfg80211_set_wifi_test_config(struct wiphy *wiphy,
 		ret_val = ucfg_send_wfatest_cmd(adapter->vdev, &wfa_param);
 	}
 
+	cmd_id = QCA_WLAN_VENDOR_ATTR_WIFI_TEST_CONFIG_FILS_DISCOVERY_FRAMES_TX;
+	if (tb[cmd_id] && adapter->device_mode == QDF_SAP_MODE) {
+		wfa_param.vdev_id = adapter->vdev_id;
+		wfa_param.value = nla_get_u8(tb[cmd_id]);
+
+		if (!(wfa_param.value == FILS_DISCV_FRAMES_DISABLE ||
+		      wfa_param.value == FILS_DISCV_FRAMES_ENABLE)) {
+			hdd_debug("Invalid FILS_DISCV_FRAMES config %d",
+				  wfa_param.value);
+			goto send_err;
+		}
+		wfa_param.cmd = WFA_FILS_DISCV_FRAMES;
+		hdd_info("send wfa FILS_DISCV_FRAMES TX config %d",
+			 wfa_param.value);
+		ret_val = ucfg_send_wfatest_cmd(adapter->vdev, &wfa_param);
+	}
+
 	if (update_sme_cfg)
 		sme_update_config(mac_handle, sme_config);
 

+ 2 - 0
core/hdd/src/wlan_hdd_cfg80211.h

@@ -313,6 +313,8 @@ wlan_hdd_wifi_test_config_policy[
 #define CSA_IGNORE 1
 #define SA_QUERY_TIMEOUT_DEFAULT 0
 #define SA_QUERY_TIMEOUT_IGNORE 1
+#define FILS_DISCV_FRAMES_DISABLE 0
+#define FILS_DISCV_FRAMES_ENABLE 1
 
 #define FEATURE_VENDOR_SUBCMD_WIFI_TEST_CONFIGURATION                    \
 {                                                                        \