Search Linux Wireless

Re: [Patch 2/2 v2] Add signal strength and bandwith to nl80211station info

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

 



On Tue, 2008-12-09 at 20:58 +0100, Henning Rogge wrote:

> -		if (!(sinfo->txrate.flags & RATE_INFO_FLAGS_MCS))
> -			NLA_PUT_U16(msg, NL80211_RATE_INFO_LEGACY,
> -				    sinfo->txrate.legacy);
> -		else
> +		NLA_PUT_U16(msg, NL80211_RATE_INFO_BITRATE,
> +				nl80211_calculate_bitrate(&sinfo->txrate));

If you do:

if (sinfo->txrate.flags & RATE_INFO_FLAGS_MCS) {
	if (sinfo->txrate.mcs < 32)
		NLA_PUT_U16(msg, ..., calculate());
} else
	NLA_PUT_U16(msg, ..., legacy);


and add a big comment to the calculate function that it only works for
MCS < 32, I'm fine with it.

johannes

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux