From: Rajkumar Manoharan <rmanoharan@atheros.com>
To: <johannes@sipsolutions.net>
Cc: <linux-wireless@vger.kernel.org>,
Rajkumar Manoharan <rmanoharan@atheros.com>
Subject: [RFC] mac80211: prevent authentication on channel mismatch w/ hw conf
Date: Mon, 4 Apr 2011 22:54:26 +0530 [thread overview]
Message-ID: <1301937866-14701-1-git-send-email-rmanoharan@atheros.com> (raw)
Do not proceed authentication if hw was already configured
with one of the vif's channel which is differed with requesting
channel. Not doing so is causing unneccesary dissociation.
This issue was originaly found while testing concurrent mode
with p2p vif.
Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
---
net/mac80211/mlme.c | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 64d92d5..dcf3d6f 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -2282,11 +2282,30 @@ int ieee80211_mgd_auth(struct ieee80211_sub_if_data *sdata,
{
const u8 *ssid;
struct ieee80211_work *wk;
+ struct ieee80211_sub_if_data *ifdata;
+ bool found = false;
u16 auth_alg;
if (req->local_state_change)
return 0; /* no need to update mac80211 state */
+ /*
+ * XXX: hw conf check should be removed, once the multiple
+ * channels are supported by mac80211
+ */
+ mutex_lock(&sdata->local->iflist_mtx);
+ list_for_each_entry(ifdata, &sdata->local->interfaces, list) {
+ if (ifdata->vif.bss_conf.enable_beacon ||
+ ifdata->vif.bss_conf.assoc) {
+ found = true;
+ break;
+ }
+ }
+ mutex_unlock(&sdata->local->iflist_mtx);
+
+ if (found && (sdata->local->hw.conf.channel != req->bss->channel))
+ return -EOPNOTSUPP;
+
switch (req->auth_type) {
case NL80211_AUTHTYPE_OPEN_SYSTEM:
auth_alg = WLAN_AUTH_OPEN;
--
1.7.4.2
next reply other threads:[~2011-04-04 17:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-04 17:24 Rajkumar Manoharan [this message]
2011-04-04 18:16 ` [RFC] mac80211: prevent authentication on channel mismatch w/ hw conf Johannes Berg
2011-04-05 15:18 ` Rajkumar Manoharan
2011-04-05 15:20 ` 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=1301937866-14701-1-git-send-email-rmanoharan@atheros.com \
--to=rmanoharan@atheros.com \
--cc=johannes@sipsolutions.net \
--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;
as well as URLs for NNTP newsgroup(s).