Переглянути джерело

qcacld-3.0: Send BTM query over 11k neighbor report

Add new WCNSS_qcom.ini value:
"prefer_btm_query" - Set this flag to enable the firmware to
send btm query for neighbor list. If this flag is not set,
the firmware will fallback to current mechanism of sending
11k neighbor report request instead of btm query.

When this prefer_btm_query is set, host driver will modify
btm_offload_config bit 8 which will be read by firmware to
get this ini value.

Change-Id: Id424c0da7207b0185cee67172782ef5c1d9fd131
CRs-Fixed: 2369000
Pragaspathi Thilagaraj 6 роки тому
батько
коміт
7d0a3cf99f

+ 7 - 2
components/mlme/core/src/wlan_mlme_main.c

@@ -1887,9 +1887,14 @@ static void mlme_init_wps_params_cfg(struct wlan_objmgr_psoc *psoc,
 			      &wps_params->wps_uuid.len);
 }
 
-static void mlme_init_btm_cfg(struct wlan_mlme_btm *btm)
+static void mlme_init_btm_cfg(struct wlan_objmgr_psoc *psoc,
+			      struct wlan_mlme_btm *btm)
 {
 	btm->btm_offload_config = cfg_default(CFG_BTM_ENABLE);
+	btm->prefer_btm_query = cfg_get(psoc, CFG_PREFER_BTM_QUERY);
+	if (btm->prefer_btm_query)
+		MLME_SET_BIT(btm->btm_offload_config, BTM_OFFLOAD_CONFIG_BIT_8);
+
 	btm->btm_solicited_timeout = cfg_default(CFG_BTM_SOLICITED_TIMEOUT);
 	btm->btm_max_attempt_cnt = cfg_default(CFG_BTM_MAX_ATTEMPT_CNT);
 	btm->btm_sticky_time = cfg_default(CFG_BTM_STICKY_TIME);
@@ -2024,11 +2029,11 @@ QDF_STATUS mlme_cfg_on_psoc_enable(struct wlan_objmgr_psoc *psoc)
 	mlme_init_wep_cfg(&mlme_cfg->wep_params);
 	mlme_init_wifi_pos_cfg(psoc, &mlme_cfg->wifi_pos_cfg);
 	mlme_init_wps_params_cfg(psoc, &mlme_cfg->wps_params);
-	mlme_init_btm_cfg(&mlme_cfg->btm);
 	mlme_init_fe_wlm_in_cfg(psoc, &mlme_cfg->wlm_config);
 	mlme_init_fe_rrm_in_cfg(psoc, &mlme_cfg->rrm_config);
 	mlme_init_mwc_cfg(psoc, &mlme_cfg->mwc);
 	mlme_init_reg_cfg(psoc, &mlme_cfg->reg);
+	mlme_init_btm_cfg(psoc, &mlme_cfg->btm);
 
 	return status;
 }

+ 22 - 0
components/mlme/dispatcher/inc/cfg_mlme_btm.h

@@ -23,6 +23,27 @@
 #ifndef CFG_MLME_BTM_H_
 #define CFG_MLME_BTM_H_
 
+/*
+ * <ini>
+ * prefer_btm_query - Prefer btm query over 11k neighbor report
+ * @Min: 0
+ * @Max: 1
+ * @Default: 1
+ *
+ * This ini is used to enable the STA to send BTM query instead of
+ * 11k neighbor report.
+ *
+ * Supported Feature: STA
+ *
+ * Usage: External
+ *
+ * </ini>
+ */
+#define CFG_PREFER_BTM_QUERY CFG_INI_BOOL( \
+			"prefer_btm_query", \
+			1, \
+			"prefer btm query over 11k neighbor report")
+
 /*
  * <ini>
  * btm_offload_config - Configure BTM
@@ -139,6 +160,7 @@
 	"configure Stick time after roaming to new AP by BTM")
 
 #define CFG_BTM_ALL \
+	CFG(CFG_PREFER_BTM_QUERY) \
 	CFG(CFG_BTM_ENABLE) \
 	CFG(CFG_BTM_SOLICITED_TIMEOUT) \
 	CFG(CFG_BTM_MAX_ATTEMPT_CNT) \

+ 7 - 0
components/mlme/dispatcher/inc/wlan_mlme_public_struct.h

@@ -1744,14 +1744,21 @@ struct wlan_mlme_wifi_pos_cfg {
 	uint32_t fine_time_meas_cap;
 };
 
+#define MLME_SET_BIT(value, bit_offset) ((value) |= (1 << (bit_offset)))
+
+#define BTM_OFFLOAD_CONFIG_BIT_8    8
+#define BTM_OFFLOAD_CONFIG_BIT_7    7
+
 /*
  * struct wlan_mlme_btm - BTM related configs
+ * @prefer_btm_query: flag to prefer btm query over 11k
  * @btm_offload_config: configure btm offload
  * @btm_solicited_timeout: configure timeout value for waiting BTM request
  * @btm_max_attempt_cnt: configure maximum attempt for sending BTM query to ESS
  * @btm_sticky_time: configure Stick time after roaming to new AP by BTM
  */
 struct wlan_mlme_btm {
+	bool prefer_btm_query;
 	uint32_t btm_offload_config;
 	uint32_t btm_solicited_timeout;
 	uint32_t btm_max_attempt_cnt;