batman-adv: disable ethtool link speed detection when auto negotiation off
authorMarek Lindner <mareklindner@neomailbox.ch>
Sun, 13 May 2018 22:38:49 +0000 (06:38 +0800)
committerSimon Wunderlich <sw@simonwunderlich.de>
Mon, 14 May 2018 07:30:57 +0000 (09:30 +0200)
commit8c46fcd783082118e72ebbe1937b93bb7df8a63c
tree1048de2ca86bed96050c0d827a10a34fa733f99f
parent6bf9e4d39a582a4beea1844d6955cb2ebc979a67
batman-adv: disable ethtool link speed detection when auto negotiation off

Virtual interface drivers such as tun / tap interfaces, VLAN, etc tend
to initialize the interface throughput with some value for the sake of
having a throughput number to export via ethtool. This exported
throughput leaves batman-adv to conclude the interface throughput is
genuine (reflecting reality), thus no measurements are necessary.

Based on the observation that those interface types also tend to set
the link auto-negotiation to 'off', batman-adv shall check this
setting to differentiate between genuine link throughput information
and placeholders installed by virtual interfaces.

The "default throughput" setting exported via sysfs still allows to
configure the batman-adv throughput for the interface, thus disabling
the measurements.

Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
Acked-by: Antonio Quartulli <a@unstable.cc>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
net/batman-adv/bat_v_elp.c