diff options
| author | Ingo Molnar <mingo@elte.hu> | 2008-12-12 12:29:35 +0300 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2008-12-12 12:29:35 +0300 |
| commit | c1dfdc7597d051b09555d4ae2acb90403e238746 (patch) | |
| tree | 86aa49f5a2ab25459f9196dd6724bbe6645b1375 /net/mac80211/wext.c | |
| parent | efbe027e95dc13ac343b6130948418d7ead7ddf1 (diff) | |
| parent | 8b1fae4e4200388b64dd88065639413cb3f1051c (diff) | |
| download | linux-c1dfdc7597d051b09555d4ae2acb90403e238746.tar.xz | |
Merge commit 'v2.6.28-rc8' into sched/core
Diffstat (limited to 'net/mac80211/wext.c')
| -rw-r--r-- | net/mac80211/wext.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/net/mac80211/wext.c b/net/mac80211/wext.c index 742f811ca416..ab4ddba874be 100644 --- a/net/mac80211/wext.c +++ b/net/mac80211/wext.c @@ -271,6 +271,7 @@ static int ieee80211_ioctl_siwmode(struct net_device *dev, __u32 *mode, char *extra) { struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); + struct ieee80211_local *local = sdata->local; int type; if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN) @@ -281,6 +282,13 @@ static int ieee80211_ioctl_siwmode(struct net_device *dev, type = NL80211_IFTYPE_STATION; break; case IW_MODE_ADHOC: + /* Setting ad-hoc mode on non ibss channel is not + * supported. + */ + if (local->oper_channel && + (local->oper_channel->flags & IEEE80211_CHAN_NO_IBSS)) + return -EOPNOTSUPP; + type = NL80211_IFTYPE_ADHOC; break; case IW_MODE_REPEAT: |
