* [RFC] mac80211: prevent authentication on channel mismatch w/ hw conf
@ 2011-04-04 17:24 Rajkumar Manoharan
2011-04-04 18:16 ` Johannes Berg
0 siblings, 1 reply; 4+ messages in thread
From: Rajkumar Manoharan @ 2011-04-04 17:24 UTC (permalink / raw)
To: johannes; +Cc: linux-wireless, Rajkumar Manoharan
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [RFC] mac80211: prevent authentication on channel mismatch w/ hw conf
2011-04-04 17:24 [RFC] mac80211: prevent authentication on channel mismatch w/ hw conf Rajkumar Manoharan
@ 2011-04-04 18:16 ` Johannes Berg
2011-04-05 15:18 ` Rajkumar Manoharan
0 siblings, 1 reply; 4+ messages in thread
From: Johannes Berg @ 2011-04-04 18:16 UTC (permalink / raw)
To: Rajkumar Manoharan; +Cc: linux-wireless
On Mon, 2011-04-04 at 22:54 +0530, Rajkumar Manoharan wrote:
> 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.
This will break any kind of pre-authentication, no?
johannes
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RFC] mac80211: prevent authentication on channel mismatch w/ hw conf
2011-04-04 18:16 ` Johannes Berg
@ 2011-04-05 15:18 ` Rajkumar Manoharan
2011-04-05 15:20 ` Johannes Berg
0 siblings, 1 reply; 4+ messages in thread
From: Rajkumar Manoharan @ 2011-04-05 15:18 UTC (permalink / raw)
To: Johannes Berg; +Cc: Rajkumar Manoharan, linux-wireless@vger.kernel.org
On Mon, Apr 04, 2011 at 11:46:43PM +0530, Johannes Berg wrote:
> On Mon, 2011-04-04 at 22:54 +0530, Rajkumar Manoharan wrote:
> > 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.
>
> This will break any kind of pre-authentication, no?
>
Yeah...I completely ignored roaming part. sorry for that and thanks for pointing out.
Is that fine to proceed authentication in case of matching ssid found in any of the vif's
bss and having such vif iteration under auth. Please help me to sort out.
--
Rajkumar
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RFC] mac80211: prevent authentication on channel mismatch w/ hw conf
2011-04-05 15:18 ` Rajkumar Manoharan
@ 2011-04-05 15:20 ` Johannes Berg
0 siblings, 0 replies; 4+ messages in thread
From: Johannes Berg @ 2011-04-05 15:20 UTC (permalink / raw)
To: Rajkumar Manoharan; +Cc: Rajkumar Manoharan, linux-wireless@vger.kernel.org
On Tue, 2011-04-05 at 20:48 +0530, Rajkumar Manoharan wrote:
> On Mon, Apr 04, 2011 at 11:46:43PM +0530, Johannes Berg wrote:
> > On Mon, 2011-04-04 at 22:54 +0530, Rajkumar Manoharan wrote:
> > > 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.
> >
> > This will break any kind of pre-authentication, no?
> >
> Yeah...I completely ignored roaming part. sorry for that and thanks for pointing out.
> Is that fine to proceed authentication in case of matching ssid found in any of the vif's
> bss and having such vif iteration under auth. Please help me to sort out.
You could also pre-auth if it's a different network if you like ...
What's the problem anyway?
johannes
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-04-05 15:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-04 17:24 [RFC] mac80211: prevent authentication on channel mismatch w/ hw conf Rajkumar Manoharan
2011-04-04 18:16 ` Johannes Berg
2011-04-05 15:18 ` Rajkumar Manoharan
2011-04-05 15:20 ` Johannes Berg
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).