batman-adv: update copyright years for 2014
[linux-2.6-block.git] / net / batman-adv / hard-interface.c
index 57c2a19dcb5c8e19c410b27528f22eb671ed528a..1b12573bcf83ea497d201469773890f91b74ad27 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2007-2013 B.A.T.M.A.N. contributors:
+/* Copyright (C) 2007-2014 B.A.T.M.A.N. contributors:
  *
  * Marek Lindner, Simon Wunderlich
  *
@@ -12,9 +12,7 @@
  * General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
 #include "main.h"
@@ -25,6 +23,7 @@
 #include "translation-table.h"
 #include "routing.h"
 #include "sysfs.h"
+#include "debugfs.h"
 #include "originator.h"
 #include "hash.h"
 #include "bridge_loop_avoidance.h"
@@ -541,6 +540,7 @@ static void batadv_hardif_remove_interface_finish(struct work_struct *work)
        hard_iface = container_of(work, struct batadv_hard_iface,
                                  cleanup_work);
 
+       batadv_debugfs_del_hardif(hard_iface);
        batadv_sysfs_del_hardif(&hard_iface->hardif_obj);
        batadv_hardif_free_ref(hard_iface);
 }
@@ -571,6 +571,11 @@ batadv_hardif_add_interface(struct net_device *net_dev)
        hard_iface->net_dev = net_dev;
        hard_iface->soft_iface = NULL;
        hard_iface->if_status = BATADV_IF_NOT_IN_USE;
+
+       ret = batadv_debugfs_add_hardif(hard_iface);
+       if (ret)
+               goto free_sysfs;
+
        INIT_LIST_HEAD(&hard_iface->list);
        INIT_WORK(&hard_iface->cleanup_work,
                  batadv_hardif_remove_interface_finish);
@@ -587,6 +592,8 @@ batadv_hardif_add_interface(struct net_device *net_dev)
 
        return hard_iface;
 
+free_sysfs:
+       batadv_sysfs_del_hardif(&hard_iface->hardif_obj);
 free_if:
        kfree(hard_iface);
 release_dev: