From: Johannes Berg <johannes@sipsolutions.net>
To: linux-wireless@vger.kernel.org
Cc: Dmitry Tarnyagin <abi.dmitryt@gmail.com>,
Johannes Berg <johannes.berg@intel.com>
Subject: [PATCH] cfg80211: fix cmp_hidden_bss
Date: Wed, 28 Nov 2012 22:44:55 +0100 [thread overview]
Message-ID: <1354139095-22937-1-git-send-email-johannes@sipsolutions.net> (raw)
From: Johannes Berg <johannes.berg@intel.com>
The cmp_bss() comparator function uses memcmp() to
compare the SSID. This means that cmp_hidden_bss()
needs to similarly return a number bigger than zero
(use 1) instead of -1 when ie1 is bigger than ie2,
which is the case if an ie2 byte is non-zero.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
net/wireless/scan.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/wireless/scan.c b/net/wireless/scan.c
index 9233910..57855bc 100644
--- a/net/wireless/scan.c
+++ b/net/wireless/scan.c
@@ -472,7 +472,7 @@ static int cmp_hidden_bss(struct cfg80211_bss *a, struct cfg80211_bss *b)
/* zeroed SSID ie is another indication of a hidden bss */
for (i = 0; i < ie2[1]; i++)
if (ie2[i + 2])
- return -1;
+ return 1;
return 0;
}
--
1.8.0
next reply other threads:[~2012-11-28 21:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-28 21:44 Johannes Berg [this message]
2012-11-28 23:53 ` [PATCH] cfg80211: fix cmp_hidden_bss Eliad Peller
2012-11-29 0:00 ` Johannes Berg
2012-11-29 0:07 ` Eliad Peller
2012-11-29 0:28 ` Johannes Berg
2012-11-29 9:01 ` [PATCH v2] " Johannes Berg
2012-11-29 9:42 ` Eliad Peller
2012-11-29 10:48 ` [PATCH v3] " Johannes Berg
2012-11-30 12:43 ` 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=1354139095-22937-1-git-send-email-johannes@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=abi.dmitryt@gmail.com \
--cc=johannes.berg@intel.com \
--cc=linux-wireless@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox