Kaynağa Gözat

qcacld-3.0: Add configuration support for he dynamic fragmentation

Add user configuration for HE dynamic fragmentation capability
support

Change-Id: I94a18b5102b1ee303ccbf832e67c37930f523bec
CRs-Fixed: 2159864
Kiran Kumar Lokere 7 yıl önce
ebeveyn
işleme
4aa08a5c14

+ 24 - 0
core/hdd/inc/wlan_hdd_cfg.h

@@ -11444,6 +11444,29 @@ enum hdd_wext_control {
 
 #ifdef WLAN_FEATURE_11AX
 /* 11AX related INI configuration */
+/*
+ * <ini>
+ * he_dynamic_frag_support - configure dynamic fragmentation
+ * @Min: 0
+ * @Max: 3
+ * @Default: 1
+ *
+ * This ini is used to configure dynamic fragmentation.
+ *
+ * Related: NA
+ *
+ * Supported Feature: 11AX
+ *
+ * Usage: Internal/External
+ *
+ * </ini>
+ */
+
+#define CFG_HE_DYNAMIC_FRAGMENTATION_NAME    "he_dynamic_frag_support"
+#define CFG_HE_DYNAMIC_FRAGMENTATION_MIN     (0)
+#define CFG_HE_DYNAMIC_FRAGMENTATION_MAX     (3)
+#define CFG_HE_DYNAMIC_FRAGMENTATION_DEFAULT (1)
+
 /*
  * <ini>
  * enable_ul_mimo- Enable UL MIMO.
@@ -14668,6 +14691,7 @@ struct hdd_config {
 	bool enable_ul_mimo;
 	bool enable_ul_ofdma;
 	uint32_t he_sta_obsspd;
+	uint8_t he_dynamic_frag_support;
 #endif
 	enum l1ss_sleep_allowed l1ss_sleep_allowed;
 	uint32_t arp_ac_category;

+ 7 - 0
core/hdd/src/wlan_hdd_cfg.c

@@ -4584,6 +4584,13 @@ struct reg_table_entry g_registry_table[] = {
 		     CFG_ENABLE_UL_MIMO_MIN,
 		     CFG_ENABLE_UL_MIMO_MAX),
 
+	REG_VARIABLE(CFG_HE_DYNAMIC_FRAGMENTATION_NAME, WLAN_PARAM_Integer,
+		     struct hdd_config, he_dynamic_frag_support,
+		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
+		     CFG_HE_DYNAMIC_FRAGMENTATION_DEFAULT,
+		     CFG_HE_DYNAMIC_FRAGMENTATION_MIN,
+		     CFG_HE_DYNAMIC_FRAGMENTATION_MAX),
+
 	REG_VARIABLE(CFG_ENABLE_UL_OFDMA_NAME, WLAN_PARAM_Integer,
 		     struct hdd_config, enable_ul_ofdma,
 		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,

+ 4 - 1
core/hdd/src/wlan_hdd_he.c

@@ -64,7 +64,8 @@ void hdd_update_tgt_he_cap(struct hdd_context *hdd_ctx,
 	hdd_he_set_wni_cfg(hdd_ctx, WNI_CFG_HE_TWT_RESPONDER,
 			   he_cap->twt_responder);
 	hdd_he_set_wni_cfg(hdd_ctx, WNI_CFG_HE_FRAGMENTATION,
-			   he_cap->fragmentation);
+			QDF_MIN(he_cap->fragmentation,
+				hdd_ctx->config->he_dynamic_frag_support));
 	hdd_he_set_wni_cfg(hdd_ctx, WNI_CFG_HE_MAX_FRAG_MSDU,
 			   he_cap->max_num_frag_msdu);
 	hdd_he_set_wni_cfg(hdd_ctx, WNI_CFG_HE_MIN_FRAG_SIZE,
@@ -224,6 +225,8 @@ void hdd_he_print_ini_config(struct hdd_context *hdd_ctx)
 		hdd_ctx->config->enable_ul_ofdma);
 	hdd_info("Name = [%s] Value = [%d]", CFG_HE_STA_OBSSPD_NAME,
 		hdd_ctx->config->he_sta_obsspd);
+	hdd_info("Name = [%s] Value = [%d]", CFG_HE_DYNAMIC_FRAGMENTATION_NAME,
+		hdd_ctx->config->he_dynamic_frag_support);
 }
 
 int hdd_update_he_cap_in_cfg(struct hdd_context *hdd_ctx)