From: Johannes Berg <johannes@sipsolutions.net>
To: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Cc: linux-wireless@vger.kernel.org, j@w1.fi
Subject: Re: [PATCH v2 3/3] nl80211: add VHT support for set_bitrate_mask
Date: Thu, 05 Dec 2013 16:42:36 +0100 [thread overview]
Message-ID: <1386258156.4182.8.camel@jlt4.sipsolutions.net> (raw)
In-Reply-To: <1386234137-3531-3-git-send-email-janusz.dziedzic@tieto.com> (sfid-20131205_100230_705131_CB931FCE)
On Thu, 2013-12-05 at 10:02 +0100, Janusz Dziedzic wrote:
> + switch (vht_mcs_map & 0x03) {
I think that should be in the caller.
> + case IEEE80211_VHT_MCS_NOT_SUPPORTED:
> + break;
> + case IEEE80211_VHT_MCS_SUPPORT_0_7:
> + mcs_mask = 0x00FF;
> + break;
> + case IEEE80211_VHT_MCS_SUPPORT_0_8:
> + mcs_mask = 0x01FF;
> + break;
> + case IEEE80211_VHT_MCS_SUPPORT_0_9:
> + mcs_mask = 0x03FF;
> + break;
> + }
> +
> + return mcs_mask;
> +}
> +
> +static void vht_build_mcs_mask(u16 vht_mcs_map,
> + u16 vht_mcs_mask[NL80211_VHT_NSS_MAX])
> +{
> + u8 nss;
> +
> + for (nss = 0; nss < NL80211_VHT_NSS_MAX; nss++) {
> + vht_mcs_mask[nss] = vht_mcs_map_to_mcs_mask(vht_mcs_map);
> + vht_mcs_map >>= 2;
> + }
> @@ -7364,20 +7430,31 @@ static int nl80211_set_tx_bitrate_mask(struct sk_buff *skb,
> mask.control[band].ht_mcs))
> return -EINVAL;
> }
> + if (tb[NL80211_TXRATE_VHT]) {
> + if (!vht_set_mcs_mask(
> + sband,
> + nla_data(tb[NL80211_TXRATE_VHT]),
> + mask.control[band].vht_mcs))
> + return -EINVAL;
> + }
>
> if (mask.control[band].legacy == 0) {
> - /* don't allow empty legacy rates if HT
> - * is not even supported. */
> - if (!rdev->wiphy.bands[band]->ht_cap.ht_supported)
> + /* don't allow empty legacy rates if HT or VHT
> + * are not even supported. */
comment style
johannes
next prev parent reply other threads:[~2013-12-05 15:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-05 9:02 [PATCH v2 1/3] nl80211: back to default bitrate_mask correctly Janusz Dziedzic
2013-12-05 9:02 ` [PATCH v2 2/3] nl80211/cfg80211: bitrate_mask, rename mcs to ht_mcs Janusz Dziedzic
2013-12-05 9:02 ` [PATCH v2 3/3] nl80211: add VHT support for set_bitrate_mask Janusz Dziedzic
2013-12-05 15:42 ` Johannes Berg [this message]
2013-12-05 9:02 ` [PATCH v2] iw: add VHT MCS/NSS set support to set bitrates Janusz Dziedzic
2013-12-05 15:43 ` Johannes Berg
2013-12-05 17:30 ` Karl Beldan
2013-12-06 9:08 ` Karl Beldan
2013-12-05 15:40 ` [PATCH v2 1/3] nl80211: back to default bitrate_mask correctly Johannes Berg
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=1386258156.4182.8.camel@jlt4.sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=j@w1.fi \
--cc=janusz.dziedzic@tieto.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox