From: Tamizh chelvam <tamizhr@codeaurora.org>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless@vger.kernel.org, ath10k@lists.infradead.org
Subject: Re: [PATCHv5 5/9] nl80211: Add netlink attribute to configure TID specific tx rate
Date: Tue, 30 Apr 2019 15:28:40 +0530 [thread overview]
Message-ID: <f70f928923e9623e63b27d590956cb42@codeaurora.org> (raw)
In-Reply-To: <d9135c6be42425424e4c3fd606c7e5aaf9dac1e9.camel@sipsolutions.net>
On 2019-04-26 15:07, Johannes Berg wrote:
>> @@ -13354,6 +13367,42 @@ static int parse_tid_conf(struct
>> cfg80211_registered_device *rdev,
>> nla_get_u8(attrs[NL80211_ATTR_TID_CONFIG_RTSCTS_CTRL]);
>> }
>>
>> + if (attrs[NL80211_ATTR_TID_CONFIG_TX_RATES_TYPE]) {
>> + int idx;
>> + enum nl80211_attrs attr;
>> +
>> + if (!wiphy_ext_feature_isset(&rdev->wiphy,
>> + NL80211_EXT_FEATURE_PER_TID_TX_BITRATE_MASK))
>> + return -EOPNOTSUPP;
>> +
>> + if (peer &&
>> + !wiphy_ext_feature_isset(&rdev->wiphy,
>> + NL80211_EXT_FEATURE_PER_STA_TX_BITRATE_MASK))
>> + return -EOPNOTSUPP;
>> +
>> + idx = NL80211_ATTR_TID_CONFIG_TX_RATES_TYPE;
>> + tid_conf->txrate_type = nla_get_u8(attrs[idx]);
>> +
>> + tid_conf->tid_conf_mask |= IEEE80211_TID_CONF_TX_BITRATE;
>> + if (tid_conf->txrate_type != NL80211_TX_RATE_AUTOMATIC) {
>> + tid_conf->mask =
>> + kzalloc(sizeof(struct cfg80211_bitrate_mask),
>> + GFP_KERNEL);
>
> You leak this
>
>> + if (!tid_conf->mask)
>> + return -ENOMEM;
>> +
>> + attr = NL80211_ATTR_TID_CONFIG_TX_RATES;
>> + ret = nl80211_parse_tx_bitrate_mask(attrs, rdev, attr,
>> + tid_conf->mask);
>> + if (ret) {
>> + kfree(tid_conf->mask);
>> + return ret;
>> + }
>> + } else {
>> + tid_conf->mask = NULL;
>> + }
>> + }
>> +
>> return 0;
>> }
>>
>> @@ -13407,7 +13456,7 @@ static int nl80211_set_tid_config(struct
>> sk_buff *skb,
>> }
>>
>> ret = parse_tid_conf(rdev, attrs, &tid_conf->tid_conf[conf_idx],
>> - tid_conf->peer);
>> + info, tid_conf->peer);
>> if (ret)
>> goto bad_tid_conf;
>
> Practically everywhere, but particularly in the bad case in the next
> loop iteration etc?
>
Yeah. I will fix this in next version.
_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k
WARNING: multiple messages have this Message-ID (diff)
From: Tamizh chelvam <tamizhr@codeaurora.org>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: ath10k@lists.infradead.org, linux-wireless@vger.kernel.org
Subject: Re: [PATCHv5 5/9] nl80211: Add netlink attribute to configure TID specific tx rate
Date: Tue, 30 Apr 2019 15:28:40 +0530 [thread overview]
Message-ID: <f70f928923e9623e63b27d590956cb42@codeaurora.org> (raw)
In-Reply-To: <d9135c6be42425424e4c3fd606c7e5aaf9dac1e9.camel@sipsolutions.net>
On 2019-04-26 15:07, Johannes Berg wrote:
>> @@ -13354,6 +13367,42 @@ static int parse_tid_conf(struct
>> cfg80211_registered_device *rdev,
>> nla_get_u8(attrs[NL80211_ATTR_TID_CONFIG_RTSCTS_CTRL]);
>> }
>>
>> + if (attrs[NL80211_ATTR_TID_CONFIG_TX_RATES_TYPE]) {
>> + int idx;
>> + enum nl80211_attrs attr;
>> +
>> + if (!wiphy_ext_feature_isset(&rdev->wiphy,
>> + NL80211_EXT_FEATURE_PER_TID_TX_BITRATE_MASK))
>> + return -EOPNOTSUPP;
>> +
>> + if (peer &&
>> + !wiphy_ext_feature_isset(&rdev->wiphy,
>> + NL80211_EXT_FEATURE_PER_STA_TX_BITRATE_MASK))
>> + return -EOPNOTSUPP;
>> +
>> + idx = NL80211_ATTR_TID_CONFIG_TX_RATES_TYPE;
>> + tid_conf->txrate_type = nla_get_u8(attrs[idx]);
>> +
>> + tid_conf->tid_conf_mask |= IEEE80211_TID_CONF_TX_BITRATE;
>> + if (tid_conf->txrate_type != NL80211_TX_RATE_AUTOMATIC) {
>> + tid_conf->mask =
>> + kzalloc(sizeof(struct cfg80211_bitrate_mask),
>> + GFP_KERNEL);
>
> You leak this
>
>> + if (!tid_conf->mask)
>> + return -ENOMEM;
>> +
>> + attr = NL80211_ATTR_TID_CONFIG_TX_RATES;
>> + ret = nl80211_parse_tx_bitrate_mask(attrs, rdev, attr,
>> + tid_conf->mask);
>> + if (ret) {
>> + kfree(tid_conf->mask);
>> + return ret;
>> + }
>> + } else {
>> + tid_conf->mask = NULL;
>> + }
>> + }
>> +
>> return 0;
>> }
>>
>> @@ -13407,7 +13456,7 @@ static int nl80211_set_tid_config(struct
>> sk_buff *skb,
>> }
>>
>> ret = parse_tid_conf(rdev, attrs, &tid_conf->tid_conf[conf_idx],
>> - tid_conf->peer);
>> + info, tid_conf->peer);
>> if (ret)
>> goto bad_tid_conf;
>
> Practically everywhere, but particularly in the bad case in the next
> loop iteration etc?
>
Yeah. I will fix this in next version.
next prev parent reply other threads:[~2019-04-30 9:58 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-26 9:29 [PATCHv5 0/9] cfg80211/mac80211: Add support for TID specific configuration Tamizh chelvam
2019-03-26 9:29 ` Tamizh chelvam
2019-03-26 9:29 ` [PATCHv5 1/9] nl80211: New netlink command " Tamizh chelvam
2019-03-26 9:29 ` Tamizh chelvam
2019-04-26 9:28 ` Johannes Berg
2019-04-26 9:28 ` Johannes Berg
2019-04-30 7:38 ` Tamizh chelvam
2019-04-30 7:38 ` Tamizh chelvam
2019-03-26 9:29 ` [PATCHv5 2/9] nl80211: Add new netlink attribute for TID speicific retry count Tamizh chelvam
2019-03-26 9:29 ` Tamizh chelvam
2019-04-26 9:31 ` Johannes Berg
2019-04-26 9:31 ` Johannes Berg
2019-04-26 9:32 ` Johannes Berg
2019-04-26 9:32 ` Johannes Berg
2019-03-26 9:29 ` [PATCHv5 3/9] nl80211: Add netlink attribute for AMPDU aggregation enable/disable Tamizh chelvam
2019-03-26 9:29 ` Tamizh chelvam
2019-03-26 9:29 ` [PATCHv5 4/9] nl80211: Add netlink attribute to enable/disable RTS_CTS Tamizh chelvam
2019-03-26 9:29 ` Tamizh chelvam
2019-03-26 9:29 ` [PATCHv5 5/9] nl80211: Add netlink attribute to configure TID specific tx rate Tamizh chelvam
2019-03-26 9:29 ` Tamizh chelvam
2019-04-26 9:37 ` Johannes Berg
2019-04-26 9:37 ` Johannes Berg
2019-04-30 9:58 ` Tamizh chelvam [this message]
2019-04-30 9:58 ` Tamizh chelvam
2019-03-26 9:29 ` [PATCHv5 6/9] mac80211: Add api to support configuring TID specific configuration Tamizh chelvam
2019-03-26 9:29 ` Tamizh chelvam
2019-03-26 9:29 ` [PATCHv5 7/9] ath10k: Add wmi command support for station specific TID config Tamizh chelvam
2019-03-26 9:29 ` Tamizh chelvam
2019-03-26 9:29 ` [PATCHv5 8/9] ath10k: Add new api to support TID specific configuration Tamizh chelvam
2019-03-26 9:29 ` Tamizh chelvam
2019-03-26 9:29 ` [PATCHv5 9/9] ath10k: Add extended TID configuration support Tamizh chelvam
2019-03-26 9:29 ` 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=f70f928923e9623e63b27d590956cb42@codeaurora.org \
--to=tamizhr@codeaurora.org \
--cc=ath10k@lists.infradead.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.