From: Sergey Matyukevich <sergey.matyukevich.os@quantenna.com>
To: Tamizh Chelvam <tamizhr@codeaurora.org>
Cc: johannes@sipsolutions.net, linux-wireless@vger.kernel.org
Subject: Re: [PATCHv9 5/6] nl80211: Add support to configure TID specific txrate configuration
Date: Tue, 14 Jan 2020 15:31:09 +0300 [thread overview]
Message-ID: <20200114123108.5mrzvyqkjp7defln@bars> (raw)
In-Reply-To: <1578921090-9758-6-git-send-email-tamizhr@codeaurora.org>
> This patch adds support to configure per TID txrate configuration
> configuration through the NL80211_TID_CONFIG_ATTR_TX_RATE_TYPE
> and NL80211_TID_CONFIG_ATTR_TX_RATE
> attribute. TX bitrate mask values passed
> in NL80211_ATTR_TX_RATES attribute and NL80211_TID_CONFIG_ATTR_TX_RATES
> attribute will have types of the TX rate should be applied. This uses
> nl80211_parse_tx_bitrate_mask to validate and calculate the bitrate
> mask.
>
> Signed-off-by: Tamizh chelvam <tamizhr@codeaurora.org>
> ---
> include/net/cfg80211.h | 5 +++
> include/uapi/linux/nl80211.h | 24 +++++++++++++
> net/wireless/nl80211.c | 76 ++++++++++++++++++++++++++++++++----------
> 3 files changed, 88 insertions(+), 17 deletions(-)
...
> @@ -13936,6 +13947,37 @@ static int parse_tid_conf(struct cfg80211_registered_device *rdev,
> nla_get_u8(attrs[NL80211_TID_CONFIG_ATTR_RTSCTS_CTRL]);
> }
>
> + if (attrs[NL80211_TID_CONFIG_ATTR_TX_RATE_TYPE]) {
> + int idx;
> + enum nl80211_attrs attr;
> +
> + err = nl80211_check_tid_config_support(rdev, extack, peer,
> + attrs, tid_conf,
> + TX_RATE);
> + if (err)
> + return err;
> + idx = NL80211_TID_CONFIG_ATTR_TX_RATE_TYPE;
> + tid_conf->txrate_type = nla_get_u8(attrs[idx]);
> + if (tid_conf->txrate_type != NL80211_TX_RATE_AUTOMATIC) {
> + tid_conf->mask =
> + kzalloc(sizeof(struct cfg80211_bitrate_mask),
> + GFP_KERNEL);
> + if (!tid_conf->mask)
> + return -ENOMEM;
> +
> + attr =
> + (enum nl80211_attrs)NL80211_TID_CONFIG_ATTR_TX_RATE;
> + err = nl80211_parse_tx_bitrate_mask(info, attrs, attr,
> + tid_conf->mask);
> + if (err) {
> + kfree(tid_conf->mask);
> + return err;
> + }
IIUC we have to free all the allocated tid_conf->mask entries in the end of
nl80211_set_tid_config, right before tid_config is freed. Alternatively,
struct ieee80211_tid_cfg can be modified to keep cfg80211_bitrate_mask
value rather than pointer.
> + } else {
> + tid_conf->mask = NULL;
> + }
> + }
> +
> return 0;
> }
Regards,
Sergey
next prev parent reply other threads:[~2020-01-14 12:33 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 ` [PATCHv9 3/6] nl80211: Add support to configure TID specific AMPDU configuration Tamizh Chelvam
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 [this message]
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=20200114123108.5mrzvyqkjp7defln@bars \
--to=sergey.matyukevich.os@quantenna.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=tamizhr@codeaurora.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