Browse Source

qcacld-3.0: Vendor attribute for setting TX fail count threshold

qcacld-2.0 to qcacld-3.0 propagation

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
Agrawal, Ashish 8 years ago
parent
commit
b45599a346
2 changed files with 20 additions and 0 deletions
  1. 16 0
      core/hdd/src/wlan_hdd_cfg80211.c
  2. 4 0
      core/hdd/src/wlan_hdd_cfg80211.h

+ 16 - 0
core/hdd/src/wlan_hdd_cfg80211.c

@@ -3914,6 +3914,7 @@ wlan_hdd_wifi_config_policy[QCA_WLAN_VENDOR_ATTR_CONFIG_MAX + 1] = {
 	[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 },
 };
 
 /**
@@ -3986,6 +3987,7 @@ __wlan_hdd_cfg80211_wifi_configuration_set(struct wiphy *wiphy,
 	QDF_STATUS qdf_status;
 	uint8_t retry, delay;
 	int param_id;
+	uint32_t tx_fail_count;
 
 	ENTER_DEV(dev);
 
@@ -4146,6 +4148,20 @@ __wlan_hdd_cfg80211_wifi_configuration_set(struct wiphy *wiphy,
 					      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(hdd_ctx->hHal,
+					adapter->sessionId, tx_fail_count);
+			if (QDF_STATUS_SUCCESS != status) {
+				hdd_info("sme_update_tx_fail_cnt_threshold (err=%d)",
+					status);
+				return -EINVAL;
+			}
+		}
+	}
+
 	if (vendor_ie_present && access_policy_present) {
 		if (access_policy == QCA_ACCESS_POLICY_DENY_UNLESS_LISTED) {
 			access_policy =

+ 4 - 0
core/hdd/src/wlan_hdd_cfg80211.h

@@ -2405,6 +2405,9 @@ enum qca_ignore_assoc_disallowed {
  *                                      power save config to turn off/on qpower
  * @QCA_WLAN_VENDOR_ATTR_CONFIG_IGNORE_ASSOC_DISALLOWED: Ignore Assoc Disallowed
  *                                                       [MBO]
+ * @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
  */
@@ -2476,6 +2479,7 @@ enum qca_wlan_vendor_config {
 	/* Unsigned 8-bit, for setting qpower dynamically */
 	QCA_WLAN_VENDOR_ATTR_CONFIG_QPOWER = 25,
 	QCA_WLAN_VENDOR_ATTR_CONFIG_IGNORE_ASSOC_DISALLOWED = 26,
+	QCA_WLAN_VENDOR_ATTR_CONFIG_TX_FAIL_COUNT,
 	/* keep last */
 	QCA_WLAN_VENDOR_ATTR_CONFIG_LAST,
 	QCA_WLAN_VENDOR_ATTR_CONFIG_MAX =