linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Karl Beldan <karl.beldan@gmail.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless <linux-wireless@vger.kernel.org>,
	Karl Beldan <karl.beldan@rivierawaves.com>
Subject: Re: [PATCH] [PATCH] mac80211: handle VHT radiotap info for tx status
Date: Sat, 27 Jul 2013 10:51:53 +0200	[thread overview]
Message-ID: <20130727085153.GA31401@gobelin> (raw)
In-Reply-To: <1374861514-29022-1-git-send-email-karl.beldan@gmail.com>

On Fri, Jul 26, 2013 at 07:58:34PM +0200, Karl Beldan wrote:
> From: Karl Beldan <karl.beldan@rivierawaves.com>
> 
> The radiotap VHT info is 12 bytes (required to be aligned on 2) :
> u16 known - IEEE80211_RADIOTAP_VHT_KNOWN_*
> u8 flags - IEEE80211_RADIOTAP_VHT_FLAG_*
> u8 bandwidth
> u8 mcs_nss[4]
> u8 coding
> u8 group_id
> u16 partial_aid
> 
> ATM mac80211 can properly handle IEEE80211_RADIOTAP_VHT_KNOWN_GI,
> IEEE80211_RADIOTAP_VHT_KNOWN_BANDWIDTH and mcs_nss[0] (i.e single user).
> 
> Signed-off-by: Karl Beldan <karl.beldan@rivierawaves.com>
> ---
>  net/mac80211/status.c | 76 ++++++++++++++++++++++++++++++++++++++++++---------
>  1 file changed, 63 insertions(+), 13 deletions(-)
> 
> diff --git a/net/mac80211/status.c b/net/mac80211/status.c
> index 6ad4c14..1a1c7fd 100644
> --- a/net/mac80211/status.c
> +++ b/net/mac80211/status.c
> @@ -235,7 +235,8 @@ static int ieee80211_tx_radiotap_len(struct ieee80211_tx_info *info)
>  
>  	/* IEEE80211_RADIOTAP_RATE rate */
>  	if (info->status.rates[0].idx >= 0 &&
> -	    !(info->status.rates[0].flags & IEEE80211_TX_RC_MCS))
> +	    !(info->status.rates[0].flags & (IEEE80211_TX_RC_MCS |
> +					     IEEE80211_TX_RC_VHT_MCS)))
>  		len += 2;
>  
>  	/* IEEE80211_RADIOTAP_TX_FLAGS */
> @@ -244,16 +245,21 @@ static int ieee80211_tx_radiotap_len(struct ieee80211_tx_info *info)
>  	/* IEEE80211_RADIOTAP_DATA_RETRIES */
>  	len += 1;
>  
> -	/* IEEE80211_TX_RC_MCS */
> -	if (info->status.rates[0].idx >= 0 &&
> -	    info->status.rates[0].flags & IEEE80211_TX_RC_MCS)
> -		len += 3;
> +	/* IEEE80211_RADIOTAP_MCS
> +	 * IEEE80211_RADIOTAP_VHT */
> +	if (info->status.rates[0].idx >= 0) {
> +		if (info->status.rates[0].flags & IEEE80211_TX_RC_MCS)
> +			len += 3;
> +		else if (info->status.rates[0].flags & IEEE80211_TX_RC_VHT_MCS)
> +			len += ALIGN(len, 2) + 12;
The '+' is a typo, should be
			len = ALIGN(len, 2) + 12;

-- 
Karl

      reply	other threads:[~2013-07-27  8:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-26 17:58 [PATCH] [PATCH] mac80211: handle VHT radiotap info for tx status Karl Beldan
2013-07-27  8:51 ` Karl Beldan [this message]

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=20130727085153.GA31401@gobelin \
    --to=karl.beldan@gmail.com \
    --cc=johannes@sipsolutions.net \
    --cc=karl.beldan@rivierawaves.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;
as well as URLs for NNTP newsgroup(s).