Prechádzať zdrojové kódy

qcacld-3.0: Enhancement to configure BA mode to fw

Currently, it can only set 2 or 3 for WMI_VDEV_PARAM_BA_MODE per the value
from attribute QCA_WLAN_VENDOR_ATTR_WIFI_TEST_CONFIG_ADDBA_BUFF_SIZE.

For enhancement, add logic:
	5 - buffer size 512
	6 - buffer size 1024

Change-Id: I8716b48659e9165604f04522f5703e9e5e46a907
CRs-Fixed: 3181782
Paul Zhang 2 rokov pred
rodič
commit
4b23c1c5e8

+ 10 - 3
core/hdd/src/wlan_hdd_cfg80211.c

@@ -10952,12 +10952,19 @@ __wlan_hdd_cfg80211_set_wifi_test_config(struct wiphy *wiphy,
 					       adapter->vdev_id, buff_size);
 		if (ret_val)
 			goto send_err;
-		if (buff_size > 64)
+
+		if (buff_size > 512)
+			/* Configure ADDBA req buffer size to 1024 */
+			set_val = HDD_BA_MODE_1024;
+		else if (buff_size > 256)
+			/* Configure ADDBA req buffer size to 512 */
+			set_val = HDD_BA_MODE_512;
+		else if (buff_size > 64)
 			/* Configure ADDBA req buffer size to 256 */
-			set_val = 3;
+			set_val = HDD_BA_MODE_256;
 		else
 			/* Configure ADDBA req buffer size to 64 */
-			set_val = 2;
+			set_val = HDD_BA_MODE_64;
 		ret_val = wma_cli_set_command(adapter->vdev_id,
 				WMI_VDEV_PARAM_BA_MODE, set_val, VDEV_CMD);
 		if (ret_val)

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

@@ -634,6 +634,26 @@ enum hdd_chain_mode {
 	HDD_CHAIN_MODE_2X2 = 3,
 };
 
+/**
+ * hdd_ba_mode: Representation of Number to configure BA mode
+ * @HDD_BA_MODE_AUTO: Auto mode
+ * @HDD_BA_MODE_MANUAL: Manual mode
+ * @HDD_BA_MODE_64: For buffer size 64
+ * @HDD_BA_MODE_256: For buffer size 256
+ * @HDD_BA_MODE_128: placeholder, not valid
+ * @HDD_BA_MODE_512: For buffer size 512
+ * @HDD_BA_MODE_1024: For buffer size 1024
+ */
+enum hdd_ba_mode {
+	HDD_BA_MODE_AUTO,
+	HDD_BA_MODE_MANUAL,
+	HDD_BA_MODE_64,
+	HDD_BA_MODE_256,
+	HDD_BA_MODE_128,
+	HDD_BA_MODE_512,
+	HDD_BA_MODE_1024,
+};
+
 /**
  * hdd_set_rate_bw(): Set the bandwidth for the given rate_info
  * @info: The rate info for which the bandwidth should be set