Parcourir la source

qcacld-3.0: Add cfg.ini support to override ARP Access category

This is a qcacld-2.0 to qcacld-3.0 propagation.

Firmware currently sets the default access category to ARP packets
as voice traffic id and host does not have a way to override this.

As a part of this change, add the cfg.ini support to override this
default access category.

Change-Id: I268cb9c0254d14f143615790c570ac5a255b359d
CRs-Fixed: 1111993
Srinivas Girigowda il y a 8 ans
Parent
commit
70e169a798
3 fichiers modifiés avec 46 ajouts et 0 suppressions
  1. 26 0
      core/hdd/inc/wlan_hdd_cfg.h
  2. 10 0
      core/hdd/src/wlan_hdd_cfg.c
  3. 10 0
      core/hdd/src/wlan_hdd_main.c

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

@@ -9128,6 +9128,31 @@ enum hdd_wext_control {
 #define CFG_ENABLE_BCAST_PROBE_RESP_MAX     (1)
 #define CFG_ENABLE_BCAST_PROBE_RESP_DEFAULT (0)
 
+/**
+ * arp_ac_category - ARP access category
+ * @Min: 0
+ * @Max: 3
+ * @Default: 3
+ *
+ * Firmware by default categorizes ARP packets with VOICE TID.
+ * This ini shall be used to override the default configuration.
+ * Access category enums are referenced in ieee80211_common.h
+ * WME_AC_BE = 0 (Best effort)
+ * WME_AC_BK = 1 (Background)
+ * WME_AC_VI = 2 (Video)
+ * WME_AC_VO = 3 (Voice)
+ *
+ * Related: none
+ *
+ * Usage: Internal/External
+ *
+ * </ini>
+ */
+#define CFG_ARP_AC_CATEGORY                "arp_ac_category"
+#define CFG_ARP_AC_CATEGORY_MIN            (0)
+#define CFG_ARP_AC_CATEGORY_MAX            (3)
+#define CFG_ARP_AC_CATEGORY_DEFAULT        (3)
+
 /*
  * <ini>
  * gActiveBpfMode - Control active BPF mode
@@ -9956,6 +9981,7 @@ struct hdd_config {
 	bool enable_ul_ofdma;
 #endif
 	enum l1ss_sleep_allowed l1ss_sleep_allowed;
+	uint32_t arp_ac_category;
 };
 
 #define VAR_OFFSET(_Struct, _Var) (offsetof(_Struct, _Var))

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

@@ -4210,6 +4210,7 @@ REG_TABLE_ENTRY g_registry_table[] = {
 		CFG_SAP_INTERNAL_RESTART_DEFAULT,
 		CFG_SAP_INTERNAL_RESTART_MIN,
 		CFG_SAP_INTERNAL_RESTART_MAX),
+
 	REG_VARIABLE(CFG_PER_ROAM_ENABLE_NAME, WLAN_PARAM_Integer,
 		struct hdd_config, is_per_roam_enabled,
 		VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
@@ -4287,6 +4288,12 @@ REG_TABLE_ENTRY g_registry_table[] = {
 		CFG_L1SS_SLEEP_ALLOWED_MIN,
 		CFG_L1SS_SLEEP_ALLOWED_MAX),
 
+	REG_VARIABLE(CFG_ARP_AC_CATEGORY, WLAN_PARAM_Integer,
+		struct hdd_config, arp_ac_category,
+		VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
+		CFG_ARP_AC_CATEGORY_DEFAULT,
+		CFG_ARP_AC_CATEGORY_MIN,
+		CFG_ARP_AC_CATEGORY_MAX),
 };
 
 /**
@@ -5765,6 +5772,9 @@ void hdd_cfg_print(hdd_context_t *pHddCtx)
 		pHddCtx->config->sap_internal_restart);
 	hdd_per_roam_print_ini_config(pHddCtx);
 	hdd_he_print_ini_config(pHddCtx);
+	hdd_info("Name = [%s] Value = [%d]",
+		CFG_ARP_AC_CATEGORY,
+		pHddCtx->config->arp_ac_category);
 }
 
 

+ 10 - 0
core/hdd/src/wlan_hdd_main.c

@@ -8326,6 +8326,16 @@ static int hdd_pre_enable_configure(hdd_context_t *hdd_ctx)
 
 	hdd_program_country_code(hdd_ctx);
 
+	ret = wma_cli_set_command(0, WMI_PDEV_PARAM_ARP_AC_OVERRIDE,
+				  hdd_ctx->config->arp_ac_category,
+				  PDEV_CMD);
+	if (0 != ret) {
+		hdd_err("WMI_PDEV_PARAM_ARP_AC_OVERRIDE ac: %d ret: %d",
+			hdd_ctx->config->arp_ac_category, ret);
+		goto out;
+	}
+
+
 	status = hdd_set_sme_chan_list(hdd_ctx);
 	if (status != QDF_STATUS_SUCCESS) {
 		hdd_alert("Failed to init channel list: %d", status);