summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAgrawal Ashish <ashishka@qti.qualcomm.com>2016-07-25 17:06:01 +0530
committerAnjaneedevi Kapparapu <akappa@codeaurora.org>2016-07-28 14:36:58 +0530
commit4af553f7b29ee3774cfd9c4ee626950b48460dba (patch)
treeca2e7d0bbe713ef3e86aed863efd417d2e0d0595
parent7015e35e17d8196c36fe098f580b950e63d0ca2b (diff)
qcacld-2.0: Vendor attribute for setting TX fail count threshold
Vendor attribute for setting TX fail count threshold. This attribute is part of QCA_NL80211_VENDOR_SUBCMD_SET_WIFI_CONFIGURATION. Change-Id: Iba2a6d4c04809041489ff8c32aeb17c9dafbc4a5 CRs-Fixed: 1045760
-rw-r--r--CORE/HDD/inc/wlan_hdd_cfg80211.h4
-rw-r--r--CORE/HDD/src/wlan_hdd_cfg80211.c18
2 files changed, 22 insertions, 0 deletions
diff --git a/CORE/HDD/inc/wlan_hdd_cfg80211.h b/CORE/HDD/inc/wlan_hdd_cfg80211.h
index 86769a7d22dc..ef6755af5212 100644
--- a/CORE/HDD/inc/wlan_hdd_cfg80211.h
+++ b/CORE/HDD/inc/wlan_hdd_cfg80211.h
@@ -1574,6 +1574,9 @@ enum qca_wlan_vendor_acs_hw_mode {
* @QCA_WLAN_VENDOR_ATTR_CONFIG_CTRL_RETRY: control frame sw retry threshold
* @QCA_WLAN_VENDOR_ATTR_CONFIG_PROPAGATION_DELAY:
* propagtion delay for 2G/5G band(Units in ms)
+ * @QCA_WLAN_VENDOR_ATTR_CONFIG_TX_FAIL_COUNT: Unsigned 32-bit value to
+ * configure the number of unicast TX fail packet count.
+ * The peer is disconnected once this threshold is reached.
* @QCA_WLAN_VENDOR_ATTR_CONFIG_LAST: last config
* @QCA_WLAN_VENDOR_ATTR_CONFIG_MAX: max config
*/
@@ -1593,6 +1596,7 @@ enum qca_wlan_vendor_config {
QCA_WLAN_VENDOR_ATTR_CONFIG_MGMT_RETRY,
QCA_WLAN_VENDOR_ATTR_CONFIG_CTRL_RETRY,
QCA_WLAN_VENDOR_ATTR_CONFIG_PROPAGATION_DELAY,
+ QCA_WLAN_VENDOR_ATTR_CONFIG_TX_FAIL_COUNT,
/* keep last */
QCA_WLAN_VENDOR_ATTR_CONFIG_LAST,
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index f8082edf3f1c..2dd81425a9f6 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -8370,6 +8370,7 @@ wlan_hdd_wifi_config_policy[QCA_WLAN_VENDOR_ATTR_CONFIG_MAX
[QCA_WLAN_VENDOR_ATTR_CONFIG_MGMT_RETRY] = {.type = NLA_U8},
[QCA_WLAN_VENDOR_ATTR_CONFIG_CTRL_RETRY] = {.type = NLA_U8},
[QCA_WLAN_VENDOR_ATTR_CONFIG_PROPAGATION_DELAY] = {.type = NLA_U8},
+ [QCA_WLAN_VENDOR_ATTR_CONFIG_TX_FAIL_COUNT] = {.type = NLA_U32 },
};
/**
@@ -8468,6 +8469,7 @@ static int __wlan_hdd_cfg80211_wifi_configuration_set(struct wiphy *wiphy,
eHalStatus status;
struct sir_set_tx_rx_aggregation_size request;
VOS_STATUS vos_status;
+ uint32_t tx_fail_count;
if (VOS_FTM_MODE == hdd_get_conparam()) {
hddLog(LOGE, FL("Command not allowed in FTM mode"));
@@ -8645,6 +8647,22 @@ static int __wlan_hdd_cfg80211_wifi_configuration_set(struct wiphy *wiphy,
(int)WMI_PDEV_PARAM_PROPAGATION_DELAY,
delay, PDEV_CMD);
}
+
+ if (tb[QCA_WLAN_VENDOR_ATTR_CONFIG_TX_FAIL_COUNT]) {
+ tx_fail_count = nla_get_u32(
+ tb[QCA_WLAN_VENDOR_ATTR_CONFIG_TX_FAIL_COUNT]);
+ if (tx_fail_count) {
+ status = sme_update_tx_fail_cnt_threshold(pHddCtx->hHal,
+ pAdapter->sessionId,
+ tx_fail_count);
+ if (!HAL_STATUS_SUCCESS(status)) {
+ hddLog(LOGE,
+ FL("sme_update_tx_fail_cnt_threshold (err=%d)"),
+ status);
+ return -EINVAL;
+ }
+ }
+ }
return ret_val;
}