diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index d9532e21c4..966a3068e6 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -9154,16 +9154,9 @@ static int hdd_config_mpdu_aggregation(struct wlan_hdd_link_info *link_info, tb[QCA_WLAN_VENDOR_ATTR_CONFIG_TX_MPDU_AGGREGATION]; struct nlattr *rx_attr = tb[QCA_WLAN_VENDOR_ATTR_CONFIG_RX_MPDU_AGGREGATION]; - struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(link_info->adapter); - mac_handle_t mac_handle = hdd_ctx->mac_handle; uint8_t tx_size, rx_size; QDF_STATUS status; - if (!mac_handle) { - hdd_err("NULL Mac handle"); - return -EINVAL; - } - /* nothing to do if neither attribute is present */ if (!tx_attr && !rx_attr) return 0; @@ -9185,20 +9178,6 @@ static int hdd_config_mpdu_aggregation(struct wlan_hdd_link_info *link_info, return -EINVAL; } - if (tx_size > 1) - sme_set_amsdu(mac_handle, true); - else - sme_set_amsdu(mac_handle, false); - - hdd_debug("tx size: %d", tx_size); - status = wma_cli_set_command(link_info->vdev_id, - GEN_VDEV_PARAM_AMSDU, - tx_size, GEN_CMD); - if (status) { - hdd_err("Failed to set AMSDU param to FW, status %d", status); - return qdf_status_to_os_return(status); - } - status = wma_set_tx_rx_aggr_size(link_info->vdev_id, tx_size, rx_size, WMI_VDEV_CUSTOM_AGGR_TYPE_AMPDU); @@ -9214,8 +9193,15 @@ static int hdd_config_msdu_aggregation(struct wlan_hdd_link_info *link_info, struct nlattr *rx_attr = tb[QCA_WLAN_VENDOR_ATTR_CONFIG_RX_MSDU_AGGREGATION]; uint8_t tx_size, rx_size; + struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(link_info->adapter); + mac_handle_t mac_handle = hdd_ctx->mac_handle; QDF_STATUS status; + if (!mac_handle) { + hdd_err("NULL Mac handle"); + return -EINVAL; + } + /* nothing to do if neither attribute is present */ if (!tx_attr && !rx_attr) return 0; @@ -9237,10 +9223,19 @@ static int hdd_config_msdu_aggregation(struct wlan_hdd_link_info *link_info, return -EINVAL; } - status = wma_set_tx_rx_aggr_size(link_info->vdev_id, - tx_size, - rx_size, - WMI_VDEV_CUSTOM_AGGR_TYPE_AMSDU); + if (tx_size > 1) + sme_set_amsdu(mac_handle, true); + else + sme_set_amsdu(mac_handle, false); + + hdd_debug("tx size: %d", tx_size); + status = wma_cli_set_command(link_info->vdev_id, + GEN_VDEV_PARAM_AMSDU, + tx_size, GEN_CMD); + if (status) { + hdd_err("Failed to set AMSDU param to FW, status %d", status); + return qdf_status_to_os_return(status); + } return qdf_status_to_os_return(status); } diff --git a/core/wma/src/wma_features.c b/core/wma/src/wma_features.c index 3de4e0ce8a..1cb6987852 100644 --- a/core/wma/src/wma_features.c +++ b/core/wma/src/wma_features.c @@ -91,6 +91,8 @@ */ #define ADDBA_TXAGGR_SIZE_HELIUM 64 #define ADDBA_TXAGGR_SIZE_LITHIUM 256 +#define ADDBA_TXAGGR_SIZE_512 512 +#define ADDBA_TXAGGR_SIZE_BERYLLIUM 1024 static bool is_wakeup_event_console_logs_enabled = false; @@ -4491,8 +4493,10 @@ QDF_STATUS wma_set_tx_rx_aggr_size(uint8_t vdev_id, cmd->enable_bitmap |= (0x1 << 6); } - if ((tx_size != ADDBA_TXAGGR_SIZE_LITHIUM) && - (tx_size > ADDBA_TXAGGR_SIZE_HELIUM)) { + if ((tx_size > ADDBA_TXAGGR_SIZE_HELIUM) && + (tx_size != ADDBA_TXAGGR_SIZE_LITHIUM) && + (tx_size != ADDBA_TXAGGR_SIZE_512) && + (tx_size != ADDBA_TXAGGR_SIZE_BERYLLIUM)) { wma_err("Invalid AMPDU Size"); return QDF_STATUS_E_INVAL; }