Commit 56489151 authored by Markus Pargmann's avatar Markus Pargmann Committed by Antonio Quartulli

batman-adv: iv_ogm_queue_add, Simplify expressions

Signed-off-by: default avatarMarkus Pargmann <mpa@pengutronix.de>
Signed-off-by: default avatarMarek Lindner <mareklindner@neomailbox.ch>
parent 940d156f
...@@ -750,13 +750,13 @@ static void batadv_iv_ogm_queue_add(struct batadv_priv *bat_priv, ...@@ -750,13 +750,13 @@ static void batadv_iv_ogm_queue_add(struct batadv_priv *bat_priv,
unsigned long max_aggregation_jiffies; unsigned long max_aggregation_jiffies;
batadv_ogm_packet = (struct batadv_ogm_packet *)packet_buff; batadv_ogm_packet = (struct batadv_ogm_packet *)packet_buff;
direct_link = batadv_ogm_packet->flags & BATADV_DIRECTLINK ? 1 : 0; direct_link = !!(batadv_ogm_packet->flags & BATADV_DIRECTLINK);
max_aggregation_jiffies = msecs_to_jiffies(BATADV_MAX_AGGREGATION_MS); max_aggregation_jiffies = msecs_to_jiffies(BATADV_MAX_AGGREGATION_MS);
/* find position for the packet in the forward queue */ /* find position for the packet in the forward queue */
spin_lock_bh(&bat_priv->forw_bat_list_lock); spin_lock_bh(&bat_priv->forw_bat_list_lock);
/* own packets are not to be aggregated */ /* own packets are not to be aggregated */
if ((atomic_read(&bat_priv->aggregated_ogms)) && (!own_packet)) { if (atomic_read(&bat_priv->aggregated_ogms) && !own_packet) {
hlist_for_each_entry(forw_packet_pos, hlist_for_each_entry(forw_packet_pos,
&bat_priv->forw_bat_list, list) { &bat_priv->forw_bat_list, list) {
if (batadv_iv_ogm_can_aggregate(batadv_ogm_packet, if (batadv_iv_ogm_can_aggregate(batadv_ogm_packet,
......
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