* [PATCH] mac80211: allow mode change if IBSS is not allowed
@ 2008-12-22 21:39 Pavel Roskin
2008-12-22 21:52 ` Johannes Berg
0 siblings, 1 reply; 4+ messages in thread
From: Pavel Roskin @ 2008-12-22 21:39 UTC (permalink / raw)
To: linux-wireless, John W Linville
Changing mode on an interface is not allowed if IBSS is disabled for the
current channel. That restriction should only apply when switching to
the ad-hoc mode, as it was prior to db17d8c4.
Signed-off-by: Pavel Roskin <proski@gnu.org>
---
net/mac80211/iface.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index 5abbc3f..b907482 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -699,7 +699,8 @@ int ieee80211_if_change_type(struct ieee80211_sub_if_data *sdata,
return 0;
/* Setting ad-hoc mode on non-IBSS channel is not supported. */
- if (sdata->local->oper_channel->flags & IEEE80211_CHAN_NO_IBSS)
+ if (sdata->local->oper_channel->flags & IEEE80211_CHAN_NO_IBSS &&
+ type == NL80211_IFTYPE_ADHOC)
return -EOPNOTSUPP;
/*
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] mac80211: allow mode change if IBSS is not allowed
2008-12-22 21:39 [PATCH] mac80211: allow mode change if IBSS is not allowed Pavel Roskin
@ 2008-12-22 21:52 ` Johannes Berg
2008-12-23 21:07 ` John W. Linville
0 siblings, 1 reply; 4+ messages in thread
From: Johannes Berg @ 2008-12-22 21:52 UTC (permalink / raw)
To: Pavel Roskin; +Cc: linux-wireless, John W Linville
[-- Attachment #1: Type: text/plain, Size: 1245 bytes --]
On Mon, 2008-12-22 at 16:39 -0500, Pavel Roskin wrote:
> Changing mode on an interface is not allowed if IBSS is disabled for the
> current channel. That restriction should only apply when switching to
> the ad-hoc mode, as it was prior to db17d8c4.
>
> Signed-off-by: Pavel Roskin <proski@gnu.org>
Thanks Pavel.
Acked-by: Johannes Berg <johannes@sipsolutions.net>
> ---
> net/mac80211/iface.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
> index 5abbc3f..b907482 100644
> --- a/net/mac80211/iface.c
> +++ b/net/mac80211/iface.c
> @@ -699,7 +699,8 @@ int ieee80211_if_change_type(struct ieee80211_sub_if_data *sdata,
> return 0;
>
> /* Setting ad-hoc mode on non-IBSS channel is not supported. */
> - if (sdata->local->oper_channel->flags & IEEE80211_CHAN_NO_IBSS)
> + if (sdata->local->oper_channel->flags & IEEE80211_CHAN_NO_IBSS &&
> + type == NL80211_IFTYPE_ADHOC)
> return -EOPNOTSUPP;
>
> /*
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mac80211: allow mode change if IBSS is not allowed
2008-12-22 21:52 ` Johannes Berg
@ 2008-12-23 21:07 ` John W. Linville
2008-12-23 21:46 ` Johannes Berg
0 siblings, 1 reply; 4+ messages in thread
From: John W. Linville @ 2008-12-23 21:07 UTC (permalink / raw)
To: Johannes Berg; +Cc: Pavel Roskin, linux-wireless
On Mon, Dec 22, 2008 at 10:52:58PM +0100, Johannes Berg wrote:
> On Mon, 2008-12-22 at 16:39 -0500, Pavel Roskin wrote:
> > Changing mode on an interface is not allowed if IBSS is disabled for the
> > current channel. That restriction should only apply when switching to
> > the ad-hoc mode, as it was prior to db17d8c4.
> >
> > Signed-off-by: Pavel Roskin <proski@gnu.org>
>
> Thanks Pavel.
>
> Acked-by: Johannes Berg <johannes@sipsolutions.net>
Doesn't this need to account for the other beaconing modes?
John
--
John W. Linville Linux should be at the core
linville@tuxdriver.com of your literate lifestyle.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mac80211: allow mode change if IBSS is not allowed
2008-12-23 21:07 ` John W. Linville
@ 2008-12-23 21:46 ` Johannes Berg
0 siblings, 0 replies; 4+ messages in thread
From: Johannes Berg @ 2008-12-23 21:46 UTC (permalink / raw)
To: John W. Linville; +Cc: Pavel Roskin, linux-wireless
[-- Attachment #1: Type: text/plain, Size: 807 bytes --]
On Tue, 2008-12-23 at 16:07 -0500, John W. Linville wrote:
> On Mon, Dec 22, 2008 at 10:52:58PM +0100, Johannes Berg wrote:
> > On Mon, 2008-12-22 at 16:39 -0500, Pavel Roskin wrote:
> > > Changing mode on an interface is not allowed if IBSS is disabled for the
> > > current channel. That restriction should only apply when switching to
> > > the ad-hoc mode, as it was prior to db17d8c4.
> > >
> > > Signed-off-by: Pavel Roskin <proski@gnu.org>
> >
> > Thanks Pavel.
> >
> > Acked-by: Johannes Berg <johannes@sipsolutions.net>
>
> Doesn't this need to account for the other beaconing modes?
Well, for now this fixes the regression I introduced, and how the other
modes should be handled we haven't really defined yet. But yeah, it
might make some sense for mesh too...
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-12-23 21:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-22 21:39 [PATCH] mac80211: allow mode change if IBSS is not allowed Pavel Roskin
2008-12-22 21:52 ` Johannes Berg
2008-12-23 21:07 ` John W. Linville
2008-12-23 21:46 ` 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).