From ef45b1f2462ee40843b7607c5342eae4f1595772 Mon Sep 17 00:00:00 2001 From: Simon Wunderlich Date: Wed, 22 Sep 2021 09:51:11 +0200 Subject: [PATCH] batman-adv: apply WiFi penalty on all interfaces Signed-off-by: Simon Wunderlich --- net/batman-adv/bat_iv_ogm.c | 3 +-- net/batman-adv/bat_v_ogm.c | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/net/batman-adv/bat_iv_ogm.c b/net/batman-adv/bat_iv_ogm.c index f94f538f..95b045c3 100644 --- a/net/batman-adv/bat_iv_ogm.c +++ b/net/batman-adv/bat_iv_ogm.c @@ -1159,8 +1159,7 @@ static bool batadv_iv_ogm_calc_tq(struct batadv_orig_node *orig_node, * interfaces and other half duplex devices suffer from throughput * drops as they can't send and receive at the same time. */ - if (if_outgoing && if_incoming == if_outgoing && - batadv_is_wifi_hardif(if_outgoing)) + if (if_outgoing && if_incoming == if_outgoing) tq_iface_hop_penalty = batadv_hop_penalty(tq_iface_hop_penalty, bat_priv); diff --git a/net/batman-adv/bat_v_ogm.c b/net/batman-adv/bat_v_ogm.c index 1d750f3c..17c50e82 100644 --- a/net/batman-adv/bat_v_ogm.c +++ b/net/batman-adv/bat_v_ogm.c @@ -492,9 +492,7 @@ static u32 batadv_v_forward_penalty(struct batadv_priv *bat_priv, * due to the store & forward characteristics of WIFI. * Very low throughput values are the exception. */ - if (throughput > 10 && - if_incoming == if_outgoing && - !(if_incoming->bat_v.flags & BATADV_FULL_DUPLEX)) + if (throughput > 10 && if_incoming == if_outgoing) return throughput / 2; /* hop penalty of 255 equals 100% */ -- 2.30.2