public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Dan Williams <dcbw@redhat.com>
Cc: Jouni Malinen <j@w1.fi>, Marcel Holtmann <marcel@holtmann.org>,
	linux-wireless@vger.kernel.org
Subject: Re: Missing link quality with wireless-testing
Date: Wed, 18 Feb 2009 17:48:31 +0100	[thread overview]
Message-ID: <1234975711.4023.28.camel@johannes.local> (raw)
In-Reply-To: <1234969986.19743.7.camel@localhost>

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

On Wed, 2009-02-18 at 10:13 -0500, Dan Williams wrote:

> >         /* cfg80211 requires this, and enforces 0..100 */
> >         if (local->hw.flags & IEEE80211_HW_SIGNAL_UNSPEC)
> >                 range->max_qual.level = 100;
> >         else if  (local->hw.flags & IEEE80211_HW_SIGNAL_DBM)
> >                 range->max_qual.level = -110;
> >         else
> >                 range->max_qual.level = 0;
> > 
> > Note the dBm branch -- clearly wrong. Did anyone care? Clearly not.
> 
> Almost; I was partially wrong as well.  The comments from wireless.h
> imply that max_qual.level in the dBm case can be < 0.  Remember that
> these values are *s8*, and thus max_qual.level can be < 0 and greater
> than -127 at least.

Ok, I wasn't looking at the header file, only your explanation.

> This of course doesn't allow RSSI-based levels of > 127, but whatever.
> To get the definitive determination of RSSI vs. dBm for level, you use
> (updated & IW_QUAL_DBM).
> 
> The understanding of max_qual.level == 0 means dBm was probably from
> conversations with Jean and that's apparently not borne out by the
> evidence from wireless.h, unless there's something else I'm not reading.
> 
> NM doesn't handle IW_QUAL_DBM.  It should.
> 
> > Therefore, here's what I'm going to do:
> >  1) always set IW_QUAL_QUAL_INVALID, even in max_qual (fixes bug #1)
> >  2) set max_qual.level to 0 for dBm instead of -110 (fixes bug #2)
> > 
> > patch below.
> 
> I think leaving max_qual.level == -110 is OK in mac80211 actually.  It's
> NM that's got the problem by not respecting IW_QUAL_DBM.

Yeah, but now we've got three or four bugs that together mean we broke
NM. We can't really wait for NM *and* wpa_supplicant to get their
fixes...

Should we just calculate a qual.qual value anyway?

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2009-02-18 16:49 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-17 18:52 Missing link quality with wireless-testing Marcel Holtmann
2009-02-17 19:43 ` Johannes Berg
2009-02-17 20:24   ` Marcel Holtmann
2009-02-17 20:55     ` Johannes Berg
2009-02-17 21:09       ` Marcel Holtmann
2009-02-17 23:25         ` Dan Williams
2009-02-18  4:57           ` Marcel Holtmann
2009-02-18  7:31             ` Jouni Malinen
2009-02-18  8:06               ` Marcel Holtmann
2009-02-18  8:25                 ` Jouni Malinen
2009-02-18 12:18                   ` Dan Williams
2009-02-18 12:33                     ` Jouni Malinen
2009-02-18 12:48                       ` Dan Williams
2009-02-18 13:20                         ` Dan Williams
2009-02-18 14:01                         ` Jouni Malinen
2009-02-18 14:25                         ` Johannes Berg
2009-02-18 13:37                     ` Johannes Berg
2009-02-18 15:13                       ` Dan Williams
2009-02-18 16:48                         ` Johannes Berg [this message]
2009-02-18 17:27 ` [PATCH] cfg80211/mac80211: fill qual.qual value/adjust max_qual.qual Johannes Berg
2009-02-18 17:29   ` Johannes Berg

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=1234975711.4023.28.camel@johannes.local \
    --to=johannes@sipsolutions.net \
    --cc=dcbw@redhat.com \
    --cc=j@w1.fi \
    --cc=linux-wireless@vger.kernel.org \
    --cc=marcel@holtmann.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox