Patchwork nl80211: fix UNSPEC signal quality reporting

login
register
mail settings
Submitter Dan Williams
Date Nov. 15, 2011, 12:35 a.m.
Message ID <1321317339.26609.1.camel@dcbw.foobar.com>
Download mbox | patch
Permalink /patch/125647/
State Accepted
Commit 98ac6763ff282125acf69886af9c92162c35f243
Headers show

Comments

Dan Williams - Nov. 15, 2011, 12:35 a.m.
r->level got assigned so it's clearly not INVALID; instead
r->qual should be invalid.

Signed-hostap: Dan Williams <dcbw@redhat.com>
---
 src/drivers/driver_nl80211.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Candidate for 1.0 and 0.7.x too.
Jouni Malinen - Nov. 18, 2011, 9:25 p.m.
On Mon, Nov 14, 2011 at 06:35:39PM -0600, Dan Williams wrote:
> r->level got assigned so it's clearly not INVALID; instead
> r->qual should be invalid.

Thanks, applied.

Patch

diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index 0f7447b..3e9701c 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -3040,7 +3040,7 @@  static int bss_info_handler(struct nl_msg *msg, void *arg)
 		r->flags |= WPA_SCAN_LEVEL_DBM | WPA_SCAN_QUAL_INVALID;
 	} else if (bss[NL80211_BSS_SIGNAL_UNSPEC]) {
 		r->level = nla_get_u8(bss[NL80211_BSS_SIGNAL_UNSPEC]);
-		r->flags |= WPA_SCAN_LEVEL_INVALID;
+		r->flags |= WPA_SCAN_QUAL_INVALID;
 	} else
 		r->flags |= WPA_SCAN_LEVEL_INVALID | WPA_SCAN_QUAL_INVALID;
 	if (bss[NL80211_BSS_TSF])