aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/debugfs_netdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/debugfs_netdev.c')
-rw-r--r--net/mac80211/debugfs_netdev.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/net/mac80211/debugfs_netdev.c b/net/mac80211/debugfs_netdev.c
index 4aa6621f9970..475f89a8aee1 100644
--- a/net/mac80211/debugfs_netdev.c
+++ b/net/mac80211/debugfs_netdev.c
@@ -476,12 +476,12 @@ static void del_mesh_config(struct ieee80211_sub_if_data *sdata)
476} 476}
477#endif 477#endif
478 478
479static void del_files(struct ieee80211_sub_if_data *sdata, int type) 479static void del_files(struct ieee80211_sub_if_data *sdata)
480{ 480{
481 if (!sdata->debugfsdir) 481 if (!sdata->debugfsdir)
482 return; 482 return;
483 483
484 switch (type) { 484 switch (sdata->vif.type) {
485 case IEEE80211_IF_TYPE_MESH_POINT: 485 case IEEE80211_IF_TYPE_MESH_POINT:
486#ifdef CONFIG_MAC80211_MESH 486#ifdef CONFIG_MAC80211_MESH
487 del_mesh_stats(sdata); 487 del_mesh_stats(sdata);
@@ -521,22 +521,16 @@ void ieee80211_debugfs_add_netdev(struct ieee80211_sub_if_data *sdata)
521 sprintf(buf, "netdev:%s", sdata->dev->name); 521 sprintf(buf, "netdev:%s", sdata->dev->name);
522 sdata->debugfsdir = debugfs_create_dir(buf, 522 sdata->debugfsdir = debugfs_create_dir(buf,
523 sdata->local->hw.wiphy->debugfsdir); 523 sdata->local->hw.wiphy->debugfsdir);
524 add_files(sdata);
524} 525}
525 526
526void ieee80211_debugfs_remove_netdev(struct ieee80211_sub_if_data *sdata) 527void ieee80211_debugfs_remove_netdev(struct ieee80211_sub_if_data *sdata)
527{ 528{
528 del_files(sdata, sdata->vif.type); 529 del_files(sdata);
529 debugfs_remove(sdata->debugfsdir); 530 debugfs_remove(sdata->debugfsdir);
530 sdata->debugfsdir = NULL; 531 sdata->debugfsdir = NULL;
531} 532}
532 533
533void ieee80211_debugfs_change_if_type(struct ieee80211_sub_if_data *sdata,
534 int oldtype)
535{
536 del_files(sdata, oldtype);
537 add_files(sdata);
538}
539
540static int netdev_notify(struct notifier_block *nb, 534static int netdev_notify(struct notifier_block *nb,
541 unsigned long state, 535 unsigned long state,
542 void *ndev) 536 void *ndev)