diff options
Diffstat (limited to 'net/batman-adv/hard-interface.c')
-rw-r--r-- | net/batman-adv/hard-interface.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/net/batman-adv/hard-interface.c b/net/batman-adv/hard-interface.c index bebd46ce0ebd..3f0e41a50514 100644 --- a/net/batman-adv/hard-interface.c +++ b/net/batman-adv/hard-interface.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include "translation-table.h" | 23 | #include "translation-table.h" |
24 | #include "routing.h" | 24 | #include "routing.h" |
25 | #include "sysfs.h" | 25 | #include "sysfs.h" |
26 | #include "debugfs.h" | ||
26 | #include "originator.h" | 27 | #include "originator.h" |
27 | #include "hash.h" | 28 | #include "hash.h" |
28 | #include "bridge_loop_avoidance.h" | 29 | #include "bridge_loop_avoidance.h" |
@@ -539,6 +540,7 @@ static void batadv_hardif_remove_interface_finish(struct work_struct *work) | |||
539 | hard_iface = container_of(work, struct batadv_hard_iface, | 540 | hard_iface = container_of(work, struct batadv_hard_iface, |
540 | cleanup_work); | 541 | cleanup_work); |
541 | 542 | ||
543 | batadv_debugfs_del_hardif(hard_iface); | ||
542 | batadv_sysfs_del_hardif(&hard_iface->hardif_obj); | 544 | batadv_sysfs_del_hardif(&hard_iface->hardif_obj); |
543 | batadv_hardif_free_ref(hard_iface); | 545 | batadv_hardif_free_ref(hard_iface); |
544 | } | 546 | } |
@@ -569,6 +571,11 @@ batadv_hardif_add_interface(struct net_device *net_dev) | |||
569 | hard_iface->net_dev = net_dev; | 571 | hard_iface->net_dev = net_dev; |
570 | hard_iface->soft_iface = NULL; | 572 | hard_iface->soft_iface = NULL; |
571 | hard_iface->if_status = BATADV_IF_NOT_IN_USE; | 573 | hard_iface->if_status = BATADV_IF_NOT_IN_USE; |
574 | |||
575 | ret = batadv_debugfs_add_hardif(hard_iface); | ||
576 | if (ret) | ||
577 | goto free_sysfs; | ||
578 | |||
572 | INIT_LIST_HEAD(&hard_iface->list); | 579 | INIT_LIST_HEAD(&hard_iface->list); |
573 | INIT_WORK(&hard_iface->cleanup_work, | 580 | INIT_WORK(&hard_iface->cleanup_work, |
574 | batadv_hardif_remove_interface_finish); | 581 | batadv_hardif_remove_interface_finish); |
@@ -585,6 +592,8 @@ batadv_hardif_add_interface(struct net_device *net_dev) | |||
585 | 592 | ||
586 | return hard_iface; | 593 | return hard_iface; |
587 | 594 | ||
595 | free_sysfs: | ||
596 | batadv_sysfs_del_hardif(&hard_iface->hardif_obj); | ||
588 | free_if: | 597 | free_if: |
589 | kfree(hard_iface); | 598 | kfree(hard_iface); |
590 | release_dev: | 599 | release_dev: |