diff options
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/debugfs_sta.c | 2 | ||||
-rw-r--r-- | net/mac80211/mlme.c | 22 | ||||
-rw-r--r-- | net/mac80211/sta_info.c | 2 | ||||
-rw-r--r-- | net/mac80211/wext.c | 8 |
4 files changed, 10 insertions, 24 deletions
diff --git a/net/mac80211/debugfs_sta.c b/net/mac80211/debugfs_sta.c index 189d0bafa91a..b85c4f27b361 100644 --- a/net/mac80211/debugfs_sta.c +++ b/net/mac80211/debugfs_sta.c | |||
@@ -199,7 +199,7 @@ static ssize_t sta_agg_status_write(struct file *file, | |||
199 | /* toggle Rx aggregation command */ | 199 | /* toggle Rx aggregation command */ |
200 | tid_num = tid_num - 100; | 200 | tid_num = tid_num - 100; |
201 | if (tid_static_rx[tid_num] == 1) { | 201 | if (tid_static_rx[tid_num] == 1) { |
202 | strcpy(state, "off "); | 202 | strcpy(state, "off"); |
203 | ieee80211_sta_stop_rx_ba_session(sta->sdata, da, tid_num, 0, | 203 | ieee80211_sta_stop_rx_ba_session(sta->sdata, da, tid_num, 0, |
204 | WLAN_REASON_QSTA_REQUIRE_SETUP); | 204 | WLAN_REASON_QSTA_REQUIRE_SETUP); |
205 | sta->ampdu_mlme.tid_state_rx[tid_num] |= | 205 | sta->ampdu_mlme.tid_state_rx[tid_num] |= |
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 87665d7bb4f9..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 */ | ||
2565 | void 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 | rcu_read_lock(); | ||
2574 | list_for_each_entry_rcu(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 | rcu_read_unlock(); | ||
2581 | break; | ||
2582 | } | ||
2583 | } | ||
2584 | EXPORT_SYMBOL(ieee80211_notify_mac); | ||
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c index 7fef8ea1f5ec..d254446b85b5 100644 --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c | |||
@@ -99,7 +99,7 @@ struct sta_info *sta_info_get(struct ieee80211_local *local, const u8 *addr) | |||
99 | 99 | ||
100 | sta = rcu_dereference(local->sta_hash[STA_HASH(addr)]); | 100 | sta = rcu_dereference(local->sta_hash[STA_HASH(addr)]); |
101 | while (sta) { | 101 | while (sta) { |
102 | if (compare_ether_addr(sta->sta.addr, addr) == 0) | 102 | if (memcmp(sta->sta.addr, addr, ETH_ALEN) == 0) |
103 | break; | 103 | break; |
104 | sta = rcu_dereference(sta->hnext); | 104 | sta = rcu_dereference(sta->hnext); |
105 | } | 105 | } |
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: |