diff options
author | Pavel Roskin <proski@gnu.org> | 2008-12-22 16:39:36 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-01-12 14:24:56 -0500 |
commit | dcebf45cdc8384be9009b2b9a825054b64742768 (patch) | |
tree | 7daaaff83e1ff0f7d70a9056f19caa9c8bc7bd44 /net/mac80211 | |
parent | 4fb7404e0eaf574c00d01d2b1ce2615229b350cd (diff) |
mac80211: allow mode change if IBSS is not allowed
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 "cfg80211: handle SIOCGIWMODE/SIOCSIWMODE".
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | 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 5abbc3f07dd6..b9074824862a 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, | |||
699 | return 0; | 699 | return 0; |
700 | 700 | ||
701 | /* Setting ad-hoc mode on non-IBSS channel is not supported. */ | 701 | /* Setting ad-hoc mode on non-IBSS channel is not supported. */ |
702 | if (sdata->local->oper_channel->flags & IEEE80211_CHAN_NO_IBSS) | 702 | if (sdata->local->oper_channel->flags & IEEE80211_CHAN_NO_IBSS && |
703 | type == NL80211_IFTYPE_ADHOC) | ||
703 | return -EOPNOTSUPP; | 704 | return -EOPNOTSUPP; |
704 | 705 | ||
705 | /* | 706 | /* |