瀏覽代碼

qcacld-3.0: fix setting tx aggr size issue for qca6390

For QCA6390, firmware not advertise service capability for
tx aggr size 256 support information. Actually it supports
max tx aggr size 256. If user want to use aggr size 256 from
ini file , current behavior will reset the size 64 for QCA6390.
Fix this issue to adopt size from ini file configuration.

Change-Id: Icaed9af65d70e3d14ac604636c4269bd00a8c801
CRs-Fixed: 3089384
Zhaoyang Liu 3 年之前
父節點
當前提交
2839ca71b4
共有 1 個文件被更改,包括 8 次插入14 次删除
  1. 8 14
      core/wma/src/wma_features.c

+ 8 - 14
core/wma/src/wma_features.c

@@ -4187,13 +4187,10 @@ QDF_STATUS wma_set_tx_rx_aggr_size(uint8_t vdev_id,
 	if (wmi_service_enabled(wma_handle->wmi_handle,
 				wmi_service_ampdu_tx_buf_size_256_support)) {
 		cmd->enable_bitmap |= (0x1 << 6);
-		if (!(tx_size <= ADDBA_TXAGGR_SIZE_LITHIUM)) {
-			wma_err("Invalid AMPDU Size");
-			return QDF_STATUS_E_INVAL;
-		}
-	} else if (tx_size == ADDBA_TXAGGR_SIZE_LITHIUM) {
-		tx_size = ADDBA_TXAGGR_SIZE_HELIUM;
-	} else if (!(tx_size <= ADDBA_TXAGGR_SIZE_HELIUM)) {
+	}
+
+	if ((tx_size != ADDBA_TXAGGR_SIZE_LITHIUM) &&
+	    (tx_size > ADDBA_TXAGGR_SIZE_HELIUM)) {
 		wma_err("Invalid AMPDU Size");
 		return QDF_STATUS_E_INVAL;
 	}
@@ -4266,13 +4263,10 @@ QDF_STATUS wma_set_tx_rx_aggr_size_per_ac(WMA_HANDLE handle,
 		if (wmi_service_enabled(wma_handle->wmi_handle,
 					wmi_service_ampdu_tx_buf_size_256_support)) {
 			cmd->enable_bitmap |= (0x1 << 6);
-			if (!(tx_aggr_size[queue_num] <= ADDBA_TXAGGR_SIZE_LITHIUM)) {
-				wma_err("Invalid AMPDU Size");
-				return QDF_STATUS_E_INVAL;
-			}
-		} else if (tx_aggr_size[queue_num] == ADDBA_TXAGGR_SIZE_LITHIUM) {
-			tx_aggr_size[queue_num] = ADDBA_TXAGGR_SIZE_HELIUM;
-		} else if (!(tx_aggr_size[queue_num] <= ADDBA_TXAGGR_SIZE_HELIUM)) {
+		}
+
+		if ((tx_aggr_size[queue_num] != ADDBA_TXAGGR_SIZE_LITHIUM) &&
+		    (tx_aggr_size[queue_num] > ADDBA_TXAGGR_SIZE_HELIUM)) {
 			wma_err("Invalid AMPDU Size");
 			return QDF_STATUS_E_INVAL;
 		}