From: Larry Finger <Larry.Finger@lwfinger.net>
To: Michael Buesch <mb@bu3sch.de>
Cc: John Linville <linville@tuxdriver.com>, netdev@vger.kernel.org
Subject: Re: [PATCH] improved statistics for bcm43xx-softmac
Date: Thu, 29 Jun 2006 10:31:34 -0500 [thread overview]
Message-ID: <44A3F256.2090601@lwfinger.net> (raw)
In-Reply-To: <200606291712.21973.mb@bu3sch.de>
Michael Buesch wrote:
> On Thursday 29 June 2006 06:08, Larry Finger wrote:
>> /* fill in the real statistics when iface associated */
>> - wstats->qual.qual = 100; // TODO: get the real signal quality
>> - wstats->qual.level = 3 - bcm->stats.link_quality;
>> + list_for_each_entry(network, &mac->ieee->network_list, list) {
>> + if (!memcmp(mac->associnfo.bssid, network->bssid, ETH_ALEN)) {
>> + if (!tmp_level) /* get initial value */
>> + tmp_level = network->stats.rssi;
>> + else /* smooth results */
>> + tmp_level = (7 * tmp_level + network->stats.rssi)/8;
>> + break;
>> + }
>> + }
>
> You need to lock the ieee80211 lock here. Otherwise it might race and crash,
> if some workqueue modifies the list inbetween.
Thanks for the comment. Is there an easier way to get to network->stats?
Larry
next prev parent reply other threads:[~2006-06-29 15:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-29 4:08 [PATCH] improved statistics for bcm43xx-softmac Larry Finger
2006-06-29 15:12 ` Michael Buesch
2006-06-29 15:31 ` Larry Finger [this message]
2006-06-29 20:56 ` Dan Williams
2006-06-30 3:07 ` Larry Finger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=44A3F256.2090601@lwfinger.net \
--to=larry.finger@lwfinger.net \
--cc=linville@tuxdriver.com \
--cc=mb@bu3sch.de \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.