Commit 3eb8773e3a24d88ca528993af3756af70f307a82

Authored by Simon Wunderlich
Committed by Antonio Quartulli
1 parent 99e966fc96

batman-adv: rename bridge loop avoidance claim types

for consistency reasons within the code and with the documentation,
we should always call it "claim" and "unclaim".

Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>

Showing 2 changed files with 11 additions and 11 deletions Side-by-side Diff

net/batman-adv/bridge_loop_avoidance.c
... ... @@ -295,7 +295,7 @@
295 295  
296 296 /* now we pretend that the client would have sent this ... */
297 297 switch (claimtype) {
298   - case BATADV_CLAIM_TYPE_ADD:
  298 + case BATADV_CLAIM_TYPE_CLAIM:
299 299 /* normal claim frame
300 300 * set Ethernet SRC to the clients mac
301 301 */
... ... @@ -303,7 +303,7 @@
303 303 batadv_dbg(BATADV_DBG_BLA, bat_priv,
304 304 "bla_send_claim(): CLAIM %pM on vid %d\n", mac, vid);
305 305 break;
306   - case BATADV_CLAIM_TYPE_DEL:
  306 + case BATADV_CLAIM_TYPE_UNCLAIM:
307 307 /* unclaim frame
308 308 * set HW SRC to the clients mac
309 309 */
... ... @@ -468,7 +468,7 @@
468 468 continue;
469 469  
470 470 batadv_bla_send_claim(bat_priv, claim->addr, claim->vid,
471   - BATADV_CLAIM_TYPE_ADD);
  471 + BATADV_CLAIM_TYPE_CLAIM);
472 472 }
473 473 rcu_read_unlock();
474 474 }
... ... @@ -703,7 +703,7 @@
703 703 if (primary_if && batadv_compare_eth(backbone_addr,
704 704 primary_if->net_dev->dev_addr))
705 705 batadv_bla_send_claim(bat_priv, claim_addr, vid,
706   - BATADV_CLAIM_TYPE_DEL);
  706 + BATADV_CLAIM_TYPE_UNCLAIM);
707 707  
708 708 backbone_gw = batadv_backbone_hash_find(bat_priv, backbone_addr, vid);
709 709  
... ... @@ -739,7 +739,7 @@
739 739 batadv_bla_add_claim(bat_priv, claim_addr, vid, backbone_gw);
740 740 if (batadv_compare_eth(backbone_addr, primary_if->net_dev->dev_addr))
741 741 batadv_bla_send_claim(bat_priv, claim_addr, vid,
742   - BATADV_CLAIM_TYPE_ADD);
  742 + BATADV_CLAIM_TYPE_CLAIM);
743 743  
744 744 /* TODO: we could call something like tt_local_del() here. */
745 745  
746 746  
... ... @@ -784,12 +784,12 @@
784 784 * otherwise assume it is in the hw_src
785 785 */
786 786 switch (bla_dst->type) {
787   - case BATADV_CLAIM_TYPE_ADD:
  787 + case BATADV_CLAIM_TYPE_CLAIM:
788 788 backbone_addr = hw_src;
789 789 break;
790 790 case BATADV_CLAIM_TYPE_REQUEST:
791 791 case BATADV_CLAIM_TYPE_ANNOUNCE:
792   - case BATADV_CLAIM_TYPE_DEL:
  792 + case BATADV_CLAIM_TYPE_UNCLAIM:
793 793 backbone_addr = ethhdr->h_source;
794 794 break;
795 795 default:
796 796  
... ... @@ -905,12 +905,12 @@
905 905  
906 906 /* check for the different types of claim frames ... */
907 907 switch (bla_dst->type) {
908   - case BATADV_CLAIM_TYPE_ADD:
  908 + case BATADV_CLAIM_TYPE_CLAIM:
909 909 if (batadv_handle_claim(bat_priv, primary_if, hw_src,
910 910 ethhdr->h_source, vid))
911 911 return 1;
912 912 break;
913   - case BATADV_CLAIM_TYPE_DEL:
  913 + case BATADV_CLAIM_TYPE_UNCLAIM:
914 914 if (batadv_handle_unclaim(bat_priv, primary_if,
915 915 ethhdr->h_source, hw_src, vid))
916 916 return 1;
net/batman-adv/packet.h
... ... @@ -92,8 +92,8 @@
92 92  
93 93 /* claim frame types for the bridge loop avoidance */
94 94 enum batadv_bla_claimframe {
95   - BATADV_CLAIM_TYPE_ADD = 0x00,
96   - BATADV_CLAIM_TYPE_DEL = 0x01,
  95 + BATADV_CLAIM_TYPE_CLAIM = 0x00,
  96 + BATADV_CLAIM_TYPE_UNCLAIM = 0x01,
97 97 BATADV_CLAIM_TYPE_ANNOUNCE = 0x02,
98 98 BATADV_CLAIM_TYPE_REQUEST = 0x03,
99 99 };