Search Linux Wireless

Re: [PATCH v2 03/10] rtlwifi: Add sta_statistics of mac80211's op, and set filled=0 by default

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

 



On Tue, 2018-01-16 at 17:42 +0200, Kalle Valo wrote:

> > When using iwconfig to check wifi status, wext uses 'static struct' of
> > sinfo to get station info so sinfo->filled will be persistent. Since the
> > commit 2b9a7e1bac24 ("mac80211: allow drivers to provide most station
> > statistics") assumes driver initializes sinfo->filled to declare supported
> > fields, without initialization it will report wrong info. This commit
> > simply set 'filled' to be zero simply, and left sinfo to be filled by
> > mac80211.

Huh, this can't be right.

> Adding an empty op like that feels pointless, IMHO (but without checking
> mac80211 sources) not having the op should be the same as filled = 0. To
> me this smells like a bug in mac80211.
> 
> Johannes, what do you think?

It can't be right. It would've broken each and every driver out there,
other than the one or two who implement this.

However, it looks like PK is actually correct - *wext* does appear to
be broken! nl80211 does this:

                memset(&sinfo, 0, sizeof(sinfo));
                err = rdev_dump_station(rdev, wdev->netdev, sta_idx,
                                        mac_addr, &sinfo);


and

        memset(&sinfo, 0, sizeof(sinfo));

...

        err = rdev_get_station(rdev, dev, mac_addr, &sinfo);

and has a bug in cfg80211_cqm_rssi_update(). Wext also has bugs, I'll
send out a fix.

johannes



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

  Powered by Linux