Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 323175
b: refs/heads/master
c: 7caf69f
h: refs/heads/master
i:
  323173: a76fcc7
  323171: c7a04b3
  323167: abb72ff
v: v3
  • Loading branch information
Linus Lüssing authored and Antonio Quartulli committed Sep 23, 2012
1 parent dfe715d commit 0663138
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 40a3eb33e307616567f4b81792f405a7f3f0abee
refs/heads/master: 7caf69fb9c5017df01945a1861c042f6aa08edeb
13 changes: 7 additions & 6 deletions trunk/net/batman-adv/bat_iv_ogm.c
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,8 @@ batadv_iv_ogm_orig_update(struct batadv_priv *bat_priv,
struct batadv_neigh_node *router = NULL;
struct batadv_orig_node *orig_node_tmp;
struct hlist_node *node;
uint8_t bcast_own_sum_orig, bcast_own_sum_neigh;
int if_num;
uint8_t sum_orig, sum_neigh;
uint8_t *neigh_addr;

batadv_dbg(BATADV_DBG_BATMAN, bat_priv,
Expand Down Expand Up @@ -727,17 +728,17 @@ batadv_iv_ogm_orig_update(struct batadv_priv *bat_priv,
if (router && (neigh_node->tq_avg == router->tq_avg)) {
orig_node_tmp = router->orig_node;
spin_lock_bh(&orig_node_tmp->ogm_cnt_lock);
bcast_own_sum_orig =
orig_node_tmp->bcast_own_sum[if_incoming->if_num];
if_num = router->if_incoming->if_num;
sum_orig = orig_node_tmp->bcast_own_sum[if_num];
spin_unlock_bh(&orig_node_tmp->ogm_cnt_lock);

orig_node_tmp = neigh_node->orig_node;
spin_lock_bh(&orig_node_tmp->ogm_cnt_lock);
bcast_own_sum_neigh =
orig_node_tmp->bcast_own_sum[if_incoming->if_num];
if_num = neigh_node->if_incoming->if_num;
sum_neigh = orig_node_tmp->bcast_own_sum[if_num];
spin_unlock_bh(&orig_node_tmp->ogm_cnt_lock);

if (bcast_own_sum_orig >= bcast_own_sum_neigh)
if (sum_orig >= sum_neigh)
goto update_tt;
}

Expand Down

0 comments on commit 0663138

Please sign in to comment.