Commit 33462e68 authored by Sergey Matyukevich's avatar Sergey Matyukevich Committed by Johannes Berg

cfg80211: add support for TID specific AMSDU configuration

This patch adds support to control per TID MSDU aggregation
using the NL80211_TID_CONFIG_ATTR_AMSDU_CTRL attribute.
Signed-off-by: default avatarSergey Matyukevich <sergey.matyukevich.os@quantenna.com>
Link: https://lore.kernel.org/r/20200424112905.26770-4-sergey.matyukevich.os@quantenna.comSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 60c2ef0e
...@@ -640,8 +640,9 @@ struct cfg80211_chan_def { ...@@ -640,8 +640,9 @@ struct cfg80211_chan_def {
* @noack: noack configuration value for the TID * @noack: noack configuration value for the TID
* @retry_long: retry count value * @retry_long: retry count value
* @retry_short: retry count value * @retry_short: retry count value
* @ampdu: Enable/Disable aggregation * @ampdu: Enable/Disable MPDU aggregation
* @rtscts: Enable/Disable RTS/CTS * @rtscts: Enable/Disable RTS/CTS
* @amsdu: Enable/Disable MSDU aggregation
*/ */
struct cfg80211_tid_cfg { struct cfg80211_tid_cfg {
bool config_override; bool config_override;
...@@ -651,6 +652,7 @@ struct cfg80211_tid_cfg { ...@@ -651,6 +652,7 @@ struct cfg80211_tid_cfg {
u8 retry_long, retry_short; u8 retry_long, retry_short;
enum nl80211_tid_config ampdu; enum nl80211_tid_config ampdu;
enum nl80211_tid_config rtscts; enum nl80211_tid_config rtscts;
enum nl80211_tid_config amsdu;
}; };
/** /**
......
...@@ -4844,12 +4844,15 @@ enum nl80211_tid_config { ...@@ -4844,12 +4844,15 @@ enum nl80211_tid_config {
* &NL80211_CMD_SET_TID_CONFIG. Its type is u8, min value is 1 and * &NL80211_CMD_SET_TID_CONFIG. Its type is u8, min value is 1 and
* the max value is advertised by the driver in this attribute on * the max value is advertised by the driver in this attribute on
* output in wiphy capabilities. * output in wiphy capabilities.
* @NL80211_TID_CONFIG_ATTR_AMPDU_CTRL: Enable/Disable aggregation for the TIDs * @NL80211_TID_CONFIG_ATTR_AMPDU_CTRL: Enable/Disable MPDU aggregation
* specified in %NL80211_TID_CONFIG_ATTR_TIDS. Its type is u8, using * for the TIDs specified in %NL80211_TID_CONFIG_ATTR_TIDS.
* the values from &nl80211_tid_config. * Its type is u8, using the values from &nl80211_tid_config.
* @NL80211_TID_CONFIG_ATTR_RTSCTS_CTRL: Enable/Disable RTS_CTS for the TIDs * @NL80211_TID_CONFIG_ATTR_RTSCTS_CTRL: Enable/Disable RTS_CTS for the TIDs
* specified in %NL80211_TID_CONFIG_ATTR_TIDS. It is u8 type, using * specified in %NL80211_TID_CONFIG_ATTR_TIDS. It is u8 type, using
* the values from &nl80211_tid_config. * the values from &nl80211_tid_config.
* @NL80211_TID_CONFIG_ATTR_AMSDU_CTRL: Enable/Disable MSDU aggregation
* for the TIDs specified in %NL80211_TID_CONFIG_ATTR_TIDS.
* Its type is u8, using the values from &nl80211_tid_config.
*/ */
enum nl80211_tid_config_attr { enum nl80211_tid_config_attr {
__NL80211_TID_CONFIG_ATTR_INVALID, __NL80211_TID_CONFIG_ATTR_INVALID,
...@@ -4863,6 +4866,7 @@ enum nl80211_tid_config_attr { ...@@ -4863,6 +4866,7 @@ enum nl80211_tid_config_attr {
NL80211_TID_CONFIG_ATTR_RETRY_LONG, NL80211_TID_CONFIG_ATTR_RETRY_LONG,
NL80211_TID_CONFIG_ATTR_AMPDU_CTRL, NL80211_TID_CONFIG_ATTR_AMPDU_CTRL,
NL80211_TID_CONFIG_ATTR_RTSCTS_CTRL, NL80211_TID_CONFIG_ATTR_RTSCTS_CTRL,
NL80211_TID_CONFIG_ATTR_AMSDU_CTRL,
/* keep last */ /* keep last */
__NL80211_TID_CONFIG_ATTR_AFTER_LAST, __NL80211_TID_CONFIG_ATTR_AFTER_LAST,
......
...@@ -343,6 +343,8 @@ nl80211_tid_config_attr_policy[NL80211_TID_CONFIG_ATTR_MAX + 1] = { ...@@ -343,6 +343,8 @@ nl80211_tid_config_attr_policy[NL80211_TID_CONFIG_ATTR_MAX + 1] = {
NLA_POLICY_MAX(NLA_U8, NL80211_TID_CONFIG_DISABLE), NLA_POLICY_MAX(NLA_U8, NL80211_TID_CONFIG_DISABLE),
[NL80211_TID_CONFIG_ATTR_RTSCTS_CTRL] = [NL80211_TID_CONFIG_ATTR_RTSCTS_CTRL] =
NLA_POLICY_MAX(NLA_U8, NL80211_TID_CONFIG_DISABLE), NLA_POLICY_MAX(NLA_U8, NL80211_TID_CONFIG_DISABLE),
[NL80211_TID_CONFIG_ATTR_AMSDU_CTRL] =
NLA_POLICY_MAX(NLA_U8, NL80211_TID_CONFIG_DISABLE),
}; };
static const struct nla_policy nl80211_policy[NUM_NL80211_ATTR] = { static const struct nla_policy nl80211_policy[NUM_NL80211_ATTR] = {
...@@ -14080,6 +14082,12 @@ static int parse_tid_conf(struct cfg80211_registered_device *rdev, ...@@ -14080,6 +14082,12 @@ static int parse_tid_conf(struct cfg80211_registered_device *rdev,
nla_get_u8(attrs[NL80211_TID_CONFIG_ATTR_RTSCTS_CTRL]); nla_get_u8(attrs[NL80211_TID_CONFIG_ATTR_RTSCTS_CTRL]);
} }
if (attrs[NL80211_TID_CONFIG_ATTR_AMSDU_CTRL]) {
tid_conf->mask |= BIT(NL80211_TID_CONFIG_ATTR_AMSDU_CTRL);
tid_conf->amsdu =
nla_get_u8(attrs[NL80211_TID_CONFIG_ATTR_AMSDU_CTRL]);
}
if (peer) if (peer)
mask = rdev->wiphy.tid_config_support.peer; mask = rdev->wiphy.tid_config_support.peer;
else else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment