aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/mlme.c22
-rw-r--r--net/mac80211/wext.c8
2 files changed, 8 insertions, 22 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 14d165f0df75..409bb7716236 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -2560,25 +2560,3 @@ void ieee80211_mlme_notify_scan_completed(struct ieee80211_local *local)
2560 ieee80211_restart_sta_timer(sdata); 2560 ieee80211_restart_sta_timer(sdata);
2561 rcu_read_unlock(); 2561 rcu_read_unlock();
2562} 2562}
2563
2564/* driver notification call */
2565void ieee80211_notify_mac(struct ieee80211_hw *hw,
2566 enum ieee80211_notification_types notif_type)
2567{
2568 struct ieee80211_local *local = hw_to_local(hw);
2569 struct ieee80211_sub_if_data *sdata;
2570
2571 switch (notif_type) {
2572 case IEEE80211_NOTIFY_RE_ASSOC:
2573 rtnl_lock();
2574 list_for_each_entry(sdata, &local->interfaces, list) {
2575 if (sdata->vif.type != NL80211_IFTYPE_STATION)
2576 continue;
2577
2578 ieee80211_sta_req_auth(sdata, &sdata->u.sta);
2579 }
2580 rtnl_unlock();
2581 break;
2582 }
2583}
2584EXPORT_SYMBOL(ieee80211_notify_mac);
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: