aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv/bridge_loop_avoidance.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/batman-adv/bridge_loop_avoidance.c')
-rw-r--r--net/batman-adv/bridge_loop_avoidance.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/net/batman-adv/bridge_loop_avoidance.c b/net/batman-adv/bridge_loop_avoidance.c
index 13afc6527521..c37513100f53 100644
--- a/net/batman-adv/bridge_loop_avoidance.c
+++ b/net/batman-adv/bridge_loop_avoidance.c
@@ -292,7 +292,7 @@ static void batadv_bla_send_claim(struct bat_priv *bat_priv, uint8_t *mac,
292 292
293 /* now we pretend that the client would have sent this ... */ 293 /* now we pretend that the client would have sent this ... */
294 switch (claimtype) { 294 switch (claimtype) {
295 case CLAIM_TYPE_ADD: 295 case BATADV_CLAIM_TYPE_ADD:
296 /* normal claim frame 296 /* normal claim frame
297 * set Ethernet SRC to the clients mac 297 * set Ethernet SRC to the clients mac
298 */ 298 */
@@ -300,7 +300,7 @@ static void batadv_bla_send_claim(struct bat_priv *bat_priv, uint8_t *mac,
300 batadv_dbg(DBG_BLA, bat_priv, 300 batadv_dbg(DBG_BLA, bat_priv,
301 "bla_send_claim(): CLAIM %pM on vid %d\n", mac, vid); 301 "bla_send_claim(): CLAIM %pM on vid %d\n", mac, vid);
302 break; 302 break;
303 case CLAIM_TYPE_DEL: 303 case BATADV_CLAIM_TYPE_DEL:
304 /* unclaim frame 304 /* unclaim frame
305 * set HW SRC to the clients mac 305 * set HW SRC to the clients mac
306 */ 306 */
@@ -309,7 +309,7 @@ static void batadv_bla_send_claim(struct bat_priv *bat_priv, uint8_t *mac,
309 "bla_send_claim(): UNCLAIM %pM on vid %d\n", mac, 309 "bla_send_claim(): UNCLAIM %pM on vid %d\n", mac,
310 vid); 310 vid);
311 break; 311 break;
312 case CLAIM_TYPE_ANNOUNCE: 312 case BATADV_CLAIM_TYPE_ANNOUNCE:
313 /* announcement frame 313 /* announcement frame
314 * set HW SRC to the special mac containg the crc 314 * set HW SRC to the special mac containg the crc
315 */ 315 */
@@ -318,7 +318,7 @@ static void batadv_bla_send_claim(struct bat_priv *bat_priv, uint8_t *mac,
318 "bla_send_claim(): ANNOUNCE of %pM on vid %d\n", 318 "bla_send_claim(): ANNOUNCE of %pM on vid %d\n",
319 ethhdr->h_source, vid); 319 ethhdr->h_source, vid);
320 break; 320 break;
321 case CLAIM_TYPE_REQUEST: 321 case BATADV_CLAIM_TYPE_REQUEST:
322 /* request frame 322 /* request frame
323 * set HW SRC to the special mac containg the crc 323 * set HW SRC to the special mac containg the crc
324 */ 324 */
@@ -459,7 +459,7 @@ static void batadv_bla_answer_request(struct bat_priv *bat_priv,
459 continue; 459 continue;
460 460
461 batadv_bla_send_claim(bat_priv, claim->addr, claim->vid, 461 batadv_bla_send_claim(bat_priv, claim->addr, claim->vid,
462 CLAIM_TYPE_ADD); 462 BATADV_CLAIM_TYPE_ADD);
463 } 463 }
464 rcu_read_unlock(); 464 rcu_read_unlock();
465 } 465 }
@@ -485,7 +485,7 @@ static void batadv_bla_send_request(struct backbone_gw *backbone_gw)
485 485
486 /* send request */ 486 /* send request */
487 batadv_bla_send_claim(backbone_gw->bat_priv, backbone_gw->orig, 487 batadv_bla_send_claim(backbone_gw->bat_priv, backbone_gw->orig,
488 backbone_gw->vid, CLAIM_TYPE_REQUEST); 488 backbone_gw->vid, BATADV_CLAIM_TYPE_REQUEST);
489 489
490 /* no local broadcasts should be sent or received, for now. */ 490 /* no local broadcasts should be sent or received, for now. */
491 if (!atomic_read(&backbone_gw->request_sent)) { 491 if (!atomic_read(&backbone_gw->request_sent)) {
@@ -511,7 +511,7 @@ static void batadv_bla_send_announce(struct bat_priv *bat_priv,
511 memcpy(&mac[4], &crc, 2); 511 memcpy(&mac[4], &crc, 2);
512 512
513 batadv_bla_send_claim(bat_priv, mac, backbone_gw->vid, 513 batadv_bla_send_claim(bat_priv, mac, backbone_gw->vid,
514 CLAIM_TYPE_ANNOUNCE); 514 BATADV_CLAIM_TYPE_ANNOUNCE);
515 515
516} 516}
517 517
@@ -694,7 +694,7 @@ static int batadv_handle_unclaim(struct bat_priv *bat_priv,
694 if (primary_if && batadv_compare_eth(backbone_addr, 694 if (primary_if && batadv_compare_eth(backbone_addr,
695 primary_if->net_dev->dev_addr)) 695 primary_if->net_dev->dev_addr))
696 batadv_bla_send_claim(bat_priv, claim_addr, vid, 696 batadv_bla_send_claim(bat_priv, claim_addr, vid,
697 CLAIM_TYPE_DEL); 697 BATADV_CLAIM_TYPE_DEL);
698 698
699 backbone_gw = batadv_backbone_hash_find(bat_priv, backbone_addr, vid); 699 backbone_gw = batadv_backbone_hash_find(bat_priv, backbone_addr, vid);
700 700
@@ -730,7 +730,7 @@ static int batadv_handle_claim(struct bat_priv *bat_priv,
730 batadv_bla_add_claim(bat_priv, claim_addr, vid, backbone_gw); 730 batadv_bla_add_claim(bat_priv, claim_addr, vid, backbone_gw);
731 if (batadv_compare_eth(backbone_addr, primary_if->net_dev->dev_addr)) 731 if (batadv_compare_eth(backbone_addr, primary_if->net_dev->dev_addr))
732 batadv_bla_send_claim(bat_priv, claim_addr, vid, 732 batadv_bla_send_claim(bat_priv, claim_addr, vid,
733 CLAIM_TYPE_ADD); 733 BATADV_CLAIM_TYPE_ADD);
734 734
735 /* TODO: we could call something like tt_local_del() here. */ 735 /* TODO: we could call something like tt_local_del() here. */
736 736
@@ -773,12 +773,12 @@ static int batadv_check_claim_group(struct bat_priv *bat_priv,
773 * otherwise assume it is in the hw_src 773 * otherwise assume it is in the hw_src
774 */ 774 */
775 switch (bla_dst->type) { 775 switch (bla_dst->type) {
776 case CLAIM_TYPE_ADD: 776 case BATADV_CLAIM_TYPE_ADD:
777 backbone_addr = hw_src; 777 backbone_addr = hw_src;
778 break; 778 break;
779 case CLAIM_TYPE_REQUEST: 779 case BATADV_CLAIM_TYPE_REQUEST:
780 case CLAIM_TYPE_ANNOUNCE: 780 case BATADV_CLAIM_TYPE_ANNOUNCE:
781 case CLAIM_TYPE_DEL: 781 case BATADV_CLAIM_TYPE_DEL:
782 backbone_addr = ethhdr->h_source; 782 backbone_addr = ethhdr->h_source;
783 break; 783 break;
784 default: 784 default:
@@ -894,23 +894,23 @@ static int batadv_bla_process_claim(struct bat_priv *bat_priv,
894 894
895 /* check for the different types of claim frames ... */ 895 /* check for the different types of claim frames ... */
896 switch (bla_dst->type) { 896 switch (bla_dst->type) {
897 case CLAIM_TYPE_ADD: 897 case BATADV_CLAIM_TYPE_ADD:
898 if (batadv_handle_claim(bat_priv, primary_if, hw_src, 898 if (batadv_handle_claim(bat_priv, primary_if, hw_src,
899 ethhdr->h_source, vid)) 899 ethhdr->h_source, vid))
900 return 1; 900 return 1;
901 break; 901 break;
902 case CLAIM_TYPE_DEL: 902 case BATADV_CLAIM_TYPE_DEL:
903 if (batadv_handle_unclaim(bat_priv, primary_if, 903 if (batadv_handle_unclaim(bat_priv, primary_if,
904 ethhdr->h_source, hw_src, vid)) 904 ethhdr->h_source, hw_src, vid))
905 return 1; 905 return 1;
906 break; 906 break;
907 907
908 case CLAIM_TYPE_ANNOUNCE: 908 case BATADV_CLAIM_TYPE_ANNOUNCE:
909 if (batadv_handle_announce(bat_priv, hw_src, ethhdr->h_source, 909 if (batadv_handle_announce(bat_priv, hw_src, ethhdr->h_source,
910 vid)) 910 vid))
911 return 1; 911 return 1;
912 break; 912 break;
913 case CLAIM_TYPE_REQUEST: 913 case BATADV_CLAIM_TYPE_REQUEST:
914 if (batadv_handle_request(bat_priv, primary_if, hw_src, ethhdr, 914 if (batadv_handle_request(bat_priv, primary_if, hw_src, ethhdr,
915 vid)) 915 vid))
916 return 1; 916 return 1;