aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-11-25 17:27:58 -0500
committerDavid S. Miller <davem@davemloft.net>2008-11-25 17:27:58 -0500
commitd7713ccc7bec64fbe0e4e39f93b17dfec711db7f (patch)
tree586afddc7e21ecaa82fc9af369778e53de93fb4e /net
parent11c6dd2c723a9ff9bdd4ee11b2798a08abc94e98 (diff)
parent020cf6ba7a91ccc5db359f91e9abba175fd3a0aa (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/wext.c8
-rw-r--r--net/wireless/reg.c4
2 files changed, 10 insertions, 2 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,
271 __u32 *mode, char *extra) 271 __u32 *mode, char *extra)
272{ 272{
273 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); 273 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
274 struct ieee80211_local *local = sdata->local;
274 int type; 275 int type;
275 276
276 if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN) 277 if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
@@ -281,6 +282,13 @@ static int ieee80211_ioctl_siwmode(struct net_device *dev,
281 type = NL80211_IFTYPE_STATION; 282 type = NL80211_IFTYPE_STATION;
282 break; 283 break;
283 case IW_MODE_ADHOC: 284 case IW_MODE_ADHOC:
285 /* Setting ad-hoc mode on non ibss channel is not
286 * supported.
287 */
288 if (local->oper_channel &&
289 (local->oper_channel->flags & IEEE80211_CHAN_NO_IBSS))
290 return -EOPNOTSUPP;
291
284 type = NL80211_IFTYPE_ADHOC; 292 type = NL80211_IFTYPE_ADHOC;
285 break; 293 break;
286 case IW_MODE_REPEAT: 294 case IW_MODE_REPEAT:
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index 626dbb688499..eb3b1a9f9b12 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -343,9 +343,9 @@ static int ignore_request(struct wiphy *wiphy, enum reg_set_by set_by,
343 return 0; 343 return 0;
344 return -EALREADY; 344 return -EALREADY;
345 } 345 }
346 if (WARN_ON(!is_alpha2_set(alpha2) || !is_an_alpha2(alpha2)), 346 if (WARN(!is_alpha2_set(alpha2) || !is_an_alpha2(alpha2),
347 "Invalid Country IE regulatory hint passed " 347 "Invalid Country IE regulatory hint passed "
348 "to the wireless core\n") 348 "to the wireless core\n"))
349 return -EINVAL; 349 return -EINVAL;
350 /* We ignore Country IE hints for now, as we haven't yet 350 /* We ignore Country IE hints for now, as we haven't yet
351 * added the dot11MultiDomainCapabilityEnabled flag 351 * added the dot11MultiDomainCapabilityEnabled flag