2 include/net/mac80211.h | 1
3 net/mac80211/ieee80211.c | 198 ++++++++++++++++++++++++++++++++++++++--
4 net/mac80211/ieee80211_common.h | 64 ++++++++++++
5 net/mac80211/ieee80211_i.h | 9 +
6 net/mac80211/ieee80211_iface.c | 66 +++++++++++++
7 net/mac80211/ieee80211_ioctl.c | 21 ++++
8 net/mac80211/ieee80211_rate.c | 3
9 net/mac80211/ieee80211_rate.h | 2
10 net/mac80211/ieee80211_sta.c | 2
11 net/mac80211/rx.c | 29 ++++-
12 net/mac80211/tx.c | 14 ++
13 net/mac80211/wme.c | 10 +-
14 12 files changed, 399 insertions(+), 20 deletions(-)
16 Index: mac80211/include/net/mac80211.h
17 ===================================================================
18 --- mac80211.orig/include/net/mac80211.h 2007-11-11 15:15:42.824034853 +0100
19 +++ mac80211/include/net/mac80211.h 2007-11-11 15:15:53.784659457 +0100
21 enum ieee80211_if_types {
22 IEEE80211_IF_TYPE_INVALID,
24 + IEEE80211_IF_TYPE_MGMT,
25 IEEE80211_IF_TYPE_STA,
26 IEEE80211_IF_TYPE_IBSS,
27 IEEE80211_IF_TYPE_MNTR,
28 Index: mac80211/net/mac80211/ieee80211.c
29 ===================================================================
30 --- mac80211.orig/net/mac80211/ieee80211.c 2007-11-11 15:15:51.536531354 +0100
31 +++ mac80211/net/mac80211/ieee80211.c 2007-11-11 15:16:22.214279577 +0100
33 #include <linux/bitmap.h>
34 #include <net/cfg80211.h>
36 +#include "ieee80211_common.h"
37 #include "ieee80211_i.h"
38 #include "ieee80211_rate.h"
41 ieee80211_configure_filter(local);
44 +/* management interface */
47 +ieee80211_fill_frame_info(struct ieee80211_local *local,
48 + struct ieee80211_frame_info *fi,
49 + struct ieee80211_rx_status *status)
53 + struct ieee80211_rate *rate;
55 + jiffies_to_timespec(jiffies, &ts);
56 + fi->hosttime = cpu_to_be64((u64) ts.tv_sec * 1000000 +
58 + fi->mactime = cpu_to_be64(status->mactime);
59 + switch (status->phymode) {
60 + case MODE_IEEE80211A:
61 + fi->phytype = htonl(ieee80211_phytype_ofdm_dot11_a);
63 + case MODE_IEEE80211B:
64 + fi->phytype = htonl(ieee80211_phytype_dsss_dot11_b);
66 + case MODE_IEEE80211G:
67 + fi->phytype = htonl(ieee80211_phytype_pbcc_dot11_g);
70 + fi->phytype = htonl(0xAAAAAAAA);
73 + fi->channel = htonl(status->channel);
74 + rate = ieee80211_get_rate(local, status->phymode,
77 + fi->datarate = htonl(rate->rate);
78 + if (rate->flags & IEEE80211_RATE_PREAMBLE2) {
79 + if (status->rate == rate->val)
80 + fi->preamble = htonl(2); /* long */
81 + else if (status->rate == rate->val2)
82 + fi->preamble = htonl(1); /* short */
84 + fi->preamble = htonl(0);
86 + fi->datarate = htonl(0);
87 + fi->preamble = htonl(0);
90 + fi->antenna = htonl(status->antenna);
91 + fi->priority = htonl(0xffffffff); /* no clue */
92 + fi->ssi_type = htonl(ieee80211_ssi_raw);
93 + fi->ssi_signal = htonl(status->ssi);
94 + fi->ssi_noise = 0x00000000;
97 + /* clear everything because we really don't know.
98 + * the msg_type field isn't present on monitor frames
99 + * so we don't know whether it will be present or not,
100 + * but it's ok to not clear it since it'll be assigned
102 + memset(fi, 0, sizeof(*fi) - sizeof(fi->msg_type));
104 + fi->ssi_type = htonl(ieee80211_ssi_none);
106 + fi->version = htonl(IEEE80211_FI_VERSION);
107 + fi->length = cpu_to_be32(sizeof(*fi) - sizeof(fi->msg_type));
110 +/* this routine is actually not just for this, but also
111 + * for pushing fake 'management' frames into userspace.
112 + * it shall be replaced by a netlink-based system. */
114 +ieee80211_rx_mgmt(struct ieee80211_local *local, struct sk_buff *skb,
115 + struct ieee80211_rx_status *status, u32 msg_type)
117 + struct ieee80211_frame_info *fi;
118 + const size_t hlen = sizeof(struct ieee80211_frame_info);
119 + struct net_device *dev = local->apdev;
123 + if (skb_headroom(skb) < hlen) {
124 + I802_DEBUG_INC(local->rx_expand_skb_head);
125 + if (pskb_expand_head(skb, hlen, 0, GFP_ATOMIC)) {
126 + dev_kfree_skb(skb);
131 + fi = (struct ieee80211_frame_info *) skb_push(skb, hlen);
133 + ieee80211_fill_frame_info(local, fi, status);
134 + fi->msg_type = htonl(msg_type);
136 + dev->stats.rx_packets++;
137 + dev->stats.rx_bytes += skb->len;
139 + skb_set_mac_header(skb, 0);
140 + skb->ip_summed = CHECKSUM_UNNECESSARY;
141 + skb->pkt_type = PACKET_OTHERHOST;
142 + skb->protocol = htons(ETH_P_802_2);
143 + memset(skb->cb, 0, sizeof(skb->cb));
147 +static int ieee80211_mgmt_open(struct net_device *dev)
149 + struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
151 + if (!netif_running(local->mdev))
152 + return -EOPNOTSUPP;
156 +static int ieee80211_mgmt_stop(struct net_device *dev)
161 +static int ieee80211_change_mtu_apdev(struct net_device *dev, int new_mtu)
163 + /* FIX: what would be proper limits for MTU?
164 + * This interface uses 802.11 frames. */
165 + if (new_mtu < 256 || new_mtu > IEEE80211_MAX_DATA_LEN) {
166 + printk(KERN_WARNING "%s: invalid MTU %d\n",
167 + dev->name, new_mtu);
171 +#ifdef CONFIG_MAC80211_VERBOSE_DEBUG
172 + printk(KERN_DEBUG "%s: setting MTU %d\n", dev->name, new_mtu);
173 +#endif /* CONFIG_MAC80211_VERBOSE_DEBUG */
174 + dev->mtu = new_mtu;
178 +void ieee80211_if_mgmt_setup(struct net_device *dev)
181 + dev->hard_start_xmit = ieee80211_mgmt_start_xmit;
182 + dev->change_mtu = ieee80211_change_mtu_apdev;
183 + dev->open = ieee80211_mgmt_open;
184 + dev->stop = ieee80211_mgmt_stop;
185 + dev->type = ARPHRD_IEEE80211_PRISM;
186 + dev->hard_header_parse = &header_parse_80211;
187 + dev->destructor = ieee80211_if_free;
190 /* regular interfaces */
192 static int ieee80211_change_mtu(struct net_device *dev, int new_mtu)
196 case IEEE80211_IF_TYPE_AP:
197 + case IEEE80211_IF_TYPE_MGMT:
198 case IEEE80211_IF_TYPE_STA:
199 case IEEE80211_IF_TYPE_MNTR:
200 case IEEE80211_IF_TYPE_IBSS:
202 if (local->open_count == 0) {
203 res = dev_open(local->mdev);
205 + if (local->apdev) {
206 + res = dev_open(local->apdev);
209 tasklet_enable(&local->tx_pending_tasklet);
210 tasklet_enable(&local->tasklet);
213 if (netif_running(local->mdev))
214 dev_close(local->mdev);
217 + dev_close(local->apdev);
219 if (local->ops->stop)
220 local->ops->stop(local_to_hw(local));
223 pkt_data->flags |= IEEE80211_TXPD_DO_NOT_ENCRYPT;
224 if (control->flags & IEEE80211_TXCTL_REQUEUE)
225 pkt_data->flags |= IEEE80211_TXPD_REQUEUE;
226 + if (control->type == IEEE80211_IF_TYPE_MGMT)
227 + pkt_data->flags |= IEEE80211_TXPD_MGMT_IFACE;
228 pkt_data->queue = control->queue;
230 hdrlen = ieee80211_get_hdrlen_from_skb(skb);
232 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
233 struct ieee80211_local *local = hw_to_local(hw);
236 struct ieee80211_tx_status_rtap_hdr *rthdr;
237 struct ieee80211_sub_if_data *sdata;
240 local->dot11FailedCount++;
243 + msg_type = (status->flags & IEEE80211_TX_STATUS_ACK) ?
244 + ieee80211_msg_tx_callback_ack : ieee80211_msg_tx_callback_fail;
246 /* this was a transmitted frame, but now we want to reuse it */
249 + if ((status->control.flags & IEEE80211_TXCTL_REQ_TX_STATUS) &&
251 + if (local->monitors) {
252 + skb2 = skb_clone(skb, GFP_ATOMIC);
259 + /* Send frame to hostapd */
260 + ieee80211_rx_mgmt(local, skb2, NULL, msg_type);
266 if (!local->monitors) {
269 @@ -1161,6 +1339,8 @@
270 BUG_ON(local->reg_state != IEEE80211_DEV_REGISTERED);
272 local->reg_state = IEEE80211_DEV_UNREGISTERED;
274 + ieee80211_if_del_mgmt(local);
277 * At this point, interface list manipulations are fine
278 Index: mac80211/net/mac80211/ieee80211_i.h
279 ===================================================================
280 --- mac80211.orig/net/mac80211/ieee80211_i.h 2007-11-11 15:15:42.840035769 +0100
281 +++ mac80211/net/mac80211/ieee80211_i.h 2007-11-11 15:15:53.792659922 +0100
283 * when using CTS protection with IEEE 802.11g. */
284 struct ieee80211_rate *last_frag_rate;
285 int last_frag_hwrate;
286 + int mgmt_interface;
288 /* Extra fragments (in addition to the first fragment
291 #define IEEE80211_TXPD_REQ_TX_STATUS BIT(0)
292 #define IEEE80211_TXPD_DO_NOT_ENCRYPT BIT(1)
293 #define IEEE80211_TXPD_REQUEUE BIT(2)
294 +#define IEEE80211_TXPD_MGMT_IFACE BIT(3)
295 /* Stored in sk_buff->cb */
296 struct ieee80211_tx_packet_data {
299 struct list_head modes_list;
301 struct net_device *mdev; /* wmaster# - "master" 802.11 device */
302 + struct net_device *apdev; /* wlan#ap - management frames (hostapd) */
305 unsigned int filter_flags; /* FIF_* */
306 @@ -701,11 +704,14 @@
307 int ieee80211_hw_config(struct ieee80211_local *local);
308 int ieee80211_if_config(struct net_device *dev);
309 int ieee80211_if_config_beacon(struct net_device *dev);
310 +void ieee80211_rx_mgmt(struct ieee80211_local *local, struct sk_buff *skb,
311 + struct ieee80211_rx_status *status, u32 msg_type);
312 void ieee80211_prepare_rates(struct ieee80211_local *local,
313 struct ieee80211_hw_mode *mode);
314 void ieee80211_tx_set_iswep(struct ieee80211_txrx_data *tx);
315 int ieee80211_if_update_wds(struct net_device *dev, u8 *remote_addr);
316 void ieee80211_if_setup(struct net_device *dev);
317 +void ieee80211_if_mgmt_setup(struct net_device *dev);
318 struct ieee80211_rate *ieee80211_get_rate(struct ieee80211_local *local,
319 int phymode, int hwrate);
322 int ieee80211_if_remove(struct net_device *dev, const char *name, int id);
323 void ieee80211_if_free(struct net_device *dev);
324 void ieee80211_if_sdata_init(struct ieee80211_sub_if_data *sdata);
325 +int ieee80211_if_add_mgmt(struct ieee80211_local *local);
326 +void ieee80211_if_del_mgmt(struct ieee80211_local *local);
329 void ieee80211_regdomain_init(void);
331 int ieee80211_master_start_xmit(struct sk_buff *skb, struct net_device *dev);
332 int ieee80211_monitor_start_xmit(struct sk_buff *skb, struct net_device *dev);
333 int ieee80211_subif_start_xmit(struct sk_buff *skb, struct net_device *dev);
334 +int ieee80211_mgmt_start_xmit(struct sk_buff *skb, struct net_device *dev);
336 /* utility functions/constants */
337 extern void *mac80211_wiphy_privid; /* for wiphy privid */
338 Index: mac80211/net/mac80211/ieee80211_iface.c
339 ===================================================================
340 --- mac80211.orig/net/mac80211/ieee80211_iface.c 2007-11-11 15:15:42.848036222 +0100
341 +++ mac80211/net/mac80211/ieee80211_iface.c 2007-11-11 15:15:53.796660158 +0100
346 +int ieee80211_if_add_mgmt(struct ieee80211_local *local)
348 + struct net_device *ndev;
349 + struct ieee80211_sub_if_data *nsdata;
354 + ndev = alloc_netdev(sizeof(struct ieee80211_sub_if_data), "wmgmt%d",
355 + ieee80211_if_mgmt_setup);
358 + ret = dev_alloc_name(ndev, ndev->name);
362 + memcpy(ndev->dev_addr, local->hw.wiphy->perm_addr, ETH_ALEN);
363 + SET_NETDEV_DEV(ndev, wiphy_dev(local->hw.wiphy));
365 + nsdata = IEEE80211_DEV_TO_SUB_IF(ndev);
366 + ndev->ieee80211_ptr = &nsdata->wdev;
367 + nsdata->wdev.wiphy = local->hw.wiphy;
368 + nsdata->type = IEEE80211_IF_TYPE_MGMT;
369 + nsdata->dev = ndev;
370 + nsdata->local = local;
371 + ieee80211_if_sdata_init(nsdata);
373 + ret = register_netdevice(ndev);
378 + * Called even when register_netdevice fails, it would
379 + * oops if assigned before initialising the rest.
381 + ndev->uninit = ieee80211_if_reinit;
383 + ieee80211_debugfs_add_netdev(nsdata);
385 + if (local->open_count > 0)
387 + local->apdev = ndev;
395 +void ieee80211_if_del_mgmt(struct ieee80211_local *local)
397 + struct net_device *apdev;
400 + apdev = local->apdev;
401 + ieee80211_debugfs_remove_netdev(IEEE80211_DEV_TO_SUB_IF(apdev));
402 + local->apdev = NULL;
403 + unregister_netdevice(apdev);
406 void ieee80211_if_set_type(struct net_device *dev, int type)
408 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
410 ieee80211_if_sdata_deinit(sdata);
412 switch (sdata->type) {
413 + case IEEE80211_IF_TYPE_MGMT:
414 + /* nothing to do */
416 case IEEE80211_IF_TYPE_INVALID:
421 void ieee80211_if_free(struct net_device *dev)
423 + struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
424 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
426 + /* local->apdev must be NULL when freeing management interface */
427 + BUG_ON(dev == local->apdev);
428 ieee80211_if_sdata_deinit(sdata);
431 Index: mac80211/net/mac80211/ieee80211_rate.c
432 ===================================================================
433 --- mac80211.orig/net/mac80211/ieee80211_rate.c 2007-11-11 15:15:42.852036451 +0100
434 +++ mac80211/net/mac80211/ieee80211_rate.c 2007-11-11 15:15:53.800660386 +0100
436 struct rate_control_ref *ref, *old;
439 - if (local->open_count || netif_running(local->mdev))
440 + if (local->open_count || netif_running(local->mdev) ||
441 + (local->apdev && netif_running(local->apdev)))
444 ref = rate_control_alloc(name, local);
445 Index: mac80211/net/mac80211/ieee80211_rate.h
446 ===================================================================
447 --- mac80211.orig/net/mac80211/ieee80211_rate.h 2007-11-11 15:15:42.860036908 +0100
448 +++ mac80211/net/mac80211/ieee80211_rate.h 2007-11-11 15:15:53.800660386 +0100
451 /* parameters from the caller to rate_control_get_rate(): */
452 struct ieee80211_hw_mode *mode;
453 + int mgmt_data; /* this is data frame that is used for management
454 + * (e.g., IEEE 802.1X EAPOL) */
458 Index: mac80211/net/mac80211/ieee80211_sta.c
459 ===================================================================
460 --- mac80211.orig/net/mac80211/ieee80211_sta.c 2007-11-11 15:15:42.868037362 +0100
461 +++ mac80211/net/mac80211/ieee80211_sta.c 2007-11-11 15:15:53.800660386 +0100
463 pkt_data = (struct ieee80211_tx_packet_data *) skb->cb;
464 memset(pkt_data, 0, sizeof(struct ieee80211_tx_packet_data));
465 pkt_data->ifindex = sdata->dev->ifindex;
466 + if (sdata->type == IEEE80211_IF_TYPE_MGMT)
467 + pkt_data->flags |= IEEE80211_TXPD_MGMT_IFACE;
469 pkt_data->flags |= IEEE80211_TXPD_DO_NOT_ENCRYPT;
471 Index: mac80211/net/mac80211/rx.c
472 ===================================================================
473 --- mac80211.orig/net/mac80211/rx.c 2007-11-11 15:15:42.872037591 +0100
474 +++ mac80211/net/mac80211/rx.c 2007-11-11 15:15:53.804660611 +0100
477 #include "ieee80211_i.h"
478 #include "ieee80211_led.h"
479 +#include "ieee80211_common.h"
488 + if (!rx->local->apdev)
491 + ieee80211_rx_mgmt(rx->local, rx->skb, rx->u.rx.status,
492 + ieee80211_msg_sta_not_assoc);
493 + return TXRX_QUEUED;
496 return TXRX_CONTINUE;
499 if (rx->sdata->eapol && ieee80211_is_eapol(rx->skb) &&
500 rx->sdata->type != IEEE80211_IF_TYPE_STA &&
501 - (rx->flags & IEEE80211_TXRXD_RXRA_MATCH))
502 - return TXRX_CONTINUE;
503 + (rx->flags & IEEE80211_TXRXD_RXRA_MATCH)) {
504 + /* Pass both encrypted and unencrypted EAPOL frames to user
505 + * space for processing. */
506 + if (!rx->local->apdev)
508 + ieee80211_rx_mgmt(rx->local, rx->skb, rx->u.rx.status,
509 + ieee80211_msg_normal);
510 + return TXRX_QUEUED;
513 if (unlikely(rx->sdata->ieee802_1x &&
514 (rx->fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_DATA &&
515 @@ -1196,8 +1209,13 @@
516 sdata->type == IEEE80211_IF_TYPE_IBSS) &&
517 !(sdata->flags & IEEE80211_SDATA_USERSPACE_MLME))
518 ieee80211_sta_rx_mgmt(rx->dev, rx->skb, rx->u.rx.status);
522 + /* Management frames are sent to hostapd for processing */
523 + if (!rx->local->apdev)
525 + ieee80211_rx_mgmt(rx->local, rx->skb, rx->u.rx.status,
526 + ieee80211_msg_normal);
531 @@ -1407,6 +1425,7 @@
532 /* take everything */
534 case IEEE80211_IF_TYPE_INVALID:
535 + case IEEE80211_IF_TYPE_MGMT:
536 /* should never get here */
539 Index: mac80211/net/mac80211/tx.c
540 ===================================================================
541 --- mac80211.orig/net/mac80211/tx.c 2007-11-11 15:15:42.880038048 +0100
542 +++ mac80211/net/mac80211/tx.c 2007-11-11 15:15:53.804660611 +0100
544 return TXRX_CONTINUE;
547 - if (unlikely(/* !injected && */ tx->sdata->ieee802_1x &&
548 + if (unlikely(!tx->u.tx.mgmt_interface && tx->sdata->ieee802_1x &&
549 !(sta_flags & WLAN_STA_AUTHORIZED))) {
550 #ifdef CONFIG_MAC80211_VERBOSE_DEBUG
551 printk(KERN_DEBUG "%s: dropped frame to " MAC_FMT
553 memset(&extra, 0, sizeof(extra));
554 extra.mode = tx->u.tx.mode;
555 extra.ethertype = tx->ethertype;
556 + extra.mgmt_data = tx->sdata &&
557 + tx->sdata->type == IEEE80211_IF_TYPE_MGMT;
559 tx->u.tx.rate = rate_control_get_rate(tx->local, tx->dev,
561 @@ -1076,7 +1078,7 @@
564 static int ieee80211_tx(struct net_device *dev, struct sk_buff *skb,
565 - struct ieee80211_tx_control *control)
566 + struct ieee80211_tx_control *control, int mgmt)
568 struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
569 struct sta_info *sta;
570 @@ -1107,6 +1109,7 @@
574 + tx.u.tx.mgmt_interface = mgmt;
575 tx.u.tx.mode = local->hw.conf.mode;
577 for (handler = local->tx_handlers; *handler != NULL;
578 @@ -1253,7 +1256,8 @@
579 control.flags |= IEEE80211_TXCTL_REQUEUE;
580 control.queue = pkt_data->queue;
582 - ret = ieee80211_tx(odev, skb, &control);
583 + ret = ieee80211_tx(odev, skb, &control,
584 + control.type == IEEE80211_IF_TYPE_MGMT);
588 @@ -1498,6 +1502,8 @@
589 pkt_data = (struct ieee80211_tx_packet_data *)skb->cb;
590 memset(pkt_data, 0, sizeof(struct ieee80211_tx_packet_data));
591 pkt_data->ifindex = dev->ifindex;
592 + if (sdata->type == IEEE80211_IF_TYPE_MGMT)
593 + pkt_data->flags |= IEEE80211_TXPD_MGMT_IFACE;
595 skb->dev = local->mdev;
596 dev->stats.tx_packets++;
597 @@ -1555,6 +1561,8 @@
598 pkt_data = (struct ieee80211_tx_packet_data *) skb->cb;
599 memset(pkt_data, 0, sizeof(struct ieee80211_tx_packet_data));
600 pkt_data->ifindex = sdata->dev->ifindex;
601 + if (sdata->type == IEEE80211_IF_TYPE_MGMT)
602 + pkt_data->flags |= IEEE80211_TXPD_MGMT_IFACE;
604 skb->priority = 20; /* use hardcoded priority for mgmt TX queue */
605 skb->dev = sdata->local->mdev;
606 Index: mac80211/net/mac80211/wme.c
607 ===================================================================
608 --- mac80211.orig/net/mac80211/wme.c 2007-11-11 15:15:42.888038502 +0100
609 +++ mac80211/net/mac80211/wme.c 2007-11-11 15:15:53.804660611 +0100
611 static inline int classify80211(struct sk_buff *skb, struct Qdisc *qd)
613 struct ieee80211_local *local = wdev_priv(qd->dev->ieee80211_ptr);
614 + struct ieee80211_tx_packet_data *pkt_data =
615 + (struct ieee80211_tx_packet_data *) skb->cb;
616 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
617 unsigned short fc = le16_to_cpu(hdr->frame_control);
620 return IEEE80211_TX_QUEUE_DATA0;
623 - if (0 /* injected */) {
624 - /* use AC from radiotap */
625 + if (unlikely(pkt_data->flags & IEEE80211_TXPD_MGMT_IFACE)) {
626 + /* Data frames from hostapd (mainly, EAPOL) use AC_VO
627 + * and they will include QoS control fields if
628 + * the target STA is using WME. */
630 + return ieee802_1d_to_ac[skb->priority];
633 /* is this a QoS frame? */
634 Index: mac80211/net/mac80211/ieee80211_ioctl.c
635 ===================================================================
636 --- mac80211.orig/net/mac80211/ieee80211_ioctl.c 2007-11-11 15:15:51.532531127 +0100
637 +++ mac80211/net/mac80211/ieee80211_ioctl.c 2007-11-11 15:15:53.808660833 +0100
638 @@ -840,16 +840,29 @@
639 void *wrqu, char *extra)
641 struct ieee80211_sub_if_data *sdata;
642 + struct ieee80211_local *local;
643 int *i = (int *) extra;
645 + int value = *(i + 1);
648 if (!capable(CAP_NET_ADMIN))
651 sdata = IEEE80211_DEV_TO_SUB_IF(dev);
652 + local = sdata->local;
655 + case PRISM2_PARAM_MGMT_IF:
658 + ret = ieee80211_if_add_mgmt(local);
659 + } else if (value == 0) {
661 + ieee80211_if_del_mgmt(local);
668 @@ -864,12 +877,20 @@
669 void *wrqu, char *extra)
671 struct ieee80211_sub_if_data *sdata;
672 + struct ieee80211_local *local;
673 int *param = (int *) extra;
676 sdata = IEEE80211_DEV_TO_SUB_IF(dev);
677 + local = sdata->local;
680 + case PRISM2_PARAM_MGMT_IF:
682 + *param = local->apdev->ifindex;