diff options
author | David S. Miller <davem@davemloft.net> | 2012-01-18 15:59:32 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-01-18 15:59:32 -0500 |
commit | 1c659a4475ec2b2f4495e4773c417a9100cbd9de (patch) | |
tree | 26c026d7377624b2fd56f1bb369b31a8b34d043e /net | |
parent | ccb19d263fd1c9e34948e2158c53eacbff369344 (diff) | |
parent | 4f3d09de38d234ce7ffba5ec5a7e6704f983d375 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/debugfs_key.c | 7 | ||||
-rw-r--r-- | net/mac80211/mesh_hwmp.c | 8 | ||||
-rw-r--r-- | net/mac80211/mesh_plink.c | 4 | ||||
-rw-r--r-- | net/mac80211/mlme.c | 38 |
4 files changed, 37 insertions, 20 deletions
diff --git a/net/mac80211/debugfs_key.c b/net/mac80211/debugfs_key.c index 38e6101190d9..59edcd95a58d 100644 --- a/net/mac80211/debugfs_key.c +++ b/net/mac80211/debugfs_key.c | |||
@@ -225,9 +225,9 @@ KEY_OPS(key); | |||
225 | key, &key_##name##_ops); | 225 | key, &key_##name##_ops); |
226 | 226 | ||
227 | void ieee80211_debugfs_key_add(struct ieee80211_key *key) | 227 | void ieee80211_debugfs_key_add(struct ieee80211_key *key) |
228 | { | 228 | { |
229 | static int keycount; | 229 | static int keycount; |
230 | char buf[50]; | 230 | char buf[100]; |
231 | struct sta_info *sta; | 231 | struct sta_info *sta; |
232 | 232 | ||
233 | if (!key->local->debugfs.keys) | 233 | if (!key->local->debugfs.keys) |
@@ -244,7 +244,8 @@ void ieee80211_debugfs_key_add(struct ieee80211_key *key) | |||
244 | 244 | ||
245 | sta = key->sta; | 245 | sta = key->sta; |
246 | if (sta) { | 246 | if (sta) { |
247 | sprintf(buf, "../../stations/%pM", sta->sta.addr); | 247 | sprintf(buf, "../../netdev:%s/stations/%pM", |
248 | sta->sdata->name, sta->sta.addr); | ||
248 | key->debugfs.stalink = | 249 | key->debugfs.stalink = |
249 | debugfs_create_symlink("station", key->debugfs.dir, buf); | 250 | debugfs_create_symlink("station", key->debugfs.dir, buf); |
250 | } | 251 | } |
diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c index 73abb7524b2c..54df1b2bafd2 100644 --- a/net/mac80211/mesh_hwmp.c +++ b/net/mac80211/mesh_hwmp.c | |||
@@ -119,12 +119,12 @@ static int mesh_path_sel_frame_tx(enum mpath_frame_type action, u8 flags, | |||
119 | int hdr_len = offsetof(struct ieee80211_mgmt, u.action.u.mesh_action) + | 119 | int hdr_len = offsetof(struct ieee80211_mgmt, u.action.u.mesh_action) + |
120 | sizeof(mgmt->u.action.u.mesh_action); | 120 | sizeof(mgmt->u.action.u.mesh_action); |
121 | 121 | ||
122 | skb = dev_alloc_skb(local->hw.extra_tx_headroom + | 122 | skb = dev_alloc_skb(local->tx_headroom + |
123 | hdr_len + | 123 | hdr_len + |
124 | 2 + 37); /* max HWMP IE */ | 124 | 2 + 37); /* max HWMP IE */ |
125 | if (!skb) | 125 | if (!skb) |
126 | return -1; | 126 | return -1; |
127 | skb_reserve(skb, local->hw.extra_tx_headroom); | 127 | skb_reserve(skb, local->tx_headroom); |
128 | mgmt = (struct ieee80211_mgmt *) skb_put(skb, hdr_len); | 128 | mgmt = (struct ieee80211_mgmt *) skb_put(skb, hdr_len); |
129 | memset(mgmt, 0, hdr_len); | 129 | memset(mgmt, 0, hdr_len); |
130 | mgmt->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT | | 130 | mgmt->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT | |
@@ -250,12 +250,12 @@ int mesh_path_error_tx(u8 ttl, u8 *target, __le32 target_sn, | |||
250 | if (time_before(jiffies, ifmsh->next_perr)) | 250 | if (time_before(jiffies, ifmsh->next_perr)) |
251 | return -EAGAIN; | 251 | return -EAGAIN; |
252 | 252 | ||
253 | skb = dev_alloc_skb(local->hw.extra_tx_headroom + | 253 | skb = dev_alloc_skb(local->tx_headroom + |
254 | hdr_len + | 254 | hdr_len + |
255 | 2 + 15 /* PERR IE */); | 255 | 2 + 15 /* PERR IE */); |
256 | if (!skb) | 256 | if (!skb) |
257 | return -1; | 257 | return -1; |
258 | skb_reserve(skb, local->tx_headroom + local->hw.extra_tx_headroom); | 258 | skb_reserve(skb, local->tx_headroom); |
259 | mgmt = (struct ieee80211_mgmt *) skb_put(skb, hdr_len); | 259 | mgmt = (struct ieee80211_mgmt *) skb_put(skb, hdr_len); |
260 | memset(mgmt, 0, hdr_len); | 260 | memset(mgmt, 0, hdr_len); |
261 | mgmt->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT | | 261 | mgmt->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT | |
diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c index 41ef1b476442..a17251730b9e 100644 --- a/net/mac80211/mesh_plink.c +++ b/net/mac80211/mesh_plink.c | |||
@@ -172,7 +172,7 @@ static int mesh_plink_frame_tx(struct ieee80211_sub_if_data *sdata, | |||
172 | int hdr_len = offsetof(struct ieee80211_mgmt, u.action.u.self_prot) + | 172 | int hdr_len = offsetof(struct ieee80211_mgmt, u.action.u.self_prot) + |
173 | sizeof(mgmt->u.action.u.self_prot); | 173 | sizeof(mgmt->u.action.u.self_prot); |
174 | 174 | ||
175 | skb = dev_alloc_skb(local->hw.extra_tx_headroom + | 175 | skb = dev_alloc_skb(local->tx_headroom + |
176 | hdr_len + | 176 | hdr_len + |
177 | 2 + /* capability info */ | 177 | 2 + /* capability info */ |
178 | 2 + /* AID */ | 178 | 2 + /* AID */ |
@@ -186,7 +186,7 @@ static int mesh_plink_frame_tx(struct ieee80211_sub_if_data *sdata, | |||
186 | sdata->u.mesh.ie_len); | 186 | sdata->u.mesh.ie_len); |
187 | if (!skb) | 187 | if (!skb) |
188 | return -1; | 188 | return -1; |
189 | skb_reserve(skb, local->hw.extra_tx_headroom); | 189 | skb_reserve(skb, local->tx_headroom); |
190 | mgmt = (struct ieee80211_mgmt *) skb_put(skb, hdr_len); | 190 | mgmt = (struct ieee80211_mgmt *) skb_put(skb, hdr_len); |
191 | memset(mgmt, 0, hdr_len); | 191 | memset(mgmt, 0, hdr_len); |
192 | mgmt->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT | | 192 | mgmt->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT | |
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index ecb4c84c1bb3..295be92f7c77 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -2750,7 +2750,6 @@ int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata, | |||
2750 | { | 2750 | { |
2751 | struct ieee80211_local *local = sdata->local; | 2751 | struct ieee80211_local *local = sdata->local; |
2752 | struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; | 2752 | struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; |
2753 | struct ieee80211_work *wk; | ||
2754 | u8 bssid[ETH_ALEN]; | 2753 | u8 bssid[ETH_ALEN]; |
2755 | bool assoc_bss = false; | 2754 | bool assoc_bss = false; |
2756 | 2755 | ||
@@ -2763,30 +2762,47 @@ int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata, | |||
2763 | assoc_bss = true; | 2762 | assoc_bss = true; |
2764 | } else { | 2763 | } else { |
2765 | bool not_auth_yet = false; | 2764 | bool not_auth_yet = false; |
2765 | struct ieee80211_work *tmp, *wk = NULL; | ||
2766 | 2766 | ||
2767 | mutex_unlock(&ifmgd->mtx); | 2767 | mutex_unlock(&ifmgd->mtx); |
2768 | 2768 | ||
2769 | mutex_lock(&local->mtx); | 2769 | mutex_lock(&local->mtx); |
2770 | list_for_each_entry(wk, &local->work_list, list) { | 2770 | list_for_each_entry(tmp, &local->work_list, list) { |
2771 | if (wk->sdata != sdata) | 2771 | if (tmp->sdata != sdata) |
2772 | continue; | 2772 | continue; |
2773 | 2773 | ||
2774 | if (wk->type != IEEE80211_WORK_DIRECT_PROBE && | 2774 | if (tmp->type != IEEE80211_WORK_DIRECT_PROBE && |
2775 | wk->type != IEEE80211_WORK_AUTH && | 2775 | tmp->type != IEEE80211_WORK_AUTH && |
2776 | wk->type != IEEE80211_WORK_ASSOC && | 2776 | tmp->type != IEEE80211_WORK_ASSOC && |
2777 | wk->type != IEEE80211_WORK_ASSOC_BEACON_WAIT) | 2777 | tmp->type != IEEE80211_WORK_ASSOC_BEACON_WAIT) |
2778 | continue; | 2778 | continue; |
2779 | 2779 | ||
2780 | if (memcmp(req->bss->bssid, wk->filter_ta, ETH_ALEN)) | 2780 | if (memcmp(req->bss->bssid, tmp->filter_ta, ETH_ALEN)) |
2781 | continue; | 2781 | continue; |
2782 | 2782 | ||
2783 | not_auth_yet = wk->type == IEEE80211_WORK_DIRECT_PROBE; | 2783 | not_auth_yet = tmp->type == IEEE80211_WORK_DIRECT_PROBE; |
2784 | list_del_rcu(&wk->list); | 2784 | list_del_rcu(&tmp->list); |
2785 | free_work(wk); | 2785 | synchronize_rcu(); |
2786 | wk = tmp; | ||
2786 | break; | 2787 | break; |
2787 | } | 2788 | } |
2788 | mutex_unlock(&local->mtx); | 2789 | mutex_unlock(&local->mtx); |
2789 | 2790 | ||
2791 | if (wk && wk->type == IEEE80211_WORK_ASSOC) { | ||
2792 | /* clean up dummy sta & TX sync */ | ||
2793 | sta_info_destroy_addr(wk->sdata, wk->filter_ta); | ||
2794 | if (wk->assoc.synced) | ||
2795 | drv_finish_tx_sync(local, wk->sdata, | ||
2796 | wk->filter_ta, | ||
2797 | IEEE80211_TX_SYNC_ASSOC); | ||
2798 | } else if (wk && wk->type == IEEE80211_WORK_AUTH) { | ||
2799 | if (wk->probe_auth.synced) | ||
2800 | drv_finish_tx_sync(local, wk->sdata, | ||
2801 | wk->filter_ta, | ||
2802 | IEEE80211_TX_SYNC_AUTH); | ||
2803 | } | ||
2804 | kfree(wk); | ||
2805 | |||
2790 | /* | 2806 | /* |
2791 | * If somebody requests authentication and we haven't | 2807 | * If somebody requests authentication and we haven't |
2792 | * sent out an auth frame yet there's no need to send | 2808 | * sent out an auth frame yet there's no need to send |