On Mon, Feb 01, 2016 at 01:26:12PM +0100, Sven Eckelmann wrote:
> On Monday 01 February 2016 14:34:33 Marek Lindner wrote:
> > The expected throughout returned by the cfg80211 API is expressed in kbps
> > while internally batman-adv stores multiples of 100kbps. Ensure the
> > conversion is performed properly.
> > 
> > Fixes: 5c324517 ("ELP - compute the metric based on the estimated 
> > throughput")
> > 
> > Signed-off-by: Marek Lindner <[email protected]>
> > ---
> >  net/batman-adv/bat_v_elp.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/net/batman-adv/bat_v_elp.c b/net/batman-adv/bat_v_elp.c
> > index 46c6a00..461a765 100644
> > --- a/net/batman-adv/bat_v_elp.c
> > +++ b/net/batman-adv/bat_v_elp.c
> > @@ -100,7 +100,7 @@ static u32 batadv_v_elp_get_throughput(struct 
> > batadv_hardif_neigh_node *neigh)
> >                             return 0;
> >                     }
> >                     if (!ret)
> > -                           return sinfo.expected_throughput / 10;
> > +                           return sinfo.expected_throughput / 100;
> >             }
> 
> Just tested it here and can say that it now show the same value as
> `iw dev adhoc0 station dump`. But the output of `iw dev adhoc0 station dump`
> confuses me. I can get easily get over 40 Mbit/s but the output of
> `iw dev adhoc0 station dump` show me 4.705Mbps. Also the output of
> `cat /sys/kernel/debug/ieee80211/phy*/netdev\:adhoc0/stations/*/rc_stats` look
> definitely more like ~40 Mbit/s.
> 
> Antonio, can you please check my tests and my conclusion (+patch [1]).

Sven,

your test looks correct. By accident this bug in mac80211 was "balanced" by the
bug that Marek is fixing with ("batman-adv: convert wifi driver throughput to
multiples of 100kbps").

Your patch[1] looks sane to me. Thanks for sending it to linux-wireless.

Cheers,


[1]http://article.gmane.org/gmane.linux.kernel.wireless.general/148102

-- 
Antonio Quartulli

Attachment: signature.asc
Description: Digital signature

Reply via email to