summaryrefslogtreecommitdiffstats
path: root/net/batman-adv/bat_v_elp.h
diff options
context:
space:
mode:
authorAntonio Quartulli <antonio@open-mesh.com>2015-11-10 18:50:51 +0100
committerAntonio Quartulli <a@unstable.cc>2016-02-29 16:25:06 +0800
commitc833484e5f3872a38fe232c663586069d5ad9645 (patch)
treed4ab62093f50a411de1fb0ed6bef90634fbe61b1 /net/batman-adv/bat_v_elp.h
parent95d392784dd0a51e4216e075f04a68c922745985 (diff)
downloadblackbird-op-linux-c833484e5f3872a38fe232c663586069d5ad9645.tar.gz
blackbird-op-linux-c833484e5f3872a38fe232c663586069d5ad9645.zip
batman-adv: ELP - compute the metric based on the estimated throughput
In case of wireless interface retrieve the throughput by querying cfg80211. To perform this call a separate work must be scheduled because the function may sleep and this is not allowed within an RCU protected context (RCU in this case is used to iterate over all the neighbours). Use ethtool to retrieve information about an Ethernet link like HALF/FULL_DUPLEX and advertised bandwidth (e.g. 100/10Mbps). The metric is updated each time a new ELP packet is sent, this way it is possible to timely react to a metric variation which can imply (for example) a neighbour disconnection. Signed-off-by: Antonio Quartulli <antonio@open-mesh.com> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
Diffstat (limited to 'net/batman-adv/bat_v_elp.h')
-rw-r--r--net/batman-adv/bat_v_elp.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/batman-adv/bat_v_elp.h b/net/batman-adv/bat_v_elp.h
index 5a7bc398a9ef..e95f1bca0785 100644
--- a/net/batman-adv/bat_v_elp.h
+++ b/net/batman-adv/bat_v_elp.h
@@ -21,11 +21,13 @@
#define _NET_BATMAN_ADV_BAT_V_ELP_H_
struct sk_buff;
+struct work_struct;
int batadv_v_elp_iface_enable(struct batadv_hard_iface *hard_iface);
void batadv_v_elp_iface_disable(struct batadv_hard_iface *hard_iface);
void batadv_v_elp_primary_iface_set(struct batadv_hard_iface *primary_iface);
int batadv_v_elp_packet_recv(struct sk_buff *skb,
struct batadv_hard_iface *if_incoming);
+void batadv_v_elp_throughput_metric_update(struct work_struct *work);
#endif /* _NET_BATMAN_ADV_BAT_V_ELP_H_ */
OpenPOWER on IntegriCloud