Przeglądaj źródła

qcacmn: Support dynamic FILS enablement for dual SAP

For Dual SAP(legacy SAP + 6 GHz SAP), WFA  HE-4.1.1 cert
case requires the following:
a) If Dual SAP is enabled, the 6 GHz SSID should be
discovered via the RNR IE of the colocated legacy SAP.
b) If a co-located neighbor is present, the  6 GHz SAP
should not send FD or unsolicited probe responses.

Add support for the above the cert case by configuring the
FD support for the 6 GHz SAP based on the operation of the
co-located SAP.

Change-Id: Ib1ea2794baf8786b7c042fc35130b6929abb947f
CRs-Fixed: 3732663
Surya Prakash Sivaraj 1 rok temu
rodzic
commit
9c831dd988

+ 17 - 0
umac/cmn_services/cmn_defs/inc/wlan_cmn_ieee80211.h

@@ -307,6 +307,23 @@ enum qcn_attribute_id {
 #define WLAN_TPE_IE_MIN_LEN                      2
 #define WLAN_MAX_NUM_TPE_IE                      8
 
+/* BSS Parameters subield of RNR IE */
+
+/* Bit-0 of BSS Parameters subfield */
+#define WLAN_RNR_BSS_PARAM_OCT_RECOMMENDED                   0x01
+/* Bit-1 of BSS Parameters subfield */
+#define WLAN_RNR_BSS_PARAM_SAME_SSID                         0x02
+/* Bit-2 of BSS Parameters subfield */
+#define WLAN_RNR_BSS_PARAM_MBSSID                            0x04
+/* Bit-3 of BSS Parameters subfield */
+#define WLAN_RNR_BSS_PARAM_TRANSMITTED_BSSID                 0x08
+/* Bit-4 of BSS Parameters subfield */
+#define WLAN_RNR_BSS_PARAM_ESS_WITH_COLOCATED_AP_IN_24_OR_5  0x10
+/* Bit-5 of BSS Parameters subfield */
+#define WLAN_RNR_BSS_PARAM_UNSOLICITED_PROBE_RESPONSE        0x20
+/* Bit-6 of BSS Parameters subfield */
+#define WLAN_RNR_BSS_PARAM_COLOCATED_AP                      0x40
+
 /* Wide band channel switch IE length */
 #define WLAN_WIDE_BW_CHAN_SWITCH_IE_LEN          3
 

+ 3 - 1
umac/mlme/include/wlan_vdev_mlme.h

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
- * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2024 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
@@ -379,6 +379,7 @@ struct vdev_mlme_proto {
  * @he_curr_non_srg_pd_threshold: current configured NON-SRG PD threshold
  * @he_curr_srg_pd_threshold: current configured SRG PD threshold
  * @is_pd_threshold_present: PD threshold is present in SR enable command or not
+ * @disable_fd_in_6ghz_band: Disable FD in 6 GHz if OOB discovery is enabled
  */
 struct vdev_mlme_mgmt_generic {
 	uint32_t rts_threshold;
@@ -420,6 +421,7 @@ struct vdev_mlme_mgmt_generic {
 	int32_t he_curr_srg_pd_threshold;
 	bool is_pd_threshold_present;
 #endif
+	bool disable_fd_in_6ghz_band;
 };
 
 /**

+ 47 - 36
umac/mlme/vdev_mgr/core/src/vdev_mgr_ops.c

@@ -725,6 +725,51 @@ static QDF_STATUS vdev_mgr_up_param_update(
 	return QDF_STATUS_SUCCESS;
 }
 
+QDF_STATUS vdev_mgr_configure_fd_for_sap(struct vdev_mlme_obj *mlme_obj)
+{
+	struct config_fils_params fils_param = {0};
+	struct vdev_mlme_mbss_11ax *mbss;
+	bool is_non_tx_vdev, is_6g_sap_fd_enabled;
+
+	if (!mlme_obj->vdev->vdev_mlme.des_chan ||
+	    !WLAN_REG_IS_6GHZ_CHAN_FREQ(
+		mlme_obj->vdev->vdev_mlme.des_chan->ch_freq))
+		return QDF_STATUS_SUCCESS;
+	/*
+	 * In case of a non-tx vdev, 'profile_num' must be greater
+	 * than 0 indicating one or more non-tx vdev and 'profile_idx'
+	 * must be in the range [1, 2^n] where n is the max bssid
+	 * indicator
+	 */
+	mbss = &mlme_obj->mgmt.mbss_11ax;
+	is_non_tx_vdev = mbss && mbss->profile_idx && mbss->profile_num;
+	if (is_non_tx_vdev)
+		return QDF_STATUS_SUCCESS;
+
+	is_6g_sap_fd_enabled = wlan_vdev_mlme_feat_ext_cap_get(mlme_obj->vdev,
+						WLAN_VDEV_FEXT_FILS_DISC_6G_SAP);
+	mlme_debug("SAP FD enabled %d", is_6g_sap_fd_enabled);
+
+	fils_param.vdev_id = wlan_vdev_get_id(mlme_obj->vdev);
+
+	/* If FD is disabled during runtime, disable the FD in FW */
+	if (wlan_mlme_is_fd_disabled_in_6ghz_band(mlme_obj->vdev))
+		goto send_cmd;
+
+	if (is_6g_sap_fd_enabled) {
+		fils_param.fd_period = DEFAULT_FILS_DISCOVERY_PERIOD;
+	} else if (wlan_vdev_mlme_feat_ext2_cap_get(mlme_obj->vdev,
+					WLAN_VDEV_FEXT2_20TU_PRB_RESP)) {
+		fils_param.send_prb_rsp_frame = true;
+		fils_param.fd_period = DEFAULT_PROBE_RESP_PERIOD;
+	} else {
+		mlme_debug("SAP FD and 20TU Prb both are disabled");
+	}
+
+send_cmd:
+	return tgt_vdev_mgr_fils_enable_send(mlme_obj, &fils_param);
+}
+
 QDF_STATUS vdev_mgr_up_send(struct vdev_mlme_obj *mlme_obj)
 {
 	QDF_STATUS status;
@@ -733,9 +778,6 @@ QDF_STATUS vdev_mgr_up_send(struct vdev_mlme_obj *mlme_obj)
 	struct beacon_tmpl_params bcn_tmpl_param = {0};
 	enum QDF_OPMODE opmode;
 	struct wlan_objmgr_vdev *vdev;
-	struct config_fils_params fils_param = {0};
-	uint8_t is_6g_sap_fd_enabled;
-	bool is_non_tx_vdev;
 
 	if (!mlme_obj) {
 		mlme_err("VDEV_MLME is NULL");
@@ -772,39 +814,8 @@ QDF_STATUS vdev_mgr_up_send(struct vdev_mlme_obj *mlme_obj)
 	mlme_obj->mgmt.ap.max_chan_switch_time = 0;
 	mlme_obj->mgmt.ap.last_bcn_ts_ms = 0;
 
-	is_6g_sap_fd_enabled = wlan_vdev_mlme_feat_ext_cap_get(vdev,
-					WLAN_VDEV_FEXT_FILS_DISC_6G_SAP);
-	mlme_debug("SAP FD enabled %d", is_6g_sap_fd_enabled);
-
-	/*
-	 * In case of a non-tx vdev, 'profile_num' must be greater
-	 * than 0 indicating one or more non-tx vdev and 'profile_idx'
-	 * must be in the range [1, 2^n] where n is the max bssid
-	 * indicator
-	 */
-	is_non_tx_vdev = param.profile_num && param.profile_idx;
-
-	if (opmode == QDF_SAP_MODE && mlme_obj->vdev->vdev_mlme.des_chan &&
-	    WLAN_REG_IS_6GHZ_CHAN_FREQ(
-			mlme_obj->vdev->vdev_mlme.des_chan->ch_freq) &&
-		!is_non_tx_vdev) {
-		fils_param.vdev_id = wlan_vdev_get_id(mlme_obj->vdev);
-		if (is_6g_sap_fd_enabled) {
-			fils_param.fd_period = DEFAULT_FILS_DISCOVERY_PERIOD;
-		} else {
-			if (wlan_vdev_mlme_feat_ext2_cap_get(vdev,
-					WLAN_VDEV_FEXT2_20TU_PRB_RESP)) {
-				fils_param.send_prb_rsp_frame = true;
-				fils_param.fd_period =
-					DEFAULT_PROBE_RESP_PERIOD;
-			} else {
-				mlme_err("SAP FD and 20TU Prb both are disabled");
-			}
-		}
-		status = tgt_vdev_mgr_fils_enable_send(mlme_obj,
-						       &fils_param);
-	}
-
+	if (opmode == QDF_SAP_MODE)
+		status = vdev_mgr_configure_fd_for_sap(mlme_obj);
 	return status;
 }
 

+ 10 - 1
umac/mlme/vdev_mgr/core/src/vdev_mgr_ops.h

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2019-2020 The Linux Foundation. All rights reserved.
- * Copyright (c) 2021, 2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021,2023-2024 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
@@ -266,4 +266,13 @@ QDF_STATUS vdev_mgr_send_set_mac_addr(struct qdf_mac_addr mac_addr,
 				      struct qdf_mac_addr mld_addr,
 				      struct wlan_objmgr_vdev *vdev);
 #endif
+
+/**
+ * vdev_mgr_configure_fd_for_sap() - Configure the FILS FD params to the
+ * firmware
+ * @mlme_obj: pointer to vdev_mlme_obj
+ *
+ * Return: QDF_STATUS
+ */
+QDF_STATUS vdev_mgr_configure_fd_for_sap(struct vdev_mlme_obj *mlme_obj);
 #endif /* __VDEV_MGR_OPS_H__ */

+ 19 - 1
umac/mlme/vdev_mgr/dispatcher/inc/wlan_vdev_mlme_api.h

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2018-2019, 2021 The Linux Foundation. All rights reserved.
- * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2024 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
@@ -345,4 +345,22 @@ wlan_mlme_update_sr_data(struct wlan_objmgr_vdev *vdev, int *val,
 			 bool is_sr_enable)
 {}
 #endif
+
+/**
+ * wlan_mlme_disable_fd_in_6ghz_band() - Set fd disabled flag in vdev
+ * @vdev: vdev object
+ * @disable_fd: Disable the 6 GHz FD.
+ *
+ * Return: void
+ */
+void wlan_mlme_disable_fd_in_6ghz_band(struct wlan_objmgr_vdev *vdev,
+				       bool disable_fd);
+
+/**
+ * wlan_mlme_is_fd_disabled_in_6ghz_band() - Get fd disabled flag fom vdev
+ * @vdev: vdev obj
+ *
+ * Return: true/false
+ */
+bool wlan_mlme_is_fd_disabled_in_6ghz_band(struct wlan_objmgr_vdev *vdev);
 #endif

+ 24 - 1
umac/mlme/vdev_mgr/dispatcher/src/wlan_vdev_mlme_api.c

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2018-2019, 2021 The Linux Foundation. All rights reserved.
- * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2024 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
@@ -482,3 +482,26 @@ wlan_mlme_update_sr_data(struct wlan_objmgr_vdev *vdev, int *val,
 	wlan_vdev_mlme_set_current_srg_pd_threshold(vdev, srg_pd_threshold);
 }
 #endif
+
+void wlan_mlme_disable_fd_in_6ghz_band(struct wlan_objmgr_vdev *vdev,
+				       bool disable_fd)
+{
+	struct vdev_mlme_obj *vdev_mlme;
+
+	vdev_mlme = wlan_vdev_mlme_get_cmpt_obj(vdev);
+	if (!vdev_mlme)
+		return;
+
+	vdev_mlme->mgmt.generic.disable_fd_in_6ghz_band = disable_fd;
+}
+
+bool wlan_mlme_is_fd_disabled_in_6ghz_band(struct wlan_objmgr_vdev *vdev)
+{
+	struct vdev_mlme_obj *vdev_mlme;
+
+	vdev_mlme = wlan_vdev_mlme_get_cmpt_obj(vdev);
+	if (!vdev_mlme)
+		return false;
+
+	return vdev_mlme->mgmt.generic.disable_fd_in_6ghz_band;
+}