2020-01-13 13:14:03

by Tamizh chelvam

[permalink] [raw]
Subject: [PATCHv9 0/6] cfg80211/mac80211: Add support for TID specific configuration

From: Tamizh chelvam <[email protected]>

Add infrastructure to support per TID configurations like noack policy,
retry count, AMPDU control(disable/enable), RTSCTS control(enable/disable)
and TX rate mask configurations.
This will be useful for the driver which can supports data TID
specific configuration rather than phy level configurations.
Here NL80211_CMD_SET_TID_CONFIG added to support this operation by
accepting TID configuration.
This command can accept STA mac addreess to make the configuration
station specific rather than applying to all the connected stations
to the netdev.
And this nested command configuration can accept multiple number of
data TID specific configuration in a single command,
enum ieee80211_tid_conf_mask used to notify the driver that which
configuration got modified for the TID.

Tamizh chelvam (6):
nl80211: Add NL command to support TID speicific configurations
nl80211: Add support to configure TID specific retry configuration
nl80211: Add support to configure TID specific AMPDU configuration
nl80211: Add support to configure TID specific RTSCTS configuration
nl80211: Add support to configure TID specific txrate configuration
mac80211: Add api to support configuring TID specific configuration

include/net/cfg80211.h | 65 ++++++++++
include/net/mac80211.h | 10 ++
include/uapi/linux/nl80211.h | 139 +++++++++++++++++++++
net/mac80211/cfg.c | 56 +++++++++
net/mac80211/driver-ops.h | 27 ++++
net/wireless/nl80211.c | 280 +++++++++++++++++++++++++++++++++++++++---
net/wireless/rdev-ops.h | 24 ++++
net/wireless/trace.h | 37 ++++++
8 files changed, 621 insertions(+), 17 deletions(-)

v9:
* Modified to accept multiple TIDs.
* Splitted retry_short and retry_long as separate parameter
* Introduced new api to reset tid config

v8:
* Fixed enum typecast warning.

v7:
* Fixed compilation error and removed tid config variables from mac80211

v6:
* Addressed Johannes comments.

v5:
* Fixed possible memleak of 'tid_conf' in nl80211_set_tid_config.

v4:
* Fixed kbuild warnings.

v3:
* Modified "nl80211: Add netlink attribute to configure TID specific tx rate" patch
to accept multiple TX rate configuration at a time.
* Modified noack and ampdu variable data type to int in
"mac80211: Add api to support configuring TID specific configuration" patch to store
default configuration.
* Modified "ath10k: Add new api to support TID specific configuration" patch to handle
default values for noack and ampdu. And added sta pointer sanity check in
ath10k_mac_tid_bitrate_config function.
* Fixed "ath10k: Add extended TID configuration support" wmi command parameters
assigned part.

v2:
* Added support to accept multiple TID configuration
* Added support to configure TX rate and RTSCTS control
--
1.7.9.5


2020-01-13 13:14:03

by Tamizh chelvam

[permalink] [raw]
Subject: [PATCHv9 4/6] nl80211: Add support to configure TID specific RTSCTS configuration

From: Tamizh chelvam <[email protected]>

This patch adds support to configure per TID RTSCTS control
configuration to enable/disable through the
NL80211_TID_CONFIG_ATTR_RTSCTS_CTRL attribute.

Signed-off-by: Tamizh chelvam <[email protected]>
---
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 ccb9505..62085a6 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -606,6 +606,8 @@ enum ieee80211_tid_conf_mask {
BIT(NL80211_TID_CONFIG_ATTR_RETRY_LONG),
IEEE80211_TID_CONF_AMPDU =
BIT(NL80211_TID_CONFIG_ATTR_AMPDU_CTRL),
+ IEEE80211_TID_CONF_RTSCTS =
+ BIT(NL80211_TID_CONFIG_ATTR_RTSCTS_CTRL),
};

