Skip to content

Commit

Permalink
batman-adv: Use default throughput value on cfg80211 error
Browse files Browse the repository at this point in the history
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: f44a3ae ("batman-adv: refactor wifi interface detection")
Signed-off-by: Sven Eckelmann <[email protected]>
Reviewed-by: Marek Lindner <[email protected]>
Signed-off-by: Simon Wunderlich <[email protected]>
  • Loading branch information
ecsv authored and simonwunderlich committed Jun 13, 2017
1 parent 75ae84a commit 3f3f873
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions net/batman-adv/bat_v_elp.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,10 @@ static u32 batadv_v_elp_get_throughput(struct batadv_hardif_neigh_node *neigh)
*/
return 0;
}
if (!ret)
return sinfo.expected_throughput / 100;
if (ret)
goto default_throughput;

return sinfo.expected_throughput / 100;
}

/* if not a wifi interface, check if this device provides data via
Expand Down

0 comments on commit 3f3f873

Please sign in to comment.