2 * Copyright (c) 2006 Jiri Benc <jbenc@suse.cz>
3 * Copyright 2007 Johannes Berg <johannes@sipsolutions.net>
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
10 #include <linux/kernel.h>
11 #include <linux/device.h>
13 #include <linux/interrupt.h>
14 #include <linux/netdevice.h>
15 #include <linux/rtnetlink.h>
16 #include <linux/notifier.h>
17 #include <net/mac80211.h>
18 #include <net/cfg80211.h>
19 #include "ieee80211_i.h"
22 #include "debugfs_netdev.h"
24 static ssize_t
ieee80211_if_read(
25 struct ieee80211_sub_if_data
*sdata
,
27 size_t count
, loff_t
*ppos
,
28 ssize_t (*format
)(const struct ieee80211_sub_if_data
*, char *, int))
31 ssize_t ret
= -EINVAL
;
33 read_lock(&dev_base_lock
);
34 if (sdata
->dev
->reg_state
== NETREG_REGISTERED
)
35 ret
= (*format
)(sdata
, buf
, sizeof(buf
));
36 read_unlock(&dev_base_lock
);
39 ret
= simple_read_from_buffer(userbuf
, count
, ppos
, buf
, ret
);
44 #ifdef CONFIG_MAC80211_MESH
45 static ssize_t
ieee80211_if_write(
46 struct ieee80211_sub_if_data
*sdata
,
47 char const __user
*userbuf
,
48 size_t count
, loff_t
*ppos
,
49 int (*format
)(struct ieee80211_sub_if_data
*, char *))
54 memset(buf
, 0x00, sizeof(buf
));
55 buf_size
= min(count
, (sizeof(buf
)-1));
56 if (copy_from_user(buf
, userbuf
, buf_size
))
58 read_lock(&dev_base_lock
);
59 if (sdata
->dev
->reg_state
== NETREG_REGISTERED
)
60 (*format
)(sdata
, buf
);
61 read_unlock(&dev_base_lock
);
67 #define IEEE80211_IF_FMT(name, field, format_string) \
68 static ssize_t ieee80211_if_fmt_##name( \
69 const struct ieee80211_sub_if_data *sdata, char *buf, \
72 return scnprintf(buf, buflen, format_string, sdata->field); \
74 #define IEEE80211_IF_WFMT(name, field, type) \
75 static int ieee80211_if_wfmt_##name( \
76 struct ieee80211_sub_if_data *sdata, char *buf) \
81 tmp = simple_strtoul(buf, &endp, 0); \
82 if ((endp == buf) || ((type)tmp != tmp)) \
87 #define IEEE80211_IF_FMT_DEC(name, field) \
88 IEEE80211_IF_FMT(name, field, "%d\n")
89 #define IEEE80211_IF_FMT_HEX(name, field) \
90 IEEE80211_IF_FMT(name, field, "%#x\n")
91 #define IEEE80211_IF_FMT_SIZE(name, field) \
92 IEEE80211_IF_FMT(name, field, "%zd\n")
94 #define IEEE80211_IF_FMT_ATOMIC(name, field) \
95 static ssize_t ieee80211_if_fmt_##name( \
96 const struct ieee80211_sub_if_data *sdata, \
97 char *buf, int buflen) \
99 return scnprintf(buf, buflen, "%d\n", atomic_read(&sdata->field));\
102 #define IEEE80211_IF_FMT_MAC(name, field) \
103 static ssize_t ieee80211_if_fmt_##name( \
104 const struct ieee80211_sub_if_data *sdata, char *buf, \
107 return scnprintf(buf, buflen, "%pM\n", sdata->field); \
110 #define __IEEE80211_IF_FILE(name) \
111 static ssize_t ieee80211_if_read_##name(struct file *file, \
112 char __user *userbuf, \
113 size_t count, loff_t *ppos) \
115 return ieee80211_if_read(file->private_data, \
116 userbuf, count, ppos, \
117 ieee80211_if_fmt_##name); \
119 static const struct file_operations name##_ops = { \
120 .read = ieee80211_if_read_##name, \
121 .open = mac80211_open_file_generic, \
124 #define IEEE80211_IF_FILE(name, field, format) \
125 IEEE80211_IF_FMT_##format(name, field) \
126 __IEEE80211_IF_FILE(name)
128 #define __IEEE80211_IF_WFILE(name) \
129 static ssize_t ieee80211_if_read_##name(struct file *file, \
130 char __user *userbuf, \
131 size_t count, loff_t *ppos) \
133 return ieee80211_if_read(file->private_data, \
134 userbuf, count, ppos, \
135 ieee80211_if_fmt_##name); \
137 static ssize_t ieee80211_if_write_##name(struct file *file, \
138 const char __user *userbuf, \
139 size_t count, loff_t *ppos) \
141 return ieee80211_if_write(file->private_data, \
142 userbuf, count, ppos, \
143 ieee80211_if_wfmt_##name); \
145 static const struct file_operations name##_ops = { \
146 .read = ieee80211_if_read_##name, \
147 .write = ieee80211_if_write_##name, \
148 .open = mac80211_open_file_generic, \
151 #define IEEE80211_IF_WFILE(name, field, format, type) \
152 IEEE80211_IF_FMT_##format(name, field) \
153 IEEE80211_IF_WFMT(name, field, type) \
154 __IEEE80211_IF_WFILE(name)
156 /* common attributes */
157 IEEE80211_IF_FILE(drop_unencrypted
, drop_unencrypted
, DEC
);
158 IEEE80211_IF_FILE(force_unicast_rateidx
, force_unicast_rateidx
, DEC
);
159 IEEE80211_IF_FILE(max_ratectrl_rateidx
, max_ratectrl_rateidx
, DEC
);
161 /* STA/IBSS attributes */
162 IEEE80211_IF_FILE(state
, u
.sta
.state
, DEC
);
163 IEEE80211_IF_FILE(bssid
, u
.sta
.bssid
, MAC
);
164 IEEE80211_IF_FILE(prev_bssid
, u
.sta
.prev_bssid
, MAC
);
165 IEEE80211_IF_FILE(ssid_len
, u
.sta
.ssid_len
, SIZE
);
166 IEEE80211_IF_FILE(aid
, u
.sta
.aid
, DEC
);
167 IEEE80211_IF_FILE(ap_capab
, u
.sta
.ap_capab
, HEX
);
168 IEEE80211_IF_FILE(capab
, u
.sta
.capab
, HEX
);
169 IEEE80211_IF_FILE(extra_ie_len
, u
.sta
.extra_ie_len
, SIZE
);
170 IEEE80211_IF_FILE(auth_tries
, u
.sta
.auth_tries
, DEC
);
171 IEEE80211_IF_FILE(assoc_tries
, u
.sta
.assoc_tries
, DEC
);
172 IEEE80211_IF_FILE(auth_algs
, u
.sta
.auth_algs
, HEX
);
173 IEEE80211_IF_FILE(auth_alg
, u
.sta
.auth_alg
, DEC
);
174 IEEE80211_IF_FILE(auth_transaction
, u
.sta
.auth_transaction
, DEC
);
176 static ssize_t
ieee80211_if_fmt_flags(
177 const struct ieee80211_sub_if_data
*sdata
, char *buf
, int buflen
)
179 return scnprintf(buf
, buflen
, "%s%s%s%s%s%s%s\n",
180 sdata
->u
.sta
.flags
& IEEE80211_STA_SSID_SET
? "SSID\n" : "",
181 sdata
->u
.sta
.flags
& IEEE80211_STA_BSSID_SET
? "BSSID\n" : "",
182 sdata
->u
.sta
.flags
& IEEE80211_STA_PREV_BSSID_SET
? "prev BSSID\n" : "",
183 sdata
->u
.sta
.flags
& IEEE80211_STA_AUTHENTICATED
? "AUTH\n" : "",
184 sdata
->u
.sta
.flags
& IEEE80211_STA_ASSOCIATED
? "ASSOC\n" : "",
185 sdata
->u
.sta
.flags
& IEEE80211_STA_PROBEREQ_POLL
? "PROBEREQ POLL\n" : "",
186 sdata
->bss_conf
.use_cts_prot
? "CTS prot\n" : "");
188 __IEEE80211_IF_FILE(flags
);
191 IEEE80211_IF_FILE(num_sta_ps
, u
.ap
.num_sta_ps
, ATOMIC
);
192 IEEE80211_IF_FILE(dtim_count
, u
.ap
.dtim_count
, DEC
);
194 static ssize_t
ieee80211_if_fmt_num_buffered_multicast(
195 const struct ieee80211_sub_if_data
*sdata
, char *buf
, int buflen
)
197 return scnprintf(buf
, buflen
, "%u\n",
198 skb_queue_len(&sdata
->u
.ap
.ps_bc_buf
));
200 __IEEE80211_IF_FILE(num_buffered_multicast
);
203 IEEE80211_IF_FILE(peer
, u
.wds
.remote_addr
, MAC
);
205 #ifdef CONFIG_MAC80211_MESH
206 /* Mesh stats attributes */
207 IEEE80211_IF_FILE(fwded_frames
, u
.mesh
.mshstats
.fwded_frames
, DEC
);
208 IEEE80211_IF_FILE(dropped_frames_ttl
, u
.mesh
.mshstats
.dropped_frames_ttl
, DEC
);
209 IEEE80211_IF_FILE(dropped_frames_no_route
,
210 u
.mesh
.mshstats
.dropped_frames_no_route
, DEC
);
211 IEEE80211_IF_FILE(estab_plinks
, u
.mesh
.mshstats
.estab_plinks
, ATOMIC
);
213 /* Mesh parameters */
214 IEEE80211_IF_WFILE(dot11MeshMaxRetries
,
215 u
.mesh
.mshcfg
.dot11MeshMaxRetries
, DEC
, u8
);
216 IEEE80211_IF_WFILE(dot11MeshRetryTimeout
,
217 u
.mesh
.mshcfg
.dot11MeshRetryTimeout
, DEC
, u16
);
218 IEEE80211_IF_WFILE(dot11MeshConfirmTimeout
,
219 u
.mesh
.mshcfg
.dot11MeshConfirmTimeout
, DEC
, u16
);
220 IEEE80211_IF_WFILE(dot11MeshHoldingTimeout
,
221 u
.mesh
.mshcfg
.dot11MeshHoldingTimeout
, DEC
, u16
);
222 IEEE80211_IF_WFILE(dot11MeshTTL
, u
.mesh
.mshcfg
.dot11MeshTTL
, DEC
, u8
);
223 IEEE80211_IF_WFILE(auto_open_plinks
, u
.mesh
.mshcfg
.auto_open_plinks
, DEC
, u8
);
224 IEEE80211_IF_WFILE(dot11MeshMaxPeerLinks
,
225 u
.mesh
.mshcfg
.dot11MeshMaxPeerLinks
, DEC
, u16
);
226 IEEE80211_IF_WFILE(dot11MeshHWMPactivePathTimeout
,
227 u
.mesh
.mshcfg
.dot11MeshHWMPactivePathTimeout
, DEC
, u32
);
228 IEEE80211_IF_WFILE(dot11MeshHWMPpreqMinInterval
,
229 u
.mesh
.mshcfg
.dot11MeshHWMPpreqMinInterval
, DEC
, u16
);
230 IEEE80211_IF_WFILE(dot11MeshHWMPnetDiameterTraversalTime
,
231 u
.mesh
.mshcfg
.dot11MeshHWMPnetDiameterTraversalTime
, DEC
, u16
);
232 IEEE80211_IF_WFILE(dot11MeshHWMPmaxPREQretries
,
233 u
.mesh
.mshcfg
.dot11MeshHWMPmaxPREQretries
, DEC
, u8
);
234 IEEE80211_IF_WFILE(path_refresh_time
,
235 u
.mesh
.mshcfg
.path_refresh_time
, DEC
, u32
);
236 IEEE80211_IF_WFILE(min_discovery_timeout
,
237 u
.mesh
.mshcfg
.min_discovery_timeout
, DEC
, u16
);
241 #define DEBUGFS_ADD(name, type)\
242 sdata->debugfs.type.name = debugfs_create_file(#name, 0400,\
243 sdata->debugfsdir, sdata, &name##_ops);
245 static void add_sta_files(struct ieee80211_sub_if_data
*sdata
)
247 DEBUGFS_ADD(drop_unencrypted
, sta
);
248 DEBUGFS_ADD(force_unicast_rateidx
, sta
);
249 DEBUGFS_ADD(max_ratectrl_rateidx
, sta
);
251 DEBUGFS_ADD(state
, sta
);
252 DEBUGFS_ADD(bssid
, sta
);
253 DEBUGFS_ADD(prev_bssid
, sta
);
254 DEBUGFS_ADD(ssid_len
, sta
);
255 DEBUGFS_ADD(aid
, sta
);
256 DEBUGFS_ADD(ap_capab
, sta
);
257 DEBUGFS_ADD(capab
, sta
);
258 DEBUGFS_ADD(extra_ie_len
, sta
);
259 DEBUGFS_ADD(auth_tries
, sta
);
260 DEBUGFS_ADD(assoc_tries
, sta
);
261 DEBUGFS_ADD(auth_algs
, sta
);
262 DEBUGFS_ADD(auth_alg
, sta
);
263 DEBUGFS_ADD(auth_transaction
, sta
);
264 DEBUGFS_ADD(flags
, sta
);
267 static void add_ap_files(struct ieee80211_sub_if_data
*sdata
)
269 DEBUGFS_ADD(drop_unencrypted
, ap
);
270 DEBUGFS_ADD(force_unicast_rateidx
, ap
);
271 DEBUGFS_ADD(max_ratectrl_rateidx
, ap
);
273 DEBUGFS_ADD(num_sta_ps
, ap
);
274 DEBUGFS_ADD(dtim_count
, ap
);
275 DEBUGFS_ADD(num_buffered_multicast
, ap
);
278 static void add_wds_files(struct ieee80211_sub_if_data
*sdata
)
280 DEBUGFS_ADD(drop_unencrypted
, wds
);
281 DEBUGFS_ADD(force_unicast_rateidx
, wds
);
282 DEBUGFS_ADD(max_ratectrl_rateidx
, wds
);
284 DEBUGFS_ADD(peer
, wds
);
287 static void add_vlan_files(struct ieee80211_sub_if_data
*sdata
)
289 DEBUGFS_ADD(drop_unencrypted
, vlan
);
290 DEBUGFS_ADD(force_unicast_rateidx
, vlan
);
291 DEBUGFS_ADD(max_ratectrl_rateidx
, vlan
);
294 static void add_monitor_files(struct ieee80211_sub_if_data
*sdata
)
298 #ifdef CONFIG_MAC80211_MESH
299 #define MESHSTATS_ADD(name)\
300 sdata->mesh_stats.name = debugfs_create_file(#name, 0400,\
301 sdata->mesh_stats_dir, sdata, &name##_ops);
303 static void add_mesh_stats(struct ieee80211_sub_if_data
*sdata
)
305 sdata
->mesh_stats_dir
= debugfs_create_dir("mesh_stats",
307 MESHSTATS_ADD(fwded_frames
);
308 MESHSTATS_ADD(dropped_frames_ttl
);
309 MESHSTATS_ADD(dropped_frames_no_route
);
310 MESHSTATS_ADD(estab_plinks
);
313 #define MESHPARAMS_ADD(name)\
314 sdata->mesh_config.name = debugfs_create_file(#name, 0600,\
315 sdata->mesh_config_dir, sdata, &name##_ops);
317 static void add_mesh_config(struct ieee80211_sub_if_data
*sdata
)
319 sdata
->mesh_config_dir
= debugfs_create_dir("mesh_config",
321 MESHPARAMS_ADD(dot11MeshMaxRetries
);
322 MESHPARAMS_ADD(dot11MeshRetryTimeout
);
323 MESHPARAMS_ADD(dot11MeshConfirmTimeout
);
324 MESHPARAMS_ADD(dot11MeshHoldingTimeout
);
325 MESHPARAMS_ADD(dot11MeshTTL
);
326 MESHPARAMS_ADD(auto_open_plinks
);
327 MESHPARAMS_ADD(dot11MeshMaxPeerLinks
);
328 MESHPARAMS_ADD(dot11MeshHWMPactivePathTimeout
);
329 MESHPARAMS_ADD(dot11MeshHWMPpreqMinInterval
);
330 MESHPARAMS_ADD(dot11MeshHWMPnetDiameterTraversalTime
);
331 MESHPARAMS_ADD(dot11MeshHWMPmaxPREQretries
);
332 MESHPARAMS_ADD(path_refresh_time
);
333 MESHPARAMS_ADD(min_discovery_timeout
);
337 static void add_files(struct ieee80211_sub_if_data
*sdata
)
339 if (!sdata
->debugfsdir
)
342 switch (sdata
->vif
.type
) {
343 case NL80211_IFTYPE_MESH_POINT
:
344 #ifdef CONFIG_MAC80211_MESH
345 add_mesh_stats(sdata
);
346 add_mesh_config(sdata
);
349 case NL80211_IFTYPE_STATION
:
350 case NL80211_IFTYPE_ADHOC
:
351 add_sta_files(sdata
);
353 case NL80211_IFTYPE_AP
:
356 case NL80211_IFTYPE_WDS
:
357 add_wds_files(sdata
);
359 case NL80211_IFTYPE_MONITOR
:
360 add_monitor_files(sdata
);
362 case NL80211_IFTYPE_AP_VLAN
:
363 add_vlan_files(sdata
);
370 #define DEBUGFS_DEL(name, type) \
372 debugfs_remove(sdata->debugfs.type.name); \
373 sdata->debugfs.type.name = NULL; \
376 static void del_sta_files(struct ieee80211_sub_if_data
*sdata
)
378 DEBUGFS_DEL(drop_unencrypted
, sta
);
379 DEBUGFS_DEL(force_unicast_rateidx
, sta
);
380 DEBUGFS_DEL(max_ratectrl_rateidx
, sta
);
382 DEBUGFS_DEL(state
, sta
);
383 DEBUGFS_DEL(bssid
, sta
);
384 DEBUGFS_DEL(prev_bssid
, sta
);
385 DEBUGFS_DEL(ssid_len
, sta
);
386 DEBUGFS_DEL(aid
, sta
);
387 DEBUGFS_DEL(ap_capab
, sta
);
388 DEBUGFS_DEL(capab
, sta
);
389 DEBUGFS_DEL(extra_ie_len
, sta
);
390 DEBUGFS_DEL(auth_tries
, sta
);
391 DEBUGFS_DEL(assoc_tries
, sta
);
392 DEBUGFS_DEL(auth_algs
, sta
);
393 DEBUGFS_DEL(auth_alg
, sta
);
394 DEBUGFS_DEL(auth_transaction
, sta
);
395 DEBUGFS_DEL(flags
, sta
);
398 static void del_ap_files(struct ieee80211_sub_if_data
*sdata
)
400 DEBUGFS_DEL(drop_unencrypted
, ap
);
401 DEBUGFS_DEL(force_unicast_rateidx
, ap
);
402 DEBUGFS_DEL(max_ratectrl_rateidx
, ap
);
404 DEBUGFS_DEL(num_sta_ps
, ap
);
405 DEBUGFS_DEL(dtim_count
, ap
);
406 DEBUGFS_DEL(num_buffered_multicast
, ap
);
409 static void del_wds_files(struct ieee80211_sub_if_data
*sdata
)
411 DEBUGFS_DEL(drop_unencrypted
, wds
);
412 DEBUGFS_DEL(force_unicast_rateidx
, wds
);
413 DEBUGFS_DEL(max_ratectrl_rateidx
, wds
);
415 DEBUGFS_DEL(peer
, wds
);
418 static void del_vlan_files(struct ieee80211_sub_if_data
*sdata
)
420 DEBUGFS_DEL(drop_unencrypted
, vlan
);
421 DEBUGFS_DEL(force_unicast_rateidx
, vlan
);
422 DEBUGFS_DEL(max_ratectrl_rateidx
, vlan
);
425 static void del_monitor_files(struct ieee80211_sub_if_data
*sdata
)
429 #ifdef CONFIG_MAC80211_MESH
430 #define MESHSTATS_DEL(name) \
432 debugfs_remove(sdata->mesh_stats.name); \
433 sdata->mesh_stats.name = NULL; \
436 static void del_mesh_stats(struct ieee80211_sub_if_data
*sdata
)
438 MESHSTATS_DEL(fwded_frames
);
439 MESHSTATS_DEL(dropped_frames_ttl
);
440 MESHSTATS_DEL(dropped_frames_no_route
);
441 MESHSTATS_DEL(estab_plinks
);
442 debugfs_remove(sdata
->mesh_stats_dir
);
443 sdata
->mesh_stats_dir
= NULL
;
446 #define MESHPARAMS_DEL(name) \
448 debugfs_remove(sdata->mesh_config.name); \
449 sdata->mesh_config.name = NULL; \
452 static void del_mesh_config(struct ieee80211_sub_if_data
*sdata
)
454 MESHPARAMS_DEL(dot11MeshMaxRetries
);
455 MESHPARAMS_DEL(dot11MeshRetryTimeout
);
456 MESHPARAMS_DEL(dot11MeshConfirmTimeout
);
457 MESHPARAMS_DEL(dot11MeshHoldingTimeout
);
458 MESHPARAMS_DEL(dot11MeshTTL
);
459 MESHPARAMS_DEL(auto_open_plinks
);
460 MESHPARAMS_DEL(dot11MeshMaxPeerLinks
);
461 MESHPARAMS_DEL(dot11MeshHWMPactivePathTimeout
);
462 MESHPARAMS_DEL(dot11MeshHWMPpreqMinInterval
);
463 MESHPARAMS_DEL(dot11MeshHWMPnetDiameterTraversalTime
);
464 MESHPARAMS_DEL(dot11MeshHWMPmaxPREQretries
);
465 MESHPARAMS_DEL(path_refresh_time
);
466 MESHPARAMS_DEL(min_discovery_timeout
);
467 debugfs_remove(sdata
->mesh_config_dir
);
468 sdata
->mesh_config_dir
= NULL
;
472 static void del_files(struct ieee80211_sub_if_data
*sdata
)
474 if (!sdata
->debugfsdir
)
477 switch (sdata
->vif
.type
) {
478 case NL80211_IFTYPE_MESH_POINT
:
479 #ifdef CONFIG_MAC80211_MESH
480 del_mesh_stats(sdata
);
481 del_mesh_config(sdata
);
484 case NL80211_IFTYPE_STATION
:
485 case NL80211_IFTYPE_ADHOC
:
486 del_sta_files(sdata
);
488 case NL80211_IFTYPE_AP
:
491 case NL80211_IFTYPE_WDS
:
492 del_wds_files(sdata
);
494 case NL80211_IFTYPE_MONITOR
:
495 del_monitor_files(sdata
);
497 case NL80211_IFTYPE_AP_VLAN
:
498 del_vlan_files(sdata
);
505 static int notif_registered
;
507 void ieee80211_debugfs_add_netdev(struct ieee80211_sub_if_data
*sdata
)
509 char buf
[10+IFNAMSIZ
];
511 if (!notif_registered
)
514 sprintf(buf
, "netdev:%s", sdata
->dev
->name
);
515 sdata
->debugfsdir
= debugfs_create_dir(buf
,
516 sdata
->local
->hw
.wiphy
->debugfsdir
);
520 void ieee80211_debugfs_remove_netdev(struct ieee80211_sub_if_data
*sdata
)
523 debugfs_remove(sdata
->debugfsdir
);
524 sdata
->debugfsdir
= NULL
;
527 static int netdev_notify(struct notifier_block
*nb
,
531 struct net_device
*dev
= ndev
;
533 struct ieee80211_sub_if_data
*sdata
;
534 char buf
[10+IFNAMSIZ
];
536 if (state
!= NETDEV_CHANGENAME
)
539 if (!dev
->ieee80211_ptr
|| !dev
->ieee80211_ptr
->wiphy
)
542 if (dev
->ieee80211_ptr
->wiphy
->privid
!= mac80211_wiphy_privid
)
545 sdata
= IEEE80211_DEV_TO_SUB_IF(dev
);
547 dir
= sdata
->debugfsdir
;
552 sprintf(buf
, "netdev:%s", dev
->name
);
553 if (!debugfs_rename(dir
->d_parent
, dir
, dir
->d_parent
, buf
))
554 printk(KERN_ERR
"mac80211: debugfs: failed to rename debugfs "
560 static struct notifier_block mac80211_debugfs_netdev_notifier
= {
561 .notifier_call
= netdev_notify
,
564 void ieee80211_debugfs_netdev_init(void)
568 err
= register_netdevice_notifier(&mac80211_debugfs_netdev_notifier
);
571 "mac80211: failed to install netdev notifier,"
572 " disabling per-netdev debugfs!\n");
574 notif_registered
= 1;
577 void ieee80211_debugfs_netdev_exit(void)
579 unregister_netdevice_notifier(&mac80211_debugfs_netdev_notifier
);
580 notif_registered
= 0;