]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - net/batman-adv/types.h
batman-adv: Cache the type of wifi device for each hardif
authorSven Eckelmann <sven.eckelmann@open-mesh.com>
Fri, 30 Sep 2016 13:21:03 +0000 (15:21 +0200)
committerSimon Wunderlich <sw@simonwunderlich.de>
Tue, 8 Nov 2016 18:02:37 +0000 (19:02 +0100)
commit10b1bbb46c6c8e571458a9a8913514dbebbaf20c
treed6485a43f41c5867811004a8766eaafc3a56ce3f
parentf44a3ae9a2811cfd5321e0f72c02bc270410db64
batman-adv: Cache the type of wifi device for each hardif

batman-adv is requiring the type of wifi device in different contexts. Some
of them can take the rtnl semaphore and some of them already have the
semaphore taken. But even others don't allow that the semaphore will be
taken.

The data has to be retrieved when the hardif is added to batman-adv because
some of the wifi information for an hardif will only be available with rtnl
lock. It can then be cached in the batadv_hard_iface and the functions
is_wifi_netdev and is_cfg80211_netdev can just compare the correct bits
without imposing extra locking requirements.

Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
net/batman-adv/bat_iv_ogm.c
net/batman-adv/bat_v_elp.c
net/batman-adv/hard-interface.c
net/batman-adv/hard-interface.h
net/batman-adv/translation-table.c
net/batman-adv/types.h