nl80211: Add support to configure TID specific Tx rate configuration
PATCH 1/1 nl80211: Add support to configure TID specific Tx rate configuration
This patch adds support to configure per TID Tx Rate configuration through NL80211_TID_CONFIG_ATTR_TX_RATE* attributes. And it uses nl80211_parse_tx_bitrate_mask api to validate the Tx rate mask.
Signed-off-by Tamizh Chelvam <[email protected]>
--- include/net/cfg80211.h | 26 +++++++++-------- include/uapi/linux/nl80211.h | 21 ++++++++++++++ net/wireless/nl80211.c | 64 +++++++++++++++++++++++++++++++----------- 3 files changed, 82 insertions(+), 29 deletions(-)
include/net/cfg80211.h +14 -12
@@ -626,6 +626,18 @@ struct cfg80211_chan_def {struct ieee80211_edmg edmg; }; +/* +* cfg80211_bitrate_mask - masks for bitrate control +*/ +struct cfg80211_bitrate_mask { +struct { +u32 legacy; +u8 ht_mcs[IEEE80211_HT_MCS_MASK_LEN ]; +u16 vht_mcs[NL80211_VHT_NSS_MAX ]; +enum nl80211_txrate_gi gi; + } control[NUM_NL80211_BANDS ]; +}; +/** * struct cfg80211_tid_cfg - TID specific configuration * @config_override: Flag to notify driver to reset TID configuration
@@ -647,6 +659,8 @@ struct cfg80211_tid_cfg {u8 retry_long, retry_short;enum nl80211_tid_config ampdu;enum nl80211_tid_config rtscts; +enum nl80211_tx_rate_setting txrate_type; +struct cfg80211_bitrate_mask txrate_mask; };/**
@@ -1000,18 +1014,6 @@ struct cfg80211_acl_data {struct mac_address mac_addrs[]; }; -/* -* cfg80211_bitrate_mask - masks for bitrate control -*/ -struct cfg80211_bitrate_mask { -struct { -u32 legacy; -u8 ht_mcs[IEEE80211_HT_MCS_MASK_LEN ]; -u16 vht_mcs[NL80211_VHT_NSS_MAX ]; -enum nl80211_txrate_gi gi; - } control[NUM_NL80211_BANDS ]; -}; -/** * enum cfg80211_ap_settings_flags - AP settings flags *
include/uapi/linux/nl80211.h +21 -0
@@ -4800,6 +4800,17 @@ enum nl80211_tid_config { NL80211_TID_CONFIG_DISABLE, }; +/* enum nl80211_tx_rate_setting - TX rate configuration type +* @NL80211_TX_RATE_AUTOMATIC: automatically determine TX rate +* @NL80211_TX_RATE_LIMITED: limit the TX rate by the TX rate parameter +* @NL80211_TX_RATE_FIXED: fix TX rate to the TX rate parameter +*/ +enum nl80211_tx_rate_setting { +NL80211_TX_RATE_AUTOMATIC , +NL80211_TX_RATE_LIMITED , +NL80211_TX_RATE_FIXED , +}; +/* enum nl80211_tid_config_attr - TID specific configuration. * @NL80211_TID_CONFIG_ATTR_PAD: pad attribute for 64-bit values * @NL80211_TID_CONFIG_ATTR_VIF_SUPP: a bitmap (u64) of attributes supported
@@ -4834,6 +4845,14 @@ enum nl80211_tid_config {* @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 * the values from &nl80211_tid_config. +* @NL80211_TID_CONFIG_ATTR_TX_RATE_TYPE: This attribute will be useful +* to notfiy the driver that what type of txrate should be used +* for the TIDs specified in %NL80211_TID_CONFIG_ATTR_TIDS. using +* the values form &nl80211_tx_rate_setting. +* @NL80211_TID_CONFIG_ATTR_TX_RATE: Data frame TX rate mask should be applied +* with the parameters passed through %NL80211_ATTR_TX_RATES. +* configuration is applied to the data frame for the tid to that connected +* station. */ enum nl80211_tid_config_attr { __NL80211_TID_CONFIG_ATTR_INVALID,
@@ -4847,6 +4866,8 @@ enum nl80211_tid_config_attr {NL80211_TID_CONFIG_ATTR_RETRY_LONG ,NL80211_TID_CONFIG_ATTR_AMPDU_CTRL ,NL80211_TID_CONFIG_ATTR_RTSCTS_CTRL , +NL80211_TID_CONFIG_ATTR_TX_RATE_TYPE , +NL80211_TID_CONFIG_ATTR_TX_RATE ,/* keep last */ __NL80211_TID_CONFIG_ATTR_AFTER_LAST,
net/wireless/nl80211.c +47 -17
119 lines not on this page · raw message
Signature · 1 line
1.7.9.5
Johannes Berg
maintainerQuoted 3 lines · Tamizh Chelvam
This patch adds support to configure per TID Tx Rate configuration through NL80211_TID_CONFIG_ATTR_TX_RATE* attributes. And it uses
nl80211_parse_tx_bitrate_maskapi to validate the Tx rate mask.
This is missing some kernel-doc updates, and for the new nl80211 enum it's malformed. Please respin.
johannes