Re: [B.A.T.M.A.N.] [RFCv2 4/6] mac80211: minstrel - implement get_expected_throughput() API

Antonio Quartulli
2014-03-31T08:49:17Z

[-- Attachment #1: Type: text/plain, Size: 663 bytes --]

On 30/03/14 22:35, Antonio Quartulli wrote:
> +static u32
> +minstrel_get_expected_throughput(void *priv, void *priv_sta,
> + struct ieee80211_supported_band *sband)
> +{
> + struct minstrel_sta_info *mi = priv_sta;
> + int idx = mi->max_tp_rate[0];
> + u32 bitrate, ret;
> +
> + bitrate = sband->bitrates[mi->r[idx].rix].bitrate;
> + ret = bitrate * MINSTREL_TRUNC(mi->r[idx].probability * 1000) / 1000;

Thanks to the point raised by Andrew Lunn I just realised that this
value is expressed in Mbps/10 and so should be converted to Mbps/100
before being returned (assuming we agree on using this unit).

Cheers,

--
Antonio Quartulli

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]