qcacld-3.0: Fix logic to configure AMSDU support flag
The logic to configure AMSDU support flag based on user input was added incorrectly in AMPDU API. Move this logic to AMSDU configuration API. Also, modify the check in WMA to allow BA aggregation size setting to 512 and 1024. Change-Id: If5f533daf41bc408220ec363f8f995b77f4efc44 CRs-Fixed: 3591458
Cette révision appartient à :

révisé par
Rahul Choudhary

Parent
dcd5823e12
révision
8a0e50cb63
@@ -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);
|
||||
}
|
||||
|
@@ -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;
|
||||
}
|
||||
|
Référencer dans un nouveau ticket
Bloquer un utilisateur