diff options
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/cfg.c | 2 | ||||
-rw-r--r-- | net/mac80211/debugfs_netdev.c | 4 | ||||
-rw-r--r-- | net/mac80211/ieee80211.c | 36 | ||||
-rw-r--r-- | net/mac80211/ieee80211_i.h | 1 | ||||
-rw-r--r-- | net/mac80211/ieee80211_iface.c | 10 | ||||
-rw-r--r-- | net/mac80211/ieee80211_ioctl.c | 65 | ||||
-rw-r--r-- | net/mac80211/ieee80211_sta.c | 48 | ||||
-rw-r--r-- | net/mac80211/key.c | 6 | ||||
-rw-r--r-- | net/mac80211/rx.c | 38 | ||||
-rw-r--r-- | net/mac80211/sta_info.c | 4 | ||||
-rw-r--r-- | net/mac80211/tx.c | 17 | ||||
-rw-r--r-- | net/mac80211/util.c | 2 |
12 files changed, 116 insertions, 117 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 11156b381ec3..d02d9ef6b1ef 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
@@ -91,7 +91,7 @@ static int ieee80211_change_iface(struct wiphy *wiphy, int ifindex, | |||
91 | 91 | ||
92 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); | 92 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
93 | 93 | ||
94 | if (sdata->type == IEEE80211_IF_TYPE_VLAN) | 94 | if (sdata->vif.type == IEEE80211_IF_TYPE_VLAN) |
95 | return -EOPNOTSUPP; | 95 | return -EOPNOTSUPP; |
96 | 96 | ||
97 | ieee80211_if_reinit(dev); | 97 | ieee80211_if_reinit(dev); |
diff --git a/net/mac80211/debugfs_netdev.c b/net/mac80211/debugfs_netdev.c index bf715d28643b..d2d3c076c853 100644 --- a/net/mac80211/debugfs_netdev.c +++ b/net/mac80211/debugfs_netdev.c | |||
@@ -226,7 +226,7 @@ static void add_files(struct ieee80211_sub_if_data *sdata) | |||
226 | if (!sdata->debugfsdir) | 226 | if (!sdata->debugfsdir) |
227 | return; | 227 | return; |
228 | 228 | ||
229 | switch (sdata->type) { | 229 | switch (sdata->vif.type) { |
230 | case IEEE80211_IF_TYPE_STA: | 230 | case IEEE80211_IF_TYPE_STA: |
231 | case IEEE80211_IF_TYPE_IBSS: | 231 | case IEEE80211_IF_TYPE_IBSS: |
232 | add_sta_files(sdata); | 232 | add_sta_files(sdata); |
@@ -353,7 +353,7 @@ void ieee80211_debugfs_add_netdev(struct ieee80211_sub_if_data *sdata) | |||
353 | 353 | ||
354 | void ieee80211_debugfs_remove_netdev(struct ieee80211_sub_if_data *sdata) | 354 | void ieee80211_debugfs_remove_netdev(struct ieee80211_sub_if_data *sdata) |
355 | { | 355 | { |
356 | del_files(sdata, sdata->type); | 356 | del_files(sdata, sdata->vif.type); |
357 | debugfs_remove(sdata->debugfsdir); | 357 | debugfs_remove(sdata->debugfsdir); |
358 | sdata->debugfsdir = NULL; | 358 | sdata->debugfsdir = NULL; |
359 | } | 359 | } |
diff --git a/net/mac80211/ieee80211.c b/net/mac80211/ieee80211.c index 42c27089f006..c9981701ef68 100644 --- a/net/mac80211/ieee80211.c +++ b/net/mac80211/ieee80211.c | |||
@@ -177,21 +177,21 @@ static int ieee80211_open(struct net_device *dev) | |||
177 | /* | 177 | /* |
178 | * check whether it may have the same address | 178 | * check whether it may have the same address |
179 | */ | 179 | */ |
180 | if (!identical_mac_addr_allowed(sdata->type, | 180 | if (!identical_mac_addr_allowed(sdata->vif.type, |
181 | nsdata->type)) | 181 | nsdata->vif.type)) |
182 | return -ENOTUNIQ; | 182 | return -ENOTUNIQ; |
183 | 183 | ||
184 | /* | 184 | /* |
185 | * can only add VLANs to enabled APs | 185 | * can only add VLANs to enabled APs |
186 | */ | 186 | */ |
187 | if (sdata->type == IEEE80211_IF_TYPE_VLAN && | 187 | if (sdata->vif.type == IEEE80211_IF_TYPE_VLAN && |
188 | nsdata->type == IEEE80211_IF_TYPE_AP && | 188 | nsdata->vif.type == IEEE80211_IF_TYPE_AP && |
189 | netif_running(nsdata->dev)) | 189 | netif_running(nsdata->dev)) |
190 | sdata->u.vlan.ap = nsdata; | 190 | sdata->u.vlan.ap = nsdata; |
191 | } | 191 | } |
192 | } | 192 | } |
193 | 193 | ||
194 | switch (sdata->type) { | 194 | switch (sdata->vif.type) { |
195 | case IEEE80211_IF_TYPE_WDS: | 195 | case IEEE80211_IF_TYPE_WDS: |
196 | if (is_zero_ether_addr(sdata->u.wds.remote_addr)) | 196 | if (is_zero_ether_addr(sdata->u.wds.remote_addr)) |
197 | return -ENOLINK; | 197 | return -ENOLINK; |
@@ -222,7 +222,7 @@ static int ieee80211_open(struct net_device *dev) | |||
222 | ieee80211_led_radio(local, local->hw.conf.radio_enabled); | 222 | ieee80211_led_radio(local, local->hw.conf.radio_enabled); |
223 | } | 223 | } |
224 | 224 | ||
225 | switch (sdata->type) { | 225 | switch (sdata->vif.type) { |
226 | case IEEE80211_IF_TYPE_VLAN: | 226 | case IEEE80211_IF_TYPE_VLAN: |
227 | list_add(&sdata->u.vlan.list, &sdata->u.vlan.ap->u.ap.vlans); | 227 | list_add(&sdata->u.vlan.list, &sdata->u.vlan.ap->u.ap.vlans); |
228 | /* no need to tell driver */ | 228 | /* no need to tell driver */ |
@@ -244,7 +244,7 @@ static int ieee80211_open(struct net_device *dev) | |||
244 | /* fall through */ | 244 | /* fall through */ |
245 | default: | 245 | default: |
246 | conf.vif = &sdata->vif; | 246 | conf.vif = &sdata->vif; |
247 | conf.type = sdata->type; | 247 | conf.type = sdata->vif.type; |
248 | conf.mac_addr = dev->dev_addr; | 248 | conf.mac_addr = dev->dev_addr; |
249 | res = local->ops->add_interface(local_to_hw(local), &conf); | 249 | res = local->ops->add_interface(local_to_hw(local), &conf); |
250 | if (res && !local->open_count && local->ops->stop) | 250 | if (res && !local->open_count && local->ops->stop) |
@@ -256,7 +256,7 @@ static int ieee80211_open(struct net_device *dev) | |||
256 | ieee80211_reset_erp_info(dev); | 256 | ieee80211_reset_erp_info(dev); |
257 | ieee80211_enable_keys(sdata); | 257 | ieee80211_enable_keys(sdata); |
258 | 258 | ||
259 | if (sdata->type == IEEE80211_IF_TYPE_STA && | 259 | if (sdata->vif.type == IEEE80211_IF_TYPE_STA && |
260 | !(sdata->flags & IEEE80211_SDATA_USERSPACE_MLME)) | 260 | !(sdata->flags & IEEE80211_SDATA_USERSPACE_MLME)) |
261 | netif_carrier_off(dev); | 261 | netif_carrier_off(dev); |
262 | else | 262 | else |
@@ -322,7 +322,7 @@ static int ieee80211_stop(struct net_device *dev) | |||
322 | dev_mc_unsync(local->mdev, dev); | 322 | dev_mc_unsync(local->mdev, dev); |
323 | 323 | ||
324 | /* down all dependent devices, that is VLANs */ | 324 | /* down all dependent devices, that is VLANs */ |
325 | if (sdata->type == IEEE80211_IF_TYPE_AP) { | 325 | if (sdata->vif.type == IEEE80211_IF_TYPE_AP) { |
326 | struct ieee80211_sub_if_data *vlan, *tmp; | 326 | struct ieee80211_sub_if_data *vlan, *tmp; |
327 | 327 | ||
328 | list_for_each_entry_safe(vlan, tmp, &sdata->u.ap.vlans, | 328 | list_for_each_entry_safe(vlan, tmp, &sdata->u.ap.vlans, |
@@ -333,7 +333,7 @@ static int ieee80211_stop(struct net_device *dev) | |||
333 | 333 | ||
334 | local->open_count--; | 334 | local->open_count--; |
335 | 335 | ||
336 | switch (sdata->type) { | 336 | switch (sdata->vif.type) { |
337 | case IEEE80211_IF_TYPE_VLAN: | 337 | case IEEE80211_IF_TYPE_VLAN: |
338 | list_del(&sdata->u.vlan.list); | 338 | list_del(&sdata->u.vlan.list); |
339 | sdata->u.vlan.ap = NULL; | 339 | sdata->u.vlan.ap = NULL; |
@@ -379,7 +379,7 @@ static int ieee80211_stop(struct net_device *dev) | |||
379 | /* fall through */ | 379 | /* fall through */ |
380 | default: | 380 | default: |
381 | conf.vif = &sdata->vif; | 381 | conf.vif = &sdata->vif; |
382 | conf.type = sdata->type; | 382 | conf.type = sdata->vif.type; |
383 | conf.mac_addr = dev->dev_addr; | 383 | conf.mac_addr = dev->dev_addr; |
384 | /* disable all keys for as long as this netdev is down */ | 384 | /* disable all keys for as long as this netdev is down */ |
385 | ieee80211_disable_keys(sdata); | 385 | ieee80211_disable_keys(sdata); |
@@ -502,13 +502,13 @@ static int __ieee80211_if_config(struct net_device *dev, | |||
502 | return 0; | 502 | return 0; |
503 | 503 | ||
504 | memset(&conf, 0, sizeof(conf)); | 504 | memset(&conf, 0, sizeof(conf)); |
505 | conf.type = sdata->type; | 505 | conf.type = sdata->vif.type; |
506 | if (sdata->type == IEEE80211_IF_TYPE_STA || | 506 | if (sdata->vif.type == IEEE80211_IF_TYPE_STA || |
507 | sdata->type == IEEE80211_IF_TYPE_IBSS) { | 507 | sdata->vif.type == IEEE80211_IF_TYPE_IBSS) { |
508 | conf.bssid = sdata->u.sta.bssid; | 508 | conf.bssid = sdata->u.sta.bssid; |
509 | conf.ssid = sdata->u.sta.ssid; | 509 | conf.ssid = sdata->u.sta.ssid; |
510 | conf.ssid_len = sdata->u.sta.ssid_len; | 510 | conf.ssid_len = sdata->u.sta.ssid_len; |
511 | } else if (sdata->type == IEEE80211_IF_TYPE_AP) { | 511 | } else if (sdata->vif.type == IEEE80211_IF_TYPE_AP) { |
512 | conf.ssid = sdata->u.ap.ssid; | 512 | conf.ssid = sdata->u.ap.ssid; |
513 | conf.ssid_len = sdata->u.ap.ssid_len; | 513 | conf.ssid_len = sdata->u.ap.ssid_len; |
514 | conf.beacon = beacon; | 514 | conf.beacon = beacon; |
@@ -703,7 +703,7 @@ static void ieee80211_tasklet_handler(unsigned long data) | |||
703 | case IEEE80211_RX_MSG: | 703 | case IEEE80211_RX_MSG: |
704 | /* status is in skb->cb */ | 704 | /* status is in skb->cb */ |
705 | memcpy(&rx_status, skb->cb, sizeof(rx_status)); | 705 | memcpy(&rx_status, skb->cb, sizeof(rx_status)); |
706 | /* Clear skb->type in order to not confuse kernel | 706 | /* Clear skb->pkt_type in order to not confuse kernel |
707 | * netstack. */ | 707 | * netstack. */ |
708 | skb->pkt_type = 0; | 708 | skb->pkt_type = 0; |
709 | __ieee80211_rx(local_to_hw(local), skb, &rx_status); | 709 | __ieee80211_rx(local_to_hw(local), skb, &rx_status); |
@@ -962,7 +962,7 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb, | |||
962 | if (!monitors || !skb) | 962 | if (!monitors || !skb) |
963 | goto out; | 963 | goto out; |
964 | 964 | ||
965 | if (sdata->type == IEEE80211_IF_TYPE_MNTR) { | 965 | if (sdata->vif.type == IEEE80211_IF_TYPE_MNTR) { |
966 | if (!netif_running(sdata->dev)) | 966 | if (!netif_running(sdata->dev)) |
967 | continue; | 967 | continue; |
968 | monitors--; | 968 | monitors--; |
@@ -1084,7 +1084,7 @@ struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len, | |||
1084 | mdev->header_ops = &ieee80211_header_ops; | 1084 | mdev->header_ops = &ieee80211_header_ops; |
1085 | mdev->set_multicast_list = ieee80211_master_set_multicast_list; | 1085 | mdev->set_multicast_list = ieee80211_master_set_multicast_list; |
1086 | 1086 | ||
1087 | sdata->type = IEEE80211_IF_TYPE_AP; | 1087 | sdata->vif.type = IEEE80211_IF_TYPE_AP; |
1088 | sdata->dev = mdev; | 1088 | sdata->dev = mdev; |
1089 | sdata->local = local; | 1089 | sdata->local = local; |
1090 | sdata->u.ap.force_unicast_rateidx = -1; | 1090 | sdata->u.ap.force_unicast_rateidx = -1; |
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index c551a7f379e0..91edaad4c620 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h | |||
@@ -294,7 +294,6 @@ struct ieee80211_if_sta { | |||
294 | #define IEEE80211_SDATA_USERSPACE_MLME BIT(4) | 294 | #define IEEE80211_SDATA_USERSPACE_MLME BIT(4) |
295 | struct ieee80211_sub_if_data { | 295 | struct ieee80211_sub_if_data { |
296 | struct list_head list; | 296 | struct list_head list; |
297 | enum ieee80211_if_types type; | ||
298 | 297 | ||
299 | struct wireless_dev wdev; | 298 | struct wireless_dev wdev; |
300 | 299 | ||
diff --git a/net/mac80211/ieee80211_iface.c b/net/mac80211/ieee80211_iface.c index b72066378805..be96aa84c79a 100644 --- a/net/mac80211/ieee80211_iface.c +++ b/net/mac80211/ieee80211_iface.c | |||
@@ -66,7 +66,7 @@ int ieee80211_if_add(struct net_device *dev, const char *name, | |||
66 | sdata = IEEE80211_DEV_TO_SUB_IF(ndev); | 66 | sdata = IEEE80211_DEV_TO_SUB_IF(ndev); |
67 | ndev->ieee80211_ptr = &sdata->wdev; | 67 | ndev->ieee80211_ptr = &sdata->wdev; |
68 | sdata->wdev.wiphy = local->hw.wiphy; | 68 | sdata->wdev.wiphy = local->hw.wiphy; |
69 | sdata->type = IEEE80211_IF_TYPE_AP; | 69 | sdata->vif.type = IEEE80211_IF_TYPE_AP; |
70 | sdata->dev = ndev; | 70 | sdata->dev = ndev; |
71 | sdata->local = local; | 71 | sdata->local = local; |
72 | ieee80211_if_sdata_init(sdata); | 72 | ieee80211_if_sdata_init(sdata); |
@@ -98,7 +98,7 @@ fail: | |||
98 | void ieee80211_if_set_type(struct net_device *dev, int type) | 98 | void ieee80211_if_set_type(struct net_device *dev, int type) |
99 | { | 99 | { |
100 | struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); | 100 | struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
101 | int oldtype = sdata->type; | 101 | int oldtype = sdata->vif.type; |
102 | 102 | ||
103 | /* | 103 | /* |
104 | * We need to call this function on the master interface | 104 | * We need to call this function on the master interface |
@@ -116,7 +116,7 @@ void ieee80211_if_set_type(struct net_device *dev, int type) | |||
116 | 116 | ||
117 | /* most have no BSS pointer */ | 117 | /* most have no BSS pointer */ |
118 | sdata->bss = NULL; | 118 | sdata->bss = NULL; |
119 | sdata->type = type; | 119 | sdata->vif.type = type; |
120 | 120 | ||
121 | switch (type) { | 121 | switch (type) { |
122 | case IEEE80211_IF_TYPE_WDS: | 122 | case IEEE80211_IF_TYPE_WDS: |
@@ -181,7 +181,7 @@ void ieee80211_if_reinit(struct net_device *dev) | |||
181 | 181 | ||
182 | ieee80211_if_sdata_deinit(sdata); | 182 | ieee80211_if_sdata_deinit(sdata); |
183 | 183 | ||
184 | switch (sdata->type) { | 184 | switch (sdata->vif.type) { |
185 | case IEEE80211_IF_TYPE_INVALID: | 185 | case IEEE80211_IF_TYPE_INVALID: |
186 | /* cannot happen */ | 186 | /* cannot happen */ |
187 | WARN_ON(1); | 187 | WARN_ON(1); |
@@ -279,7 +279,7 @@ int ieee80211_if_remove(struct net_device *dev, const char *name, int id) | |||
279 | ASSERT_RTNL(); | 279 | ASSERT_RTNL(); |
280 | 280 | ||
281 | list_for_each_entry_safe(sdata, n, &local->interfaces, list) { | 281 | list_for_each_entry_safe(sdata, n, &local->interfaces, list) { |
282 | if ((sdata->type == id || id == -1) && | 282 | if ((sdata->vif.type == id || id == -1) && |
283 | strcmp(name, sdata->dev->name) == 0 && | 283 | strcmp(name, sdata->dev->name) == 0 && |
284 | sdata->dev != local->mdev) { | 284 | sdata->dev != local->mdev) { |
285 | list_del_rcu(&sdata->list); | 285 | list_del_rcu(&sdata->list); |
diff --git a/net/mac80211/ieee80211_ioctl.c b/net/mac80211/ieee80211_ioctl.c index 2604e21c05a8..5024d3733834 100644 --- a/net/mac80211/ieee80211_ioctl.c +++ b/net/mac80211/ieee80211_ioctl.c | |||
@@ -112,8 +112,8 @@ static int ieee80211_ioctl_siwgenie(struct net_device *dev, | |||
112 | if (sdata->flags & IEEE80211_SDATA_USERSPACE_MLME) | 112 | if (sdata->flags & IEEE80211_SDATA_USERSPACE_MLME) |
113 | return -EOPNOTSUPP; | 113 | return -EOPNOTSUPP; |
114 | 114 | ||
115 | if (sdata->type == IEEE80211_IF_TYPE_STA || | 115 | if (sdata->vif.type == IEEE80211_IF_TYPE_STA || |
116 | sdata->type == IEEE80211_IF_TYPE_IBSS) { | 116 | sdata->vif.type == IEEE80211_IF_TYPE_IBSS) { |
117 | int ret = ieee80211_sta_set_extra_ie(dev, extra, data->length); | 117 | int ret = ieee80211_sta_set_extra_ie(dev, extra, data->length); |
118 | if (ret) | 118 | if (ret) |
119 | return ret; | 119 | return ret; |
@@ -232,7 +232,7 @@ static int ieee80211_ioctl_siwmode(struct net_device *dev, | |||
232 | struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); | 232 | struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
233 | int type; | 233 | int type; |
234 | 234 | ||
235 | if (sdata->type == IEEE80211_IF_TYPE_VLAN) | 235 | if (sdata->vif.type == IEEE80211_IF_TYPE_VLAN) |
236 | return -EOPNOTSUPP; | 236 | return -EOPNOTSUPP; |
237 | 237 | ||
238 | switch (*mode) { | 238 | switch (*mode) { |
@@ -249,7 +249,7 @@ static int ieee80211_ioctl_siwmode(struct net_device *dev, | |||
249 | return -EINVAL; | 249 | return -EINVAL; |
250 | } | 250 | } |
251 | 251 | ||
252 | if (type == sdata->type) | 252 | if (type == sdata->vif.type) |
253 | return 0; | 253 | return 0; |
254 | if (netif_running(dev)) | 254 | if (netif_running(dev)) |
255 | return -EBUSY; | 255 | return -EBUSY; |
@@ -268,7 +268,7 @@ static int ieee80211_ioctl_giwmode(struct net_device *dev, | |||
268 | struct ieee80211_sub_if_data *sdata; | 268 | struct ieee80211_sub_if_data *sdata; |
269 | 269 | ||
270 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); | 270 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
271 | switch (sdata->type) { | 271 | switch (sdata->vif.type) { |
272 | case IEEE80211_IF_TYPE_AP: | 272 | case IEEE80211_IF_TYPE_AP: |
273 | *mode = IW_MODE_MASTER; | 273 | *mode = IW_MODE_MASTER; |
274 | break; | 274 | break; |
@@ -336,13 +336,13 @@ static int ieee80211_ioctl_siwfreq(struct net_device *dev, | |||
336 | struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); | 336 | struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); |
337 | struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); | 337 | struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
338 | 338 | ||
339 | if (sdata->type == IEEE80211_IF_TYPE_STA) | 339 | if (sdata->vif.type == IEEE80211_IF_TYPE_STA) |
340 | sdata->u.sta.flags &= ~IEEE80211_STA_AUTO_CHANNEL_SEL; | 340 | sdata->u.sta.flags &= ~IEEE80211_STA_AUTO_CHANNEL_SEL; |
341 | 341 | ||
342 | /* freq->e == 0: freq->m = channel; otherwise freq = m * 10^e */ | 342 | /* freq->e == 0: freq->m = channel; otherwise freq = m * 10^e */ |
343 | if (freq->e == 0) { | 343 | if (freq->e == 0) { |
344 | if (freq->m < 0) { | 344 | if (freq->m < 0) { |
345 | if (sdata->type == IEEE80211_IF_TYPE_STA) | 345 | if (sdata->vif.type == IEEE80211_IF_TYPE_STA) |
346 | sdata->u.sta.flags |= | 346 | sdata->u.sta.flags |= |
347 | IEEE80211_STA_AUTO_CHANNEL_SEL; | 347 | IEEE80211_STA_AUTO_CHANNEL_SEL; |
348 | return 0; | 348 | return 0; |
@@ -388,8 +388,8 @@ static int ieee80211_ioctl_siwessid(struct net_device *dev, | |||
388 | len--; | 388 | len--; |
389 | 389 | ||
390 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); | 390 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
391 | if (sdata->type == IEEE80211_IF_TYPE_STA || | 391 | if (sdata->vif.type == IEEE80211_IF_TYPE_STA || |
392 | sdata->type == IEEE80211_IF_TYPE_IBSS) { | 392 | sdata->vif.type == IEEE80211_IF_TYPE_IBSS) { |
393 | int ret; | 393 | int ret; |
394 | if (sdata->flags & IEEE80211_SDATA_USERSPACE_MLME) { | 394 | if (sdata->flags & IEEE80211_SDATA_USERSPACE_MLME) { |
395 | if (len > IEEE80211_MAX_SSID_LEN) | 395 | if (len > IEEE80211_MAX_SSID_LEN) |
@@ -409,7 +409,7 @@ static int ieee80211_ioctl_siwessid(struct net_device *dev, | |||
409 | return 0; | 409 | return 0; |
410 | } | 410 | } |
411 | 411 | ||
412 | if (sdata->type == IEEE80211_IF_TYPE_AP) { | 412 | if (sdata->vif.type == IEEE80211_IF_TYPE_AP) { |
413 | memcpy(sdata->u.ap.ssid, ssid, len); | 413 | memcpy(sdata->u.ap.ssid, ssid, len); |
414 | memset(sdata->u.ap.ssid + len, 0, | 414 | memset(sdata->u.ap.ssid + len, 0, |
415 | IEEE80211_MAX_SSID_LEN - len); | 415 | IEEE80211_MAX_SSID_LEN - len); |
@@ -428,8 +428,8 @@ static int ieee80211_ioctl_giwessid(struct net_device *dev, | |||
428 | 428 | ||
429 | struct ieee80211_sub_if_data *sdata; | 429 | struct ieee80211_sub_if_data *sdata; |
430 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); | 430 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
431 | if (sdata->type == IEEE80211_IF_TYPE_STA || | 431 | if (sdata->vif.type == IEEE80211_IF_TYPE_STA || |
432 | sdata->type == IEEE80211_IF_TYPE_IBSS) { | 432 | sdata->vif.type == IEEE80211_IF_TYPE_IBSS) { |
433 | int res = ieee80211_sta_get_ssid(dev, ssid, &len); | 433 | int res = ieee80211_sta_get_ssid(dev, ssid, &len); |
434 | if (res == 0) { | 434 | if (res == 0) { |
435 | data->length = len; | 435 | data->length = len; |
@@ -439,7 +439,7 @@ static int ieee80211_ioctl_giwessid(struct net_device *dev, | |||
439 | return res; | 439 | return res; |
440 | } | 440 | } |
441 | 441 | ||
442 | if (sdata->type == IEEE80211_IF_TYPE_AP) { | 442 | if (sdata->vif.type == IEEE80211_IF_TYPE_AP) { |
443 | len = sdata->u.ap.ssid_len; | 443 | len = sdata->u.ap.ssid_len; |
444 | if (len > IW_ESSID_MAX_SIZE) | 444 | if (len > IW_ESSID_MAX_SIZE) |
445 | len = IW_ESSID_MAX_SIZE; | 445 | len = IW_ESSID_MAX_SIZE; |
@@ -459,8 +459,8 @@ static int ieee80211_ioctl_siwap(struct net_device *dev, | |||
459 | struct ieee80211_sub_if_data *sdata; | 459 | struct ieee80211_sub_if_data *sdata; |
460 | 460 | ||
461 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); | 461 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
462 | if (sdata->type == IEEE80211_IF_TYPE_STA || | 462 | if (sdata->vif.type == IEEE80211_IF_TYPE_STA || |
463 | sdata->type == IEEE80211_IF_TYPE_IBSS) { | 463 | sdata->vif.type == IEEE80211_IF_TYPE_IBSS) { |
464 | int ret; | 464 | int ret; |
465 | if (sdata->flags & IEEE80211_SDATA_USERSPACE_MLME) { | 465 | if (sdata->flags & IEEE80211_SDATA_USERSPACE_MLME) { |
466 | memcpy(sdata->u.sta.bssid, (u8 *) &ap_addr->sa_data, | 466 | memcpy(sdata->u.sta.bssid, (u8 *) &ap_addr->sa_data, |
@@ -479,7 +479,7 @@ static int ieee80211_ioctl_siwap(struct net_device *dev, | |||
479 | return ret; | 479 | return ret; |
480 | ieee80211_sta_req_auth(dev, &sdata->u.sta); | 480 | ieee80211_sta_req_auth(dev, &sdata->u.sta); |
481 | return 0; | 481 | return 0; |
482 | } else if (sdata->type == IEEE80211_IF_TYPE_WDS) { | 482 | } else if (sdata->vif.type == IEEE80211_IF_TYPE_WDS) { |
483 | if (memcmp(sdata->u.wds.remote_addr, (u8 *) &ap_addr->sa_data, | 483 | if (memcmp(sdata->u.wds.remote_addr, (u8 *) &ap_addr->sa_data, |
484 | ETH_ALEN) == 0) | 484 | ETH_ALEN) == 0) |
485 | return 0; | 485 | return 0; |
@@ -497,12 +497,12 @@ static int ieee80211_ioctl_giwap(struct net_device *dev, | |||
497 | struct ieee80211_sub_if_data *sdata; | 497 | struct ieee80211_sub_if_data *sdata; |
498 | 498 | ||
499 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); | 499 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
500 | if (sdata->type == IEEE80211_IF_TYPE_STA || | 500 | if (sdata->vif.type == IEEE80211_IF_TYPE_STA || |
501 | sdata->type == IEEE80211_IF_TYPE_IBSS) { | 501 | sdata->vif.type == IEEE80211_IF_TYPE_IBSS) { |
502 | ap_addr->sa_family = ARPHRD_ETHER; | 502 | ap_addr->sa_family = ARPHRD_ETHER; |
503 | memcpy(&ap_addr->sa_data, sdata->u.sta.bssid, ETH_ALEN); | 503 | memcpy(&ap_addr->sa_data, sdata->u.sta.bssid, ETH_ALEN); |
504 | return 0; | 504 | return 0; |
505 | } else if (sdata->type == IEEE80211_IF_TYPE_WDS) { | 505 | } else if (sdata->vif.type == IEEE80211_IF_TYPE_WDS) { |
506 | ap_addr->sa_family = ARPHRD_ETHER; | 506 | ap_addr->sa_family = ARPHRD_ETHER; |
507 | memcpy(&ap_addr->sa_data, sdata->u.wds.remote_addr, ETH_ALEN); | 507 | memcpy(&ap_addr->sa_data, sdata->u.wds.remote_addr, ETH_ALEN); |
508 | return 0; | 508 | return 0; |
@@ -524,11 +524,10 @@ static int ieee80211_ioctl_siwscan(struct net_device *dev, | |||
524 | if (!netif_running(dev)) | 524 | if (!netif_running(dev)) |
525 | return -ENETDOWN; | 525 | return -ENETDOWN; |
526 | 526 | ||
527 | if (sdata->type != IEEE80211_IF_TYPE_STA && | 527 | if (sdata->vif.type != IEEE80211_IF_TYPE_STA && |
528 | sdata->type != IEEE80211_IF_TYPE_IBSS && | 528 | sdata->vif.type != IEEE80211_IF_TYPE_IBSS && |
529 | sdata->type != IEEE80211_IF_TYPE_AP) { | 529 | sdata->vif.type != IEEE80211_IF_TYPE_AP) |
530 | return -EOPNOTSUPP; | 530 | return -EOPNOTSUPP; |
531 | } | ||
532 | 531 | ||
533 | /* if SSID was specified explicitly then use that */ | 532 | /* if SSID was specified explicitly then use that */ |
534 | if (wrqu->data.length == sizeof(struct iw_scan_req) && | 533 | if (wrqu->data.length == sizeof(struct iw_scan_req) && |
@@ -606,7 +605,7 @@ static int ieee80211_ioctl_giwrate(struct net_device *dev, | |||
606 | struct ieee80211_sub_if_data *sdata; | 605 | struct ieee80211_sub_if_data *sdata; |
607 | 606 | ||
608 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); | 607 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
609 | if (sdata->type == IEEE80211_IF_TYPE_STA) | 608 | if (sdata->vif.type == IEEE80211_IF_TYPE_STA) |
610 | sta = sta_info_get(local, sdata->u.sta.bssid); | 609 | sta = sta_info_get(local, sdata->u.sta.bssid); |
611 | else | 610 | else |
612 | return -EOPNOTSUPP; | 611 | return -EOPNOTSUPP; |
@@ -820,8 +819,8 @@ static int ieee80211_ioctl_siwmlme(struct net_device *dev, | |||
820 | struct iw_mlme *mlme = (struct iw_mlme *) extra; | 819 | struct iw_mlme *mlme = (struct iw_mlme *) extra; |
821 | 820 | ||
822 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); | 821 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
823 | if (sdata->type != IEEE80211_IF_TYPE_STA && | 822 | if (sdata->vif.type != IEEE80211_IF_TYPE_STA && |
824 | sdata->type != IEEE80211_IF_TYPE_IBSS) | 823 | sdata->vif.type != IEEE80211_IF_TYPE_IBSS) |
825 | return -EINVAL; | 824 | return -EINVAL; |
826 | 825 | ||
827 | switch (mlme->cmd) { | 826 | switch (mlme->cmd) { |
@@ -938,7 +937,7 @@ static int ieee80211_ioctl_siwauth(struct net_device *dev, | |||
938 | sdata->drop_unencrypted = !!data->value; | 937 | sdata->drop_unencrypted = !!data->value; |
939 | break; | 938 | break; |
940 | case IW_AUTH_PRIVACY_INVOKED: | 939 | case IW_AUTH_PRIVACY_INVOKED: |
941 | if (sdata->type != IEEE80211_IF_TYPE_STA) | 940 | if (sdata->vif.type != IEEE80211_IF_TYPE_STA) |
942 | ret = -EINVAL; | 941 | ret = -EINVAL; |
943 | else { | 942 | else { |
944 | sdata->u.sta.flags &= ~IEEE80211_STA_PRIVACY_INVOKED; | 943 | sdata->u.sta.flags &= ~IEEE80211_STA_PRIVACY_INVOKED; |
@@ -953,8 +952,8 @@ static int ieee80211_ioctl_siwauth(struct net_device *dev, | |||
953 | } | 952 | } |
954 | break; | 953 | break; |
955 | case IW_AUTH_80211_AUTH_ALG: | 954 | case IW_AUTH_80211_AUTH_ALG: |
956 | if (sdata->type == IEEE80211_IF_TYPE_STA || | 955 | if (sdata->vif.type == IEEE80211_IF_TYPE_STA || |
957 | sdata->type == IEEE80211_IF_TYPE_IBSS) | 956 | sdata->vif.type == IEEE80211_IF_TYPE_IBSS) |
958 | sdata->u.sta.auth_algs = data->value; | 957 | sdata->u.sta.auth_algs = data->value; |
959 | else | 958 | else |
960 | ret = -EOPNOTSUPP; | 959 | ret = -EOPNOTSUPP; |
@@ -974,8 +973,8 @@ static struct iw_statistics *ieee80211_get_wireless_stats(struct net_device *dev | |||
974 | struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); | 973 | struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
975 | struct sta_info *sta = NULL; | 974 | struct sta_info *sta = NULL; |
976 | 975 | ||
977 | if (sdata->type == IEEE80211_IF_TYPE_STA || | 976 | if (sdata->vif.type == IEEE80211_IF_TYPE_STA || |
978 | sdata->type == IEEE80211_IF_TYPE_IBSS) | 977 | sdata->vif.type == IEEE80211_IF_TYPE_IBSS) |
979 | sta = sta_info_get(local, sdata->u.sta.bssid); | 978 | sta = sta_info_get(local, sdata->u.sta.bssid); |
980 | if (!sta) { | 979 | if (!sta) { |
981 | wstats->discard.fragment = 0; | 980 | wstats->discard.fragment = 0; |
@@ -1003,8 +1002,8 @@ static int ieee80211_ioctl_giwauth(struct net_device *dev, | |||
1003 | 1002 | ||
1004 | switch (data->flags & IW_AUTH_INDEX) { | 1003 | switch (data->flags & IW_AUTH_INDEX) { |
1005 | case IW_AUTH_80211_AUTH_ALG: | 1004 | case IW_AUTH_80211_AUTH_ALG: |
1006 | if (sdata->type == IEEE80211_IF_TYPE_STA || | 1005 | if (sdata->vif.type == IEEE80211_IF_TYPE_STA || |
1007 | sdata->type == IEEE80211_IF_TYPE_IBSS) | 1006 | sdata->vif.type == IEEE80211_IF_TYPE_IBSS) |
1008 | data->value = sdata->u.sta.auth_algs; | 1007 | data->value = sdata->u.sta.auth_algs; |
1009 | else | 1008 | else |
1010 | ret = -EOPNOTSUPP; | 1009 | ret = -EOPNOTSUPP; |
diff --git a/net/mac80211/ieee80211_sta.c b/net/mac80211/ieee80211_sta.c index d1f7199a2083..b1e7d17ee253 100644 --- a/net/mac80211/ieee80211_sta.c +++ b/net/mac80211/ieee80211_sta.c | |||
@@ -471,7 +471,7 @@ static void ieee80211_set_associated(struct net_device *dev, | |||
471 | ifsta->flags |= IEEE80211_STA_ASSOCIATED; | 471 | ifsta->flags |= IEEE80211_STA_ASSOCIATED; |
472 | 472 | ||
473 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); | 473 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
474 | if (sdata->type != IEEE80211_IF_TYPE_STA) | 474 | if (sdata->vif.type != IEEE80211_IF_TYPE_STA) |
475 | return; | 475 | return; |
476 | 476 | ||
477 | bss = ieee80211_rx_bss_get(dev, ifsta->bssid, | 477 | bss = ieee80211_rx_bss_get(dev, ifsta->bssid, |
@@ -1025,7 +1025,7 @@ static void ieee80211_send_addba_resp(struct net_device *dev, u8 *da, u16 tid, | |||
1025 | memset(mgmt, 0, 24); | 1025 | memset(mgmt, 0, 24); |
1026 | memcpy(mgmt->da, da, ETH_ALEN); | 1026 | memcpy(mgmt->da, da, ETH_ALEN); |
1027 | memcpy(mgmt->sa, dev->dev_addr, ETH_ALEN); | 1027 | memcpy(mgmt->sa, dev->dev_addr, ETH_ALEN); |
1028 | if (sdata->type == IEEE80211_IF_TYPE_AP) | 1028 | if (sdata->vif.type == IEEE80211_IF_TYPE_AP) |
1029 | memcpy(mgmt->bssid, dev->dev_addr, ETH_ALEN); | 1029 | memcpy(mgmt->bssid, dev->dev_addr, ETH_ALEN); |
1030 | else | 1030 | else |
1031 | memcpy(mgmt->bssid, ifsta->bssid, ETH_ALEN); | 1031 | memcpy(mgmt->bssid, ifsta->bssid, ETH_ALEN); |
@@ -1184,7 +1184,7 @@ void ieee80211_send_delba(struct net_device *dev, const u8 *da, u16 tid, | |||
1184 | memset(mgmt, 0, 24); | 1184 | memset(mgmt, 0, 24); |
1185 | memcpy(mgmt->da, da, ETH_ALEN); | 1185 | memcpy(mgmt->da, da, ETH_ALEN); |
1186 | memcpy(mgmt->sa, dev->dev_addr, ETH_ALEN); | 1186 | memcpy(mgmt->sa, dev->dev_addr, ETH_ALEN); |
1187 | if (sdata->type == IEEE80211_IF_TYPE_AP) | 1187 | if (sdata->vif.type == IEEE80211_IF_TYPE_AP) |
1188 | memcpy(mgmt->bssid, dev->dev_addr, ETH_ALEN); | 1188 | memcpy(mgmt->bssid, dev->dev_addr, ETH_ALEN); |
1189 | else | 1189 | else |
1190 | memcpy(mgmt->bssid, ifsta->bssid, ETH_ALEN); | 1190 | memcpy(mgmt->bssid, ifsta->bssid, ETH_ALEN); |
@@ -1329,7 +1329,7 @@ static void ieee80211_rx_mgmt_auth(struct net_device *dev, | |||
1329 | DECLARE_MAC_BUF(mac); | 1329 | DECLARE_MAC_BUF(mac); |
1330 | 1330 | ||
1331 | if (ifsta->state != IEEE80211_AUTHENTICATE && | 1331 | if (ifsta->state != IEEE80211_AUTHENTICATE && |
1332 | sdata->type != IEEE80211_IF_TYPE_IBSS) { | 1332 | sdata->vif.type != IEEE80211_IF_TYPE_IBSS) { |
1333 | printk(KERN_DEBUG "%s: authentication frame received from " | 1333 | printk(KERN_DEBUG "%s: authentication frame received from " |
1334 | "%s, but not in authenticate state - ignored\n", | 1334 | "%s, but not in authenticate state - ignored\n", |
1335 | dev->name, print_mac(mac, mgmt->sa)); | 1335 | dev->name, print_mac(mac, mgmt->sa)); |
@@ -1343,7 +1343,7 @@ static void ieee80211_rx_mgmt_auth(struct net_device *dev, | |||
1343 | return; | 1343 | return; |
1344 | } | 1344 | } |
1345 | 1345 | ||
1346 | if (sdata->type != IEEE80211_IF_TYPE_IBSS && | 1346 | if (sdata->vif.type != IEEE80211_IF_TYPE_IBSS && |
1347 | memcmp(ifsta->bssid, mgmt->sa, ETH_ALEN) != 0) { | 1347 | memcmp(ifsta->bssid, mgmt->sa, ETH_ALEN) != 0) { |
1348 | printk(KERN_DEBUG "%s: authentication frame received from " | 1348 | printk(KERN_DEBUG "%s: authentication frame received from " |
1349 | "unknown AP (SA=%s BSSID=%s) - " | 1349 | "unknown AP (SA=%s BSSID=%s) - " |
@@ -1352,7 +1352,7 @@ static void ieee80211_rx_mgmt_auth(struct net_device *dev, | |||
1352 | return; | 1352 | return; |
1353 | } | 1353 | } |
1354 | 1354 | ||
1355 | if (sdata->type != IEEE80211_IF_TYPE_IBSS && | 1355 | if (sdata->vif.type != IEEE80211_IF_TYPE_IBSS && |
1356 | memcmp(ifsta->bssid, mgmt->bssid, ETH_ALEN) != 0) { | 1356 | memcmp(ifsta->bssid, mgmt->bssid, ETH_ALEN) != 0) { |
1357 | printk(KERN_DEBUG "%s: authentication frame received from " | 1357 | printk(KERN_DEBUG "%s: authentication frame received from " |
1358 | "unknown BSSID (SA=%s BSSID=%s) - " | 1358 | "unknown BSSID (SA=%s BSSID=%s) - " |
@@ -1370,7 +1370,7 @@ static void ieee80211_rx_mgmt_auth(struct net_device *dev, | |||
1370 | dev->name, print_mac(mac, mgmt->sa), auth_alg, | 1370 | dev->name, print_mac(mac, mgmt->sa), auth_alg, |
1371 | auth_transaction, status_code); | 1371 | auth_transaction, status_code); |
1372 | 1372 | ||
1373 | if (sdata->type == IEEE80211_IF_TYPE_IBSS) { | 1373 | if (sdata->vif.type == IEEE80211_IF_TYPE_IBSS) { |
1374 | /* IEEE 802.11 standard does not require authentication in IBSS | 1374 | /* IEEE 802.11 standard does not require authentication in IBSS |
1375 | * networks and most implementations do not seem to use it. | 1375 | * networks and most implementations do not seem to use it. |
1376 | * However, try to reply to authentication attempts if someone | 1376 | * However, try to reply to authentication attempts if someone |
@@ -1849,7 +1849,7 @@ static void ieee80211_rx_bss_info(struct net_device *dev, | |||
1849 | 1849 | ||
1850 | timestamp = le64_to_cpu(mgmt->u.beacon.timestamp); | 1850 | timestamp = le64_to_cpu(mgmt->u.beacon.timestamp); |
1851 | 1851 | ||
1852 | if (sdata->type == IEEE80211_IF_TYPE_IBSS && beacon && | 1852 | if (sdata->vif.type == IEEE80211_IF_TYPE_IBSS && beacon && |
1853 | memcmp(mgmt->bssid, sdata->u.sta.bssid, ETH_ALEN) == 0) { | 1853 | memcmp(mgmt->bssid, sdata->u.sta.bssid, ETH_ALEN) == 0) { |
1854 | #ifdef CONFIG_MAC80211_IBSS_DEBUG | 1854 | #ifdef CONFIG_MAC80211_IBSS_DEBUG |
1855 | static unsigned long last_tsf_debug = 0; | 1855 | static unsigned long last_tsf_debug = 0; |
@@ -1874,7 +1874,7 @@ static void ieee80211_rx_bss_info(struct net_device *dev, | |||
1874 | 1874 | ||
1875 | ieee802_11_parse_elems(mgmt->u.beacon.variable, len - baselen, &elems); | 1875 | ieee802_11_parse_elems(mgmt->u.beacon.variable, len - baselen, &elems); |
1876 | 1876 | ||
1877 | if (sdata->type == IEEE80211_IF_TYPE_IBSS && elems.supp_rates && | 1877 | if (sdata->vif.type == IEEE80211_IF_TYPE_IBSS && elems.supp_rates && |
1878 | memcmp(mgmt->bssid, sdata->u.sta.bssid, ETH_ALEN) == 0 && | 1878 | memcmp(mgmt->bssid, sdata->u.sta.bssid, ETH_ALEN) == 0 && |
1879 | (sta = sta_info_get(local, mgmt->sa))) { | 1879 | (sta = sta_info_get(local, mgmt->sa))) { |
1880 | struct ieee80211_hw_mode *mode; | 1880 | struct ieee80211_hw_mode *mode; |
@@ -2103,7 +2103,7 @@ static void ieee80211_rx_mgmt_beacon(struct net_device *dev, | |||
2103 | ieee80211_rx_bss_info(dev, mgmt, len, rx_status, 1); | 2103 | ieee80211_rx_bss_info(dev, mgmt, len, rx_status, 1); |
2104 | 2104 | ||
2105 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); | 2105 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
2106 | if (sdata->type != IEEE80211_IF_TYPE_STA) | 2106 | if (sdata->vif.type != IEEE80211_IF_TYPE_STA) |
2107 | return; | 2107 | return; |
2108 | ifsta = &sdata->u.sta; | 2108 | ifsta = &sdata->u.sta; |
2109 | 2109 | ||
@@ -2163,7 +2163,7 @@ static void ieee80211_rx_mgmt_probe_req(struct net_device *dev, | |||
2163 | DECLARE_MAC_BUF(mac3); | 2163 | DECLARE_MAC_BUF(mac3); |
2164 | #endif | 2164 | #endif |
2165 | 2165 | ||
2166 | if (sdata->type != IEEE80211_IF_TYPE_IBSS || | 2166 | if (sdata->vif.type != IEEE80211_IF_TYPE_IBSS || |
2167 | ifsta->state != IEEE80211_IBSS_JOINED || | 2167 | ifsta->state != IEEE80211_IBSS_JOINED || |
2168 | len < 24 + 2 || !ifsta->probe_resp) | 2168 | len < 24 + 2 || !ifsta->probe_resp) |
2169 | return; | 2169 | return; |
@@ -2474,10 +2474,10 @@ void ieee80211_sta_work(struct work_struct *work) | |||
2474 | if (local->sta_sw_scanning || local->sta_hw_scanning) | 2474 | if (local->sta_sw_scanning || local->sta_hw_scanning) |
2475 | return; | 2475 | return; |
2476 | 2476 | ||
2477 | if (sdata->type != IEEE80211_IF_TYPE_STA && | 2477 | if (sdata->vif.type != IEEE80211_IF_TYPE_STA && |
2478 | sdata->type != IEEE80211_IF_TYPE_IBSS) { | 2478 | sdata->vif.type != IEEE80211_IF_TYPE_IBSS) { |
2479 | printk(KERN_DEBUG "%s: ieee80211_sta_work: non-STA interface " | 2479 | printk(KERN_DEBUG "%s: ieee80211_sta_work: non-STA interface " |
2480 | "(type=%d)\n", dev->name, sdata->type); | 2480 | "(type=%d)\n", dev->name, sdata->vif.type); |
2481 | return; | 2481 | return; |
2482 | } | 2482 | } |
2483 | ifsta = &sdata->u.sta; | 2483 | ifsta = &sdata->u.sta; |
@@ -2572,7 +2572,7 @@ void ieee80211_sta_req_auth(struct net_device *dev, | |||
2572 | struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); | 2572 | struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); |
2573 | struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); | 2573 | struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
2574 | 2574 | ||
2575 | if (sdata->type != IEEE80211_IF_TYPE_STA) | 2575 | if (sdata->vif.type != IEEE80211_IF_TYPE_STA) |
2576 | return; | 2576 | return; |
2577 | 2577 | ||
2578 | if ((ifsta->flags & (IEEE80211_STA_BSSID_SET | | 2578 | if ((ifsta->flags & (IEEE80211_STA_BSSID_SET | |
@@ -3039,7 +3039,7 @@ int ieee80211_sta_set_ssid(struct net_device *dev, char *ssid, size_t len) | |||
3039 | ifsta->flags |= IEEE80211_STA_SSID_SET; | 3039 | ifsta->flags |= IEEE80211_STA_SSID_SET; |
3040 | else | 3040 | else |
3041 | ifsta->flags &= ~IEEE80211_STA_SSID_SET; | 3041 | ifsta->flags &= ~IEEE80211_STA_SSID_SET; |
3042 | if (sdata->type == IEEE80211_IF_TYPE_IBSS && | 3042 | if (sdata->vif.type == IEEE80211_IF_TYPE_IBSS && |
3043 | !(ifsta->flags & IEEE80211_STA_BSSID_SET)) { | 3043 | !(ifsta->flags & IEEE80211_STA_BSSID_SET)) { |
3044 | ifsta->ibss_join_req = jiffies; | 3044 | ifsta->ibss_join_req = jiffies; |
3045 | ifsta->state = IEEE80211_IBSS_SEARCH; | 3045 | ifsta->state = IEEE80211_IBSS_SEARCH; |
@@ -3157,7 +3157,7 @@ void ieee80211_scan_completed(struct ieee80211_hw *hw) | |||
3157 | if (sdata->dev == local->mdev) | 3157 | if (sdata->dev == local->mdev) |
3158 | continue; | 3158 | continue; |
3159 | 3159 | ||
3160 | if (sdata->type == IEEE80211_IF_TYPE_STA) { | 3160 | if (sdata->vif.type == IEEE80211_IF_TYPE_STA) { |
3161 | if (sdata->u.sta.flags & IEEE80211_STA_ASSOCIATED) | 3161 | if (sdata->u.sta.flags & IEEE80211_STA_ASSOCIATED) |
3162 | ieee80211_send_nullfunc(local, sdata, 0); | 3162 | ieee80211_send_nullfunc(local, sdata, 0); |
3163 | ieee80211_sta_timer((unsigned long)sdata); | 3163 | ieee80211_sta_timer((unsigned long)sdata); |
@@ -3169,7 +3169,7 @@ void ieee80211_scan_completed(struct ieee80211_hw *hw) | |||
3169 | 3169 | ||
3170 | done: | 3170 | done: |
3171 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); | 3171 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
3172 | if (sdata->type == IEEE80211_IF_TYPE_IBSS) { | 3172 | if (sdata->vif.type == IEEE80211_IF_TYPE_IBSS) { |
3173 | struct ieee80211_if_sta *ifsta = &sdata->u.sta; | 3173 | struct ieee80211_if_sta *ifsta = &sdata->u.sta; |
3174 | if (!(ifsta->flags & IEEE80211_STA_BSSID_SET) || | 3174 | if (!(ifsta->flags & IEEE80211_STA_BSSID_SET) || |
3175 | (!ifsta->state == IEEE80211_IBSS_JOINED && | 3175 | (!ifsta->state == IEEE80211_IBSS_JOINED && |
@@ -3204,7 +3204,7 @@ void ieee80211_sta_scan_work(struct work_struct *work) | |||
3204 | skip = !(local->enabled_modes & (1 << mode->mode)); | 3204 | skip = !(local->enabled_modes & (1 << mode->mode)); |
3205 | chan = &mode->channels[local->scan_channel_idx]; | 3205 | chan = &mode->channels[local->scan_channel_idx]; |
3206 | if (!(chan->flag & IEEE80211_CHAN_W_SCAN) || | 3206 | if (!(chan->flag & IEEE80211_CHAN_W_SCAN) || |
3207 | (sdata->type == IEEE80211_IF_TYPE_IBSS && | 3207 | (sdata->vif.type == IEEE80211_IF_TYPE_IBSS && |
3208 | !(chan->flag & IEEE80211_CHAN_W_IBSS)) || | 3208 | !(chan->flag & IEEE80211_CHAN_W_IBSS)) || |
3209 | (local->hw_modes & local->enabled_modes & | 3209 | (local->hw_modes & local->enabled_modes & |
3210 | (1 << MODE_IEEE80211G) && mode->mode == MODE_IEEE80211B)) | 3210 | (1 << MODE_IEEE80211G) && mode->mode == MODE_IEEE80211B)) |
@@ -3312,7 +3312,7 @@ static int ieee80211_sta_start_scan(struct net_device *dev, | |||
3312 | continue; | 3312 | continue; |
3313 | 3313 | ||
3314 | netif_stop_queue(sdata->dev); | 3314 | netif_stop_queue(sdata->dev); |
3315 | if (sdata->type == IEEE80211_IF_TYPE_STA && | 3315 | if (sdata->vif.type == IEEE80211_IF_TYPE_STA && |
3316 | (sdata->u.sta.flags & IEEE80211_STA_ASSOCIATED)) | 3316 | (sdata->u.sta.flags & IEEE80211_STA_ASSOCIATED)) |
3317 | ieee80211_send_nullfunc(local, sdata, 1); | 3317 | ieee80211_send_nullfunc(local, sdata, 1); |
3318 | } | 3318 | } |
@@ -3353,7 +3353,7 @@ int ieee80211_sta_req_scan(struct net_device *dev, u8 *ssid, size_t ssid_len) | |||
3353 | struct ieee80211_if_sta *ifsta = &sdata->u.sta; | 3353 | struct ieee80211_if_sta *ifsta = &sdata->u.sta; |
3354 | struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); | 3354 | struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); |
3355 | 3355 | ||
3356 | if (sdata->type != IEEE80211_IF_TYPE_STA) | 3356 | if (sdata->vif.type != IEEE80211_IF_TYPE_STA) |
3357 | return ieee80211_sta_start_scan(dev, ssid, ssid_len); | 3357 | return ieee80211_sta_start_scan(dev, ssid, ssid_len); |
3358 | 3358 | ||
3359 | if (local->sta_sw_scanning || local->sta_hw_scanning) { | 3359 | if (local->sta_sw_scanning || local->sta_hw_scanning) { |
@@ -3576,8 +3576,8 @@ int ieee80211_sta_deauthenticate(struct net_device *dev, u16 reason) | |||
3576 | printk(KERN_DEBUG "%s: deauthenticate(reason=%d)\n", | 3576 | printk(KERN_DEBUG "%s: deauthenticate(reason=%d)\n", |
3577 | dev->name, reason); | 3577 | dev->name, reason); |
3578 | 3578 | ||
3579 | if (sdata->type != IEEE80211_IF_TYPE_STA && | 3579 | if (sdata->vif.type != IEEE80211_IF_TYPE_STA && |
3580 | sdata->type != IEEE80211_IF_TYPE_IBSS) | 3580 | sdata->vif.type != IEEE80211_IF_TYPE_IBSS) |
3581 | return -EINVAL; | 3581 | return -EINVAL; |
3582 | 3582 | ||
3583 | ieee80211_send_deauth(dev, ifsta, reason); | 3583 | ieee80211_send_deauth(dev, ifsta, reason); |
@@ -3594,7 +3594,7 @@ int ieee80211_sta_disassociate(struct net_device *dev, u16 reason) | |||
3594 | printk(KERN_DEBUG "%s: disassociate(reason=%d)\n", | 3594 | printk(KERN_DEBUG "%s: disassociate(reason=%d)\n", |
3595 | dev->name, reason); | 3595 | dev->name, reason); |
3596 | 3596 | ||
3597 | if (sdata->type != IEEE80211_IF_TYPE_STA) | 3597 | if (sdata->vif.type != IEEE80211_IF_TYPE_STA) |
3598 | return -EINVAL; | 3598 | return -EINVAL; |
3599 | 3599 | ||
3600 | if (!(ifsta->flags & IEEE80211_STA_ASSOCIATED)) | 3600 | if (!(ifsta->flags & IEEE80211_STA_ASSOCIATED)) |
diff --git a/net/mac80211/key.c b/net/mac80211/key.c index 0b2328f7d67c..ed57fb8e82fc 100644 --- a/net/mac80211/key.c +++ b/net/mac80211/key.c | |||
@@ -49,8 +49,8 @@ static const u8 *get_mac_for_key(struct ieee80211_key *key) | |||
49 | * address to indicate a transmit-only key. | 49 | * address to indicate a transmit-only key. |
50 | */ | 50 | */ |
51 | if (key->conf.alg != ALG_WEP && | 51 | if (key->conf.alg != ALG_WEP && |
52 | (key->sdata->type == IEEE80211_IF_TYPE_AP || | 52 | (key->sdata->vif.type == IEEE80211_IF_TYPE_AP || |
53 | key->sdata->type == IEEE80211_IF_TYPE_VLAN)) | 53 | key->sdata->vif.type == IEEE80211_IF_TYPE_VLAN)) |
54 | addr = zero_addr; | 54 | addr = zero_addr; |
55 | 55 | ||
56 | if (key->sta) | 56 | if (key->sta) |
@@ -172,7 +172,7 @@ struct ieee80211_key *ieee80211_key_alloc(struct ieee80211_sub_if_data *sdata, | |||
172 | if (sta->flags & WLAN_STA_WME) | 172 | if (sta->flags & WLAN_STA_WME) |
173 | key->conf.flags |= IEEE80211_KEY_FLAG_WMM_STA; | 173 | key->conf.flags |= IEEE80211_KEY_FLAG_WMM_STA; |
174 | } else { | 174 | } else { |
175 | if (sdata->type == IEEE80211_IF_TYPE_STA) { | 175 | if (sdata->vif.type == IEEE80211_IF_TYPE_STA) { |
176 | struct sta_info *ap; | 176 | struct sta_info *ap; |
177 | 177 | ||
178 | /* same here, the AP could be using QoS */ | 178 | /* same here, the AP could be using QoS */ |
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index ed3b81639203..465fce0f62ad 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c | |||
@@ -223,7 +223,7 @@ ieee80211_rx_monitor(struct ieee80211_local *local, struct sk_buff *origskb, | |||
223 | if (!netif_running(sdata->dev)) | 223 | if (!netif_running(sdata->dev)) |
224 | continue; | 224 | continue; |
225 | 225 | ||
226 | if (sdata->type != IEEE80211_IF_TYPE_MNTR) | 226 | if (sdata->vif.type != IEEE80211_IF_TYPE_MNTR) |
227 | continue; | 227 | continue; |
228 | 228 | ||
229 | if (prev_dev) { | 229 | if (prev_dev) { |
@@ -419,7 +419,7 @@ ieee80211_rx_h_check(struct ieee80211_txrx_data *rx) | |||
419 | if (unlikely(((rx->fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_DATA || | 419 | if (unlikely(((rx->fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_DATA || |
420 | ((rx->fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_CTL && | 420 | ((rx->fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_CTL && |
421 | (rx->fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_PSPOLL)) && | 421 | (rx->fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_PSPOLL)) && |
422 | rx->sdata->type != IEEE80211_IF_TYPE_IBSS && | 422 | rx->sdata->vif.type != IEEE80211_IF_TYPE_IBSS && |
423 | (!rx->sta || !(rx->sta->flags & WLAN_STA_ASSOC)))) { | 423 | (!rx->sta || !(rx->sta->flags & WLAN_STA_ASSOC)))) { |
424 | if ((!(rx->fc & IEEE80211_FCTL_FROMDS) && | 424 | if ((!(rx->fc & IEEE80211_FCTL_FROMDS) && |
425 | !(rx->fc & IEEE80211_FCTL_TODS) && | 425 | !(rx->fc & IEEE80211_FCTL_TODS) && |
@@ -639,14 +639,14 @@ ieee80211_rx_h_sta_process(struct ieee80211_txrx_data *rx) | |||
639 | /* Update last_rx only for IBSS packets which are for the current | 639 | /* Update last_rx only for IBSS packets which are for the current |
640 | * BSSID to avoid keeping the current IBSS network alive in cases where | 640 | * BSSID to avoid keeping the current IBSS network alive in cases where |
641 | * other STAs are using different BSSID. */ | 641 | * other STAs are using different BSSID. */ |
642 | if (rx->sdata->type == IEEE80211_IF_TYPE_IBSS) { | 642 | if (rx->sdata->vif.type == IEEE80211_IF_TYPE_IBSS) { |
643 | u8 *bssid = ieee80211_get_bssid(hdr, rx->skb->len, | 643 | u8 *bssid = ieee80211_get_bssid(hdr, rx->skb->len, |
644 | IEEE80211_IF_TYPE_IBSS); | 644 | IEEE80211_IF_TYPE_IBSS); |
645 | if (compare_ether_addr(bssid, rx->sdata->u.sta.bssid) == 0) | 645 | if (compare_ether_addr(bssid, rx->sdata->u.sta.bssid) == 0) |
646 | sta->last_rx = jiffies; | 646 | sta->last_rx = jiffies; |
647 | } else | 647 | } else |
648 | if (!is_multicast_ether_addr(hdr->addr1) || | 648 | if (!is_multicast_ether_addr(hdr->addr1) || |
649 | rx->sdata->type == IEEE80211_IF_TYPE_STA) { | 649 | rx->sdata->vif.type == IEEE80211_IF_TYPE_STA) { |
650 | /* Update last_rx only for unicast frames in order to prevent | 650 | /* Update last_rx only for unicast frames in order to prevent |
651 | * the Probe Request frames (the only broadcast frames from a | 651 | * the Probe Request frames (the only broadcast frames from a |
652 | * STA in infrastructure mode) from keeping a connection alive. | 652 | * STA in infrastructure mode) from keeping a connection alive. |
@@ -901,8 +901,8 @@ ieee80211_rx_h_ps_poll(struct ieee80211_txrx_data *rx) | |||
901 | !(rx->flags & IEEE80211_TXRXD_RXRA_MATCH))) | 901 | !(rx->flags & IEEE80211_TXRXD_RXRA_MATCH))) |
902 | return TXRX_CONTINUE; | 902 | return TXRX_CONTINUE; |
903 | 903 | ||
904 | if ((sdata->type != IEEE80211_IF_TYPE_AP) && | 904 | if ((sdata->vif.type != IEEE80211_IF_TYPE_AP) && |
905 | (sdata->type != IEEE80211_IF_TYPE_VLAN)) | 905 | (sdata->vif.type != IEEE80211_IF_TYPE_VLAN)) |
906 | return TXRX_DROP; | 906 | return TXRX_DROP; |
907 | 907 | ||
908 | skb = skb_dequeue(&rx->sta->tx_filtered); | 908 | skb = skb_dequeue(&rx->sta->tx_filtered); |
@@ -1058,8 +1058,8 @@ ieee80211_data_to_8023(struct ieee80211_txrx_data *rx) | |||
1058 | memcpy(dst, hdr->addr3, ETH_ALEN); | 1058 | memcpy(dst, hdr->addr3, ETH_ALEN); |
1059 | memcpy(src, hdr->addr2, ETH_ALEN); | 1059 | memcpy(src, hdr->addr2, ETH_ALEN); |
1060 | 1060 | ||
1061 | if (unlikely(sdata->type != IEEE80211_IF_TYPE_AP && | 1061 | if (unlikely(sdata->vif.type != IEEE80211_IF_TYPE_AP && |
1062 | sdata->type != IEEE80211_IF_TYPE_VLAN)) { | 1062 | sdata->vif.type != IEEE80211_IF_TYPE_VLAN)) { |
1063 | if (net_ratelimit()) | 1063 | if (net_ratelimit()) |
1064 | printk(KERN_DEBUG "%s: dropped ToDS frame " | 1064 | printk(KERN_DEBUG "%s: dropped ToDS frame " |
1065 | "(BSSID=%s SA=%s DA=%s)\n", | 1065 | "(BSSID=%s SA=%s DA=%s)\n", |
@@ -1075,7 +1075,7 @@ ieee80211_data_to_8023(struct ieee80211_txrx_data *rx) | |||
1075 | memcpy(dst, hdr->addr3, ETH_ALEN); | 1075 | memcpy(dst, hdr->addr3, ETH_ALEN); |
1076 | memcpy(src, hdr->addr4, ETH_ALEN); | 1076 | memcpy(src, hdr->addr4, ETH_ALEN); |
1077 | 1077 | ||
1078 | if (unlikely(sdata->type != IEEE80211_IF_TYPE_WDS)) { | 1078 | if (unlikely(sdata->vif.type != IEEE80211_IF_TYPE_WDS)) { |
1079 | if (net_ratelimit()) | 1079 | if (net_ratelimit()) |
1080 | printk(KERN_DEBUG "%s: dropped FromDS&ToDS " | 1080 | printk(KERN_DEBUG "%s: dropped FromDS&ToDS " |
1081 | "frame (RA=%s TA=%s DA=%s SA=%s)\n", | 1081 | "frame (RA=%s TA=%s DA=%s SA=%s)\n", |
@@ -1092,7 +1092,7 @@ ieee80211_data_to_8023(struct ieee80211_txrx_data *rx) | |||
1092 | memcpy(dst, hdr->addr1, ETH_ALEN); | 1092 | memcpy(dst, hdr->addr1, ETH_ALEN); |
1093 | memcpy(src, hdr->addr3, ETH_ALEN); | 1093 | memcpy(src, hdr->addr3, ETH_ALEN); |
1094 | 1094 | ||
1095 | if (sdata->type != IEEE80211_IF_TYPE_STA || | 1095 | if (sdata->vif.type != IEEE80211_IF_TYPE_STA || |
1096 | (is_multicast_ether_addr(dst) && | 1096 | (is_multicast_ether_addr(dst) && |
1097 | !compare_ether_addr(src, dev->dev_addr))) | 1097 | !compare_ether_addr(src, dev->dev_addr))) |
1098 | return -1; | 1098 | return -1; |
@@ -1102,7 +1102,7 @@ ieee80211_data_to_8023(struct ieee80211_txrx_data *rx) | |||
1102 | memcpy(dst, hdr->addr1, ETH_ALEN); | 1102 | memcpy(dst, hdr->addr1, ETH_ALEN); |
1103 | memcpy(src, hdr->addr2, ETH_ALEN); | 1103 | memcpy(src, hdr->addr2, ETH_ALEN); |
1104 | 1104 | ||
1105 | if (sdata->type != IEEE80211_IF_TYPE_IBSS) { | 1105 | if (sdata->vif.type != IEEE80211_IF_TYPE_IBSS) { |
1106 | if (net_ratelimit()) { | 1106 | if (net_ratelimit()) { |
1107 | printk(KERN_DEBUG "%s: dropped IBSS frame " | 1107 | printk(KERN_DEBUG "%s: dropped IBSS frame " |
1108 | "(DA=%s SA=%s BSSID=%s)\n", | 1108 | "(DA=%s SA=%s BSSID=%s)\n", |
@@ -1190,8 +1190,8 @@ ieee80211_deliver_skb(struct ieee80211_txrx_data *rx) | |||
1190 | skb = rx->skb; | 1190 | skb = rx->skb; |
1191 | xmit_skb = NULL; | 1191 | xmit_skb = NULL; |
1192 | 1192 | ||
1193 | if (local->bridge_packets && (sdata->type == IEEE80211_IF_TYPE_AP || | 1193 | if (local->bridge_packets && (sdata->vif.type == IEEE80211_IF_TYPE_AP || |
1194 | sdata->type == IEEE80211_IF_TYPE_VLAN) && | 1194 | sdata->vif.type == IEEE80211_IF_TYPE_VLAN) && |
1195 | (rx->flags & IEEE80211_TXRXD_RXRA_MATCH)) { | 1195 | (rx->flags & IEEE80211_TXRXD_RXRA_MATCH)) { |
1196 | if (is_multicast_ether_addr(ehdr->h_dest)) { | 1196 | if (is_multicast_ether_addr(ehdr->h_dest)) { |
1197 | /* | 1197 | /* |
@@ -1435,8 +1435,8 @@ ieee80211_rx_h_mgmt(struct ieee80211_txrx_data *rx) | |||
1435 | return TXRX_DROP; | 1435 | return TXRX_DROP; |
1436 | 1436 | ||
1437 | sdata = IEEE80211_DEV_TO_SUB_IF(rx->dev); | 1437 | sdata = IEEE80211_DEV_TO_SUB_IF(rx->dev); |
1438 | if ((sdata->type == IEEE80211_IF_TYPE_STA || | 1438 | if ((sdata->vif.type == IEEE80211_IF_TYPE_STA || |
1439 | sdata->type == IEEE80211_IF_TYPE_IBSS) && | 1439 | sdata->vif.type == IEEE80211_IF_TYPE_IBSS) && |
1440 | !(sdata->flags & IEEE80211_SDATA_USERSPACE_MLME)) | 1440 | !(sdata->flags & IEEE80211_SDATA_USERSPACE_MLME)) |
1441 | ieee80211_sta_rx_mgmt(rx->dev, rx->skb, rx->u.rx.status); | 1441 | ieee80211_sta_rx_mgmt(rx->dev, rx->skb, rx->u.rx.status); |
1442 | else | 1442 | else |
@@ -1528,7 +1528,7 @@ static void ieee80211_rx_michael_mic_report(struct net_device *dev, | |||
1528 | goto ignore; | 1528 | goto ignore; |
1529 | } | 1529 | } |
1530 | 1530 | ||
1531 | if (rx->sdata->type == IEEE80211_IF_TYPE_AP && keyidx) { | 1531 | if (rx->sdata->vif.type == IEEE80211_IF_TYPE_AP && keyidx) { |
1532 | /* | 1532 | /* |
1533 | * APs with pairwise keys should never receive Michael MIC | 1533 | * APs with pairwise keys should never receive Michael MIC |
1534 | * errors for non-zero keyidx because these are reserved for | 1534 | * errors for non-zero keyidx because these are reserved for |
@@ -1590,7 +1590,7 @@ static int prepare_for_handlers(struct ieee80211_sub_if_data *sdata, | |||
1590 | { | 1590 | { |
1591 | int multicast = is_multicast_ether_addr(hdr->addr1); | 1591 | int multicast = is_multicast_ether_addr(hdr->addr1); |
1592 | 1592 | ||
1593 | switch (sdata->type) { | 1593 | switch (sdata->vif.type) { |
1594 | case IEEE80211_IF_TYPE_STA: | 1594 | case IEEE80211_IF_TYPE_STA: |
1595 | if (!bssid) | 1595 | if (!bssid) |
1596 | return 0; | 1596 | return 0; |
@@ -1738,10 +1738,10 @@ void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw, struct sk_buff *skb, | |||
1738 | if (!netif_running(sdata->dev)) | 1738 | if (!netif_running(sdata->dev)) |
1739 | continue; | 1739 | continue; |
1740 | 1740 | ||
1741 | if (sdata->type == IEEE80211_IF_TYPE_MNTR) | 1741 | if (sdata->vif.type == IEEE80211_IF_TYPE_MNTR) |
1742 | continue; | 1742 | continue; |
1743 | 1743 | ||
1744 | bssid = ieee80211_get_bssid(hdr, skb->len, sdata->type); | 1744 | bssid = ieee80211_get_bssid(hdr, skb->len, sdata->vif.type); |
1745 | rx.flags |= IEEE80211_TXRXD_RXRA_MATCH; | 1745 | rx.flags |= IEEE80211_TXRXD_RXRA_MATCH; |
1746 | prepares = prepare_for_handlers(sdata, bssid, &rx, hdr); | 1746 | prepares = prepare_for_handlers(sdata, bssid, &rx, hdr); |
1747 | /* prepare_for_handlers can change sta */ | 1747 | /* prepare_for_handlers can change sta */ |
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c index 32e241764725..1f74bd296357 100644 --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c | |||
@@ -181,7 +181,7 @@ struct sta_info * sta_info_add(struct ieee80211_local *local, | |||
181 | struct ieee80211_sub_if_data *sdata; | 181 | struct ieee80211_sub_if_data *sdata; |
182 | 182 | ||
183 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); | 183 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
184 | if (sdata->type == IEEE80211_IF_TYPE_VLAN) | 184 | if (sdata->vif.type == IEEE80211_IF_TYPE_VLAN) |
185 | sdata = sdata->u.vlan.ap; | 185 | sdata = sdata->u.vlan.ap; |
186 | 186 | ||
187 | local->ops->sta_notify(local_to_hw(local), &sdata->vif, | 187 | local->ops->sta_notify(local_to_hw(local), &sdata->vif, |
@@ -259,7 +259,7 @@ void sta_info_free(struct sta_info *sta) | |||
259 | 259 | ||
260 | sdata = IEEE80211_DEV_TO_SUB_IF(sta->dev); | 260 | sdata = IEEE80211_DEV_TO_SUB_IF(sta->dev); |
261 | 261 | ||
262 | if (sdata->type == IEEE80211_IF_TYPE_VLAN) | 262 | if (sdata->vif.type == IEEE80211_IF_TYPE_VLAN) |
263 | sdata = sdata->u.vlan.ap; | 263 | sdata = sdata->u.vlan.ap; |
264 | 264 | ||
265 | local->ops->sta_notify(local_to_hw(local), &sdata->vif, | 265 | local->ops->sta_notify(local_to_hw(local), &sdata->vif, |
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 1b772ee2fe14..99590e4ce30b 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c | |||
@@ -237,7 +237,7 @@ ieee80211_tx_h_check_assoc(struct ieee80211_txrx_data *tx) | |||
237 | 237 | ||
238 | if (likely(tx->flags & IEEE80211_TXRXD_TXUNICAST)) { | 238 | if (likely(tx->flags & IEEE80211_TXRXD_TXUNICAST)) { |
239 | if (unlikely(!(sta_flags & WLAN_STA_ASSOC) && | 239 | if (unlikely(!(sta_flags & WLAN_STA_ASSOC) && |
240 | tx->sdata->type != IEEE80211_IF_TYPE_IBSS && | 240 | tx->sdata->vif.type != IEEE80211_IF_TYPE_IBSS && |
241 | (tx->fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_DATA)) { | 241 | (tx->fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_DATA)) { |
242 | #ifdef CONFIG_MAC80211_VERBOSE_DEBUG | 242 | #ifdef CONFIG_MAC80211_VERBOSE_DEBUG |
243 | DECLARE_MAC_BUF(mac); | 243 | DECLARE_MAC_BUF(mac); |
@@ -251,7 +251,7 @@ ieee80211_tx_h_check_assoc(struct ieee80211_txrx_data *tx) | |||
251 | } else { | 251 | } else { |
252 | if (unlikely((tx->fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_DATA && | 252 | if (unlikely((tx->fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_DATA && |
253 | tx->local->num_sta == 0 && | 253 | tx->local->num_sta == 0 && |
254 | tx->sdata->type != IEEE80211_IF_TYPE_IBSS)) { | 254 | tx->sdata->vif.type != IEEE80211_IF_TYPE_IBSS)) { |
255 | /* | 255 | /* |
256 | * No associated STAs - no need to send multicast | 256 | * No associated STAs - no need to send multicast |
257 | * frames. | 257 | * frames. |
@@ -294,7 +294,7 @@ static void purge_old_ps_buffers(struct ieee80211_local *local) | |||
294 | list_for_each_entry_rcu(sdata, &local->interfaces, list) { | 294 | list_for_each_entry_rcu(sdata, &local->interfaces, list) { |
295 | struct ieee80211_if_ap *ap; | 295 | struct ieee80211_if_ap *ap; |
296 | if (sdata->dev == local->mdev || | 296 | if (sdata->dev == local->mdev || |
297 | sdata->type != IEEE80211_IF_TYPE_AP) | 297 | sdata->vif.type != IEEE80211_IF_TYPE_AP) |
298 | continue; | 298 | continue; |
299 | ap = &sdata->u.ap; | 299 | ap = &sdata->u.ap; |
300 | skb = skb_dequeue(&ap->ps_bc_buf); | 300 | skb = skb_dequeue(&ap->ps_bc_buf); |
@@ -949,7 +949,7 @@ __ieee80211_tx_prepare(struct ieee80211_txrx_data *tx, | |||
949 | 949 | ||
950 | /* process and remove the injection radiotap header */ | 950 | /* process and remove the injection radiotap header */ |
951 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); | 951 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
952 | if (unlikely(sdata->type == IEEE80211_IF_TYPE_MNTR)) { | 952 | if (unlikely(sdata->vif.type == IEEE80211_IF_TYPE_MNTR)) { |
953 | if (__ieee80211_parse_tx_radiotap(tx, skb) == TXRX_DROP) | 953 | if (__ieee80211_parse_tx_radiotap(tx, skb) == TXRX_DROP) |
954 | return TXRX_DROP; | 954 | return TXRX_DROP; |
955 | 955 | ||
@@ -1252,7 +1252,7 @@ int ieee80211_master_start_xmit(struct sk_buff *skb, | |||
1252 | } | 1252 | } |
1253 | 1253 | ||
1254 | control.vif = &osdata->vif; | 1254 | control.vif = &osdata->vif; |
1255 | control.type = osdata->type; | 1255 | control.type = osdata->vif.type; |
1256 | if (pkt_data->flags & IEEE80211_TXPD_REQ_TX_STATUS) | 1256 | if (pkt_data->flags & IEEE80211_TXPD_REQ_TX_STATUS) |
1257 | control.flags |= IEEE80211_TXCTL_REQ_TX_STATUS; | 1257 | control.flags |= IEEE80211_TXCTL_REQ_TX_STATUS; |
1258 | if (pkt_data->flags & IEEE80211_TXPD_DO_NOT_ENCRYPT) | 1258 | if (pkt_data->flags & IEEE80211_TXPD_DO_NOT_ENCRYPT) |
@@ -1371,7 +1371,7 @@ int ieee80211_subif_start_xmit(struct sk_buff *skb, | |||
1371 | ethertype = (skb->data[12] << 8) | skb->data[13]; | 1371 | ethertype = (skb->data[12] << 8) | skb->data[13]; |
1372 | fc = IEEE80211_FTYPE_DATA | IEEE80211_STYPE_DATA; | 1372 | fc = IEEE80211_FTYPE_DATA | IEEE80211_STYPE_DATA; |
1373 | 1373 | ||
1374 | switch (sdata->type) { | 1374 | switch (sdata->vif.type) { |
1375 | case IEEE80211_IF_TYPE_AP: | 1375 | case IEEE80211_IF_TYPE_AP: |
1376 | case IEEE80211_IF_TYPE_VLAN: | 1376 | case IEEE80211_IF_TYPE_VLAN: |
1377 | fc |= IEEE80211_FCTL_FROMDS; | 1377 | fc |= IEEE80211_FCTL_FROMDS; |
@@ -1707,7 +1707,7 @@ struct sk_buff *ieee80211_beacon_get(struct ieee80211_hw *hw, | |||
1707 | bdev = sdata->dev; | 1707 | bdev = sdata->dev; |
1708 | ap = &sdata->u.ap; | 1708 | ap = &sdata->u.ap; |
1709 | 1709 | ||
1710 | if (!ap || sdata->type != IEEE80211_IF_TYPE_AP || | 1710 | if (!ap || sdata->vif.type != IEEE80211_IF_TYPE_AP || |
1711 | !ap->beacon_head) { | 1711 | !ap->beacon_head) { |
1712 | #ifdef CONFIG_MAC80211_VERBOSE_DEBUG | 1712 | #ifdef CONFIG_MAC80211_VERBOSE_DEBUG |
1713 | if (net_ratelimit()) | 1713 | if (net_ratelimit()) |
@@ -1819,7 +1819,8 @@ ieee80211_get_buffered_bc(struct ieee80211_hw *hw, | |||
1819 | sdata = vif_to_sdata(vif); | 1819 | sdata = vif_to_sdata(vif); |
1820 | bdev = sdata->dev; | 1820 | bdev = sdata->dev; |
1821 | 1821 | ||
1822 | if (!bss || sdata->type != IEEE80211_IF_TYPE_AP || !bss->beacon_head) | 1822 | if (!bss || sdata->vif.type != IEEE80211_IF_TYPE_AP || |
1823 | !bss->beacon_head) | ||
1823 | return NULL; | 1824 | return NULL; |
1824 | 1825 | ||
1825 | if (bss->dtim_count != 0) | 1826 | if (bss->dtim_count != 0) |
diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 15503ca3e945..ba81cf542818 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c | |||
@@ -471,7 +471,7 @@ void ieee80211_iterate_active_interfaces( | |||
471 | rcu_read_lock(); | 471 | rcu_read_lock(); |
472 | 472 | ||
473 | list_for_each_entry_rcu(sdata, &local->interfaces, list) { | 473 | list_for_each_entry_rcu(sdata, &local->interfaces, list) { |
474 | switch (sdata->type) { | 474 | switch (sdata->vif.type) { |
475 | case IEEE80211_IF_TYPE_INVALID: | 475 | case IEEE80211_IF_TYPE_INVALID: |
476 | case IEEE80211_IF_TYPE_MNTR: | 476 | case IEEE80211_IF_TYPE_MNTR: |
477 | case IEEE80211_IF_TYPE_VLAN: | 477 | case IEEE80211_IF_TYPE_VLAN: |