diff options
author | Simon Wunderlich <simon.wunderlich@s2003.tu-chemnitz.de> | 2012-06-23 06:34:18 -0400 |
---|---|---|
committer | Antonio Quartulli <ordex@autistici.org> | 2012-08-23 08:02:42 -0400 |
commit | 3eb8773e3a24d88ca528993af3756af70f307a82 (patch) | |
tree | 22fc0b3068e56f157a5821ce4d348e6bf334c409 /net/batman-adv | |
parent | 99e966fc969360bed8d3bb71c144fa10ba7a12d0 (diff) |
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>
Diffstat (limited to 'net/batman-adv')
-rw-r--r-- | net/batman-adv/bridge_loop_avoidance.c | 18 | ||||
-rw-r--r-- | net/batman-adv/packet.h | 4 |
2 files changed, 11 insertions, 11 deletions
diff --git a/net/batman-adv/bridge_loop_avoidance.c b/net/batman-adv/bridge_loop_avoidance.c index 5f1ad80d5163..84dd8415ab6a 100644 --- a/net/batman-adv/bridge_loop_avoidance.c +++ b/net/batman-adv/bridge_loop_avoidance.c | |||
@@ -295,7 +295,7 @@ static void batadv_bla_send_claim(struct batadv_priv *bat_priv, uint8_t *mac, | |||
295 | 295 | ||
296 | /* now we pretend that the client would have sent this ... */ | 296 | /* now we pretend that the client would have sent this ... */ |
297 | switch (claimtype) { | 297 | switch (claimtype) { |
298 | case BATADV_CLAIM_TYPE_ADD: | 298 | case BATADV_CLAIM_TYPE_CLAIM: |
299 | /* normal claim frame | 299 | /* normal claim frame |
300 | * set Ethernet SRC to the clients mac | 300 | * set Ethernet SRC to the clients mac |
301 | */ | 301 | */ |
@@ -303,7 +303,7 @@ static void batadv_bla_send_claim(struct batadv_priv *bat_priv, uint8_t *mac, | |||
303 | batadv_dbg(BATADV_DBG_BLA, bat_priv, | 303 | batadv_dbg(BATADV_DBG_BLA, bat_priv, |
304 | "bla_send_claim(): CLAIM %pM on vid %d\n", mac, vid); | 304 | "bla_send_claim(): CLAIM %pM on vid %d\n", mac, vid); |
305 | break; | 305 | break; |
306 | case BATADV_CLAIM_TYPE_DEL: | 306 | case BATADV_CLAIM_TYPE_UNCLAIM: |
307 | /* unclaim frame | 307 | /* unclaim frame |
308 | * set HW SRC to the clients mac | 308 | * set HW SRC to the clients mac |
309 | */ | 309 | */ |
@@ -468,7 +468,7 @@ static void batadv_bla_answer_request(struct batadv_priv *bat_priv, | |||
468 | continue; | 468 | continue; |
469 | 469 | ||
470 | batadv_bla_send_claim(bat_priv, claim->addr, claim->vid, | 470 | batadv_bla_send_claim(bat_priv, claim->addr, claim->vid, |
471 | BATADV_CLAIM_TYPE_ADD); | 471 | BATADV_CLAIM_TYPE_CLAIM); |
472 | } | 472 | } |
473 | rcu_read_unlock(); | 473 | rcu_read_unlock(); |
474 | } | 474 | } |
@@ -703,7 +703,7 @@ static int batadv_handle_unclaim(struct batadv_priv *bat_priv, | |||
703 | if (primary_if && batadv_compare_eth(backbone_addr, | 703 | if (primary_if && batadv_compare_eth(backbone_addr, |
704 | primary_if->net_dev->dev_addr)) | 704 | primary_if->net_dev->dev_addr)) |
705 | batadv_bla_send_claim(bat_priv, claim_addr, vid, | 705 | batadv_bla_send_claim(bat_priv, claim_addr, vid, |
706 | BATADV_CLAIM_TYPE_DEL); | 706 | BATADV_CLAIM_TYPE_UNCLAIM); |
707 | 707 | ||
708 | backbone_gw = batadv_backbone_hash_find(bat_priv, backbone_addr, vid); | 708 | backbone_gw = batadv_backbone_hash_find(bat_priv, backbone_addr, vid); |
709 | 709 | ||
@@ -739,7 +739,7 @@ static int batadv_handle_claim(struct batadv_priv *bat_priv, | |||
739 | batadv_bla_add_claim(bat_priv, claim_addr, vid, backbone_gw); | 739 | batadv_bla_add_claim(bat_priv, claim_addr, vid, backbone_gw); |
740 | if (batadv_compare_eth(backbone_addr, primary_if->net_dev->dev_addr)) | 740 | if (batadv_compare_eth(backbone_addr, primary_if->net_dev->dev_addr)) |
741 | batadv_bla_send_claim(bat_priv, claim_addr, vid, | 741 | batadv_bla_send_claim(bat_priv, claim_addr, vid, |
742 | BATADV_CLAIM_TYPE_ADD); | 742 | BATADV_CLAIM_TYPE_CLAIM); |
743 | 743 | ||
744 | /* TODO: we could call something like tt_local_del() here. */ | 744 | /* TODO: we could call something like tt_local_del() here. */ |
745 | 745 | ||
@@ -784,12 +784,12 @@ static int batadv_check_claim_group(struct batadv_priv *bat_priv, | |||
784 | * otherwise assume it is in the hw_src | 784 | * otherwise assume it is in the hw_src |
785 | */ | 785 | */ |
786 | switch (bla_dst->type) { | 786 | switch (bla_dst->type) { |
787 | case BATADV_CLAIM_TYPE_ADD: | 787 | case BATADV_CLAIM_TYPE_CLAIM: |
788 | backbone_addr = hw_src; | 788 | backbone_addr = hw_src; |
789 | break; | 789 | break; |
790 | case BATADV_CLAIM_TYPE_REQUEST: | 790 | case BATADV_CLAIM_TYPE_REQUEST: |
791 | case BATADV_CLAIM_TYPE_ANNOUNCE: | 791 | case BATADV_CLAIM_TYPE_ANNOUNCE: |
792 | case BATADV_CLAIM_TYPE_DEL: | 792 | case BATADV_CLAIM_TYPE_UNCLAIM: |
793 | backbone_addr = ethhdr->h_source; | 793 | backbone_addr = ethhdr->h_source; |
794 | break; | 794 | break; |
795 | default: | 795 | default: |
@@ -905,12 +905,12 @@ static int batadv_bla_process_claim(struct batadv_priv *bat_priv, | |||
905 | 905 | ||
906 | /* check for the different types of claim frames ... */ | 906 | /* check for the different types of claim frames ... */ |
907 | switch (bla_dst->type) { | 907 | switch (bla_dst->type) { |
908 | case BATADV_CLAIM_TYPE_ADD: | 908 | case BATADV_CLAIM_TYPE_CLAIM: |
909 | if (batadv_handle_claim(bat_priv, primary_if, hw_src, | 909 | if (batadv_handle_claim(bat_priv, primary_if, hw_src, |
910 | ethhdr->h_source, vid)) | 910 | ethhdr->h_source, vid)) |
911 | return 1; | 911 | return 1; |
912 | break; | 912 | break; |
913 | case BATADV_CLAIM_TYPE_DEL: | 913 | case BATADV_CLAIM_TYPE_UNCLAIM: |
914 | if (batadv_handle_unclaim(bat_priv, primary_if, | 914 | if (batadv_handle_unclaim(bat_priv, primary_if, |
915 | ethhdr->h_source, hw_src, vid)) | 915 | ethhdr->h_source, hw_src, vid)) |
916 | return 1; | 916 | return 1; |
diff --git a/net/batman-adv/packet.h b/net/batman-adv/packet.h index 8d3e55a96adc..65d66e4ee757 100644 --- a/net/batman-adv/packet.h +++ b/net/batman-adv/packet.h | |||
@@ -92,8 +92,8 @@ enum batadv_tt_client_flags { | |||
92 | 92 | ||
93 | /* claim frame types for the bridge loop avoidance */ | 93 | /* claim frame types for the bridge loop avoidance */ |
94 | enum batadv_bla_claimframe { | 94 | enum batadv_bla_claimframe { |
95 | BATADV_CLAIM_TYPE_ADD = 0x00, | 95 | BATADV_CLAIM_TYPE_CLAIM = 0x00, |
96 | BATADV_CLAIM_TYPE_DEL = 0x01, | 96 | BATADV_CLAIM_TYPE_UNCLAIM = 0x01, |
97 | BATADV_CLAIM_TYPE_ANNOUNCE = 0x02, | 97 | BATADV_CLAIM_TYPE_ANNOUNCE = 0x02, |
98 | BATADV_CLAIM_TYPE_REQUEST = 0x03, | 98 | BATADV_CLAIM_TYPE_REQUEST = 0x03, |
99 | }; | 99 | }; |