Search Linux Wireless

Re: [PATCH] [PATCH] mac80211: handle VHT radiotap info for tx status

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jul 26, 2013 at 07:58:34PM +0200, Karl Beldan wrote:
> From: Karl Beldan <karl.beldan@xxxxxxxxxxxxxxxx>
> 
> 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@xxxxxxxxxxxxxxxx>
> ---
>  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
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux