Commit 0f546ffc authored by David S. Miller's avatar David S. Miller

Merge tag 'batadv-net-for-davem-20171215' of git://git.open-mesh.org/linux-merge

Simon Wunderlich says:

====================
Here are some batman-adv bugfixes:

 - Initialize the fragment headers, by Sven Eckelmann

 - Fix a NULL check in BATMAN V, by Sven Eckelmann

 - Fix kernel doc for the time_setup() change, by Sven Eckelmann

 - Use the right lock in BATMAN IV OGM Update, by Sven Eckelmann
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents fccff086 5ba7dcfe
...@@ -1214,7 +1214,7 @@ static bool batadv_iv_ogm_calc_tq(struct batadv_orig_node *orig_node, ...@@ -1214,7 +1214,7 @@ static bool batadv_iv_ogm_calc_tq(struct batadv_orig_node *orig_node,
orig_node->last_seen = jiffies; orig_node->last_seen = jiffies;
/* find packet count of corresponding one hop neighbor */ /* find packet count of corresponding one hop neighbor */
spin_lock_bh(&orig_node->bat_iv.ogm_cnt_lock); spin_lock_bh(&orig_neigh_node->bat_iv.ogm_cnt_lock);
if_num = if_incoming->if_num; if_num = if_incoming->if_num;
orig_eq_count = orig_neigh_node->bat_iv.bcast_own_sum[if_num]; orig_eq_count = orig_neigh_node->bat_iv.bcast_own_sum[if_num];
neigh_ifinfo = batadv_neigh_ifinfo_new(neigh_node, if_outgoing); neigh_ifinfo = batadv_neigh_ifinfo_new(neigh_node, if_outgoing);
...@@ -1224,7 +1224,7 @@ static bool batadv_iv_ogm_calc_tq(struct batadv_orig_node *orig_node, ...@@ -1224,7 +1224,7 @@ static bool batadv_iv_ogm_calc_tq(struct batadv_orig_node *orig_node,
} else { } else {
neigh_rq_count = 0; neigh_rq_count = 0;
} }
spin_unlock_bh(&orig_node->bat_iv.ogm_cnt_lock); spin_unlock_bh(&orig_neigh_node->bat_iv.ogm_cnt_lock);
/* pay attention to not get a value bigger than 100 % */ /* pay attention to not get a value bigger than 100 % */
if (orig_eq_count > neigh_rq_count) if (orig_eq_count > neigh_rq_count)
......
...@@ -814,7 +814,7 @@ static bool batadv_v_gw_is_eligible(struct batadv_priv *bat_priv, ...@@ -814,7 +814,7 @@ static bool batadv_v_gw_is_eligible(struct batadv_priv *bat_priv,
} }
orig_gw = batadv_gw_node_get(bat_priv, orig_node); orig_gw = batadv_gw_node_get(bat_priv, orig_node);
if (!orig_node) if (!orig_gw)
goto out; goto out;
if (batadv_v_gw_throughput_get(orig_gw, &orig_throughput) < 0) if (batadv_v_gw_throughput_get(orig_gw, &orig_throughput) < 0)
......
...@@ -499,6 +499,8 @@ int batadv_frag_send_packet(struct sk_buff *skb, ...@@ -499,6 +499,8 @@ int batadv_frag_send_packet(struct sk_buff *skb,
*/ */
if (skb->priority >= 256 && skb->priority <= 263) if (skb->priority >= 256 && skb->priority <= 263)
frag_header.priority = skb->priority - 256; frag_header.priority = skb->priority - 256;
else
frag_header.priority = 0;
ether_addr_copy(frag_header.orig, primary_if->net_dev->dev_addr); ether_addr_copy(frag_header.orig, primary_if->net_dev->dev_addr);
ether_addr_copy(frag_header.dest, orig_node->orig); ether_addr_copy(frag_header.dest, orig_node->orig);
......
...@@ -482,7 +482,7 @@ static void batadv_tp_reset_sender_timer(struct batadv_tp_vars *tp_vars) ...@@ -482,7 +482,7 @@ static void batadv_tp_reset_sender_timer(struct batadv_tp_vars *tp_vars)
/** /**
* batadv_tp_sender_timeout - timer that fires in case of packet loss * batadv_tp_sender_timeout - timer that fires in case of packet loss
* @arg: address of the related tp_vars * @t: address to timer_list inside tp_vars
* *
* If fired it means that there was packet loss. * If fired it means that there was packet loss.
* Switch to Slow Start, set the ss_threshold to half of the current cwnd and * Switch to Slow Start, set the ss_threshold to half of the current cwnd and
...@@ -1106,7 +1106,7 @@ static void batadv_tp_reset_receiver_timer(struct batadv_tp_vars *tp_vars) ...@@ -1106,7 +1106,7 @@ static void batadv_tp_reset_receiver_timer(struct batadv_tp_vars *tp_vars)
/** /**
* batadv_tp_receiver_shutdown - stop a tp meter receiver when timeout is * batadv_tp_receiver_shutdown - stop a tp meter receiver when timeout is
* reached without received ack * reached without received ack
* @arg: address of the related tp_vars * @t: address to timer_list inside tp_vars
*/ */
static void batadv_tp_receiver_shutdown(struct timer_list *t) static void batadv_tp_receiver_shutdown(struct timer_list *t)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment