]> git.baikalelectronics.ru Git - kernel.git/commit
batman-adv: invoke dev_get_by_index() outside of is_wifi_iface()
authorAntonio Quartulli <antonio@open-mesh.com>
Sun, 13 Oct 2013 00:50:18 +0000 (02:50 +0200)
committerAntonio Quartulli <antonio@meshcoding.com>
Wed, 23 Oct 2013 15:03:44 +0000 (17:03 +0200)
commit40e60aa1f8221dbcab63f5a4005878e1f9908d45
tree7e4fe1bdec04e8fec9b3b7c802bfa17be0c05782
parent1d0a1197685acaf982be439a7f549fca56f9c949
batman-adv: invoke dev_get_by_index() outside of is_wifi_iface()

Upcoming changes need to perform other checks on the
incoming net_device struct.

To avoid performing dev_get_by_index() for each and every
check, it is better to move it outside of is_wifi_iface()
and search the netdev object once only.

Signed-off-by: Antonio Quartulli <antonio@open-mesh.com>
Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
net/batman-adv/hard-interface.c
net/batman-adv/hard-interface.h
net/batman-adv/translation-table.c