Browse Source

qcacld-3.0: set msdu/mpdu aggr size for each vdev start

The global aggregation size is only set to firmware once
when vdev is created. And the size may be modified
dynamically for a specified AP during association, according
to the OUI based aggregation size configured by ini
'cfg_tx_iot_aggr'.

If global AMSDU size is 0, considering the case as below:
1. connect to AP-1 which is included in 'cfg_tx_iot_aggr',
   the AMSDU size will be set to the specifed value.
2. connect to AP-2 which is NOT in 'cfg_tx_iot_aggr',
   it doesn't reset the AMSDU size to 0, and firmware is
   still using the value set in step #1, it's wrong.

To fix this issue, set the global size for each vdev start,
as init values for each connection.

Change-Id: I790d580fc5762e6816e840ba5484b3cd758334df
CRs-Fixed: 2918046
Yu Wang 4 years ago
parent
commit
fdc00052a7
2 changed files with 31 additions and 29 deletions
  1. 2 1
      components/mlme/core/src/wlan_mlme_main.c
  2. 29 28
      core/wma/src/wma_dev_if.c

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

@@ -2361,10 +2361,11 @@ mlme_iot_parse_aggr_info(struct wlan_objmgr_psoc *psoc,
 
 	aggr_info_list = iot->aggr;
 	qdf_mem_copy(aggr_info, cfg_str, cfg_str_len);
+	mlme_legacy_debug("aggr_info=[%s]", aggr_info);
+
 	aggr_info_temp = aggr_info;
 	while (aggr_info_temp) {
 		/* skip possible spaces before oui string */
-		mlme_legacy_err("aggr_info=[%s]", aggr_info_temp);
 		while (*aggr_info_temp == ' ')
 			aggr_info_temp++;
 

+ 29 - 28
core/wma/src/wma_dev_if.c

@@ -2535,7 +2535,6 @@ QDF_STATUS wma_post_vdev_create_setup(struct wlan_objmgr_vdev *vdev)
 	struct wlan_mlme_qos *qos_aggr;
 	struct vdev_mlme_obj *vdev_mlme;
 	tp_wma_handle wma_handle;
-	uint8_t amsdu_val;
 
 	if (!mac)
 		return QDF_STATUS_E_FAILURE;
@@ -2566,34 +2565,7 @@ QDF_STATUS wma_post_vdev_create_setup(struct wlan_objmgr_vdev *vdev)
 		vdev_mlme->mgmt.generic.subtype;
 
 	qos_aggr = &mac->mlme_cfg->qos_mlme_params;
-	status = wma_set_tx_rx_aggr_size(vdev_id, qos_aggr->tx_aggregation_size,
-					 qos_aggr->rx_aggregation_size,
-					 WMI_VDEV_CUSTOM_AGGR_TYPE_AMPDU);
-	if (QDF_IS_STATUS_ERROR(status))
-		wma_err("failed to set aggregation sizes(status = %d)", status);
-
-	status = wlan_mlme_get_max_amsdu_num(wma_handle->psoc, &amsdu_val);
-	if (QDF_IS_STATUS_ERROR(status)) {
-		wma_err("failed to get amsdu aggr.size %d", status);
-	} else {
-		status = wma_set_tx_rx_aggr_size(vdev_id, amsdu_val,
-						 amsdu_val,
-					    WMI_VDEV_CUSTOM_AGGR_TYPE_AMSDU);
-		if (QDF_IS_STATUS_ERROR(status)) {
-			wma_err("failed to set amsdu aggr.size %d", status);
-		}
-	}
-
 	if (vdev_mlme->mgmt.generic.type == WMI_VDEV_TYPE_STA) {
-		status = wma_set_tx_rx_aggr_size_per_ac(
-					wma_handle, vdev_id,
-					qos_aggr,
-					WMI_VDEV_CUSTOM_AGGR_TYPE_AMPDU);
-
-		if (QDF_IS_STATUS_ERROR(status))
-			wma_err("failed to set aggr size per ac(status = %d)",
-				 status);
-
 		wma_set_sta_keep_alive(
 				wma_handle, vdev_id,
 				SIR_KEEP_ALIVE_NULL_PKT,
@@ -2827,6 +2799,8 @@ QDF_STATUS wma_vdev_pre_start(uint8_t vdev_id, bool restart)
 	struct wlan_channel *des_chan;
 	QDF_STATUS status;
 	uint8_t btc_chain_mode;
+	struct wlan_mlme_qos *qos_aggr;
+	uint8_t amsdu_val;
 
 	if (!wma || !mac_ctx)
 		return QDF_STATUS_E_FAILURE;
@@ -2934,6 +2908,33 @@ QDF_STATUS wma_vdev_pre_start(uint8_t vdev_id, bool restart)
 		}
 	}
 
+	qos_aggr = &mac_ctx->mlme_cfg->qos_mlme_params;
+	status = wma_set_tx_rx_aggr_size(vdev_id, qos_aggr->tx_aggregation_size,
+					 qos_aggr->rx_aggregation_size,
+					 WMI_VDEV_CUSTOM_AGGR_TYPE_AMPDU);
+	if (QDF_IS_STATUS_ERROR(status))
+		wma_err("failed to set aggregation sizes(status = %d)", status);
+
+	status = wlan_mlme_get_max_amsdu_num(wma->psoc, &amsdu_val);
+	if (QDF_IS_STATUS_ERROR(status)) {
+		wma_err("failed to get amsdu aggr.size(status = %d)", status);
+	} else {
+		status = wma_set_tx_rx_aggr_size(vdev_id, amsdu_val, amsdu_val,
+					WMI_VDEV_CUSTOM_AGGR_TYPE_AMSDU);
+		if (QDF_IS_STATUS_ERROR(status))
+			wma_err("failed to set amsdu aggr.size(status = %d)",
+				status);
+	}
+
+	if (mlme_obj->mgmt.generic.type == WMI_VDEV_TYPE_STA) {
+		status = wma_set_tx_rx_aggr_size_per_ac(wma, vdev_id, qos_aggr,
+					WMI_VDEV_CUSTOM_AGGR_TYPE_AMPDU);
+
+		if (QDF_IS_STATUS_ERROR(status))
+			wma_err("failed to set aggr size per ac(status = %d)",
+				status);
+	}
+
 	return QDF_STATUS_SUCCESS;
 }