From: Tamizh Chelvam <tamizhr@codeaurora.org>
To: johannes@sipsolutions.net
Cc: linux-wireless@vger.kernel.org, Tamizh chelvam <tamizhr@codeaurora.org>
Subject: [PATCHv9 3/6] nl80211: Add support to configure TID specific AMPDU configuration
Date: Mon, 13 Jan 2020 18:41:27 +0530 [thread overview]
Message-ID: <1578921090-9758-4-git-send-email-tamizhr@codeaurora.org> (raw)
In-Reply-To: <1578921090-9758-1-git-send-email-tamizhr@codeaurora.org>
From: Tamizh chelvam <tamizhr@codeaurora.org>
This patch adds support to configure per TID AMPDU control
configuration to enable/disable aggregation through the
NL80211_TID_CONFIG_ATTR_AMPDU_CTRL attribute.
Signed-off-by: Tamizh chelvam <tamizhr@codeaurora.org>
---
include/net/cfg80211.h | 4 ++++
include/uapi/linux/nl80211.h | 9 +++++++++
net/wireless/nl80211.c | 13 +++++++++++++
3 files changed, 26 insertions(+)
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index c2dec5e..ccb9505 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -604,6 +604,8 @@ enum ieee80211_tid_conf_mask {
BIT(NL80211_TID_CONFIG_ATTR_RETRY_SHORT),
IEEE80211_TID_CONF_RETRY_LONG =
BIT(NL80211_TID_CONFIG_ATTR_RETRY_LONG),
+ IEEE80211_TID_CONF_AMPDU =
+ BIT(NL80211_TID_CONFIG_ATTR_AMPDU_CTRL),
};
/**
@@ -616,6 +618,7 @@ enum ieee80211_tid_conf_mask {
* @noack: noack configuration value for the TID
* @retry_long: retry count value
* @retry_short: retry count value
+ * @ampdu: Enable/Disable aggregation
*/
struct ieee80211_tid_cfg {
bool config_override;
@@ -624,6 +627,7 @@ struct ieee80211_tid_cfg {
enum nl80211_tid_config noack;
int retry_long;
int retry_short;
+ u8 ampdu;
};
/**
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
index cdd259b..b28c51c 100644
--- a/include/uapi/linux/nl80211.h
+++ b/include/uapi/linux/nl80211.h
@@ -4767,6 +4767,8 @@ enum nl80211_tid_config {
* &NL80211_CMD_SET_TID_CONFIG. Its type is u8, min value is 1 and
* the max value should be advertised by the driver through
* max_data_retry_count.
+ * @NL80211_TID_CONFIG_ATTR_AMPDU_CTRL: Enable/Disable aggregation for the TID
+ * specified in %NL80211_TID_CONFIG_ATTR_TIDS. Its type is u8,
*/
enum nl80211_tid_config_attr {
__NL80211_TID_CONFIG_ATTR_INVALID,
@@ -4775,6 +4777,7 @@ enum nl80211_tid_config_attr {
NL80211_TID_CONFIG_ATTR_NOACK,
NL80211_TID_CONFIG_ATTR_RETRY_SHORT,
NL80211_TID_CONFIG_ATTR_RETRY_LONG,
+ NL80211_TID_CONFIG_ATTR_AMPDU_CTRL,
/* keep last */
__NL80211_TID_CONFIG_ATTR_AFTER_LAST,
@@ -5607,6 +5610,10 @@ enum nl80211_feature_flags {
* retry_long count functionality.
* @NL80211_EXT_FEATURE_PER_STA_RETRY_LONG_CONFIG: Driver supports STA specific
* data retry_long count functionality.
+ * @NL80211_EXT_FEATURE_PER_TID_AMPDU_CTRL_CONFIG: Driver supports TID specific
+ * aggregation control(enable/disable).
+ * @NL80211_EXT_FEATURE_PER_STA_AMPDU_CTRL_CONFIG: Driver supports per STA
+ * specific TID aggregation control(enable/disable).
*
* @NUM_NL80211_EXT_FEATURES: number of extended features.
* @MAX_NL80211_EXT_FEATURES: highest extended feature index.
@@ -5660,6 +5667,8 @@ enum nl80211_ext_feature_index {
NL80211_EXT_FEATURE_PER_STA_RETRY_SHORT_CONFIG,
NL80211_EXT_FEATURE_PER_TID_RETRY_LONG_CONFIG,
NL80211_EXT_FEATURE_PER_STA_RETRY_LONG_CONFIG,
+ NL80211_EXT_FEATURE_PER_TID_AMPDU_CTRL_CONFIG,
+ NL80211_EXT_FEATURE_PER_STA_AMPDU_CTRL_CONFIG,
/* add new features before the definition below */
NUM_NL80211_EXT_FEATURES,
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index bb26e3d..b60669f 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -329,6 +329,8 @@ static int validate_ie_attr(const struct nlattr *attr,
NLA_POLICY_MAX(NLA_U8, NL80211_TID_CONFIG_DISABLE),
[NL80211_TID_CONFIG_ATTR_RETRY_SHORT] = NLA_POLICY_MIN(NLA_U8, 1),
[NL80211_TID_CONFIG_ATTR_RETRY_LONG] = NLA_POLICY_MIN(NLA_U8, 1),
+ [NL80211_TID_CONFIG_ATTR_AMPDU_CTRL] =
+ NLA_POLICY_MAX(NLA_U8, NL80211_TID_CONFIG_DISABLE),
};
const struct nla_policy nl80211_policy[NUM_NL80211_ATTR] = {
@@ -13910,6 +13912,17 @@ static int parse_tid_conf(struct cfg80211_registered_device *rdev,
return -EINVAL;
}
+ if (attrs[NL80211_TID_CONFIG_ATTR_AMPDU_CTRL]) {
+ err = nl80211_check_tid_config_support(rdev, extack, peer,
+ attrs, tid_conf,
+ AMPDU_CTRL);
+ if (err)
+ return err;
+
+ tid_conf->ampdu =
+ nla_get_u8(attrs[NL80211_TID_CONFIG_ATTR_AMPDU_CTRL]);
+ }
+
return 0;
}
--
1.7.9.5
next prev parent reply other threads:[~2020-01-13 13:11 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-13 13:11 [PATCHv9 0/6] cfg80211/mac80211: Add support for TID specific configuration Tamizh Chelvam
2020-01-13 13:11 ` [PATCHv9 1/6] nl80211: Add NL command to support TID speicific configurations Tamizh Chelvam
2020-01-14 12:09 ` Sergey Matyukevich
2020-01-13 13:11 ` [PATCHv9 2/6] nl80211: Add support to configure TID specific retry configuration Tamizh Chelvam
2020-01-13 13:11 ` Tamizh Chelvam [this message]
2020-01-13 13:11 ` [PATCHv9 4/6] nl80211: Add support to configure TID specific RTSCTS configuration Tamizh Chelvam
2020-01-13 13:11 ` [PATCHv9 5/6] nl80211: Add support to configure TID specific txrate configuration Tamizh Chelvam
2020-01-14 12:31 ` Sergey Matyukevich
2020-01-20 7:49 ` tamizhr
2020-01-13 13:11 ` [PATCHv9 6/6] mac80211: Add api to support configuring TID specific configuration Tamizh Chelvam
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1578921090-9758-4-git-send-email-tamizhr@codeaurora.org \
--to=tamizhr@codeaurora.org \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).