summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPadma, Santhosh Kumar <skpadma@qti.qualcomm.com>2016-05-16 15:25:58 +0530
committerAnjaneedevi Kapparapu <akappa@codeaurora.org>2016-05-18 17:49:07 +0530
commit04ccd9f1053becb2f2eada41ea5e3cc0906dd568 (patch)
treefc878777dd6e77b572f62e212eee9da677b7d3db
parent3b67e97e33e9f45aee97021c1de5db11307960bc (diff)
qcacld-2.0: Set non-zero aggregation size
Currently aggregation sizes are passed to fw as they are received from user application. Add check to send aggregation sizes that are in permissible range. Change-Id: I65cd6b63bae277d58bae4d4c3fe2d6f003ccd177 CRs-Fixed: 1016732
-rw-r--r--CORE/HDD/src/wlan_hdd_cfg80211.c25
1 files changed, 20 insertions, 5 deletions
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index 427401f0fef6..1e40d7fe4af7 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -8550,12 +8550,27 @@ static int __wlan_hdd_cfg80211_wifi_configuration_set(struct wiphy *wiphy,
tb[QCA_WLAN_VENDOR_ATTR_CONFIG_RX_MPDU_AGGREGATION]);
request.vdev_id = pAdapter->sessionId;
- vos_status = wma_set_tx_rx_aggregation_size(&request);
- if (vos_status != VOS_STATUS_SUCCESS) {
+ if (request.tx_aggregation_size >=
+ CFG_TX_AGGREGATION_SIZE_MIN &&
+ request.tx_aggregation_size <=
+ CFG_TX_AGGREGATION_SIZE_MAX &&
+ request.rx_aggregation_size >=
+ CFG_RX_AGGREGATION_SIZE_MIN &&
+ request.rx_aggregation_size <=
+ CFG_RX_AGGREGATION_SIZE_MAX) {
+ vos_status = wma_set_tx_rx_aggregation_size(&request);
+ if (vos_status != VOS_STATUS_SUCCESS) {
+ hddLog(LOGE,
+ FL("failed to set aggr sizes err %d"),
+ vos_status);
+ ret_val = -EPERM;
+ }
+ } else {
hddLog(LOGE,
- FL("failed to set aggregation sizes(err=%d)"),
- vos_status);
- ret_val = -EPERM;
+ FL("TX %d RX %d MPDU aggr size not in range"),
+ request.tx_aggregation_size,
+ request.rx_aggregation_size);
+ ret_val = -EINVAL;
}
}
return ret_val;