diff options
Diffstat (limited to 'net/batman-adv/bridge_loop_avoidance.c')
-rw-r--r-- | net/batman-adv/bridge_loop_avoidance.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/net/batman-adv/bridge_loop_avoidance.c b/net/batman-adv/bridge_loop_avoidance.c index 52c0d637d581..72ff8b90e222 100644 --- a/net/batman-adv/bridge_loop_avoidance.c +++ b/net/batman-adv/bridge_loop_avoidance.c | |||
@@ -255,7 +255,7 @@ static void bla_send_claim(struct bat_priv *bat_priv, uint8_t *mac, | |||
255 | struct bla_claim_dst local_claim_dest; | 255 | struct bla_claim_dst local_claim_dest; |
256 | __be32 zeroip = 0; | 256 | __be32 zeroip = 0; |
257 | 257 | ||
258 | primary_if = primary_if_get_selected(bat_priv); | 258 | primary_if = batadv_primary_if_get_selected(bat_priv); |
259 | if (!primary_if) | 259 | if (!primary_if) |
260 | return; | 260 | return; |
261 | 261 | ||
@@ -339,7 +339,7 @@ static void bla_send_claim(struct bat_priv *bat_priv, uint8_t *mac, | |||
339 | netif_rx(skb); | 339 | netif_rx(skb); |
340 | out: | 340 | out: |
341 | if (primary_if) | 341 | if (primary_if) |
342 | hardif_free_ref(primary_if); | 342 | batadv_hardif_free_ref(primary_if); |
343 | } | 343 | } |
344 | 344 | ||
345 | /* @bat_priv: the bat priv with all the soft interface information | 345 | /* @bat_priv: the bat priv with all the soft interface information |
@@ -1075,7 +1075,7 @@ static void bla_periodic_work(struct work_struct *work) | |||
1075 | struct hard_iface *primary_if; | 1075 | struct hard_iface *primary_if; |
1076 | int i; | 1076 | int i; |
1077 | 1077 | ||
1078 | primary_if = primary_if_get_selected(bat_priv); | 1078 | primary_if = batadv_primary_if_get_selected(bat_priv); |
1079 | if (!primary_if) | 1079 | if (!primary_if) |
1080 | goto out; | 1080 | goto out; |
1081 | 1081 | ||
@@ -1106,7 +1106,7 @@ static void bla_periodic_work(struct work_struct *work) | |||
1106 | } | 1106 | } |
1107 | out: | 1107 | out: |
1108 | if (primary_if) | 1108 | if (primary_if) |
1109 | hardif_free_ref(primary_if); | 1109 | batadv_hardif_free_ref(primary_if); |
1110 | 1110 | ||
1111 | bla_start_timer(bat_priv); | 1111 | bla_start_timer(bat_priv); |
1112 | } | 1112 | } |
@@ -1131,12 +1131,12 @@ int batadv_bla_init(struct bat_priv *bat_priv) | |||
1131 | /* setting claim destination address */ | 1131 | /* setting claim destination address */ |
1132 | memcpy(&bat_priv->claim_dest.magic, claim_dest, 3); | 1132 | memcpy(&bat_priv->claim_dest.magic, claim_dest, 3); |
1133 | bat_priv->claim_dest.type = 0; | 1133 | bat_priv->claim_dest.type = 0; |
1134 | primary_if = primary_if_get_selected(bat_priv); | 1134 | primary_if = batadv_primary_if_get_selected(bat_priv); |
1135 | if (primary_if) { | 1135 | if (primary_if) { |
1136 | bat_priv->claim_dest.group = | 1136 | bat_priv->claim_dest.group = |
1137 | htons(crc16(0, primary_if->net_dev->dev_addr, | 1137 | htons(crc16(0, primary_if->net_dev->dev_addr, |
1138 | ETH_ALEN)); | 1138 | ETH_ALEN)); |
1139 | hardif_free_ref(primary_if); | 1139 | batadv_hardif_free_ref(primary_if); |
1140 | } else { | 1140 | } else { |
1141 | bat_priv->claim_dest.group = 0; /* will be set later */ | 1141 | bat_priv->claim_dest.group = 0; /* will be set later */ |
1142 | } | 1142 | } |
@@ -1319,7 +1319,7 @@ void batadv_bla_free(struct bat_priv *bat_priv) | |||
1319 | struct hard_iface *primary_if; | 1319 | struct hard_iface *primary_if; |
1320 | 1320 | ||
1321 | cancel_delayed_work_sync(&bat_priv->bla_work); | 1321 | cancel_delayed_work_sync(&bat_priv->bla_work); |
1322 | primary_if = primary_if_get_selected(bat_priv); | 1322 | primary_if = batadv_primary_if_get_selected(bat_priv); |
1323 | 1323 | ||
1324 | if (bat_priv->claim_hash) { | 1324 | if (bat_priv->claim_hash) { |
1325 | bla_purge_claims(bat_priv, primary_if, 1); | 1325 | bla_purge_claims(bat_priv, primary_if, 1); |
@@ -1332,7 +1332,7 @@ void batadv_bla_free(struct bat_priv *bat_priv) | |||
1332 | bat_priv->backbone_hash = NULL; | 1332 | bat_priv->backbone_hash = NULL; |
1333 | } | 1333 | } |
1334 | if (primary_if) | 1334 | if (primary_if) |
1335 | hardif_free_ref(primary_if); | 1335 | batadv_hardif_free_ref(primary_if); |
1336 | } | 1336 | } |
1337 | 1337 | ||
1338 | /* @bat_priv: the bat priv with all the soft interface information | 1338 | /* @bat_priv: the bat priv with all the soft interface information |
@@ -1356,7 +1356,7 @@ int batadv_bla_rx(struct bat_priv *bat_priv, struct sk_buff *skb, short vid) | |||
1356 | 1356 | ||
1357 | ethhdr = (struct ethhdr *)skb_mac_header(skb); | 1357 | ethhdr = (struct ethhdr *)skb_mac_header(skb); |
1358 | 1358 | ||
1359 | primary_if = primary_if_get_selected(bat_priv); | 1359 | primary_if = batadv_primary_if_get_selected(bat_priv); |
1360 | if (!primary_if) | 1360 | if (!primary_if) |
1361 | goto handled; | 1361 | goto handled; |
1362 | 1362 | ||
@@ -1416,7 +1416,7 @@ handled: | |||
1416 | 1416 | ||
1417 | out: | 1417 | out: |
1418 | if (primary_if) | 1418 | if (primary_if) |
1419 | hardif_free_ref(primary_if); | 1419 | batadv_hardif_free_ref(primary_if); |
1420 | if (claim) | 1420 | if (claim) |
1421 | claim_free_ref(claim); | 1421 | claim_free_ref(claim); |
1422 | return ret; | 1422 | return ret; |
@@ -1441,7 +1441,7 @@ int batadv_bla_tx(struct bat_priv *bat_priv, struct sk_buff *skb, short vid) | |||
1441 | struct hard_iface *primary_if; | 1441 | struct hard_iface *primary_if; |
1442 | int ret = 0; | 1442 | int ret = 0; |
1443 | 1443 | ||
1444 | primary_if = primary_if_get_selected(bat_priv); | 1444 | primary_if = batadv_primary_if_get_selected(bat_priv); |
1445 | if (!primary_if) | 1445 | if (!primary_if) |
1446 | goto out; | 1446 | goto out; |
1447 | 1447 | ||
@@ -1502,7 +1502,7 @@ handled: | |||
1502 | ret = 1; | 1502 | ret = 1; |
1503 | out: | 1503 | out: |
1504 | if (primary_if) | 1504 | if (primary_if) |
1505 | hardif_free_ref(primary_if); | 1505 | batadv_hardif_free_ref(primary_if); |
1506 | if (claim) | 1506 | if (claim) |
1507 | claim_free_ref(claim); | 1507 | claim_free_ref(claim); |
1508 | return ret; | 1508 | return ret; |
@@ -1521,7 +1521,7 @@ int batadv_bla_claim_table_seq_print_text(struct seq_file *seq, void *offset) | |||
1521 | bool is_own; | 1521 | bool is_own; |
1522 | int ret = 0; | 1522 | int ret = 0; |
1523 | 1523 | ||
1524 | primary_if = primary_if_get_selected(bat_priv); | 1524 | primary_if = batadv_primary_if_get_selected(bat_priv); |
1525 | if (!primary_if) { | 1525 | if (!primary_if) { |
1526 | ret = seq_printf(seq, | 1526 | ret = seq_printf(seq, |
1527 | "BATMAN mesh %s disabled - please specify interfaces to enable it\n", | 1527 | "BATMAN mesh %s disabled - please specify interfaces to enable it\n", |
@@ -1559,6 +1559,6 @@ int batadv_bla_claim_table_seq_print_text(struct seq_file *seq, void *offset) | |||
1559 | } | 1559 | } |
1560 | out: | 1560 | out: |
1561 | if (primary_if) | 1561 | if (primary_if) |
1562 | hardif_free_ref(primary_if); | 1562 | batadv_hardif_free_ref(primary_if); |
1563 | return ret; | 1563 | return ret; |
1564 | } | 1564 | } |