提交 3f3f8732 编写于 作者: S Sven Eckelmann 提交者: Simon Wunderlich

batman-adv: Use default throughput value on cfg80211 error

A wifi interface should never be handled like an ethernet devices. The
parser of the cfg80211 output must therefore skip the ethtool code when
cfg80211_get_station returned an error.

Fixes: f44a3ae9 ("batman-adv: refactor wifi interface detection")
Signed-off-by: NSven Eckelmann <sven@narfation.org>
Reviewed-by: NMarek Lindner <mareklindner@neomailbox.ch>
Signed-off-by: NSimon Wunderlich <sw@simonwunderlich.de>
上级 75ae84a4
...@@ -109,7 +109,9 @@ static u32 batadv_v_elp_get_throughput(struct batadv_hardif_neigh_node *neigh) ...@@ -109,7 +109,9 @@ static u32 batadv_v_elp_get_throughput(struct batadv_hardif_neigh_node *neigh)
*/ */
return 0; return 0;
} }
if (!ret) if (ret)
goto default_throughput;
return sinfo.expected_throughput / 100; return sinfo.expected_throughput / 100;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册