/**
@@ -619,6 +621,7 @@ enum ieee80211_tid_conf_mask {
* @retry_long: retry count value
* @retry_short: retry count value
* @ampdu: Enable/Disable aggregation
+ * @rtscts: Enable/Disable RTS/CTS
*/
struct ieee80211_tid_cfg {
bool config_override;
@@ -628,6 +631,7 @@ struct ieee80211_tid_cfg {
int retry_long;
int retry_short;
u8 ampdu;
+ u8 rtscts;
};

/**
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
index b28c51c..c4ac7d7 100644
--- a/include/uapi/linux/nl80211.h
+++ b/include/uapi/linux/nl80211.h
@@ -4769,6 +4769,8 @@ enum nl80211_tid_config {
* 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,
+ * @NL80211_TID_CONFIG_ATTR_RTSCTS_CTRL: Enable/Disable RTS_CTS for the TID
+ * specified in %%NL80211_TID_CONFIG_ATTR_TIDS. It is u8 type.
*/
enum nl80211_tid_config_attr {
__NL80211_TID_CONFIG_ATTR_INVALID,
@@ -4778,6 +4780,7 @@ enum nl80211_tid_config_attr {
NL80211_TID_CONFIG_ATTR_RETRY_SHORT,
NL80211_TID_CONFIG_ATTR_RETRY_LONG,
NL80211_TID_CONFIG_ATTR_AMPDU_CTRL,
+ NL80211_TID_CONFIG_ATTR_RTSCTS_CTRL,

/* keep last */
__NL80211_TID_CONFIG_ATTR_AFTER_LAST,
@@ -5614,6 +5617,10 @@ enum nl80211_feature_flags {
* aggregation control(enable/disable).
* @NL80211_EXT_FEATURE_PER_STA_AMPDU_CTRL_CONFIG: Driver supports per STA
* specific TID aggregation control(enable/disable).
+ * @NL80211_EXT_FEATURE_PER_TID_RTSCTS_CTRL_CONFIG: Driver supports TID specific
+ * RTS_CTS control(enable/disable).
+ * @NL80211_EXT_FEATURE_PER_STA_RTSCTS_CTRL_CONFIG: Driver supports STA specific
+ * RTS_CTS control(enable/disable).
*
* @NUM_NL80211_EXT_FEATURES: number of extended features.
* @MAX_NL80211_EXT_FEATURES: highest extended feature index.
@@ -5669,6 +5676,8 @@ enum nl80211_ext_feature_index {
NL80211_EXT_FEATURE_PER_STA_RETRY_LONG_CONFIG,
NL80211_EXT_FEATURE_PER_TID_AMPDU_CTRL_CONFIG,
NL80211_EXT_FEATURE_PER_STA_AMPDU_CTRL_CONFIG,
+ NL80211_EXT_FEATURE_PER_TID_RTSCTS_CTRL_CONFIG,
+ NL80211_EXT_FEATURE_PER_STA_RTSCTS_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 b60669f..8388dbf 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -331,6 +331,8 @@ static int validate_ie_attr(const struct nlattr *attr,
[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),
+ [NL80211_TID_CONFIG_ATTR_RTSCTS_CTRL] =
+ NLA_POLICY_MAX(NLA_U8, NL80211_TID_CONFIG_DISABLE),
};

const struct nla_policy nl80211_policy[NUM_NL80211_ATTR] = {
@@ -13923,6 +13925,17 @@ static int parse_tid_conf(struct cfg80211_registered_device *rdev,
nla_get_u8(attrs[NL80211_TID_CONFIG_ATTR_AMPDU_CTRL]);
}

+ if (attrs[NL80211_TID_CONFIG_ATTR_RTSCTS_CTRL]) {
+ err = nl80211_check_tid_config_support(rdev, extack, peer,
+ attrs, tid_conf,
+ RTSCTS_CTRL);
+ if (err)
+ return err;
+
+ tid_conf->rtscts =
+ nla_get_u8(attrs[NL80211_TID_CONFIG_ATTR_RTSCTS_CTRL]);
+ }
+
return 0;
}

--
1.7.9.5