diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/agg-rx.c | 6 | ||||
-rw-r--r-- | net/mac80211/agg-tx.c | 14 | ||||
-rw-r--r-- | net/mac80211/cfg.c | 2 | ||||
-rw-r--r-- | net/mac80211/debugfs_key.c | 2 | ||||
-rw-r--r-- | net/mac80211/debugfs_netdev.c | 55 | ||||
-rw-r--r-- | net/mac80211/debugfs_netdev.h | 9 | ||||
-rw-r--r-- | net/mac80211/debugfs_sta.c | 2 | ||||
-rw-r--r-- | net/mac80211/driver-ops.h | 4 | ||||
-rw-r--r-- | net/mac80211/driver-trace.h | 12 | ||||
-rw-r--r-- | net/mac80211/ht.c | 6 | ||||
-rw-r--r-- | net/mac80211/ibss.c | 32 | ||||
-rw-r--r-- | net/mac80211/ieee80211_i.h | 5 | ||||
-rw-r--r-- | net/mac80211/iface.c | 62 | ||||
-rw-r--r-- | net/mac80211/main.c | 17 | ||||
-rw-r--r-- | net/mac80211/mesh.c | 4 | ||||
-rw-r--r-- | net/mac80211/mesh_hwmp.c | 18 | ||||
-rw-r--r-- | net/mac80211/mesh_pathtbl.c | 6 | ||||
-rw-r--r-- | net/mac80211/mesh_plink.c | 2 | ||||
-rw-r--r-- | net/mac80211/mlme.c | 62 | ||||
-rw-r--r-- | net/mac80211/pm.c | 2 | ||||
-rw-r--r-- | net/mac80211/rx.c | 43 | ||||
-rw-r--r-- | net/mac80211/scan.c | 2 | ||||
-rw-r--r-- | net/mac80211/spectmgmt.c | 4 | ||||
-rw-r--r-- | net/mac80211/sta_info.c | 8 | ||||
-rw-r--r-- | net/mac80211/status.c | 2 | ||||
-rw-r--r-- | net/mac80211/tx.c | 33 | ||||
-rw-r--r-- | net/mac80211/util.c | 14 |
27 files changed, 221 insertions, 207 deletions
diff --git a/net/mac80211/agg-rx.c b/net/mac80211/agg-rx.c index f16d49d474b4..37ecdeddd5ac 100644 --- a/net/mac80211/agg-rx.c +++ b/net/mac80211/agg-rx.c | |||
@@ -135,7 +135,7 @@ static void ieee80211_send_addba_resp(struct ieee80211_sub_if_data *sdata, u8 *d | |||
135 | 135 | ||
136 | if (!skb) { | 136 | if (!skb) { |
137 | printk(KERN_DEBUG "%s: failed to allocate buffer " | 137 | printk(KERN_DEBUG "%s: failed to allocate buffer " |
138 | "for addba resp frame\n", sdata->dev->name); | 138 | "for addba resp frame\n", sdata->name); |
139 | return; | 139 | return; |
140 | } | 140 | } |
141 | 141 | ||
@@ -143,10 +143,10 @@ static void ieee80211_send_addba_resp(struct ieee80211_sub_if_data *sdata, u8 *d | |||
143 | mgmt = (struct ieee80211_mgmt *) skb_put(skb, 24); | 143 | mgmt = (struct ieee80211_mgmt *) skb_put(skb, 24); |
144 | memset(mgmt, 0, 24); | 144 | memset(mgmt, 0, 24); |
145 | memcpy(mgmt->da, da, ETH_ALEN); | 145 | memcpy(mgmt->da, da, ETH_ALEN); |
146 | memcpy(mgmt->sa, sdata->dev->dev_addr, ETH_ALEN); | 146 | memcpy(mgmt->sa, sdata->vif.addr, ETH_ALEN); |
147 | if (sdata->vif.type == NL80211_IFTYPE_AP || | 147 | if (sdata->vif.type == NL80211_IFTYPE_AP || |
148 | sdata->vif.type == NL80211_IFTYPE_AP_VLAN) | 148 | sdata->vif.type == NL80211_IFTYPE_AP_VLAN) |
149 | memcpy(mgmt->bssid, sdata->dev->dev_addr, ETH_ALEN); | 149 | memcpy(mgmt->bssid, sdata->vif.addr, ETH_ALEN); |
150 | else if (sdata->vif.type == NL80211_IFTYPE_STATION) | 150 | else if (sdata->vif.type == NL80211_IFTYPE_STATION) |
151 | memcpy(mgmt->bssid, sdata->u.mgd.bssid, ETH_ALEN); | 151 | memcpy(mgmt->bssid, sdata->u.mgd.bssid, ETH_ALEN); |
152 | 152 | ||
diff --git a/net/mac80211/agg-tx.c b/net/mac80211/agg-tx.c index b05de532c379..209be60564ce 100644 --- a/net/mac80211/agg-tx.c +++ b/net/mac80211/agg-tx.c | |||
@@ -58,17 +58,17 @@ static void ieee80211_send_addba_request(struct ieee80211_sub_if_data *sdata, | |||
58 | 58 | ||
59 | if (!skb) { | 59 | if (!skb) { |
60 | printk(KERN_ERR "%s: failed to allocate buffer " | 60 | printk(KERN_ERR "%s: failed to allocate buffer " |
61 | "for addba request frame\n", sdata->dev->name); | 61 | "for addba request frame\n", sdata->name); |
62 | return; | 62 | return; |
63 | } | 63 | } |
64 | skb_reserve(skb, local->hw.extra_tx_headroom); | 64 | skb_reserve(skb, local->hw.extra_tx_headroom); |
65 | mgmt = (struct ieee80211_mgmt *) skb_put(skb, 24); | 65 | mgmt = (struct ieee80211_mgmt *) skb_put(skb, 24); |
66 | memset(mgmt, 0, 24); | 66 | memset(mgmt, 0, 24); |
67 | memcpy(mgmt->da, da, ETH_ALEN); | 67 | memcpy(mgmt->da, da, ETH_ALEN); |
68 | memcpy(mgmt->sa, sdata->dev->dev_addr, ETH_ALEN); | 68 | memcpy(mgmt->sa, sdata->vif.addr, ETH_ALEN); |
69 | if (sdata->vif.type == NL80211_IFTYPE_AP || | 69 | if (sdata->vif.type == NL80211_IFTYPE_AP || |
70 | sdata->vif.type == NL80211_IFTYPE_AP_VLAN) | 70 | sdata->vif.type == NL80211_IFTYPE_AP_VLAN) |
71 | memcpy(mgmt->bssid, sdata->dev->dev_addr, ETH_ALEN); | 71 | memcpy(mgmt->bssid, sdata->vif.addr, ETH_ALEN); |
72 | else if (sdata->vif.type == NL80211_IFTYPE_STATION) | 72 | else if (sdata->vif.type == NL80211_IFTYPE_STATION) |
73 | memcpy(mgmt->bssid, sdata->u.mgd.bssid, ETH_ALEN); | 73 | memcpy(mgmt->bssid, sdata->u.mgd.bssid, ETH_ALEN); |
74 | 74 | ||
@@ -104,7 +104,7 @@ void ieee80211_send_bar(struct ieee80211_sub_if_data *sdata, u8 *ra, u16 tid, u1 | |||
104 | skb = dev_alloc_skb(sizeof(*bar) + local->hw.extra_tx_headroom); | 104 | skb = dev_alloc_skb(sizeof(*bar) + local->hw.extra_tx_headroom); |
105 | if (!skb) { | 105 | if (!skb) { |
106 | printk(KERN_ERR "%s: failed to allocate buffer for " | 106 | printk(KERN_ERR "%s: failed to allocate buffer for " |
107 | "bar frame\n", sdata->dev->name); | 107 | "bar frame\n", sdata->name); |
108 | return; | 108 | return; |
109 | } | 109 | } |
110 | skb_reserve(skb, local->hw.extra_tx_headroom); | 110 | skb_reserve(skb, local->hw.extra_tx_headroom); |
@@ -113,7 +113,7 @@ void ieee80211_send_bar(struct ieee80211_sub_if_data *sdata, u8 *ra, u16 tid, u1 | |||
113 | bar->frame_control = cpu_to_le16(IEEE80211_FTYPE_CTL | | 113 | bar->frame_control = cpu_to_le16(IEEE80211_FTYPE_CTL | |
114 | IEEE80211_STYPE_BACK_REQ); | 114 | IEEE80211_STYPE_BACK_REQ); |
115 | memcpy(bar->ra, ra, ETH_ALEN); | 115 | memcpy(bar->ra, ra, ETH_ALEN); |
116 | memcpy(bar->ta, sdata->dev->dev_addr, ETH_ALEN); | 116 | memcpy(bar->ta, sdata->vif.addr, ETH_ALEN); |
117 | bar_control |= (u16)IEEE80211_BAR_CTRL_ACK_POLICY_NORMAL; | 117 | bar_control |= (u16)IEEE80211_BAR_CTRL_ACK_POLICY_NORMAL; |
118 | bar_control |= (u16)IEEE80211_BAR_CTRL_CBMTID_COMPRESSED_BA; | 118 | bar_control |= (u16)IEEE80211_BAR_CTRL_CBMTID_COMPRESSED_BA; |
119 | bar_control |= (u16)(tid << 12); | 119 | bar_control |= (u16)(tid << 12); |
@@ -489,7 +489,7 @@ void ieee80211_start_tx_ba_cb_irqsafe(struct ieee80211_vif *vif, | |||
489 | #ifdef CONFIG_MAC80211_HT_DEBUG | 489 | #ifdef CONFIG_MAC80211_HT_DEBUG |
490 | if (net_ratelimit()) | 490 | if (net_ratelimit()) |
491 | printk(KERN_WARNING "%s: Not enough memory, " | 491 | printk(KERN_WARNING "%s: Not enough memory, " |
492 | "dropping start BA session", skb->dev->name); | 492 | "dropping start BA session", sdata->name); |
493 | #endif | 493 | #endif |
494 | return; | 494 | return; |
495 | } | 495 | } |
@@ -621,7 +621,7 @@ void ieee80211_stop_tx_ba_cb_irqsafe(struct ieee80211_vif *vif, | |||
621 | #ifdef CONFIG_MAC80211_HT_DEBUG | 621 | #ifdef CONFIG_MAC80211_HT_DEBUG |
622 | if (net_ratelimit()) | 622 | if (net_ratelimit()) |
623 | printk(KERN_WARNING "%s: Not enough memory, " | 623 | printk(KERN_WARNING "%s: Not enough memory, " |
624 | "dropping stop BA session", skb->dev->name); | 624 | "dropping stop BA session", sdata->name); |
625 | #endif | 625 | #endif |
626 | return; | 626 | return; |
627 | } | 627 | } |
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 14e1f4015a72..fcfa1bf776a7 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
@@ -729,7 +729,7 @@ static int ieee80211_add_station(struct wiphy *wiphy, struct net_device *dev, | |||
729 | } else | 729 | } else |
730 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); | 730 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
731 | 731 | ||
732 | if (compare_ether_addr(mac, dev->dev_addr) == 0) | 732 | if (compare_ether_addr(mac, sdata->vif.addr) == 0) |
733 | return -EINVAL; | 733 | return -EINVAL; |
734 | 734 | ||
735 | if (is_multicast_ether_addr(mac)) | 735 | if (is_multicast_ether_addr(mac)) |
diff --git a/net/mac80211/debugfs_key.c b/net/mac80211/debugfs_key.c index e0f5224630da..d12e743cb4e1 100644 --- a/net/mac80211/debugfs_key.c +++ b/net/mac80211/debugfs_key.c | |||
@@ -56,7 +56,7 @@ KEY_CONF_FILE(keyidx, D); | |||
56 | KEY_CONF_FILE(hw_key_idx, D); | 56 | KEY_CONF_FILE(hw_key_idx, D); |
57 | KEY_FILE(flags, X); | 57 | KEY_FILE(flags, X); |
58 | KEY_FILE(tx_rx_count, D); | 58 | KEY_FILE(tx_rx_count, D); |
59 | KEY_READ(ifindex, sdata->dev->ifindex, 20, "%d\n"); | 59 | KEY_READ(ifindex, sdata->name, IFNAMSIZ + 2, "%s\n"); |
60 | KEY_OPS(ifindex); | 60 | KEY_OPS(ifindex); |
61 | 61 | ||
62 | static ssize_t key_algorithm_read(struct file *file, | 62 | static ssize_t key_algorithm_read(struct file *file, |
diff --git a/net/mac80211/debugfs_netdev.c b/net/mac80211/debugfs_netdev.c index 472b2039906c..5d9c797635a9 100644 --- a/net/mac80211/debugfs_netdev.c +++ b/net/mac80211/debugfs_netdev.c | |||
@@ -280,16 +280,11 @@ static void add_files(struct ieee80211_sub_if_data *sdata) | |||
280 | } | 280 | } |
281 | } | 281 | } |
282 | 282 | ||
283 | static int notif_registered; | ||
284 | |||
285 | void ieee80211_debugfs_add_netdev(struct ieee80211_sub_if_data *sdata) | 283 | void ieee80211_debugfs_add_netdev(struct ieee80211_sub_if_data *sdata) |
286 | { | 284 | { |
287 | char buf[10+IFNAMSIZ]; | 285 | char buf[10+IFNAMSIZ]; |
288 | 286 | ||
289 | if (!notif_registered) | 287 | sprintf(buf, "netdev:%s", sdata->name); |
290 | return; | ||
291 | |||
292 | sprintf(buf, "netdev:%s", sdata->dev->name); | ||
293 | sdata->debugfs.dir = debugfs_create_dir(buf, | 288 | sdata->debugfs.dir = debugfs_create_dir(buf, |
294 | sdata->local->hw.wiphy->debugfsdir); | 289 | sdata->local->hw.wiphy->debugfsdir); |
295 | add_files(sdata); | 290 | add_files(sdata); |
@@ -304,58 +299,18 @@ void ieee80211_debugfs_remove_netdev(struct ieee80211_sub_if_data *sdata) | |||
304 | sdata->debugfs.dir = NULL; | 299 | sdata->debugfs.dir = NULL; |
305 | } | 300 | } |
306 | 301 | ||
307 | static int netdev_notify(struct notifier_block *nb, | 302 | void ieee80211_debugfs_rename_netdev(struct ieee80211_sub_if_data *sdata) |
308 | unsigned long state, | ||
309 | void *ndev) | ||
310 | { | 303 | { |
311 | struct net_device *dev = ndev; | ||
312 | struct dentry *dir; | 304 | struct dentry *dir; |
313 | struct ieee80211_sub_if_data *sdata; | 305 | char buf[10 + IFNAMSIZ]; |
314 | char buf[10+IFNAMSIZ]; | ||
315 | |||
316 | if (state != NETDEV_CHANGENAME) | ||
317 | return 0; | ||
318 | |||
319 | if (!dev->ieee80211_ptr || !dev->ieee80211_ptr->wiphy) | ||
320 | return 0; | ||
321 | |||
322 | if (dev->ieee80211_ptr->wiphy->privid != mac80211_wiphy_privid) | ||
323 | return 0; | ||
324 | |||
325 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); | ||
326 | 306 | ||
327 | dir = sdata->debugfs.dir; | 307 | dir = sdata->debugfs.dir; |
328 | 308 | ||
329 | if (!dir) | 309 | if (!dir) |
330 | return 0; | 310 | return; |
331 | 311 | ||
332 | sprintf(buf, "netdev:%s", dev->name); | 312 | sprintf(buf, "netdev:%s", sdata->name); |
333 | if (!debugfs_rename(dir->d_parent, dir, dir->d_parent, buf)) | 313 | if (!debugfs_rename(dir->d_parent, dir, dir->d_parent, buf)) |
334 | printk(KERN_ERR "mac80211: debugfs: failed to rename debugfs " | 314 | printk(KERN_ERR "mac80211: debugfs: failed to rename debugfs " |
335 | "dir to %s\n", buf); | 315 | "dir to %s\n", buf); |
336 | |||
337 | return 0; | ||
338 | } | ||
339 | |||
340 | static struct notifier_block mac80211_debugfs_netdev_notifier = { | ||
341 | .notifier_call = netdev_notify, | ||
342 | }; | ||
343 | |||
344 | void ieee80211_debugfs_netdev_init(void) | ||
345 | { | ||
346 | int err; | ||
347 | |||
348 | err = register_netdevice_notifier(&mac80211_debugfs_netdev_notifier); | ||
349 | if (err) { | ||
350 | printk(KERN_ERR | ||
351 | "mac80211: failed to install netdev notifier," | ||
352 | " disabling per-netdev debugfs!\n"); | ||
353 | } else | ||
354 | notif_registered = 1; | ||
355 | } | ||
356 | |||
357 | void ieee80211_debugfs_netdev_exit(void) | ||
358 | { | ||
359 | unregister_netdevice_notifier(&mac80211_debugfs_netdev_notifier); | ||
360 | notif_registered = 0; | ||
361 | } | 316 | } |
diff --git a/net/mac80211/debugfs_netdev.h b/net/mac80211/debugfs_netdev.h index 7af731f0b731..79025e79f4d6 100644 --- a/net/mac80211/debugfs_netdev.h +++ b/net/mac80211/debugfs_netdev.h | |||
@@ -6,8 +6,7 @@ | |||
6 | #ifdef CONFIG_MAC80211_DEBUGFS | 6 | #ifdef CONFIG_MAC80211_DEBUGFS |
7 | void ieee80211_debugfs_add_netdev(struct ieee80211_sub_if_data *sdata); | 7 | void ieee80211_debugfs_add_netdev(struct ieee80211_sub_if_data *sdata); |
8 | void ieee80211_debugfs_remove_netdev(struct ieee80211_sub_if_data *sdata); | 8 | void ieee80211_debugfs_remove_netdev(struct ieee80211_sub_if_data *sdata); |
9 | void ieee80211_debugfs_netdev_init(void); | 9 | void ieee80211_debugfs_rename_netdev(struct ieee80211_sub_if_data *sdata); |
10 | void ieee80211_debugfs_netdev_exit(void); | ||
11 | #else | 10 | #else |
12 | static inline void ieee80211_debugfs_add_netdev( | 11 | static inline void ieee80211_debugfs_add_netdev( |
13 | struct ieee80211_sub_if_data *sdata) | 12 | struct ieee80211_sub_if_data *sdata) |
@@ -15,10 +14,8 @@ static inline void ieee80211_debugfs_add_netdev( | |||
15 | static inline void ieee80211_debugfs_remove_netdev( | 14 | static inline void ieee80211_debugfs_remove_netdev( |
16 | struct ieee80211_sub_if_data *sdata) | 15 | struct ieee80211_sub_if_data *sdata) |
17 | {} | 16 | {} |
18 | static inline void ieee80211_debugfs_netdev_init(void) | 17 | static inline void ieee80211_debugfs_rename_netdev( |
19 | {} | 18 | struct ieee80211_sub_if_data *sdata) |
20 | |||
21 | static inline void ieee80211_debugfs_netdev_exit(void) | ||
22 | {} | 19 | {} |
23 | #endif | 20 | #endif |
24 | 21 | ||
diff --git a/net/mac80211/debugfs_sta.c b/net/mac80211/debugfs_sta.c index 3f41608c8081..374ff6f98a9c 100644 --- a/net/mac80211/debugfs_sta.c +++ b/net/mac80211/debugfs_sta.c | |||
@@ -44,7 +44,7 @@ static const struct file_operations sta_ ##name## _ops = { \ | |||
44 | STA_OPS(name) | 44 | STA_OPS(name) |
45 | 45 | ||
46 | STA_FILE(aid, sta.aid, D); | 46 | STA_FILE(aid, sta.aid, D); |
47 | STA_FILE(dev, sdata->dev->name, S); | 47 | STA_FILE(dev, sdata->name, S); |
48 | STA_FILE(rx_packets, rx_packets, LU); | 48 | STA_FILE(rx_packets, rx_packets, LU); |
49 | STA_FILE(tx_packets, tx_packets, LU); | 49 | STA_FILE(tx_packets, tx_packets, LU); |
50 | STA_FILE(rx_bytes, rx_bytes, LU); | 50 | STA_FILE(rx_bytes, rx_bytes, LU); |
diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h index 921dd9c9ff62..a4002657dac5 100644 --- a/net/mac80211/driver-ops.h +++ b/net/mac80211/driver-ops.h | |||
@@ -39,7 +39,7 @@ static inline int drv_add_interface(struct ieee80211_local *local, | |||
39 | struct ieee80211_if_init_conf *conf) | 39 | struct ieee80211_if_init_conf *conf) |
40 | { | 40 | { |
41 | int ret = local->ops->add_interface(&local->hw, conf); | 41 | int ret = local->ops->add_interface(&local->hw, conf); |
42 | trace_drv_add_interface(local, conf->mac_addr, conf->vif, ret); | 42 | trace_drv_add_interface(local, conf->vif, ret); |
43 | return ret; | 43 | return ret; |
44 | } | 44 | } |
45 | 45 | ||
@@ -47,7 +47,7 @@ static inline void drv_remove_interface(struct ieee80211_local *local, | |||
47 | struct ieee80211_if_init_conf *conf) | 47 | struct ieee80211_if_init_conf *conf) |
48 | { | 48 | { |
49 | local->ops->remove_interface(&local->hw, conf); | 49 | local->ops->remove_interface(&local->hw, conf); |
50 | trace_drv_remove_interface(local, conf->mac_addr, conf->vif); | 50 | trace_drv_remove_interface(local, conf->vif); |
51 | } | 51 | } |
52 | 52 | ||
53 | static inline int drv_config(struct ieee80211_local *local, u32 changed) | 53 | static inline int drv_config(struct ieee80211_local *local, u32 changed) |
diff --git a/net/mac80211/driver-trace.h b/net/mac80211/driver-trace.h index ee94ea0c67e9..7b155b947209 100644 --- a/net/mac80211/driver-trace.h +++ b/net/mac80211/driver-trace.h | |||
@@ -70,11 +70,10 @@ TRACE_EVENT(drv_stop, | |||
70 | 70 | ||
71 | TRACE_EVENT(drv_add_interface, | 71 | TRACE_EVENT(drv_add_interface, |
72 | TP_PROTO(struct ieee80211_local *local, | 72 | TP_PROTO(struct ieee80211_local *local, |
73 | const u8 *addr, | ||
74 | struct ieee80211_vif *vif, | 73 | struct ieee80211_vif *vif, |
75 | int ret), | 74 | int ret), |
76 | 75 | ||
77 | TP_ARGS(local, addr, vif, ret), | 76 | TP_ARGS(local, vif, ret), |
78 | 77 | ||
79 | TP_STRUCT__entry( | 78 | TP_STRUCT__entry( |
80 | LOCAL_ENTRY | 79 | LOCAL_ENTRY |
@@ -86,7 +85,7 @@ TRACE_EVENT(drv_add_interface, | |||
86 | TP_fast_assign( | 85 | TP_fast_assign( |
87 | LOCAL_ASSIGN; | 86 | LOCAL_ASSIGN; |
88 | VIF_ASSIGN; | 87 | VIF_ASSIGN; |
89 | memcpy(__entry->addr, addr, 6); | 88 | memcpy(__entry->addr, vif->addr, 6); |
90 | __entry->ret = ret; | 89 | __entry->ret = ret; |
91 | ), | 90 | ), |
92 | 91 | ||
@@ -97,10 +96,9 @@ TRACE_EVENT(drv_add_interface, | |||
97 | ); | 96 | ); |
98 | 97 | ||
99 | TRACE_EVENT(drv_remove_interface, | 98 | TRACE_EVENT(drv_remove_interface, |
100 | TP_PROTO(struct ieee80211_local *local, | 99 | TP_PROTO(struct ieee80211_local *local, struct ieee80211_vif *vif), |
101 | const u8 *addr, struct ieee80211_vif *vif), | ||
102 | 100 | ||
103 | TP_ARGS(local, addr, vif), | 101 | TP_ARGS(local, vif), |
104 | 102 | ||
105 | TP_STRUCT__entry( | 103 | TP_STRUCT__entry( |
106 | LOCAL_ENTRY | 104 | LOCAL_ENTRY |
@@ -111,7 +109,7 @@ TRACE_EVENT(drv_remove_interface, | |||
111 | TP_fast_assign( | 109 | TP_fast_assign( |
112 | LOCAL_ASSIGN; | 110 | LOCAL_ASSIGN; |
113 | VIF_ASSIGN; | 111 | VIF_ASSIGN; |
114 | memcpy(__entry->addr, addr, 6); | 112 | memcpy(__entry->addr, vif->addr, 6); |
115 | ), | 113 | ), |
116 | 114 | ||
117 | TP_printk( | 115 | TP_printk( |
diff --git a/net/mac80211/ht.c b/net/mac80211/ht.c index 3787455fb696..45ebd062a2fb 100644 --- a/net/mac80211/ht.c +++ b/net/mac80211/ht.c | |||
@@ -106,7 +106,7 @@ void ieee80211_send_delba(struct ieee80211_sub_if_data *sdata, | |||
106 | 106 | ||
107 | if (!skb) { | 107 | if (!skb) { |
108 | printk(KERN_ERR "%s: failed to allocate buffer " | 108 | printk(KERN_ERR "%s: failed to allocate buffer " |
109 | "for delba frame\n", sdata->dev->name); | 109 | "for delba frame\n", sdata->name); |
110 | return; | 110 | return; |
111 | } | 111 | } |
112 | 112 | ||
@@ -114,10 +114,10 @@ void ieee80211_send_delba(struct ieee80211_sub_if_data *sdata, | |||
114 | mgmt = (struct ieee80211_mgmt *) skb_put(skb, 24); | 114 | mgmt = (struct ieee80211_mgmt *) skb_put(skb, 24); |
115 | memset(mgmt, 0, 24); | 115 | memset(mgmt, 0, 24); |
116 | memcpy(mgmt->da, da, ETH_ALEN); | 116 | memcpy(mgmt->da, da, ETH_ALEN); |
117 | memcpy(mgmt->sa, sdata->dev->dev_addr, ETH_ALEN); | 117 | memcpy(mgmt->sa, sdata->vif.addr, ETH_ALEN); |
118 | if (sdata->vif.type == NL80211_IFTYPE_AP || | 118 | if (sdata->vif.type == NL80211_IFTYPE_AP || |
119 | sdata->vif.type == NL80211_IFTYPE_AP_VLAN) | 119 | sdata->vif.type == NL80211_IFTYPE_AP_VLAN) |
120 | memcpy(mgmt->bssid, sdata->dev->dev_addr, ETH_ALEN); | 120 | memcpy(mgmt->bssid, sdata->vif.addr, ETH_ALEN); |
121 | else if (sdata->vif.type == NL80211_IFTYPE_STATION) | 121 | else if (sdata->vif.type == NL80211_IFTYPE_STATION) |
122 | memcpy(mgmt->bssid, sdata->u.mgd.bssid, ETH_ALEN); | 122 | memcpy(mgmt->bssid, sdata->u.mgd.bssid, ETH_ALEN); |
123 | 123 | ||
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c index 1925be9b82fb..ef6c6b2401d1 100644 --- a/net/mac80211/ibss.c +++ b/net/mac80211/ibss.c | |||
@@ -117,7 +117,7 @@ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata, | |||
117 | mgmt->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT | | 117 | mgmt->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT | |
118 | IEEE80211_STYPE_PROBE_RESP); | 118 | IEEE80211_STYPE_PROBE_RESP); |
119 | memset(mgmt->da, 0xff, ETH_ALEN); | 119 | memset(mgmt->da, 0xff, ETH_ALEN); |
120 | memcpy(mgmt->sa, sdata->dev->dev_addr, ETH_ALEN); | 120 | memcpy(mgmt->sa, sdata->vif.addr, ETH_ALEN); |
121 | memcpy(mgmt->bssid, ifibss->bssid, ETH_ALEN); | 121 | memcpy(mgmt->bssid, ifibss->bssid, ETH_ALEN); |
122 | mgmt->u.beacon.beacon_int = cpu_to_le16(beacon_int); | 122 | mgmt->u.beacon.beacon_int = cpu_to_le16(beacon_int); |
123 | mgmt->u.beacon.timestamp = cpu_to_le64(tsf); | 123 | mgmt->u.beacon.timestamp = cpu_to_le64(tsf); |
@@ -266,7 +266,7 @@ static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata, | |||
266 | printk(KERN_DEBUG "%s: updated supp_rates set " | 266 | printk(KERN_DEBUG "%s: updated supp_rates set " |
267 | "for %pM based on beacon info (0x%llx | " | 267 | "for %pM based on beacon info (0x%llx | " |
268 | "0x%llx -> 0x%llx)\n", | 268 | "0x%llx -> 0x%llx)\n", |
269 | sdata->dev->name, | 269 | sdata->name, |
270 | sta->sta.addr, | 270 | sta->sta.addr, |
271 | (unsigned long long) prev_rates, | 271 | (unsigned long long) prev_rates, |
272 | (unsigned long long) supp_rates, | 272 | (unsigned long long) supp_rates, |
@@ -364,7 +364,7 @@ static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata, | |||
364 | #ifdef CONFIG_MAC80211_IBSS_DEBUG | 364 | #ifdef CONFIG_MAC80211_IBSS_DEBUG |
365 | printk(KERN_DEBUG "%s: beacon TSF higher than " | 365 | printk(KERN_DEBUG "%s: beacon TSF higher than " |
366 | "local TSF - IBSS merge with BSSID %pM\n", | 366 | "local TSF - IBSS merge with BSSID %pM\n", |
367 | sdata->dev->name, mgmt->bssid); | 367 | sdata->name, mgmt->bssid); |
368 | #endif | 368 | #endif |
369 | ieee80211_sta_join_ibss(sdata, bss); | 369 | ieee80211_sta_join_ibss(sdata, bss); |
370 | ieee80211_ibss_add_sta(sdata, mgmt->bssid, mgmt->sa, supp_rates); | 370 | ieee80211_ibss_add_sta(sdata, mgmt->bssid, mgmt->sa, supp_rates); |
@@ -393,7 +393,7 @@ struct sta_info *ieee80211_ibss_add_sta(struct ieee80211_sub_if_data *sdata, | |||
393 | if (local->num_sta >= IEEE80211_IBSS_MAX_STA_ENTRIES) { | 393 | if (local->num_sta >= IEEE80211_IBSS_MAX_STA_ENTRIES) { |
394 | if (net_ratelimit()) | 394 | if (net_ratelimit()) |
395 | printk(KERN_DEBUG "%s: No room for a new IBSS STA entry %pM\n", | 395 | printk(KERN_DEBUG "%s: No room for a new IBSS STA entry %pM\n", |
396 | sdata->dev->name, addr); | 396 | sdata->name, addr); |
397 | return NULL; | 397 | return NULL; |
398 | } | 398 | } |
399 | 399 | ||
@@ -402,7 +402,7 @@ struct sta_info *ieee80211_ibss_add_sta(struct ieee80211_sub_if_data *sdata, | |||
402 | 402 | ||
403 | #ifdef CONFIG_MAC80211_VERBOSE_DEBUG | 403 | #ifdef CONFIG_MAC80211_VERBOSE_DEBUG |
404 | printk(KERN_DEBUG "%s: Adding new IBSS station %pM (dev=%s)\n", | 404 | printk(KERN_DEBUG "%s: Adding new IBSS station %pM (dev=%s)\n", |
405 | wiphy_name(local->hw.wiphy), addr, sdata->dev->name); | 405 | wiphy_name(local->hw.wiphy), addr, sdata->name); |
406 | #endif | 406 | #endif |
407 | 407 | ||
408 | sta = sta_info_alloc(sdata, addr, GFP_ATOMIC); | 408 | sta = sta_info_alloc(sdata, addr, GFP_ATOMIC); |
@@ -466,7 +466,7 @@ static void ieee80211_sta_merge_ibss(struct ieee80211_sub_if_data *sdata) | |||
466 | return; | 466 | return; |
467 | 467 | ||
468 | printk(KERN_DEBUG "%s: No active IBSS STAs - trying to scan for other " | 468 | printk(KERN_DEBUG "%s: No active IBSS STAs - trying to scan for other " |
469 | "IBSS networks with same SSID (merge)\n", sdata->dev->name); | 469 | "IBSS networks with same SSID (merge)\n", sdata->name); |
470 | 470 | ||
471 | ieee80211_request_internal_scan(sdata, ifibss->ssid, ifibss->ssid_len); | 471 | ieee80211_request_internal_scan(sdata, ifibss->ssid, ifibss->ssid_len); |
472 | } | 472 | } |
@@ -488,13 +488,13 @@ static void ieee80211_sta_create_ibss(struct ieee80211_sub_if_data *sdata) | |||
488 | * random number generator get different BSSID. */ | 488 | * random number generator get different BSSID. */ |
489 | get_random_bytes(bssid, ETH_ALEN); | 489 | get_random_bytes(bssid, ETH_ALEN); |
490 | for (i = 0; i < ETH_ALEN; i++) | 490 | for (i = 0; i < ETH_ALEN; i++) |
491 | bssid[i] ^= sdata->dev->dev_addr[i]; | 491 | bssid[i] ^= sdata->vif.addr[i]; |
492 | bssid[0] &= ~0x01; | 492 | bssid[0] &= ~0x01; |
493 | bssid[0] |= 0x02; | 493 | bssid[0] |= 0x02; |
494 | } | 494 | } |
495 | 495 | ||
496 | printk(KERN_DEBUG "%s: Creating new IBSS network, BSSID %pM\n", | 496 | printk(KERN_DEBUG "%s: Creating new IBSS network, BSSID %pM\n", |
497 | sdata->dev->name, bssid); | 497 | sdata->name, bssid); |
498 | 498 | ||
499 | sband = local->hw.wiphy->bands[ifibss->channel->band]; | 499 | sband = local->hw.wiphy->bands[ifibss->channel->band]; |
500 | 500 | ||
@@ -523,7 +523,7 @@ static void ieee80211_sta_find_ibss(struct ieee80211_sub_if_data *sdata) | |||
523 | active_ibss = ieee80211_sta_active_ibss(sdata); | 523 | active_ibss = ieee80211_sta_active_ibss(sdata); |
524 | #ifdef CONFIG_MAC80211_IBSS_DEBUG | 524 | #ifdef CONFIG_MAC80211_IBSS_DEBUG |
525 | printk(KERN_DEBUG "%s: sta_find_ibss (active_ibss=%d)\n", | 525 | printk(KERN_DEBUG "%s: sta_find_ibss (active_ibss=%d)\n", |
526 | sdata->dev->name, active_ibss); | 526 | sdata->name, active_ibss); |
527 | #endif /* CONFIG_MAC80211_IBSS_DEBUG */ | 527 | #endif /* CONFIG_MAC80211_IBSS_DEBUG */ |
528 | 528 | ||
529 | if (active_ibss) | 529 | if (active_ibss) |
@@ -552,7 +552,7 @@ static void ieee80211_sta_find_ibss(struct ieee80211_sub_if_data *sdata) | |||
552 | 552 | ||
553 | printk(KERN_DEBUG "%s: Selected IBSS BSSID %pM" | 553 | printk(KERN_DEBUG "%s: Selected IBSS BSSID %pM" |
554 | " based on configured SSID\n", | 554 | " based on configured SSID\n", |
555 | sdata->dev->name, bss->cbss.bssid); | 555 | sdata->name, bss->cbss.bssid); |
556 | 556 | ||
557 | ieee80211_sta_join_ibss(sdata, bss); | 557 | ieee80211_sta_join_ibss(sdata, bss); |
558 | ieee80211_rx_bss_put(local, bss); | 558 | ieee80211_rx_bss_put(local, bss); |
@@ -571,7 +571,7 @@ static void ieee80211_sta_find_ibss(struct ieee80211_sub_if_data *sdata) | |||
571 | } else if (time_after(jiffies, ifibss->last_scan_completed + | 571 | } else if (time_after(jiffies, ifibss->last_scan_completed + |
572 | IEEE80211_SCAN_INTERVAL)) { | 572 | IEEE80211_SCAN_INTERVAL)) { |
573 | printk(KERN_DEBUG "%s: Trigger new scan to find an IBSS to " | 573 | printk(KERN_DEBUG "%s: Trigger new scan to find an IBSS to " |
574 | "join\n", sdata->dev->name); | 574 | "join\n", sdata->name); |
575 | 575 | ||
576 | ieee80211_request_internal_scan(sdata, ifibss->ssid, | 576 | ieee80211_request_internal_scan(sdata, ifibss->ssid, |
577 | ifibss->ssid_len); | 577 | ifibss->ssid_len); |
@@ -585,7 +585,7 @@ static void ieee80211_sta_find_ibss(struct ieee80211_sub_if_data *sdata) | |||
585 | return; | 585 | return; |
586 | } | 586 | } |
587 | printk(KERN_DEBUG "%s: IBSS not allowed on" | 587 | printk(KERN_DEBUG "%s: IBSS not allowed on" |
588 | " %d MHz\n", sdata->dev->name, | 588 | " %d MHz\n", sdata->name, |
589 | local->hw.conf.channel->center_freq); | 589 | local->hw.conf.channel->center_freq); |
590 | 590 | ||
591 | /* No IBSS found - decrease scan interval and continue | 591 | /* No IBSS found - decrease scan interval and continue |
@@ -619,7 +619,7 @@ static void ieee80211_rx_mgmt_probe_req(struct ieee80211_sub_if_data *sdata, | |||
619 | #ifdef CONFIG_MAC80211_IBSS_DEBUG | 619 | #ifdef CONFIG_MAC80211_IBSS_DEBUG |
620 | printk(KERN_DEBUG "%s: RX ProbeReq SA=%pM DA=%pM BSSID=%pM" | 620 | printk(KERN_DEBUG "%s: RX ProbeReq SA=%pM DA=%pM BSSID=%pM" |
621 | " (tx_last_beacon=%d)\n", | 621 | " (tx_last_beacon=%d)\n", |
622 | sdata->dev->name, mgmt->sa, mgmt->da, | 622 | sdata->name, mgmt->sa, mgmt->da, |
623 | mgmt->bssid, tx_last_beacon); | 623 | mgmt->bssid, tx_last_beacon); |
624 | #endif /* CONFIG_MAC80211_IBSS_DEBUG */ | 624 | #endif /* CONFIG_MAC80211_IBSS_DEBUG */ |
625 | 625 | ||
@@ -637,7 +637,7 @@ static void ieee80211_rx_mgmt_probe_req(struct ieee80211_sub_if_data *sdata, | |||
637 | #ifdef CONFIG_MAC80211_IBSS_DEBUG | 637 | #ifdef CONFIG_MAC80211_IBSS_DEBUG |
638 | printk(KERN_DEBUG "%s: Invalid SSID IE in ProbeReq " | 638 | printk(KERN_DEBUG "%s: Invalid SSID IE in ProbeReq " |
639 | "from %pM\n", | 639 | "from %pM\n", |
640 | sdata->dev->name, mgmt->sa); | 640 | sdata->name, mgmt->sa); |
641 | #endif | 641 | #endif |
642 | return; | 642 | return; |
643 | } | 643 | } |
@@ -657,7 +657,7 @@ static void ieee80211_rx_mgmt_probe_req(struct ieee80211_sub_if_data *sdata, | |||
657 | memcpy(resp->da, mgmt->sa, ETH_ALEN); | 657 | memcpy(resp->da, mgmt->sa, ETH_ALEN); |
658 | #ifdef CONFIG_MAC80211_IBSS_DEBUG | 658 | #ifdef CONFIG_MAC80211_IBSS_DEBUG |
659 | printk(KERN_DEBUG "%s: Sending ProbeResp to %pM\n", | 659 | printk(KERN_DEBUG "%s: Sending ProbeResp to %pM\n", |
660 | sdata->dev->name, resp->da); | 660 | sdata->name, resp->da); |
661 | #endif /* CONFIG_MAC80211_IBSS_DEBUG */ | 661 | #endif /* CONFIG_MAC80211_IBSS_DEBUG */ |
662 | IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT; | 662 | IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT; |
663 | ieee80211_tx_skb(sdata, skb); | 663 | ieee80211_tx_skb(sdata, skb); |
@@ -671,7 +671,7 @@ static void ieee80211_rx_mgmt_probe_resp(struct ieee80211_sub_if_data *sdata, | |||
671 | size_t baselen; | 671 | size_t baselen; |
672 | struct ieee802_11_elems elems; | 672 | struct ieee802_11_elems elems; |
673 | 673 | ||
674 | if (memcmp(mgmt->da, sdata->dev->dev_addr, ETH_ALEN)) | 674 | if (memcmp(mgmt->da, sdata->vif.addr, ETH_ALEN)) |
675 | return; /* ignore ProbeResp to foreign address */ | 675 | return; /* ignore ProbeResp to foreign address */ |
676 | 676 | ||
677 | baselen = (u8 *) mgmt->u.probe_resp.variable - (u8 *) mgmt; | 677 | baselen = (u8 *) mgmt->u.probe_resp.variable - (u8 *) mgmt; |
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index 419f186cfcf0..178e329f9257 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h | |||
@@ -140,7 +140,6 @@ typedef unsigned __bitwise__ ieee80211_tx_result; | |||
140 | 140 | ||
141 | struct ieee80211_tx_data { | 141 | struct ieee80211_tx_data { |
142 | struct sk_buff *skb; | 142 | struct sk_buff *skb; |
143 | struct net_device *dev; | ||
144 | struct ieee80211_local *local; | 143 | struct ieee80211_local *local; |
145 | struct ieee80211_sub_if_data *sdata; | 144 | struct ieee80211_sub_if_data *sdata; |
146 | struct sta_info *sta; | 145 | struct sta_info *sta; |
@@ -433,6 +432,8 @@ struct ieee80211_sub_if_data { | |||
433 | 432 | ||
434 | int drop_unencrypted; | 433 | int drop_unencrypted; |
435 | 434 | ||
435 | char name[IFNAMSIZ]; | ||
436 | |||
436 | /* | 437 | /* |
437 | * keep track of whether the HT opmode (stored in | 438 | * keep track of whether the HT opmode (stored in |
438 | * vif.bss_info.ht_operation_mode) is valid. | 439 | * vif.bss_info.ht_operation_mode) is valid. |
@@ -937,6 +938,8 @@ void ieee80211_rx_bss_put(struct ieee80211_local *local, | |||
937 | struct ieee80211_bss *bss); | 938 | struct ieee80211_bss *bss); |
938 | 939 | ||
939 | /* interface handling */ | 940 | /* interface handling */ |
941 | int ieee80211_iface_init(void); | ||
942 | void ieee80211_iface_exit(void); | ||
940 | int ieee80211_if_add(struct ieee80211_local *local, const char *name, | 943 | int ieee80211_if_add(struct ieee80211_local *local, const char *name, |
941 | struct net_device **new_dev, enum nl80211_iftype type, | 944 | struct net_device **new_dev, enum nl80211_iftype type, |
942 | struct vif_params *params); | 945 | struct vif_params *params); |
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c index 80c16f6e2af6..a6e6da3cab70 100644 --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c | |||
@@ -60,6 +60,22 @@ static int ieee80211_change_mtu(struct net_device *dev, int new_mtu) | |||
60 | return 0; | 60 | return 0; |
61 | } | 61 | } |
62 | 62 | ||
63 | static int ieee80211_change_mac(struct net_device *dev, void *addr) | ||
64 | { | ||
65 | struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); | ||
66 | int ret; | ||
67 | |||
68 | if (netif_running(dev)) | ||
69 | return -EBUSY; | ||
70 | |||
71 | ret = eth_mac_addr(dev, addr); | ||
72 | |||
73 | if (ret == 0) | ||
74 | memcpy(sdata->vif.addr, addr, ETH_ALEN); | ||
75 | |||
76 | return ret; | ||
77 | } | ||
78 | |||
63 | static inline int identical_mac_addr_allowed(int type1, int type2) | 79 | static inline int identical_mac_addr_allowed(int type1, int type2) |
64 | { | 80 | { |
65 | return type1 == NL80211_IFTYPE_MONITOR || | 81 | return type1 == NL80211_IFTYPE_MONITOR || |
@@ -234,7 +250,7 @@ static int ieee80211_open(struct net_device *dev) | |||
234 | default: | 250 | default: |
235 | conf.vif = &sdata->vif; | 251 | conf.vif = &sdata->vif; |
236 | conf.type = sdata->vif.type; | 252 | conf.type = sdata->vif.type; |
237 | conf.mac_addr = dev->dev_addr; | 253 | conf.mac_addr = sdata->vif.addr; |
238 | res = drv_add_interface(local, &conf); | 254 | res = drv_add_interface(local, &conf); |
239 | if (res) | 255 | if (res) |
240 | goto err_stop; | 256 | goto err_stop; |
@@ -514,7 +530,7 @@ static int ieee80211_stop(struct net_device *dev) | |||
514 | 530 | ||
515 | conf.vif = &sdata->vif; | 531 | conf.vif = &sdata->vif; |
516 | conf.type = sdata->vif.type; | 532 | conf.type = sdata->vif.type; |
517 | conf.mac_addr = dev->dev_addr; | 533 | conf.mac_addr = sdata->vif.addr; |
518 | /* disable all keys for as long as this netdev is down */ | 534 | /* disable all keys for as long as this netdev is down */ |
519 | ieee80211_disable_keys(sdata); | 535 | ieee80211_disable_keys(sdata); |
520 | drv_remove_interface(local, &conf); | 536 | drv_remove_interface(local, &conf); |
@@ -651,7 +667,7 @@ static const struct net_device_ops ieee80211_dataif_ops = { | |||
651 | .ndo_start_xmit = ieee80211_subif_start_xmit, | 667 | .ndo_start_xmit = ieee80211_subif_start_xmit, |
652 | .ndo_set_multicast_list = ieee80211_set_multicast_list, | 668 | .ndo_set_multicast_list = ieee80211_set_multicast_list, |
653 | .ndo_change_mtu = ieee80211_change_mtu, | 669 | .ndo_change_mtu = ieee80211_change_mtu, |
654 | .ndo_set_mac_address = eth_mac_addr, | 670 | .ndo_set_mac_address = ieee80211_change_mac, |
655 | }; | 671 | }; |
656 | 672 | ||
657 | static const struct net_device_ops ieee80211_monitorif_ops = { | 673 | static const struct net_device_ops ieee80211_monitorif_ops = { |
@@ -794,6 +810,8 @@ int ieee80211_if_add(struct ieee80211_local *local, const char *name, | |||
794 | /* don't use IEEE80211_DEV_TO_SUB_IF because it checks too much */ | 810 | /* don't use IEEE80211_DEV_TO_SUB_IF because it checks too much */ |
795 | sdata = netdev_priv(ndev); | 811 | sdata = netdev_priv(ndev); |
796 | ndev->ieee80211_ptr = &sdata->wdev; | 812 | ndev->ieee80211_ptr = &sdata->wdev; |
813 | memcpy(sdata->vif.addr, ndev->dev_addr, ETH_ALEN); | ||
814 | memcpy(sdata->name, ndev->name, IFNAMSIZ); | ||
797 | 815 | ||
798 | /* initialise type-independent data */ | 816 | /* initialise type-independent data */ |
799 | sdata->wdev.wiphy = local->hw.wiphy; | 817 | sdata->wdev.wiphy = local->hw.wiphy; |
@@ -945,3 +963,41 @@ void ieee80211_recalc_idle(struct ieee80211_local *local) | |||
945 | if (chg) | 963 | if (chg) |
946 | ieee80211_hw_config(local, chg); | 964 | ieee80211_hw_config(local, chg); |
947 | } | 965 | } |
966 | |||
967 | static int netdev_notify(struct notifier_block *nb, | ||
968 | unsigned long state, | ||
969 | void *ndev) | ||
970 | { | ||
971 | struct net_device *dev = ndev; | ||
972 | struct ieee80211_sub_if_data *sdata; | ||
973 | |||
974 | if (state != NETDEV_CHANGENAME) | ||
975 | return 0; | ||
976 | |||
977 | if (!dev->ieee80211_ptr || !dev->ieee80211_ptr->wiphy) | ||
978 | return 0; | ||
979 | |||
980 | if (dev->ieee80211_ptr->wiphy->privid != mac80211_wiphy_privid) | ||
981 | return 0; | ||
982 | |||
983 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); | ||
984 | |||
985 | memcpy(sdata->name, sdata->name, IFNAMSIZ); | ||
986 | |||
987 | ieee80211_debugfs_rename_netdev(sdata); | ||
988 | return 0; | ||
989 | } | ||
990 | |||
991 | static struct notifier_block mac80211_netdev_notifier = { | ||
992 | .notifier_call = netdev_notify, | ||
993 | }; | ||
994 | |||
995 | int ieee80211_iface_init(void) | ||
996 | { | ||
997 | return register_netdevice_notifier(&mac80211_netdev_notifier); | ||
998 | } | ||
999 | |||
1000 | void ieee80211_iface_exit(void) | ||
1001 | { | ||
1002 | unregister_netdevice_notifier(&mac80211_netdev_notifier); | ||
1003 | } | ||
diff --git a/net/mac80211/main.c b/net/mac80211/main.c index 8116d1a96a4a..dbf05b4dd003 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c | |||
@@ -32,7 +32,6 @@ | |||
32 | #include "led.h" | 32 | #include "led.h" |
33 | #include "cfg.h" | 33 | #include "cfg.h" |
34 | #include "debugfs.h" | 34 | #include "debugfs.h" |
35 | #include "debugfs_netdev.h" | ||
36 | 35 | ||
37 | void ieee80211_configure_filter(struct ieee80211_local *local) | 36 | void ieee80211_configure_filter(struct ieee80211_local *local) |
38 | { | 37 | { |
@@ -173,7 +172,7 @@ void ieee80211_bss_info_change_notify(struct ieee80211_sub_if_data *sdata, | |||
173 | } else if (sdata->vif.type == NL80211_IFTYPE_ADHOC) | 172 | } else if (sdata->vif.type == NL80211_IFTYPE_ADHOC) |
174 | sdata->vif.bss_conf.bssid = sdata->u.ibss.bssid; | 173 | sdata->vif.bss_conf.bssid = sdata->u.ibss.bssid; |
175 | else if (sdata->vif.type == NL80211_IFTYPE_AP) | 174 | else if (sdata->vif.type == NL80211_IFTYPE_AP) |
176 | sdata->vif.bss_conf.bssid = sdata->dev->dev_addr; | 175 | sdata->vif.bss_conf.bssid = sdata->vif.addr; |
177 | else if (ieee80211_vif_is_mesh(&sdata->vif)) { | 176 | else if (ieee80211_vif_is_mesh(&sdata->vif)) { |
178 | sdata->vif.bss_conf.bssid = zero; | 177 | sdata->vif.bss_conf.bssid = zero; |
179 | } else { | 178 | } else { |
@@ -672,11 +671,19 @@ static int __init ieee80211_init(void) | |||
672 | 671 | ||
673 | ret = rc80211_pid_init(); | 672 | ret = rc80211_pid_init(); |
674 | if (ret) | 673 | if (ret) |
675 | return ret; | 674 | goto err_pid; |
676 | 675 | ||
677 | ieee80211_debugfs_netdev_init(); | 676 | ret = ieee80211_iface_init(); |
677 | if (ret) | ||
678 | goto err_netdev; | ||
678 | 679 | ||
679 | return 0; | 680 | return 0; |
681 | err_netdev: | ||
682 | rc80211_pid_exit(); | ||
683 | err_pid: | ||
684 | rc80211_minstrel_exit(); | ||
685 | |||
686 | return ret; | ||
680 | } | 687 | } |
681 | 688 | ||
682 | static void __exit ieee80211_exit(void) | 689 | static void __exit ieee80211_exit(void) |
@@ -693,7 +700,7 @@ static void __exit ieee80211_exit(void) | |||
693 | if (mesh_allocated) | 700 | if (mesh_allocated) |
694 | ieee80211s_stop(); | 701 | ieee80211s_stop(); |
695 | 702 | ||
696 | ieee80211_debugfs_netdev_exit(); | 703 | ieee80211_iface_exit(); |
697 | } | 704 | } |
698 | 705 | ||
699 | 706 | ||
diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c index c0fe46493f71..63299b72a7b0 100644 --- a/net/mac80211/mesh.c +++ b/net/mac80211/mesh.c | |||
@@ -457,7 +457,7 @@ static void ieee80211_mesh_housekeeping(struct ieee80211_sub_if_data *sdata, | |||
457 | 457 | ||
458 | #ifdef CONFIG_MAC80211_VERBOSE_DEBUG | 458 | #ifdef CONFIG_MAC80211_VERBOSE_DEBUG |
459 | printk(KERN_DEBUG "%s: running mesh housekeeping\n", | 459 | printk(KERN_DEBUG "%s: running mesh housekeeping\n", |
460 | sdata->dev->name); | 460 | sdata->name); |
461 | #endif | 461 | #endif |
462 | 462 | ||
463 | ieee80211_sta_expire(sdata, IEEE80211_MESH_PEER_INACTIVITY_LIMIT); | 463 | ieee80211_sta_expire(sdata, IEEE80211_MESH_PEER_INACTIVITY_LIMIT); |
@@ -565,7 +565,7 @@ static void ieee80211_mesh_rx_bcn_presp(struct ieee80211_sub_if_data *sdata, | |||
565 | 565 | ||
566 | /* ignore ProbeResp to foreign address */ | 566 | /* ignore ProbeResp to foreign address */ |
567 | if (stype == IEEE80211_STYPE_PROBE_RESP && | 567 | if (stype == IEEE80211_STYPE_PROBE_RESP && |
568 | compare_ether_addr(mgmt->da, sdata->dev->dev_addr)) | 568 | compare_ether_addr(mgmt->da, sdata->vif.addr)) |
569 | return; | 569 | return; |
570 | 570 | ||
571 | baselen = (u8 *) mgmt->u.probe_resp.variable - (u8 *) mgmt; | 571 | baselen = (u8 *) mgmt->u.probe_resp.variable - (u8 *) mgmt; |
diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c index b836892f0ba9..664f5cc2b273 100644 --- a/net/mac80211/mesh_hwmp.c +++ b/net/mac80211/mesh_hwmp.c | |||
@@ -128,9 +128,9 @@ static int mesh_path_sel_frame_tx(enum mpath_frame_type action, u8 flags, | |||
128 | IEEE80211_STYPE_ACTION); | 128 | IEEE80211_STYPE_ACTION); |
129 | 129 | ||
130 | memcpy(mgmt->da, da, ETH_ALEN); | 130 | memcpy(mgmt->da, da, ETH_ALEN); |
131 | memcpy(mgmt->sa, sdata->dev->dev_addr, ETH_ALEN); | 131 | memcpy(mgmt->sa, sdata->vif.addr, ETH_ALEN); |
132 | /* BSSID == SA */ | 132 | /* BSSID == SA */ |
133 | memcpy(mgmt->bssid, sdata->dev->dev_addr, ETH_ALEN); | 133 | memcpy(mgmt->bssid, sdata->vif.addr, ETH_ALEN); |
134 | mgmt->u.action.category = MESH_PATH_SEL_CATEGORY; | 134 | mgmt->u.action.category = MESH_PATH_SEL_CATEGORY; |
135 | mgmt->u.action.u.mesh_action.action_code = MESH_PATH_SEL_ACTION; | 135 | mgmt->u.action.u.mesh_action.action_code = MESH_PATH_SEL_ACTION; |
136 | 136 | ||
@@ -222,7 +222,7 @@ int mesh_path_error_tx(u8 ttl, u8 *target, __le32 target_sn, | |||
222 | IEEE80211_STYPE_ACTION); | 222 | IEEE80211_STYPE_ACTION); |
223 | 223 | ||
224 | memcpy(mgmt->da, ra, ETH_ALEN); | 224 | memcpy(mgmt->da, ra, ETH_ALEN); |
225 | memcpy(mgmt->sa, sdata->dev->dev_addr, ETH_ALEN); | 225 | memcpy(mgmt->sa, sdata->vif.addr, ETH_ALEN); |
226 | /* BSSID is left zeroed, wildcard value */ | 226 | /* BSSID is left zeroed, wildcard value */ |
227 | mgmt->u.action.category = MESH_PATH_SEL_CATEGORY; | 227 | mgmt->u.action.category = MESH_PATH_SEL_CATEGORY; |
228 | mgmt->u.action.u.mesh_action.action_code = MESH_PATH_SEL_ACTION; | 228 | mgmt->u.action.u.mesh_action.action_code = MESH_PATH_SEL_ACTION; |
@@ -374,7 +374,7 @@ static u32 hwmp_route_info_get(struct ieee80211_sub_if_data *sdata, | |||
374 | new_metric = MAX_METRIC; | 374 | new_metric = MAX_METRIC; |
375 | exp_time = TU_TO_EXP_TIME(orig_lifetime); | 375 | exp_time = TU_TO_EXP_TIME(orig_lifetime); |
376 | 376 | ||
377 | if (memcmp(orig_addr, sdata->dev->dev_addr, ETH_ALEN) == 0) { | 377 | if (memcmp(orig_addr, sdata->vif.addr, ETH_ALEN) == 0) { |
378 | /* This MP is the originator, we are not interested in this | 378 | /* This MP is the originator, we are not interested in this |
379 | * frame, except for updating transmitter's path info. | 379 | * frame, except for updating transmitter's path info. |
380 | */ | 380 | */ |
@@ -486,7 +486,7 @@ static void hwmp_preq_frame_process(struct ieee80211_sub_if_data *sdata, | |||
486 | 486 | ||
487 | mhwmp_dbg("received PREQ from %pM\n", orig_addr); | 487 | mhwmp_dbg("received PREQ from %pM\n", orig_addr); |
488 | 488 | ||
489 | if (memcmp(target_addr, sdata->dev->dev_addr, ETH_ALEN) == 0) { | 489 | if (memcmp(target_addr, sdata->vif.addr, ETH_ALEN) == 0) { |
490 | mhwmp_dbg("PREQ is for us\n"); | 490 | mhwmp_dbg("PREQ is for us\n"); |
491 | forward = false; | 491 | forward = false; |
492 | reply = true; | 492 | reply = true; |
@@ -579,7 +579,7 @@ static void hwmp_prep_frame_process(struct ieee80211_sub_if_data *sdata, | |||
579 | * replies | 579 | * replies |
580 | */ | 580 | */ |
581 | target_addr = PREP_IE_TARGET_ADDR(prep_elem); | 581 | target_addr = PREP_IE_TARGET_ADDR(prep_elem); |
582 | if (memcmp(target_addr, sdata->dev->dev_addr, ETH_ALEN) == 0) | 582 | if (memcmp(target_addr, sdata->vif.addr, ETH_ALEN) == 0) |
583 | /* destination, no forwarding required */ | 583 | /* destination, no forwarding required */ |
584 | return; | 584 | return; |
585 | 585 | ||
@@ -890,7 +890,7 @@ void mesh_path_start_discovery(struct ieee80211_sub_if_data *sdata) | |||
890 | target_flags = MP_F_RF; | 890 | target_flags = MP_F_RF; |
891 | 891 | ||
892 | spin_unlock_bh(&mpath->state_lock); | 892 | spin_unlock_bh(&mpath->state_lock); |
893 | mesh_path_sel_frame_tx(MPATH_PREQ, 0, sdata->dev->dev_addr, | 893 | mesh_path_sel_frame_tx(MPATH_PREQ, 0, sdata->vif.addr, |
894 | cpu_to_le32(ifmsh->sn), target_flags, mpath->dst, | 894 | cpu_to_le32(ifmsh->sn), target_flags, mpath->dst, |
895 | cpu_to_le32(mpath->sn), broadcast_addr, 0, | 895 | cpu_to_le32(mpath->sn), broadcast_addr, 0, |
896 | ttl, cpu_to_le32(lifetime), 0, | 896 | ttl, cpu_to_le32(lifetime), 0, |
@@ -939,7 +939,7 @@ int mesh_nexthop_lookup(struct sk_buff *skb, | |||
939 | if (time_after(jiffies, | 939 | if (time_after(jiffies, |
940 | mpath->exp_time + | 940 | mpath->exp_time + |
941 | msecs_to_jiffies(sdata->u.mesh.mshcfg.path_refresh_time)) && | 941 | msecs_to_jiffies(sdata->u.mesh.mshcfg.path_refresh_time)) && |
942 | !memcmp(sdata->dev->dev_addr, hdr->addr4, ETH_ALEN) && | 942 | !memcmp(sdata->vif.addr, hdr->addr4, ETH_ALEN) && |
943 | !(mpath->flags & MESH_PATH_RESOLVING) && | 943 | !(mpath->flags & MESH_PATH_RESOLVING) && |
944 | !(mpath->flags & MESH_PATH_FIXED)) { | 944 | !(mpath->flags & MESH_PATH_FIXED)) { |
945 | mesh_queue_preq(mpath, | 945 | mesh_queue_preq(mpath, |
@@ -1010,7 +1010,7 @@ mesh_path_tx_root_frame(struct ieee80211_sub_if_data *sdata) | |||
1010 | { | 1010 | { |
1011 | struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; | 1011 | struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; |
1012 | 1012 | ||
1013 | mesh_path_sel_frame_tx(MPATH_RANN, 0, sdata->dev->dev_addr, | 1013 | mesh_path_sel_frame_tx(MPATH_RANN, 0, sdata->vif.addr, |
1014 | cpu_to_le32(++ifmsh->sn), | 1014 | cpu_to_le32(++ifmsh->sn), |
1015 | 0, NULL, 0, broadcast_addr, | 1015 | 0, NULL, 0, broadcast_addr, |
1016 | 0, MESH_TTL, 0, 0, 0, sdata); | 1016 | 0, MESH_TTL, 0, 0, 0, sdata); |
diff --git a/net/mac80211/mesh_pathtbl.c b/net/mac80211/mesh_pathtbl.c index a8da23905c70..fbef678f64c8 100644 --- a/net/mac80211/mesh_pathtbl.c +++ b/net/mac80211/mesh_pathtbl.c | |||
@@ -260,7 +260,7 @@ int mesh_path_add(u8 *dst, struct ieee80211_sub_if_data *sdata) | |||
260 | int err = 0; | 260 | int err = 0; |
261 | u32 hash_idx; | 261 | u32 hash_idx; |
262 | 262 | ||
263 | if (memcmp(dst, sdata->dev->dev_addr, ETH_ALEN) == 0) | 263 | if (memcmp(dst, sdata->vif.addr, ETH_ALEN) == 0) |
264 | /* never add ourselves as neighbours */ | 264 | /* never add ourselves as neighbours */ |
265 | return -ENOTSUPP; | 265 | return -ENOTSUPP; |
266 | 266 | ||
@@ -377,7 +377,7 @@ int mpp_path_add(u8 *dst, u8 *mpp, struct ieee80211_sub_if_data *sdata) | |||
377 | int err = 0; | 377 | int err = 0; |
378 | u32 hash_idx; | 378 | u32 hash_idx; |
379 | 379 | ||
380 | if (memcmp(dst, sdata->dev->dev_addr, ETH_ALEN) == 0) | 380 | if (memcmp(dst, sdata->vif.addr, ETH_ALEN) == 0) |
381 | /* never add ourselves as neighbours */ | 381 | /* never add ourselves as neighbours */ |
382 | return -ENOTSUPP; | 382 | return -ENOTSUPP; |
383 | 383 | ||
@@ -605,7 +605,7 @@ void mesh_path_discard_frame(struct sk_buff *skb, | |||
605 | struct mesh_path *mpath; | 605 | struct mesh_path *mpath; |
606 | u32 sn = 0; | 606 | u32 sn = 0; |
607 | 607 | ||
608 | if (memcmp(hdr->addr4, sdata->dev->dev_addr, ETH_ALEN) != 0) { | 608 | if (memcmp(hdr->addr4, sdata->vif.addr, ETH_ALEN) != 0) { |
609 | u8 *ra, *da; | 609 | u8 *ra, *da; |
610 | 610 | ||
611 | da = hdr->addr3; | 611 | da = hdr->addr3; |
diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c index 8fcf56ee7743..7985e5150898 100644 --- a/net/mac80211/mesh_plink.c +++ b/net/mac80211/mesh_plink.c | |||
@@ -169,7 +169,7 @@ static int mesh_plink_frame_tx(struct ieee80211_sub_if_data *sdata, | |||
169 | mgmt->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT | | 169 | mgmt->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT | |
170 | IEEE80211_STYPE_ACTION); | 170 | IEEE80211_STYPE_ACTION); |
171 | memcpy(mgmt->da, da, ETH_ALEN); | 171 | memcpy(mgmt->da, da, ETH_ALEN); |
172 | memcpy(mgmt->sa, sdata->dev->dev_addr, ETH_ALEN); | 172 | memcpy(mgmt->sa, sdata->vif.addr, ETH_ALEN); |
173 | /* BSSID is left zeroed, wildcard value */ | 173 | /* BSSID is left zeroed, wildcard value */ |
174 | mgmt->u.action.category = MESH_PLINK_CATEGORY; | 174 | mgmt->u.action.category = MESH_PLINK_CATEGORY; |
175 | mgmt->u.action.u.plink_action.action_code = action; | 175 | mgmt->u.action.u.plink_action.action_code = action; |
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index c16667a7c8df..cd5dcc3d8c2b 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -248,7 +248,7 @@ static void ieee80211_send_assoc(struct ieee80211_sub_if_data *sdata, | |||
248 | wk->ssid_len); | 248 | wk->ssid_len); |
249 | if (!skb) { | 249 | if (!skb) { |
250 | printk(KERN_DEBUG "%s: failed to allocate buffer for assoc " | 250 | printk(KERN_DEBUG "%s: failed to allocate buffer for assoc " |
251 | "frame\n", sdata->dev->name); | 251 | "frame\n", sdata->name); |
252 | return; | 252 | return; |
253 | } | 253 | } |
254 | skb_reserve(skb, local->hw.extra_tx_headroom); | 254 | skb_reserve(skb, local->hw.extra_tx_headroom); |
@@ -282,7 +282,7 @@ static void ieee80211_send_assoc(struct ieee80211_sub_if_data *sdata, | |||
282 | mgmt = (struct ieee80211_mgmt *) skb_put(skb, 24); | 282 | mgmt = (struct ieee80211_mgmt *) skb_put(skb, 24); |
283 | memset(mgmt, 0, 24); | 283 | memset(mgmt, 0, 24); |
284 | memcpy(mgmt->da, wk->bss->cbss.bssid, ETH_ALEN); | 284 | memcpy(mgmt->da, wk->bss->cbss.bssid, ETH_ALEN); |
285 | memcpy(mgmt->sa, sdata->dev->dev_addr, ETH_ALEN); | 285 | memcpy(mgmt->sa, sdata->vif.addr, ETH_ALEN); |
286 | memcpy(mgmt->bssid, wk->bss->cbss.bssid, ETH_ALEN); | 286 | memcpy(mgmt->bssid, wk->bss->cbss.bssid, ETH_ALEN); |
287 | 287 | ||
288 | if (!is_zero_ether_addr(wk->prev_bssid)) { | 288 | if (!is_zero_ether_addr(wk->prev_bssid)) { |
@@ -443,7 +443,7 @@ static void ieee80211_send_deauth_disassoc(struct ieee80211_sub_if_data *sdata, | |||
443 | skb = dev_alloc_skb(local->hw.extra_tx_headroom + sizeof(*mgmt)); | 443 | skb = dev_alloc_skb(local->hw.extra_tx_headroom + sizeof(*mgmt)); |
444 | if (!skb) { | 444 | if (!skb) { |
445 | printk(KERN_DEBUG "%s: failed to allocate buffer for " | 445 | printk(KERN_DEBUG "%s: failed to allocate buffer for " |
446 | "deauth/disassoc frame\n", sdata->dev->name); | 446 | "deauth/disassoc frame\n", sdata->name); |
447 | return; | 447 | return; |
448 | } | 448 | } |
449 | skb_reserve(skb, local->hw.extra_tx_headroom); | 449 | skb_reserve(skb, local->hw.extra_tx_headroom); |
@@ -451,7 +451,7 @@ static void ieee80211_send_deauth_disassoc(struct ieee80211_sub_if_data *sdata, | |||
451 | mgmt = (struct ieee80211_mgmt *) skb_put(skb, 24); | 451 | mgmt = (struct ieee80211_mgmt *) skb_put(skb, 24); |
452 | memset(mgmt, 0, 24); | 452 | memset(mgmt, 0, 24); |
453 | memcpy(mgmt->da, bssid, ETH_ALEN); | 453 | memcpy(mgmt->da, bssid, ETH_ALEN); |
454 | memcpy(mgmt->sa, sdata->dev->dev_addr, ETH_ALEN); | 454 | memcpy(mgmt->sa, sdata->vif.addr, ETH_ALEN); |
455 | memcpy(mgmt->bssid, bssid, ETH_ALEN); | 455 | memcpy(mgmt->bssid, bssid, ETH_ALEN); |
456 | mgmt->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT | stype); | 456 | mgmt->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT | stype); |
457 | skb_put(skb, 2); | 457 | skb_put(skb, 2); |
@@ -484,7 +484,7 @@ void ieee80211_send_pspoll(struct ieee80211_local *local, | |||
484 | skb = dev_alloc_skb(local->hw.extra_tx_headroom + sizeof(*pspoll)); | 484 | skb = dev_alloc_skb(local->hw.extra_tx_headroom + sizeof(*pspoll)); |
485 | if (!skb) { | 485 | if (!skb) { |
486 | printk(KERN_DEBUG "%s: failed to allocate buffer for " | 486 | printk(KERN_DEBUG "%s: failed to allocate buffer for " |
487 | "pspoll frame\n", sdata->dev->name); | 487 | "pspoll frame\n", sdata->name); |
488 | return; | 488 | return; |
489 | } | 489 | } |
490 | skb_reserve(skb, local->hw.extra_tx_headroom); | 490 | skb_reserve(skb, local->hw.extra_tx_headroom); |
@@ -499,7 +499,7 @@ void ieee80211_send_pspoll(struct ieee80211_local *local, | |||
499 | pspoll->aid |= cpu_to_le16(1 << 15 | 1 << 14); | 499 | pspoll->aid |= cpu_to_le16(1 << 15 | 1 << 14); |
500 | 500 | ||
501 | memcpy(pspoll->bssid, ifmgd->bssid, ETH_ALEN); | 501 | memcpy(pspoll->bssid, ifmgd->bssid, ETH_ALEN); |
502 | memcpy(pspoll->ta, sdata->dev->dev_addr, ETH_ALEN); | 502 | memcpy(pspoll->ta, sdata->vif.addr, ETH_ALEN); |
503 | 503 | ||
504 | IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT; | 504 | IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT; |
505 | ieee80211_tx_skb(sdata, skb); | 505 | ieee80211_tx_skb(sdata, skb); |
@@ -519,7 +519,7 @@ void ieee80211_send_nullfunc(struct ieee80211_local *local, | |||
519 | skb = dev_alloc_skb(local->hw.extra_tx_headroom + 24); | 519 | skb = dev_alloc_skb(local->hw.extra_tx_headroom + 24); |
520 | if (!skb) { | 520 | if (!skb) { |
521 | printk(KERN_DEBUG "%s: failed to allocate buffer for nullfunc " | 521 | printk(KERN_DEBUG "%s: failed to allocate buffer for nullfunc " |
522 | "frame\n", sdata->dev->name); | 522 | "frame\n", sdata->name); |
523 | return; | 523 | return; |
524 | } | 524 | } |
525 | skb_reserve(skb, local->hw.extra_tx_headroom); | 525 | skb_reserve(skb, local->hw.extra_tx_headroom); |
@@ -532,7 +532,7 @@ void ieee80211_send_nullfunc(struct ieee80211_local *local, | |||
532 | fc |= cpu_to_le16(IEEE80211_FCTL_PM); | 532 | fc |= cpu_to_le16(IEEE80211_FCTL_PM); |
533 | nullfunc->frame_control = fc; | 533 | nullfunc->frame_control = fc; |
534 | memcpy(nullfunc->addr1, sdata->u.mgd.bssid, ETH_ALEN); | 534 | memcpy(nullfunc->addr1, sdata->u.mgd.bssid, ETH_ALEN); |
535 | memcpy(nullfunc->addr2, sdata->dev->dev_addr, ETH_ALEN); | 535 | memcpy(nullfunc->addr2, sdata->vif.addr, ETH_ALEN); |
536 | memcpy(nullfunc->addr3, sdata->u.mgd.bssid, ETH_ALEN); | 536 | memcpy(nullfunc->addr3, sdata->u.mgd.bssid, ETH_ALEN); |
537 | 537 | ||
538 | IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT; | 538 | IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT; |
@@ -948,7 +948,7 @@ ieee80211_direct_probe(struct ieee80211_sub_if_data *sdata, | |||
948 | wk->tries++; | 948 | wk->tries++; |
949 | if (wk->tries > IEEE80211_AUTH_MAX_TRIES) { | 949 | if (wk->tries > IEEE80211_AUTH_MAX_TRIES) { |
950 | printk(KERN_DEBUG "%s: direct probe to AP %pM timed out\n", | 950 | printk(KERN_DEBUG "%s: direct probe to AP %pM timed out\n", |
951 | sdata->dev->name, wk->bss->cbss.bssid); | 951 | sdata->name, wk->bss->cbss.bssid); |
952 | 952 | ||
953 | /* | 953 | /* |
954 | * Most likely AP is not in the range so remove the | 954 | * Most likely AP is not in the range so remove the |
@@ -966,7 +966,7 @@ ieee80211_direct_probe(struct ieee80211_sub_if_data *sdata, | |||
966 | } | 966 | } |
967 | 967 | ||
968 | printk(KERN_DEBUG "%s: direct probe to AP %pM (try %d)\n", | 968 | printk(KERN_DEBUG "%s: direct probe to AP %pM (try %d)\n", |
969 | sdata->dev->name, wk->bss->cbss.bssid, | 969 | sdata->name, wk->bss->cbss.bssid, |
970 | wk->tries); | 970 | wk->tries); |
971 | 971 | ||
972 | /* | 972 | /* |
@@ -993,7 +993,7 @@ ieee80211_authenticate(struct ieee80211_sub_if_data *sdata, | |||
993 | if (wk->tries > IEEE80211_AUTH_MAX_TRIES) { | 993 | if (wk->tries > IEEE80211_AUTH_MAX_TRIES) { |
994 | printk(KERN_DEBUG "%s: authentication with AP %pM" | 994 | printk(KERN_DEBUG "%s: authentication with AP %pM" |
995 | " timed out\n", | 995 | " timed out\n", |
996 | sdata->dev->name, wk->bss->cbss.bssid); | 996 | sdata->name, wk->bss->cbss.bssid); |
997 | 997 | ||
998 | /* | 998 | /* |
999 | * Most likely AP is not in the range so remove the | 999 | * Most likely AP is not in the range so remove the |
@@ -1011,7 +1011,7 @@ ieee80211_authenticate(struct ieee80211_sub_if_data *sdata, | |||
1011 | } | 1011 | } |
1012 | 1012 | ||
1013 | printk(KERN_DEBUG "%s: authenticate with AP %pM (try %d)\n", | 1013 | printk(KERN_DEBUG "%s: authenticate with AP %pM (try %d)\n", |
1014 | sdata->dev->name, wk->bss->cbss.bssid, wk->tries); | 1014 | sdata->name, wk->bss->cbss.bssid, wk->tries); |
1015 | 1015 | ||
1016 | ieee80211_send_auth(sdata, 1, wk->auth_alg, wk->ie, wk->ie_len, | 1016 | ieee80211_send_auth(sdata, 1, wk->auth_alg, wk->ie, wk->ie_len, |
1017 | wk->bss->cbss.bssid, NULL, 0, 0); | 1017 | wk->bss->cbss.bssid, NULL, 0, 0); |
@@ -1133,7 +1133,7 @@ ieee80211_associate(struct ieee80211_sub_if_data *sdata, | |||
1133 | if (wk->tries > IEEE80211_ASSOC_MAX_TRIES) { | 1133 | if (wk->tries > IEEE80211_ASSOC_MAX_TRIES) { |
1134 | printk(KERN_DEBUG "%s: association with AP %pM" | 1134 | printk(KERN_DEBUG "%s: association with AP %pM" |
1135 | " timed out\n", | 1135 | " timed out\n", |
1136 | sdata->dev->name, wk->bss->cbss.bssid); | 1136 | sdata->name, wk->bss->cbss.bssid); |
1137 | 1137 | ||
1138 | /* | 1138 | /* |
1139 | * Most likely AP is not in the range so remove the | 1139 | * Most likely AP is not in the range so remove the |
@@ -1151,7 +1151,7 @@ ieee80211_associate(struct ieee80211_sub_if_data *sdata, | |||
1151 | } | 1151 | } |
1152 | 1152 | ||
1153 | printk(KERN_DEBUG "%s: associate with AP %pM (try %d)\n", | 1153 | printk(KERN_DEBUG "%s: associate with AP %pM (try %d)\n", |
1154 | sdata->dev->name, wk->bss->cbss.bssid, wk->tries); | 1154 | sdata->name, wk->bss->cbss.bssid, wk->tries); |
1155 | ieee80211_send_assoc(sdata, wk); | 1155 | ieee80211_send_assoc(sdata, wk); |
1156 | 1156 | ||
1157 | wk->timeout = jiffies + IEEE80211_ASSOC_TIMEOUT; | 1157 | wk->timeout = jiffies + IEEE80211_ASSOC_TIMEOUT; |
@@ -1212,7 +1212,7 @@ static void ieee80211_mgd_probe_ap(struct ieee80211_sub_if_data *sdata, | |||
1212 | #ifdef CONFIG_MAC80211_VERBOSE_DEBUG | 1212 | #ifdef CONFIG_MAC80211_VERBOSE_DEBUG |
1213 | if (beacon && net_ratelimit()) | 1213 | if (beacon && net_ratelimit()) |
1214 | printk(KERN_DEBUG "%s: detected beacon loss from AP " | 1214 | printk(KERN_DEBUG "%s: detected beacon loss from AP " |
1215 | "- sending probe request\n", sdata->dev->name); | 1215 | "- sending probe request\n", sdata->name); |
1216 | #endif | 1216 | #endif |
1217 | 1217 | ||
1218 | /* | 1218 | /* |
@@ -1269,7 +1269,7 @@ static void ieee80211_auth_completed(struct ieee80211_sub_if_data *sdata, | |||
1269 | struct ieee80211_mgd_work *wk) | 1269 | struct ieee80211_mgd_work *wk) |
1270 | { | 1270 | { |
1271 | wk->state = IEEE80211_MGD_STATE_IDLE; | 1271 | wk->state = IEEE80211_MGD_STATE_IDLE; |
1272 | printk(KERN_DEBUG "%s: authenticated\n", sdata->dev->name); | 1272 | printk(KERN_DEBUG "%s: authenticated\n", sdata->name); |
1273 | } | 1273 | } |
1274 | 1274 | ||
1275 | 1275 | ||
@@ -1366,7 +1366,7 @@ ieee80211_rx_mgmt_deauth(struct ieee80211_sub_if_data *sdata, | |||
1366 | reason_code = le16_to_cpu(mgmt->u.deauth.reason_code); | 1366 | reason_code = le16_to_cpu(mgmt->u.deauth.reason_code); |
1367 | 1367 | ||
1368 | printk(KERN_DEBUG "%s: deauthenticated from %pM (Reason: %u)\n", | 1368 | printk(KERN_DEBUG "%s: deauthenticated from %pM (Reason: %u)\n", |
1369 | sdata->dev->name, bssid, reason_code); | 1369 | sdata->name, bssid, reason_code); |
1370 | 1370 | ||
1371 | if (!wk) { | 1371 | if (!wk) { |
1372 | ieee80211_set_disassoc(sdata, true); | 1372 | ieee80211_set_disassoc(sdata, true); |
@@ -1400,7 +1400,7 @@ ieee80211_rx_mgmt_disassoc(struct ieee80211_sub_if_data *sdata, | |||
1400 | reason_code = le16_to_cpu(mgmt->u.disassoc.reason_code); | 1400 | reason_code = le16_to_cpu(mgmt->u.disassoc.reason_code); |
1401 | 1401 | ||
1402 | printk(KERN_DEBUG "%s: disassociated from %pM (Reason: %u)\n", | 1402 | printk(KERN_DEBUG "%s: disassociated from %pM (Reason: %u)\n", |
1403 | sdata->dev->name, mgmt->sa, reason_code); | 1403 | sdata->name, mgmt->sa, reason_code); |
1404 | 1404 | ||
1405 | ieee80211_set_disassoc(sdata, false); | 1405 | ieee80211_set_disassoc(sdata, false); |
1406 | return RX_MGMT_CFG80211_DISASSOC; | 1406 | return RX_MGMT_CFG80211_DISASSOC; |
@@ -1444,7 +1444,7 @@ ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata, | |||
1444 | 1444 | ||
1445 | printk(KERN_DEBUG "%s: RX %sssocResp from %pM (capab=0x%x " | 1445 | printk(KERN_DEBUG "%s: RX %sssocResp from %pM (capab=0x%x " |
1446 | "status=%d aid=%d)\n", | 1446 | "status=%d aid=%d)\n", |
1447 | sdata->dev->name, reassoc ? "Rea" : "A", mgmt->sa, | 1447 | sdata->name, reassoc ? "Rea" : "A", mgmt->sa, |
1448 | capab_info, status_code, (u16)(aid & ~(BIT(15) | BIT(14)))); | 1448 | capab_info, status_code, (u16)(aid & ~(BIT(15) | BIT(14)))); |
1449 | 1449 | ||
1450 | pos = mgmt->u.assoc_resp.variable; | 1450 | pos = mgmt->u.assoc_resp.variable; |
@@ -1458,7 +1458,7 @@ ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata, | |||
1458 | ms = tu * 1024 / 1000; | 1458 | ms = tu * 1024 / 1000; |
1459 | printk(KERN_DEBUG "%s: AP rejected association temporarily; " | 1459 | printk(KERN_DEBUG "%s: AP rejected association temporarily; " |
1460 | "comeback duration %u TU (%u ms)\n", | 1460 | "comeback duration %u TU (%u ms)\n", |
1461 | sdata->dev->name, tu, ms); | 1461 | sdata->name, tu, ms); |
1462 | wk->timeout = jiffies + msecs_to_jiffies(ms); | 1462 | wk->timeout = jiffies + msecs_to_jiffies(ms); |
1463 | if (ms > IEEE80211_ASSOC_TIMEOUT) | 1463 | if (ms > IEEE80211_ASSOC_TIMEOUT) |
1464 | run_again(ifmgd, jiffies + msecs_to_jiffies(ms)); | 1464 | run_again(ifmgd, jiffies + msecs_to_jiffies(ms)); |
@@ -1467,23 +1467,23 @@ ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata, | |||
1467 | 1467 | ||
1468 | if (status_code != WLAN_STATUS_SUCCESS) { | 1468 | if (status_code != WLAN_STATUS_SUCCESS) { |
1469 | printk(KERN_DEBUG "%s: AP denied association (code=%d)\n", | 1469 | printk(KERN_DEBUG "%s: AP denied association (code=%d)\n", |
1470 | sdata->dev->name, status_code); | 1470 | sdata->name, status_code); |
1471 | wk->state = IEEE80211_MGD_STATE_IDLE; | 1471 | wk->state = IEEE80211_MGD_STATE_IDLE; |
1472 | return RX_MGMT_CFG80211_ASSOC; | 1472 | return RX_MGMT_CFG80211_ASSOC; |
1473 | } | 1473 | } |
1474 | 1474 | ||
1475 | if ((aid & (BIT(15) | BIT(14))) != (BIT(15) | BIT(14))) | 1475 | if ((aid & (BIT(15) | BIT(14))) != (BIT(15) | BIT(14))) |
1476 | printk(KERN_DEBUG "%s: invalid aid value %d; bits 15:14 not " | 1476 | printk(KERN_DEBUG "%s: invalid aid value %d; bits 15:14 not " |
1477 | "set\n", sdata->dev->name, aid); | 1477 | "set\n", sdata->name, aid); |
1478 | aid &= ~(BIT(15) | BIT(14)); | 1478 | aid &= ~(BIT(15) | BIT(14)); |
1479 | 1479 | ||
1480 | if (!elems.supp_rates) { | 1480 | if (!elems.supp_rates) { |
1481 | printk(KERN_DEBUG "%s: no SuppRates element in AssocResp\n", | 1481 | printk(KERN_DEBUG "%s: no SuppRates element in AssocResp\n", |
1482 | sdata->dev->name); | 1482 | sdata->name); |
1483 | return RX_MGMT_NONE; | 1483 | return RX_MGMT_NONE; |
1484 | } | 1484 | } |
1485 | 1485 | ||
1486 | printk(KERN_DEBUG "%s: associated\n", sdata->dev->name); | 1486 | printk(KERN_DEBUG "%s: associated\n", sdata->name); |
1487 | ifmgd->aid = aid; | 1487 | ifmgd->aid = aid; |
1488 | 1488 | ||
1489 | rcu_read_lock(); | 1489 | rcu_read_lock(); |
@@ -1498,7 +1498,7 @@ ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata, | |||
1498 | sta = sta_info_alloc(sdata, wk->bss->cbss.bssid, GFP_KERNEL); | 1498 | sta = sta_info_alloc(sdata, wk->bss->cbss.bssid, GFP_KERNEL); |
1499 | if (!sta) { | 1499 | if (!sta) { |
1500 | printk(KERN_DEBUG "%s: failed to alloc STA entry for" | 1500 | printk(KERN_DEBUG "%s: failed to alloc STA entry for" |
1501 | " the AP\n", sdata->dev->name); | 1501 | " the AP\n", sdata->name); |
1502 | return RX_MGMT_NONE; | 1502 | return RX_MGMT_NONE; |
1503 | } | 1503 | } |
1504 | 1504 | ||
@@ -1576,7 +1576,7 @@ ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata, | |||
1576 | int err = sta_info_insert(sta); | 1576 | int err = sta_info_insert(sta); |
1577 | if (err) { | 1577 | if (err) { |
1578 | printk(KERN_DEBUG "%s: failed to insert STA entry for" | 1578 | printk(KERN_DEBUG "%s: failed to insert STA entry for" |
1579 | " the AP (error %d)\n", sdata->dev->name, err); | 1579 | " the AP (error %d)\n", sdata->name, err); |
1580 | rcu_read_unlock(); | 1580 | rcu_read_unlock(); |
1581 | return RX_MGMT_NONE; | 1581 | return RX_MGMT_NONE; |
1582 | } | 1582 | } |
@@ -1671,7 +1671,7 @@ static void ieee80211_rx_mgmt_probe_resp(struct ieee80211_sub_if_data *sdata, | |||
1671 | 1671 | ||
1672 | ASSERT_MGD_MTX(ifmgd); | 1672 | ASSERT_MGD_MTX(ifmgd); |
1673 | 1673 | ||
1674 | if (memcmp(mgmt->da, sdata->dev->dev_addr, ETH_ALEN)) | 1674 | if (memcmp(mgmt->da, sdata->vif.addr, ETH_ALEN)) |
1675 | return; /* ignore ProbeResp to foreign address */ | 1675 | return; /* ignore ProbeResp to foreign address */ |
1676 | 1676 | ||
1677 | baselen = (u8 *) mgmt->u.probe_resp.variable - (u8 *) mgmt; | 1677 | baselen = (u8 *) mgmt->u.probe_resp.variable - (u8 *) mgmt; |
@@ -1686,7 +1686,7 @@ static void ieee80211_rx_mgmt_probe_resp(struct ieee80211_sub_if_data *sdata, | |||
1686 | /* direct probe may be part of the association flow */ | 1686 | /* direct probe may be part of the association flow */ |
1687 | if (wk && wk->state == IEEE80211_MGD_STATE_PROBE) { | 1687 | if (wk && wk->state == IEEE80211_MGD_STATE_PROBE) { |
1688 | printk(KERN_DEBUG "%s: direct probe responded\n", | 1688 | printk(KERN_DEBUG "%s: direct probe responded\n", |
1689 | sdata->dev->name); | 1689 | sdata->name); |
1690 | wk->tries = 0; | 1690 | wk->tries = 0; |
1691 | wk->state = IEEE80211_MGD_STATE_AUTH; | 1691 | wk->state = IEEE80211_MGD_STATE_AUTH; |
1692 | WARN_ON(ieee80211_authenticate(sdata, wk) != RX_MGMT_NONE); | 1692 | WARN_ON(ieee80211_authenticate(sdata, wk) != RX_MGMT_NONE); |
@@ -1779,7 +1779,7 @@ static void ieee80211_rx_mgmt_beacon(struct ieee80211_sub_if_data *sdata, | |||
1779 | #ifdef CONFIG_MAC80211_VERBOSE_DEBUG | 1779 | #ifdef CONFIG_MAC80211_VERBOSE_DEBUG |
1780 | if (net_ratelimit()) { | 1780 | if (net_ratelimit()) { |
1781 | printk(KERN_DEBUG "%s: cancelling probereq poll due " | 1781 | printk(KERN_DEBUG "%s: cancelling probereq poll due " |
1782 | "to a received beacon\n", sdata->dev->name); | 1782 | "to a received beacon\n", sdata->name); |
1783 | } | 1783 | } |
1784 | #endif | 1784 | #endif |
1785 | ifmgd->flags &= ~IEEE80211_STA_BEACON_POLL; | 1785 | ifmgd->flags &= ~IEEE80211_STA_BEACON_POLL; |
@@ -2554,7 +2554,7 @@ int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata, | |||
2554 | mutex_unlock(&ifmgd->mtx); | 2554 | mutex_unlock(&ifmgd->mtx); |
2555 | 2555 | ||
2556 | printk(KERN_DEBUG "%s: deauthenticating from %pM by local choice (reason=%d)\n", | 2556 | printk(KERN_DEBUG "%s: deauthenticating from %pM by local choice (reason=%d)\n", |
2557 | sdata->dev->name, bssid, req->reason_code); | 2557 | sdata->name, bssid, req->reason_code); |
2558 | 2558 | ||
2559 | ieee80211_send_deauth_disassoc(sdata, bssid, | 2559 | ieee80211_send_deauth_disassoc(sdata, bssid, |
2560 | IEEE80211_STYPE_DEAUTH, req->reason_code, | 2560 | IEEE80211_STYPE_DEAUTH, req->reason_code, |
@@ -2583,7 +2583,7 @@ int ieee80211_mgd_disassoc(struct ieee80211_sub_if_data *sdata, | |||
2583 | } | 2583 | } |
2584 | 2584 | ||
2585 | printk(KERN_DEBUG "%s: disassociating from %pM by local choice (reason=%d)\n", | 2585 | printk(KERN_DEBUG "%s: disassociating from %pM by local choice (reason=%d)\n", |
2586 | sdata->dev->name, req->bss->bssid, req->reason_code); | 2586 | sdata->name, req->bss->bssid, req->reason_code); |
2587 | 2587 | ||
2588 | ieee80211_set_disassoc(sdata, false); | 2588 | ieee80211_set_disassoc(sdata, false); |
2589 | 2589 | ||
diff --git a/net/mac80211/pm.c b/net/mac80211/pm.c index e535f1c988fe..05ccaadb6a0e 100644 --- a/net/mac80211/pm.c +++ b/net/mac80211/pm.c | |||
@@ -102,7 +102,7 @@ int __ieee80211_suspend(struct ieee80211_hw *hw) | |||
102 | 102 | ||
103 | conf.vif = &sdata->vif; | 103 | conf.vif = &sdata->vif; |
104 | conf.type = sdata->vif.type; | 104 | conf.type = sdata->vif.type; |
105 | conf.mac_addr = sdata->dev->dev_addr; | 105 | conf.mac_addr = sdata->vif.addr; |
106 | drv_remove_interface(local, &conf); | 106 | drv_remove_interface(local, &conf); |
107 | } | 107 | } |
108 | 108 | ||
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 5bae28693da8..d0136e3da487 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c | |||
@@ -283,15 +283,15 @@ ieee80211_rx_monitor(struct ieee80211_local *local, struct sk_buff *origskb, | |||
283 | skb->protocol = htons(ETH_P_802_2); | 283 | skb->protocol = htons(ETH_P_802_2); |
284 | 284 | ||
285 | list_for_each_entry_rcu(sdata, &local->interfaces, list) { | 285 | list_for_each_entry_rcu(sdata, &local->interfaces, list) { |
286 | if (!netif_running(sdata->dev)) | ||
287 | continue; | ||
288 | |||
289 | if (sdata->vif.type != NL80211_IFTYPE_MONITOR) | 286 | if (sdata->vif.type != NL80211_IFTYPE_MONITOR) |
290 | continue; | 287 | continue; |
291 | 288 | ||
292 | if (sdata->u.mntr_flags & MONITOR_FLAG_COOK_FRAMES) | 289 | if (sdata->u.mntr_flags & MONITOR_FLAG_COOK_FRAMES) |
293 | continue; | 290 | continue; |
294 | 291 | ||
292 | if (!netif_running(sdata->dev)) | ||
293 | continue; | ||
294 | |||
295 | if (prev_dev) { | 295 | if (prev_dev) { |
296 | skb2 = skb_clone(skb, GFP_ATOMIC); | 296 | skb2 = skb_clone(skb, GFP_ATOMIC); |
297 | if (skb2) { | 297 | if (skb2) { |
@@ -476,7 +476,7 @@ ieee80211_rx_mesh_check(struct ieee80211_rx_data *rx) | |||
476 | { | 476 | { |
477 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)rx->skb->data; | 477 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)rx->skb->data; |
478 | unsigned int hdrlen = ieee80211_hdrlen(hdr->frame_control); | 478 | unsigned int hdrlen = ieee80211_hdrlen(hdr->frame_control); |
479 | char *dev_addr = rx->sdata->dev->dev_addr; | 479 | char *dev_addr = rx->sdata->vif.addr; |
480 | 480 | ||
481 | if (ieee80211_is_data(hdr->frame_control)) { | 481 | if (ieee80211_is_data(hdr->frame_control)) { |
482 | if (is_multicast_ether_addr(hdr->addr1)) { | 482 | if (is_multicast_ether_addr(hdr->addr1)) { |
@@ -1024,7 +1024,7 @@ static void ap_sta_ps_start(struct sta_info *sta) | |||
1024 | drv_sta_notify(local, &sdata->vif, STA_NOTIFY_SLEEP, &sta->sta); | 1024 | drv_sta_notify(local, &sdata->vif, STA_NOTIFY_SLEEP, &sta->sta); |
1025 | #ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG | 1025 | #ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG |
1026 | printk(KERN_DEBUG "%s: STA %pM aid %d enters power save mode\n", | 1026 | printk(KERN_DEBUG "%s: STA %pM aid %d enters power save mode\n", |
1027 | sdata->dev->name, sta->sta.addr, sta->sta.aid); | 1027 | sdata->name, sta->sta.addr, sta->sta.aid); |
1028 | #endif /* CONFIG_MAC80211_VERBOSE_PS_DEBUG */ | 1028 | #endif /* CONFIG_MAC80211_VERBOSE_PS_DEBUG */ |
1029 | } | 1029 | } |
1030 | 1030 | ||
@@ -1038,13 +1038,13 @@ static void ap_sta_ps_end(struct sta_info *sta) | |||
1038 | 1038 | ||
1039 | #ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG | 1039 | #ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG |
1040 | printk(KERN_DEBUG "%s: STA %pM aid %d exits power save mode\n", | 1040 | printk(KERN_DEBUG "%s: STA %pM aid %d exits power save mode\n", |
1041 | sdata->dev->name, sta->sta.addr, sta->sta.aid); | 1041 | sdata->name, sta->sta.addr, sta->sta.aid); |
1042 | #endif /* CONFIG_MAC80211_VERBOSE_PS_DEBUG */ | 1042 | #endif /* CONFIG_MAC80211_VERBOSE_PS_DEBUG */ |
1043 | 1043 | ||
1044 | if (test_sta_flags(sta, WLAN_STA_PS_DRIVER)) { | 1044 | if (test_sta_flags(sta, WLAN_STA_PS_DRIVER)) { |
1045 | #ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG | 1045 | #ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG |
1046 | printk(KERN_DEBUG "%s: STA %pM aid %d driver-ps-blocked\n", | 1046 | printk(KERN_DEBUG "%s: STA %pM aid %d driver-ps-blocked\n", |
1047 | sdata->dev->name, sta->sta.addr, sta->sta.aid); | 1047 | sdata->name, sta->sta.addr, sta->sta.aid); |
1048 | #endif /* CONFIG_MAC80211_VERBOSE_PS_DEBUG */ | 1048 | #endif /* CONFIG_MAC80211_VERBOSE_PS_DEBUG */ |
1049 | return; | 1049 | return; |
1050 | } | 1050 | } |
@@ -1156,7 +1156,7 @@ ieee80211_reassemble_add(struct ieee80211_sub_if_data *sdata, | |||
1156 | printk(KERN_DEBUG "%s: RX reassembly removed oldest " | 1156 | printk(KERN_DEBUG "%s: RX reassembly removed oldest " |
1157 | "fragment entry (idx=%d age=%lu seq=%d last_frag=%d " | 1157 | "fragment entry (idx=%d age=%lu seq=%d last_frag=%d " |
1158 | "addr1=%pM addr2=%pM\n", | 1158 | "addr1=%pM addr2=%pM\n", |
1159 | sdata->dev->name, idx, | 1159 | sdata->name, idx, |
1160 | jiffies - entry->first_frag_time, entry->seq, | 1160 | jiffies - entry->first_frag_time, entry->seq, |
1161 | entry->last_frag, hdr->addr1, hdr->addr2); | 1161 | entry->last_frag, hdr->addr1, hdr->addr2); |
1162 | #endif | 1162 | #endif |
@@ -1424,7 +1424,6 @@ static int | |||
1424 | __ieee80211_data_to_8023(struct ieee80211_rx_data *rx) | 1424 | __ieee80211_data_to_8023(struct ieee80211_rx_data *rx) |
1425 | { | 1425 | { |
1426 | struct ieee80211_sub_if_data *sdata = rx->sdata; | 1426 | struct ieee80211_sub_if_data *sdata = rx->sdata; |
1427 | struct net_device *dev = sdata->dev; | ||
1428 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)rx->skb->data; | 1427 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)rx->skb->data; |
1429 | 1428 | ||
1430 | if (ieee80211_has_a4(hdr->frame_control) && | 1429 | if (ieee80211_has_a4(hdr->frame_control) && |
@@ -1436,7 +1435,7 @@ __ieee80211_data_to_8023(struct ieee80211_rx_data *rx) | |||
1436 | (sdata->vif.type == NL80211_IFTYPE_STATION && sdata->u.mgd.use_4addr))) | 1435 | (sdata->vif.type == NL80211_IFTYPE_STATION && sdata->u.mgd.use_4addr))) |
1437 | return -1; | 1436 | return -1; |
1438 | 1437 | ||
1439 | return ieee80211_data_to_8023(rx->skb, dev->dev_addr, sdata->vif.type); | 1438 | return ieee80211_data_to_8023(rx->skb, sdata->vif.addr, sdata->vif.type); |
1440 | } | 1439 | } |
1441 | 1440 | ||
1442 | /* | 1441 | /* |
@@ -1453,7 +1452,7 @@ static bool ieee80211_frame_allowed(struct ieee80211_rx_data *rx, __le16 fc) | |||
1453 | * of whether the frame was encrypted or not. | 1452 | * of whether the frame was encrypted or not. |
1454 | */ | 1453 | */ |
1455 | if (ehdr->h_proto == htons(ETH_P_PAE) && | 1454 | if (ehdr->h_proto == htons(ETH_P_PAE) && |
1456 | (compare_ether_addr(ehdr->h_dest, rx->sdata->dev->dev_addr) == 0 || | 1455 | (compare_ether_addr(ehdr->h_dest, rx->sdata->vif.addr) == 0 || |
1457 | compare_ether_addr(ehdr->h_dest, pae_group_addr) == 0)) | 1456 | compare_ether_addr(ehdr->h_dest, pae_group_addr) == 0)) |
1458 | return true; | 1457 | return true; |
1459 | 1458 | ||
@@ -1721,7 +1720,7 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx) | |||
1721 | 1720 | ||
1722 | /* Frame has reached destination. Don't forward */ | 1721 | /* Frame has reached destination. Don't forward */ |
1723 | if (!is_multicast_ether_addr(hdr->addr1) && | 1722 | if (!is_multicast_ether_addr(hdr->addr1) && |
1724 | compare_ether_addr(sdata->dev->dev_addr, hdr->addr3) == 0) | 1723 | compare_ether_addr(sdata->vif.addr, hdr->addr3) == 0) |
1725 | return RX_CONTINUE; | 1724 | return RX_CONTINUE; |
1726 | 1725 | ||
1727 | mesh_hdr->ttl--; | 1726 | mesh_hdr->ttl--; |
@@ -1738,10 +1737,10 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx) | |||
1738 | 1737 | ||
1739 | if (!fwd_skb && net_ratelimit()) | 1738 | if (!fwd_skb && net_ratelimit()) |
1740 | printk(KERN_DEBUG "%s: failed to clone mesh frame\n", | 1739 | printk(KERN_DEBUG "%s: failed to clone mesh frame\n", |
1741 | sdata->dev->name); | 1740 | sdata->name); |
1742 | 1741 | ||
1743 | fwd_hdr = (struct ieee80211_hdr *) fwd_skb->data; | 1742 | fwd_hdr = (struct ieee80211_hdr *) fwd_skb->data; |
1744 | memcpy(fwd_hdr->addr2, sdata->dev->dev_addr, ETH_ALEN); | 1743 | memcpy(fwd_hdr->addr2, sdata->vif.addr, ETH_ALEN); |
1745 | info = IEEE80211_SKB_CB(fwd_skb); | 1744 | info = IEEE80211_SKB_CB(fwd_skb); |
1746 | memset(info, 0, sizeof(*info)); | 1745 | memset(info, 0, sizeof(*info)); |
1747 | info->flags |= IEEE80211_TX_INTFL_NEED_TXPROCESSING; | 1746 | info->flags |= IEEE80211_TX_INTFL_NEED_TXPROCESSING; |
@@ -1870,7 +1869,7 @@ static void ieee80211_process_sa_query_req(struct ieee80211_sub_if_data *sdata, | |||
1870 | struct sk_buff *skb; | 1869 | struct sk_buff *skb; |
1871 | struct ieee80211_mgmt *resp; | 1870 | struct ieee80211_mgmt *resp; |
1872 | 1871 | ||
1873 | if (compare_ether_addr(mgmt->da, sdata->dev->dev_addr) != 0) { | 1872 | if (compare_ether_addr(mgmt->da, sdata->vif.addr) != 0) { |
1874 | /* Not to own unicast address */ | 1873 | /* Not to own unicast address */ |
1875 | return; | 1874 | return; |
1876 | } | 1875 | } |
@@ -1894,7 +1893,7 @@ static void ieee80211_process_sa_query_req(struct ieee80211_sub_if_data *sdata, | |||
1894 | resp = (struct ieee80211_mgmt *) skb_put(skb, 24); | 1893 | resp = (struct ieee80211_mgmt *) skb_put(skb, 24); |
1895 | memset(resp, 0, 24); | 1894 | memset(resp, 0, 24); |
1896 | memcpy(resp->da, mgmt->sa, ETH_ALEN); | 1895 | memcpy(resp->da, mgmt->sa, ETH_ALEN); |
1897 | memcpy(resp->sa, sdata->dev->dev_addr, ETH_ALEN); | 1896 | memcpy(resp->sa, sdata->vif.addr, ETH_ALEN); |
1898 | memcpy(resp->bssid, sdata->u.mgd.bssid, ETH_ALEN); | 1897 | memcpy(resp->bssid, sdata->u.mgd.bssid, ETH_ALEN); |
1899 | resp->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT | | 1898 | resp->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT | |
1900 | IEEE80211_STYPE_ACTION); | 1899 | IEEE80211_STYPE_ACTION); |
@@ -2274,7 +2273,7 @@ static int prepare_for_handlers(struct ieee80211_sub_if_data *sdata, | |||
2274 | if (!bssid && !sdata->u.mgd.use_4addr) | 2273 | if (!bssid && !sdata->u.mgd.use_4addr) |
2275 | return 0; | 2274 | return 0; |
2276 | if (!multicast && | 2275 | if (!multicast && |
2277 | compare_ether_addr(sdata->dev->dev_addr, hdr->addr1) != 0) { | 2276 | compare_ether_addr(sdata->vif.addr, hdr->addr1) != 0) { |
2278 | if (!(sdata->dev->flags & IFF_PROMISC)) | 2277 | if (!(sdata->dev->flags & IFF_PROMISC)) |
2279 | return 0; | 2278 | return 0; |
2280 | rx->flags &= ~IEEE80211_RX_RA_MATCH; | 2279 | rx->flags &= ~IEEE80211_RX_RA_MATCH; |
@@ -2291,7 +2290,7 @@ static int prepare_for_handlers(struct ieee80211_sub_if_data *sdata, | |||
2291 | return 0; | 2290 | return 0; |
2292 | rx->flags &= ~IEEE80211_RX_RA_MATCH; | 2291 | rx->flags &= ~IEEE80211_RX_RA_MATCH; |
2293 | } else if (!multicast && | 2292 | } else if (!multicast && |
2294 | compare_ether_addr(sdata->dev->dev_addr, | 2293 | compare_ether_addr(sdata->vif.addr, |
2295 | hdr->addr1) != 0) { | 2294 | hdr->addr1) != 0) { |
2296 | if (!(sdata->dev->flags & IFF_PROMISC)) | 2295 | if (!(sdata->dev->flags & IFF_PROMISC)) |
2297 | return 0; | 2296 | return 0; |
@@ -2308,7 +2307,7 @@ static int prepare_for_handlers(struct ieee80211_sub_if_data *sdata, | |||
2308 | break; | 2307 | break; |
2309 | case NL80211_IFTYPE_MESH_POINT: | 2308 | case NL80211_IFTYPE_MESH_POINT: |
2310 | if (!multicast && | 2309 | if (!multicast && |
2311 | compare_ether_addr(sdata->dev->dev_addr, | 2310 | compare_ether_addr(sdata->vif.addr, |
2312 | hdr->addr1) != 0) { | 2311 | hdr->addr1) != 0) { |
2313 | if (!(sdata->dev->flags & IFF_PROMISC)) | 2312 | if (!(sdata->dev->flags & IFF_PROMISC)) |
2314 | return 0; | 2313 | return 0; |
@@ -2319,11 +2318,11 @@ static int prepare_for_handlers(struct ieee80211_sub_if_data *sdata, | |||
2319 | case NL80211_IFTYPE_AP_VLAN: | 2318 | case NL80211_IFTYPE_AP_VLAN: |
2320 | case NL80211_IFTYPE_AP: | 2319 | case NL80211_IFTYPE_AP: |
2321 | if (!bssid) { | 2320 | if (!bssid) { |
2322 | if (compare_ether_addr(sdata->dev->dev_addr, | 2321 | if (compare_ether_addr(sdata->vif.addr, |
2323 | hdr->addr1)) | 2322 | hdr->addr1)) |
2324 | return 0; | 2323 | return 0; |
2325 | } else if (!ieee80211_bssid_match(bssid, | 2324 | } else if (!ieee80211_bssid_match(bssid, |
2326 | sdata->dev->dev_addr)) { | 2325 | sdata->vif.addr)) { |
2327 | if (!(rx->flags & IEEE80211_RX_IN_SCAN)) | 2326 | if (!(rx->flags & IEEE80211_RX_IN_SCAN)) |
2328 | return 0; | 2327 | return 0; |
2329 | rx->flags &= ~IEEE80211_RX_RA_MATCH; | 2328 | rx->flags &= ~IEEE80211_RX_RA_MATCH; |
@@ -2444,7 +2443,7 @@ static void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw, | |||
2444 | printk(KERN_DEBUG "%s: failed to copy " | 2443 | printk(KERN_DEBUG "%s: failed to copy " |
2445 | "multicast frame for %s\n", | 2444 | "multicast frame for %s\n", |
2446 | wiphy_name(local->hw.wiphy), | 2445 | wiphy_name(local->hw.wiphy), |
2447 | prev->dev->name); | 2446 | prev->name); |
2448 | continue; | 2447 | continue; |
2449 | } | 2448 | } |
2450 | ieee80211_invoke_rx_handlers(prev, &rx, skb_new, rate); | 2449 | ieee80211_invoke_rx_handlers(prev, &rx, skb_new, rate); |
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c index 4cf387c944bf..d3381ba5f457 100644 --- a/net/mac80211/scan.c +++ b/net/mac80211/scan.c | |||
@@ -147,7 +147,7 @@ ieee80211_scan_rx(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb) | |||
147 | presp = ieee80211_is_probe_resp(fc); | 147 | presp = ieee80211_is_probe_resp(fc); |
148 | if (presp) { | 148 | if (presp) { |
149 | /* ignore ProbeResp to foreign address */ | 149 | /* ignore ProbeResp to foreign address */ |
150 | if (memcmp(mgmt->da, sdata->dev->dev_addr, ETH_ALEN)) | 150 | if (memcmp(mgmt->da, sdata->vif.addr, ETH_ALEN)) |
151 | return RX_DROP_MONITOR; | 151 | return RX_DROP_MONITOR; |
152 | 152 | ||
153 | presp = true; | 153 | presp = true; |
diff --git a/net/mac80211/spectmgmt.c b/net/mac80211/spectmgmt.c index aa743a895cf9..7733f66ee2c4 100644 --- a/net/mac80211/spectmgmt.c +++ b/net/mac80211/spectmgmt.c | |||
@@ -35,7 +35,7 @@ static void ieee80211_send_refuse_measurement_request(struct ieee80211_sub_if_da | |||
35 | 35 | ||
36 | if (!skb) { | 36 | if (!skb) { |
37 | printk(KERN_ERR "%s: failed to allocate buffer for " | 37 | printk(KERN_ERR "%s: failed to allocate buffer for " |
38 | "measurement report frame\n", sdata->dev->name); | 38 | "measurement report frame\n", sdata->name); |
39 | return; | 39 | return; |
40 | } | 40 | } |
41 | 41 | ||
@@ -43,7 +43,7 @@ static void ieee80211_send_refuse_measurement_request(struct ieee80211_sub_if_da | |||
43 | msr_report = (struct ieee80211_mgmt *)skb_put(skb, 24); | 43 | msr_report = (struct ieee80211_mgmt *)skb_put(skb, 24); |
44 | memset(msr_report, 0, 24); | 44 | memset(msr_report, 0, 24); |
45 | memcpy(msr_report->da, da, ETH_ALEN); | 45 | memcpy(msr_report->da, da, ETH_ALEN); |
46 | memcpy(msr_report->sa, sdata->dev->dev_addr, ETH_ALEN); | 46 | memcpy(msr_report->sa, sdata->vif.addr, ETH_ALEN); |
47 | memcpy(msr_report->bssid, bssid, ETH_ALEN); | 47 | memcpy(msr_report->bssid, bssid, ETH_ALEN); |
48 | msr_report->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT | | 48 | msr_report->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT | |
49 | IEEE80211_STYPE_ACTION); | 49 | IEEE80211_STYPE_ACTION); |
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c index c58a23eea58c..294f1b8b1545 100644 --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c | |||
@@ -372,7 +372,7 @@ int sta_info_insert(struct sta_info *sta) | |||
372 | goto out_free; | 372 | goto out_free; |
373 | } | 373 | } |
374 | 374 | ||
375 | if (WARN_ON(compare_ether_addr(sta->sta.addr, sdata->dev->dev_addr) == 0 || | 375 | if (WARN_ON(compare_ether_addr(sta->sta.addr, sdata->vif.addr) == 0 || |
376 | is_multicast_ether_addr(sta->sta.addr))) { | 376 | is_multicast_ether_addr(sta->sta.addr))) { |
377 | err = -EINVAL; | 377 | err = -EINVAL; |
378 | goto out_free; | 378 | goto out_free; |
@@ -831,7 +831,7 @@ void ieee80211_sta_expire(struct ieee80211_sub_if_data *sdata, | |||
831 | if (time_after(jiffies, sta->last_rx + exp_time)) { | 831 | if (time_after(jiffies, sta->last_rx + exp_time)) { |
832 | #ifdef CONFIG_MAC80211_IBSS_DEBUG | 832 | #ifdef CONFIG_MAC80211_IBSS_DEBUG |
833 | printk(KERN_DEBUG "%s: expiring inactive STA %pM\n", | 833 | printk(KERN_DEBUG "%s: expiring inactive STA %pM\n", |
834 | sdata->dev->name, sta->sta.addr); | 834 | sdata->name, sta->sta.addr); |
835 | #endif | 835 | #endif |
836 | __sta_info_unlink(&sta); | 836 | __sta_info_unlink(&sta); |
837 | if (sta) | 837 | if (sta) |
@@ -889,7 +889,7 @@ void ieee80211_sta_ps_deliver_wakeup(struct sta_info *sta) | |||
889 | 889 | ||
890 | #ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG | 890 | #ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG |
891 | printk(KERN_DEBUG "%s: STA %pM aid %d sending %d filtered/%d PS frames " | 891 | printk(KERN_DEBUG "%s: STA %pM aid %d sending %d filtered/%d PS frames " |
892 | "since STA not sleeping anymore\n", sdata->dev->name, | 892 | "since STA not sleeping anymore\n", sdata->name, |
893 | sta->sta.addr, sta->sta.aid, sent - buffered, buffered); | 893 | sta->sta.addr, sta->sta.aid, sent - buffered, buffered); |
894 | #endif /* CONFIG_MAC80211_VERBOSE_PS_DEBUG */ | 894 | #endif /* CONFIG_MAC80211_VERBOSE_PS_DEBUG */ |
895 | } | 895 | } |
@@ -948,7 +948,7 @@ void ieee80211_sta_ps_deliver_poll_response(struct sta_info *sta) | |||
948 | */ | 948 | */ |
949 | printk(KERN_DEBUG "%s: STA %pM sent PS Poll even " | 949 | printk(KERN_DEBUG "%s: STA %pM sent PS Poll even " |
950 | "though there are no buffered frames for it\n", | 950 | "though there are no buffered frames for it\n", |
951 | sdata->dev->name, sta->sta.addr); | 951 | sdata->name, sta->sta.addr); |
952 | #endif /* CONFIG_MAC80211_VERBOSE_PS_DEBUG */ | 952 | #endif /* CONFIG_MAC80211_VERBOSE_PS_DEBUG */ |
953 | } | 953 | } |
954 | } | 954 | } |
diff --git a/net/mac80211/status.c b/net/mac80211/status.c index 32fe327acf4e..b4608f11a40f 100644 --- a/net/mac80211/status.c +++ b/net/mac80211/status.c | |||
@@ -168,7 +168,7 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
168 | 168 | ||
169 | for_each_sta_info(local, hdr->addr1, sta, tmp) { | 169 | for_each_sta_info(local, hdr->addr1, sta, tmp) { |
170 | /* skip wrong virtual interface */ | 170 | /* skip wrong virtual interface */ |
171 | if (memcmp(hdr->addr2, sta->sdata->dev->dev_addr, ETH_ALEN)) | 171 | if (memcmp(hdr->addr2, sta->sdata->vif.addr, ETH_ALEN)) |
172 | continue; | 172 | continue; |
173 | 173 | ||
174 | if (!(info->flags & IEEE80211_TX_STAT_ACK) && | 174 | if (!(info->flags & IEEE80211_TX_STAT_ACK) && |
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index b913bfc34a9f..ac48c86ae6b3 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c | |||
@@ -223,7 +223,7 @@ ieee80211_tx_h_check_assoc(struct ieee80211_tx_data *tx) | |||
223 | #ifdef CONFIG_MAC80211_VERBOSE_DEBUG | 223 | #ifdef CONFIG_MAC80211_VERBOSE_DEBUG |
224 | printk(KERN_DEBUG "%s: dropped data frame to not " | 224 | printk(KERN_DEBUG "%s: dropped data frame to not " |
225 | "associated station %pM\n", | 225 | "associated station %pM\n", |
226 | tx->dev->name, hdr->addr1); | 226 | tx->sdata->name, hdr->addr1); |
227 | #endif /* CONFIG_MAC80211_VERBOSE_DEBUG */ | 227 | #endif /* CONFIG_MAC80211_VERBOSE_DEBUG */ |
228 | I802_DEBUG_INC(tx->local->tx_handlers_drop_not_assoc); | 228 | I802_DEBUG_INC(tx->local->tx_handlers_drop_not_assoc); |
229 | return TX_DROP; | 229 | return TX_DROP; |
@@ -331,7 +331,7 @@ ieee80211_tx_h_multicast_ps_buf(struct ieee80211_tx_data *tx) | |||
331 | #ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG | 331 | #ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG |
332 | if (net_ratelimit()) | 332 | if (net_ratelimit()) |
333 | printk(KERN_DEBUG "%s: BC TX buffer full - dropping the oldest frame\n", | 333 | printk(KERN_DEBUG "%s: BC TX buffer full - dropping the oldest frame\n", |
334 | tx->dev->name); | 334 | tx->sdata->name); |
335 | #endif | 335 | #endif |
336 | dev_kfree_skb(skb_dequeue(&tx->sdata->bss->ps_bc_buf)); | 336 | dev_kfree_skb(skb_dequeue(&tx->sdata->bss->ps_bc_buf)); |
337 | } else | 337 | } else |
@@ -391,7 +391,7 @@ ieee80211_tx_h_unicast_ps_buf(struct ieee80211_tx_data *tx) | |||
391 | if (net_ratelimit()) { | 391 | if (net_ratelimit()) { |
392 | printk(KERN_DEBUG "%s: STA %pM TX " | 392 | printk(KERN_DEBUG "%s: STA %pM TX " |
393 | "buffer full - dropping oldest frame\n", | 393 | "buffer full - dropping oldest frame\n", |
394 | tx->dev->name, sta->sta.addr); | 394 | tx->sdata->name, sta->sta.addr); |
395 | } | 395 | } |
396 | #endif | 396 | #endif |
397 | dev_kfree_skb(old); | 397 | dev_kfree_skb(old); |
@@ -416,7 +416,7 @@ ieee80211_tx_h_unicast_ps_buf(struct ieee80211_tx_data *tx) | |||
416 | #ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG | 416 | #ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG |
417 | else if (unlikely(staflags & WLAN_STA_PS_STA)) { | 417 | else if (unlikely(staflags & WLAN_STA_PS_STA)) { |
418 | printk(KERN_DEBUG "%s: STA %pM in PS mode, but pspoll " | 418 | printk(KERN_DEBUG "%s: STA %pM in PS mode, but pspoll " |
419 | "set -> send frame\n", tx->dev->name, | 419 | "set -> send frame\n", tx->sdata->name, |
420 | sta->sta.addr); | 420 | sta->sta.addr); |
421 | } | 421 | } |
422 | #endif /* CONFIG_MAC80211_VERBOSE_PS_DEBUG */ | 422 | #endif /* CONFIG_MAC80211_VERBOSE_PS_DEBUG */ |
@@ -549,7 +549,7 @@ ieee80211_tx_h_rate_ctrl(struct ieee80211_tx_data *tx) | |||
549 | "%s: Dropped data frame as no usable bitrate found while " | 549 | "%s: Dropped data frame as no usable bitrate found while " |
550 | "scanning and associated. Target station: " | 550 | "scanning and associated. Target station: " |
551 | "%pM on %d GHz band\n", | 551 | "%pM on %d GHz band\n", |
552 | tx->dev->name, hdr->addr1, | 552 | tx->sdata->name, hdr->addr1, |
553 | tx->channel->band ? 5 : 2)) | 553 | tx->channel->band ? 5 : 2)) |
554 | return TX_DROP; | 554 | return TX_DROP; |
555 | 555 | ||
@@ -1021,7 +1021,6 @@ ieee80211_tx_prepare(struct ieee80211_sub_if_data *sdata, | |||
1021 | 1021 | ||
1022 | memset(tx, 0, sizeof(*tx)); | 1022 | memset(tx, 0, sizeof(*tx)); |
1023 | tx->skb = skb; | 1023 | tx->skb = skb; |
1024 | tx->dev = sdata->dev; /* use original interface */ | ||
1025 | tx->local = local; | 1024 | tx->local = local; |
1026 | tx->sdata = sdata; | 1025 | tx->sdata = sdata; |
1027 | tx->channel = local->hw.conf.channel; | 1026 | tx->channel = local->hw.conf.channel; |
@@ -1474,7 +1473,7 @@ static void ieee80211_xmit(struct ieee80211_sub_if_data *sdata, | |||
1474 | continue; | 1473 | continue; |
1475 | if (tmp_sdata->vif.type != NL80211_IFTYPE_AP) | 1474 | if (tmp_sdata->vif.type != NL80211_IFTYPE_AP) |
1476 | continue; | 1475 | continue; |
1477 | if (compare_ether_addr(tmp_sdata->dev->dev_addr, | 1476 | if (compare_ether_addr(tmp_sdata->vif.addr, |
1478 | hdr->addr2) == 0) { | 1477 | hdr->addr2) == 0) { |
1479 | sdata = tmp_sdata; | 1478 | sdata = tmp_sdata; |
1480 | break; | 1479 | break; |
@@ -1638,7 +1637,7 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb, | |||
1638 | fc |= cpu_to_le16(IEEE80211_FCTL_FROMDS | IEEE80211_FCTL_TODS); | 1637 | fc |= cpu_to_le16(IEEE80211_FCTL_FROMDS | IEEE80211_FCTL_TODS); |
1639 | /* RA TA DA SA */ | 1638 | /* RA TA DA SA */ |
1640 | memcpy(hdr.addr1, sta->sta.addr, ETH_ALEN); | 1639 | memcpy(hdr.addr1, sta->sta.addr, ETH_ALEN); |
1641 | memcpy(hdr.addr2, dev->dev_addr, ETH_ALEN); | 1640 | memcpy(hdr.addr2, sdata->vif.addr, ETH_ALEN); |
1642 | memcpy(hdr.addr3, skb->data, ETH_ALEN); | 1641 | memcpy(hdr.addr3, skb->data, ETH_ALEN); |
1643 | memcpy(hdr.addr4, skb->data + ETH_ALEN, ETH_ALEN); | 1642 | memcpy(hdr.addr4, skb->data + ETH_ALEN, ETH_ALEN); |
1644 | hdrlen = 30; | 1643 | hdrlen = 30; |
@@ -1652,7 +1651,7 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb, | |||
1652 | fc |= cpu_to_le16(IEEE80211_FCTL_FROMDS); | 1651 | fc |= cpu_to_le16(IEEE80211_FCTL_FROMDS); |
1653 | /* DA BSSID SA */ | 1652 | /* DA BSSID SA */ |
1654 | memcpy(hdr.addr1, skb->data, ETH_ALEN); | 1653 | memcpy(hdr.addr1, skb->data, ETH_ALEN); |
1655 | memcpy(hdr.addr2, dev->dev_addr, ETH_ALEN); | 1654 | memcpy(hdr.addr2, sdata->vif.addr, ETH_ALEN); |
1656 | memcpy(hdr.addr3, skb->data + ETH_ALEN, ETH_ALEN); | 1655 | memcpy(hdr.addr3, skb->data + ETH_ALEN, ETH_ALEN); |
1657 | hdrlen = 24; | 1656 | hdrlen = 24; |
1658 | break; | 1657 | break; |
@@ -1660,7 +1659,7 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb, | |||
1660 | fc |= cpu_to_le16(IEEE80211_FCTL_FROMDS | IEEE80211_FCTL_TODS); | 1659 | fc |= cpu_to_le16(IEEE80211_FCTL_FROMDS | IEEE80211_FCTL_TODS); |
1661 | /* RA TA DA SA */ | 1660 | /* RA TA DA SA */ |
1662 | memcpy(hdr.addr1, sdata->u.wds.remote_addr, ETH_ALEN); | 1661 | memcpy(hdr.addr1, sdata->u.wds.remote_addr, ETH_ALEN); |
1663 | memcpy(hdr.addr2, dev->dev_addr, ETH_ALEN); | 1662 | memcpy(hdr.addr2, sdata->vif.addr, ETH_ALEN); |
1664 | memcpy(hdr.addr3, skb->data, ETH_ALEN); | 1663 | memcpy(hdr.addr3, skb->data, ETH_ALEN); |
1665 | memcpy(hdr.addr4, skb->data + ETH_ALEN, ETH_ALEN); | 1664 | memcpy(hdr.addr4, skb->data + ETH_ALEN, ETH_ALEN); |
1666 | hdrlen = 30; | 1665 | hdrlen = 30; |
@@ -1674,8 +1673,8 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb, | |||
1674 | goto fail; | 1673 | goto fail; |
1675 | } | 1674 | } |
1676 | 1675 | ||
1677 | if (compare_ether_addr(dev->dev_addr, | 1676 | if (compare_ether_addr(sdata->vif.addr, |
1678 | skb->data + ETH_ALEN) == 0) { | 1677 | skb->data + ETH_ALEN) == 0) { |
1679 | hdrlen = ieee80211_fill_mesh_addresses(&hdr, &fc, | 1678 | hdrlen = ieee80211_fill_mesh_addresses(&hdr, &fc, |
1680 | skb->data, skb->data + ETH_ALEN); | 1679 | skb->data, skb->data + ETH_ALEN); |
1681 | meshhdrlen = ieee80211_new_mesh_header(&mesh_hdr, | 1680 | meshhdrlen = ieee80211_new_mesh_header(&mesh_hdr, |
@@ -1705,7 +1704,7 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb, | |||
1705 | } | 1704 | } |
1706 | } | 1705 | } |
1707 | hdrlen = ieee80211_fill_mesh_addresses(&hdr, &fc, | 1706 | hdrlen = ieee80211_fill_mesh_addresses(&hdr, &fc, |
1708 | mesh_da, dev->dev_addr); | 1707 | mesh_da, sdata->vif.addr); |
1709 | rcu_read_unlock(); | 1708 | rcu_read_unlock(); |
1710 | if (is_mesh_mcast) | 1709 | if (is_mesh_mcast) |
1711 | meshhdrlen = | 1710 | meshhdrlen = |
@@ -1730,7 +1729,7 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb, | |||
1730 | if (sdata->u.mgd.use_4addr && ethertype != ETH_P_PAE) { | 1729 | if (sdata->u.mgd.use_4addr && ethertype != ETH_P_PAE) { |
1731 | fc |= cpu_to_le16(IEEE80211_FCTL_FROMDS | IEEE80211_FCTL_TODS); | 1730 | fc |= cpu_to_le16(IEEE80211_FCTL_FROMDS | IEEE80211_FCTL_TODS); |
1732 | /* RA TA DA SA */ | 1731 | /* RA TA DA SA */ |
1733 | memcpy(hdr.addr2, dev->dev_addr, ETH_ALEN); | 1732 | memcpy(hdr.addr2, sdata->vif.addr, ETH_ALEN); |
1734 | memcpy(hdr.addr3, skb->data, ETH_ALEN); | 1733 | memcpy(hdr.addr3, skb->data, ETH_ALEN); |
1735 | memcpy(hdr.addr4, skb->data + ETH_ALEN, ETH_ALEN); | 1734 | memcpy(hdr.addr4, skb->data + ETH_ALEN, ETH_ALEN); |
1736 | hdrlen = 30; | 1735 | hdrlen = 30; |
@@ -1781,7 +1780,7 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb, | |||
1781 | unlikely(!is_multicast_ether_addr(hdr.addr1) && | 1780 | unlikely(!is_multicast_ether_addr(hdr.addr1) && |
1782 | !(sta_flags & WLAN_STA_AUTHORIZED) && | 1781 | !(sta_flags & WLAN_STA_AUTHORIZED) && |
1783 | !(ethertype == ETH_P_PAE && | 1782 | !(ethertype == ETH_P_PAE && |
1784 | compare_ether_addr(dev->dev_addr, | 1783 | compare_ether_addr(sdata->vif.addr, |
1785 | skb->data + ETH_ALEN) == 0))) { | 1784 | skb->data + ETH_ALEN) == 0))) { |
1786 | #ifdef CONFIG_MAC80211_VERBOSE_DEBUG | 1785 | #ifdef CONFIG_MAC80211_VERBOSE_DEBUG |
1787 | if (net_ratelimit()) | 1786 | if (net_ratelimit()) |
@@ -2145,8 +2144,8 @@ struct sk_buff *ieee80211_beacon_get_tim(struct ieee80211_hw *hw, | |||
2145 | mgmt->frame_control = | 2144 | mgmt->frame_control = |
2146 | cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_BEACON); | 2145 | cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_BEACON); |
2147 | memset(mgmt->da, 0xff, ETH_ALEN); | 2146 | memset(mgmt->da, 0xff, ETH_ALEN); |
2148 | memcpy(mgmt->sa, sdata->dev->dev_addr, ETH_ALEN); | 2147 | memcpy(mgmt->sa, sdata->vif.addr, ETH_ALEN); |
2149 | memcpy(mgmt->bssid, sdata->dev->dev_addr, ETH_ALEN); | 2148 | memcpy(mgmt->bssid, sdata->vif.addr, ETH_ALEN); |
2150 | mgmt->u.beacon.beacon_int = | 2149 | mgmt->u.beacon.beacon_int = |
2151 | cpu_to_le16(sdata->vif.bss_conf.beacon_int); | 2150 | cpu_to_le16(sdata->vif.bss_conf.beacon_int); |
2152 | mgmt->u.beacon.capab_info = 0x0; /* 0x0 for MPs */ | 2151 | mgmt->u.beacon.capab_info = 0x0; /* 0x0 for MPs */ |
diff --git a/net/mac80211/util.c b/net/mac80211/util.c index d09f78bb2442..d45760eae6c7 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c | |||
@@ -469,7 +469,7 @@ void ieee80211_iterate_active_interfaces( | |||
469 | break; | 469 | break; |
470 | } | 470 | } |
471 | if (netif_running(sdata->dev)) | 471 | if (netif_running(sdata->dev)) |
472 | iterator(data, sdata->dev->dev_addr, | 472 | iterator(data, sdata->vif.addr, |
473 | &sdata->vif); | 473 | &sdata->vif); |
474 | } | 474 | } |
475 | 475 | ||
@@ -503,7 +503,7 @@ void ieee80211_iterate_active_interfaces_atomic( | |||
503 | break; | 503 | break; |
504 | } | 504 | } |
505 | if (netif_running(sdata->dev)) | 505 | if (netif_running(sdata->dev)) |
506 | iterator(data, sdata->dev->dev_addr, | 506 | iterator(data, sdata->vif.addr, |
507 | &sdata->vif); | 507 | &sdata->vif); |
508 | } | 508 | } |
509 | 509 | ||
@@ -848,7 +848,7 @@ void ieee80211_send_auth(struct ieee80211_sub_if_data *sdata, | |||
848 | sizeof(*mgmt) + 6 + extra_len); | 848 | sizeof(*mgmt) + 6 + extra_len); |
849 | if (!skb) { | 849 | if (!skb) { |
850 | printk(KERN_DEBUG "%s: failed to allocate buffer for auth " | 850 | printk(KERN_DEBUG "%s: failed to allocate buffer for auth " |
851 | "frame\n", sdata->dev->name); | 851 | "frame\n", sdata->name); |
852 | return; | 852 | return; |
853 | } | 853 | } |
854 | skb_reserve(skb, local->hw.extra_tx_headroom); | 854 | skb_reserve(skb, local->hw.extra_tx_headroom); |
@@ -858,7 +858,7 @@ void ieee80211_send_auth(struct ieee80211_sub_if_data *sdata, | |||
858 | mgmt->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT | | 858 | mgmt->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT | |
859 | IEEE80211_STYPE_AUTH); | 859 | IEEE80211_STYPE_AUTH); |
860 | memcpy(mgmt->da, bssid, ETH_ALEN); | 860 | memcpy(mgmt->da, bssid, ETH_ALEN); |
861 | memcpy(mgmt->sa, sdata->dev->dev_addr, ETH_ALEN); | 861 | memcpy(mgmt->sa, sdata->vif.addr, ETH_ALEN); |
862 | memcpy(mgmt->bssid, bssid, ETH_ALEN); | 862 | memcpy(mgmt->bssid, bssid, ETH_ALEN); |
863 | mgmt->u.auth.auth_alg = cpu_to_le16(auth_alg); | 863 | mgmt->u.auth.auth_alg = cpu_to_le16(auth_alg); |
864 | mgmt->u.auth.auth_transaction = cpu_to_le16(transaction); | 864 | mgmt->u.auth.auth_transaction = cpu_to_le16(transaction); |
@@ -949,7 +949,7 @@ void ieee80211_send_probe_req(struct ieee80211_sub_if_data *sdata, u8 *dst, | |||
949 | ie_len); | 949 | ie_len); |
950 | if (!skb) { | 950 | if (!skb) { |
951 | printk(KERN_DEBUG "%s: failed to allocate buffer for probe " | 951 | printk(KERN_DEBUG "%s: failed to allocate buffer for probe " |
952 | "request\n", sdata->dev->name); | 952 | "request\n", sdata->name); |
953 | return; | 953 | return; |
954 | } | 954 | } |
955 | skb_reserve(skb, local->hw.extra_tx_headroom); | 955 | skb_reserve(skb, local->hw.extra_tx_headroom); |
@@ -958,7 +958,7 @@ void ieee80211_send_probe_req(struct ieee80211_sub_if_data *sdata, u8 *dst, | |||
958 | memset(mgmt, 0, 24); | 958 | memset(mgmt, 0, 24); |
959 | mgmt->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT | | 959 | mgmt->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT | |
960 | IEEE80211_STYPE_PROBE_REQ); | 960 | IEEE80211_STYPE_PROBE_REQ); |
961 | memcpy(mgmt->sa, sdata->dev->dev_addr, ETH_ALEN); | 961 | memcpy(mgmt->sa, sdata->vif.addr, ETH_ALEN); |
962 | if (dst) { | 962 | if (dst) { |
963 | memcpy(mgmt->da, dst, ETH_ALEN); | 963 | memcpy(mgmt->da, dst, ETH_ALEN); |
964 | memcpy(mgmt->bssid, dst, ETH_ALEN); | 964 | memcpy(mgmt->bssid, dst, ETH_ALEN); |
@@ -1051,7 +1051,7 @@ int ieee80211_reconfig(struct ieee80211_local *local) | |||
1051 | netif_running(sdata->dev)) { | 1051 | netif_running(sdata->dev)) { |
1052 | conf.vif = &sdata->vif; | 1052 | conf.vif = &sdata->vif; |
1053 | conf.type = sdata->vif.type; | 1053 | conf.type = sdata->vif.type; |
1054 | conf.mac_addr = sdata->dev->dev_addr; | 1054 | conf.mac_addr = sdata->vif.addr; |
1055 | res = drv_add_interface(local, &conf); | 1055 | res = drv_add_interface(local, &conf); |
1056 | } | 1056 | } |
1057 | } | 1057 | } |