summaryrefslogtreecommitdiffstats
path: root/net/batman-adv/hard-interface.h
diff options
context:
space:
mode:
authorSven Eckelmann <sven.eckelmann@open-mesh.com>2016-09-30 15:21:03 +0200
committerSimon Wunderlich <sw@simonwunderlich.de>2016-11-08 19:02:37 +0100
commit10b1bbb46c6c8e571458a9a8913514dbebbaf20c (patch)
treed6485a43f41c5867811004a8766eaafc3a56ce3f /net/batman-adv/hard-interface.h
parentf44a3ae9a2811cfd5321e0f72c02bc270410db64 (diff)
downloadlinux-10b1bbb46c6c8e571458a9a8913514dbebbaf20c.tar.bz2
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>
Diffstat (limited to 'net/batman-adv/hard-interface.h')
-rw-r--r--net/batman-adv/hard-interface.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/batman-adv/hard-interface.h b/net/batman-adv/hard-interface.h
index 7f9acab0514c..7281dd264225 100644
--- a/net/batman-adv/hard-interface.h
+++ b/net/batman-adv/hard-interface.h
@@ -65,9 +65,8 @@ enum batadv_hard_if_cleanup {
extern struct notifier_block batadv_hard_if_notifier;
-bool batadv_is_cfg80211_netdev(struct net_device *net_device);
-bool batadv_is_wifi_netdev(struct net_device *net_device);
-bool batadv_is_wifi_iface(int ifindex);
+bool batadv_is_cfg80211_hardif(struct batadv_hard_iface *hard_iface);
+bool batadv_is_wifi_hardif(struct batadv_hard_iface *hard_iface);
struct batadv_hard_iface*
batadv_hardif_get_by_netdev(const struct net_device *net_dev);
int batadv_hardif_enable_interface(struct batadv_hard_iface *hard_iface,