Browse Source

qcacld-3.0: Disable TX_AGGREGATION_SIZE ini for HSP

HSP doesn't support TX_AGGREGATION_SIZE ini, need disable it to avoid
confusing.

Change-Id: I9e49ad5218f913f116cf4472f768f572740f14df
CRs-Fixed: 2918796
Jianmin Zhu 4 years ago
parent
commit
ac8d6a6ba2

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

@@ -761,8 +761,9 @@ static void mlme_init_ht_cap_in_cfg(struct wlan_objmgr_psoc *psoc,
 		cfg_get(psoc, CFG_SHORT_SLOT_TIME_ENABLED);
 }
 
-static void mlme_init_qos_cfg(struct wlan_objmgr_psoc *psoc,
-			      struct wlan_mlme_qos *qos_aggr_params)
+#ifdef TX_AGGREGATION_SIZE_ENABLE
+static void mlme_init_tx_aggregation_size(struct wlan_objmgr_psoc *psoc,
+					  struct wlan_mlme_qos *qos_aggr_params)
 {
 	qos_aggr_params->tx_aggregation_size =
 				cfg_get(psoc, CFG_TX_AGGREGATION_SIZE);
@@ -774,6 +775,23 @@ static void mlme_init_qos_cfg(struct wlan_objmgr_psoc *psoc,
 				cfg_get(psoc, CFG_TX_AGGREGATION_SIZEVI);
 	qos_aggr_params->tx_aggregation_size_vo =
 				cfg_get(psoc, CFG_TX_AGGREGATION_SIZEVO);
+}
+#else
+static void mlme_init_tx_aggregation_size(struct wlan_objmgr_psoc *psoc,
+					  struct wlan_mlme_qos *qos_aggr_params)
+{
+	qos_aggr_params->tx_aggregation_size = 0;
+	qos_aggr_params->tx_aggregation_size_be = 0;
+	qos_aggr_params->tx_aggregation_size_bk = 0;
+	qos_aggr_params->tx_aggregation_size_vi = 0;
+	qos_aggr_params->tx_aggregation_size_vo = 0;
+}
+#endif
+
+static void mlme_init_qos_cfg(struct wlan_objmgr_psoc *psoc,
+			      struct wlan_mlme_qos *qos_aggr_params)
+{
+	mlme_init_tx_aggregation_size(psoc, qos_aggr_params);
 	qos_aggr_params->rx_aggregation_size =
 				cfg_get(psoc, CFG_RX_AGGREGATION_SIZE);
 	qos_aggr_params->tx_aggr_sw_retry_threshold_be =

+ 13 - 5
components/mlme/dispatcher/inc/cfg_qos.h

@@ -26,11 +26,13 @@
 
 #if defined(QCA_WIFI_QCA6290) || defined(QCA_WIFI_QCA6390) || \
 	defined(QCA_WIFI_QCA6490) || defined(QCA_WIFI_QCA6750)
+
 #define ADDBA_TXAGGR_SIZE 256
 #else
 #define ADDBA_TXAGGR_SIZE 64
 #endif
 
+#ifdef TX_AGGREGATION_SIZE_ENABLE
 /*
  * <ini>
  * gTxAggregationSize - Gives an option to configure Tx aggregation size
@@ -170,6 +172,16 @@
 			CFG_VALUE_OR_DEFAULT, \
 			"Tx Aggregation size value for VO")
 
+#define CFG_QOS_TX_AGGREGATION \
+	CFG(CFG_TX_AGGREGATION_SIZE) \
+	CFG(CFG_TX_AGGREGATION_SIZEBE) \
+	CFG(CFG_TX_AGGREGATION_SIZEBK) \
+	CFG(CFG_TX_AGGREGATION_SIZEVI) \
+	CFG(CFG_TX_AGGREGATION_SIZEVO)
+#else
+#define CFG_QOS_TX_AGGREGATION
+#endif
+
 /*
  * <ini>
  * gRxAggregationSize - Gives an option to configure Rx aggregation size
@@ -570,12 +582,8 @@
 		"Used to configure OUI based tx aggr size for msdu/mpdu")
 
 #define CFG_QOS_ALL \
+	CFG_QOS_TX_AGGREGATION \
 	CFG(CFG_SAP_MAX_INACTIVITY_OVERRIDE) \
-	CFG(CFG_TX_AGGREGATION_SIZE) \
-	CFG(CFG_TX_AGGREGATION_SIZEBE) \
-	CFG(CFG_TX_AGGREGATION_SIZEBK) \
-	CFG(CFG_TX_AGGREGATION_SIZEVI) \
-	CFG(CFG_TX_AGGREGATION_SIZEVO) \
 	CFG(CFG_RX_AGGREGATION_SIZE) \
 	CFG(CFG_TX_AGGR_SW_RETRY_BE) \
 	CFG(CFG_TX_AGGR_SW_RETRY_BK) \

+ 3 - 0
configs/default_defconfig

@@ -1,3 +1,5 @@
+CONFIG_TX_AGGREGATION_SIZE_ENABLE := y
+
 ifeq ($(CONFIG_CNSS_QCA6290), y)
 	ifeq ($(CONFIG_CNSS_EMULATION), y)
 		CONFIG_QCA_WIFI_EMULATION := y
@@ -50,6 +52,7 @@ ifeq ($(CONFIG_CNSS_QCA6490), y)
 	CONFIG_DEVICE_FORCE_WAKE_ENABLE :=y
 	CONFIG_HIF_REG_WINDOW_SUPPORT :=y
 	CONFIG_DUMP_REO_QUEUE_INFO_IN_DDR :=y
+	CONFIG_TX_AGGREGATION_SIZE_ENABLE := n
 endif
 
 ifeq ($(CONFIG_CNSS_QCA6750), y)

+ 58 - 0
core/hdd/src/wlan_hdd_cfg80211.c

@@ -7535,6 +7535,7 @@ static int hdd_config_access_policy(struct hdd_adapter *adapter,
 	return qdf_status_to_os_return(status);
 }
 
+#ifdef TX_AGGREGATION_SIZE_ENABLE
 static int hdd_config_mpdu_aggregation(struct hdd_adapter *adapter,
 				       struct nlattr *tb[])
 {
@@ -7612,6 +7613,63 @@ static int hdd_config_msdu_aggregation(struct hdd_adapter *adapter,
 
 	return qdf_status_to_os_return(status);
 }
+#else
+static int hdd_config_mpdu_aggregation(struct hdd_adapter *adapter,
+				       struct nlattr *tb[])
+{
+	struct nlattr *rx_attr =
+		tb[QCA_WLAN_VENDOR_ATTR_CONFIG_RX_MPDU_AGGREGATION];
+	uint8_t rx_size;
+	QDF_STATUS status;
+
+	if (!rx_attr) {
+		hdd_err("Missing attribute for RX");
+		return -EINVAL;
+	}
+
+	rx_size = nla_get_u8(rx_attr);
+	if (!cfg_in_range(CFG_RX_AGGREGATION_SIZE, rx_size)) {
+		hdd_err("RX %d MPDU aggr size not in range",
+			rx_size);
+		return -EINVAL;
+	}
+
+	status = wma_set_tx_rx_aggr_size(adapter->vdev_id,
+					 0,
+					 rx_size,
+					 WMI_VDEV_CUSTOM_AGGR_TYPE_AMPDU);
+
+	return qdf_status_to_os_return(status);
+}
+
+static int hdd_config_msdu_aggregation(struct hdd_adapter *adapter,
+				       struct nlattr *tb[])
+{
+	struct nlattr *rx_attr =
+		tb[QCA_WLAN_VENDOR_ATTR_CONFIG_RX_MSDU_AGGREGATION];
+	uint8_t rx_size;
+	QDF_STATUS status;
+
+	if (!rx_attr) {
+		hdd_err("Missing attribute for RX");
+		return -EINVAL;
+	}
+
+	rx_size = nla_get_u8(rx_attr);
+	if (!cfg_in_range(CFG_RX_AGGREGATION_SIZE, rx_size)) {
+		hdd_err("RX %d MPDU aggr size not in range",
+			rx_size);
+		return -EINVAL;
+	}
+
+	status = wma_set_tx_rx_aggr_size(adapter->vdev_id,
+					 0,
+					 rx_size,
+					 WMI_VDEV_CUSTOM_AGGR_TYPE_AMSDU);
+
+	return qdf_status_to_os_return(status);
+}
+#endif
 
 static QDF_STATUS
 hdd_populate_vdev_chains(struct wlan_mlme_nss_chains *nss_chains_cfg,

+ 5 - 1
core/wma/src/wma_features.c

@@ -4056,6 +4056,9 @@ QDF_STATUS wma_set_tx_rx_aggr_size(uint8_t vdev_id,
 	/* bit 2 (aggr_type): TX Aggregation Type (0=A-MPDU, 1=A-MSDU) */
 	if (aggr_type == WMI_VDEV_CUSTOM_AGGR_TYPE_AMSDU)
 		cmd->enable_bitmap |= 0x04;
+	/* bit 3 (tx_aggr_size_disable):  If set tx_aggr_size is invalid */
+	if (rx_size == 0)
+		cmd->enable_bitmap |= (0x1 << 3);
 
 	cmd->enable_bitmap |= (0x1 << 6);
 
@@ -4117,7 +4120,8 @@ QDF_STATUS wma_set_tx_rx_aggr_size_per_ac(WMA_HANDLE handle,
 		cmd->rx_aggr_size = qos_aggr->rx_aggregation_size;
 		cmd->tx_aggr_size = tx_aggr_size[queue_num];
 		/* bit 5: tx_ac_enable, if set, ac bitmap is valid. */
-		cmd->enable_bitmap = 0x20 | queue_num;
+		if (cmd->rx_aggr_size != 0)
+			cmd->enable_bitmap = 0x20 | queue_num;
 		/* bit 2 (aggr_type): TX Aggregation Type (0=A-MPDU, 1=A-MSDU) */
 		if (aggr_type == WMI_VDEV_CUSTOM_AGGR_TYPE_AMSDU)
 			cmd->enable_bitmap |= 0x04;