All of lore.kernel.org
 help / color / mirror / Atom feed
From: tamizhr@codeaurora.org
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: Mon, 20 Jan 2020 13:19:11 +0530	[thread overview]
Message-ID: <c1f8ed5c0d001d2647a8ef23c0329fab@codeaurora.org> (raw)
In-Reply-To: <20200114123108.5mrzvyqkjp7defln@bars>

On 2020-01-14 18:01, Sergey Matyukevich wrote:
>> 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.
Yeah, this needs to be take care by the driver, since it will be sent 
with multiple
configuration. I have added that in the comment in next patchset.
> Alternatively,struct ieee80211_tid_cfg can be modified to keep 
> cfg80211_bitrate_mask
> value rather than pointer.
I have just reused the nl80211_parse_tx_bitrate_mask, so I feel using 
the similar approach
should be good.

> 
>> +		} else {
>> +			tid_conf->mask = NULL;
>> +		}
>> +	}
>> +
>>  	return 0;
>>  }
> 
Thanks,
Tamizh.

  reply	other threads:[~2020-01-20  7:49 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
2020-01-20  7:49     ` tamizhr [this message]
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=c1f8ed5c0d001d2647a8ef23c0329fab@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.