aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/iface.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2008-11-26 23:31:40 +0100
committerJohn W. Linville <linville@tuxdriver.com>2008-12-05 09:32:58 -0500
commite60c7744f8aa77bcbcb0b294596d6c87445d1200 (patch)
tree7039c0906d825b035595a826cd117fd08242d0ad /net/mac80211/iface.c
parentcfg80211: handle SIOCGIWNAME (diff)
downloadlinux-dev-e60c7744f8aa77bcbcb0b294596d6c87445d1200.tar.xz
linux-dev-e60c7744f8aa77bcbcb0b294596d6c87445d1200.zip
cfg80211: handle SIOCGIWMODE/SIOCSIWMODE
further reducing wext code in mac80211. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/iface.c')
-rw-r--r--net/mac80211/iface.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index 9ab772ac74ae..5abbc3f07dd6 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -698,6 +698,10 @@ int ieee80211_if_change_type(struct ieee80211_sub_if_data *sdata,
if (type == sdata->vif.type)
return 0;
+ /* Setting ad-hoc mode on non-IBSS channel is not supported. */
+ if (sdata->local->oper_channel->flags & IEEE80211_CHAN_NO_IBSS)
+ return -EOPNOTSUPP;
+
/*
* We could, here, on changes between IBSS/STA/MESH modes,
* invoke an MLME function instead that disassociates etc.