diff options
author | Sven Eckelmann <sven@narfation.org> | 2012-06-03 16:19:20 -0400 |
---|---|---|
committer | Antonio Quartulli <ordex@autistici.org> | 2012-07-01 16:47:19 -0400 |
commit | d69909d2fc9e00bd8149cc8df9b18c35008e3e62 (patch) | |
tree | 305ce47abad3d2ef055d36b0c9b9808e3555111d /net/batman-adv | |
parent | e9a4f295ebe06b00d6af5597c0cea78c315c2ebc (diff) |
batman-adv: Prefix types enum with BATADV_
Reported-by: Martin Hundebøll <martin@hundeboll.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Diffstat (limited to 'net/batman-adv')
-rw-r--r-- | net/batman-adv/bat_iv_ogm.c | 8 | ||||
-rw-r--r-- | net/batman-adv/routing.c | 10 | ||||
-rw-r--r-- | net/batman-adv/soft-interface.c | 8 | ||||
-rw-r--r-- | net/batman-adv/translation-table.c | 8 | ||||
-rw-r--r-- | net/batman-adv/types.h | 28 |
5 files changed, 31 insertions, 31 deletions
diff --git a/net/batman-adv/bat_iv_ogm.c b/net/batman-adv/bat_iv_ogm.c index a59e317284ad..60997192c899 100644 --- a/net/batman-adv/bat_iv_ogm.c +++ b/net/batman-adv/bat_iv_ogm.c | |||
@@ -209,8 +209,8 @@ static void batadv_iv_ogm_send_to_if(struct forw_packet *forw_packet, | |||
209 | /* create clone because function is called more than once */ | 209 | /* create clone because function is called more than once */ |
210 | skb = skb_clone(forw_packet->skb, GFP_ATOMIC); | 210 | skb = skb_clone(forw_packet->skb, GFP_ATOMIC); |
211 | if (skb) { | 211 | if (skb) { |
212 | batadv_inc_counter(bat_priv, BAT_CNT_MGMT_TX); | 212 | batadv_inc_counter(bat_priv, BATADV_CNT_MGMT_TX); |
213 | batadv_add_counter(bat_priv, BAT_CNT_MGMT_TX_BYTES, | 213 | batadv_add_counter(bat_priv, BATADV_CNT_MGMT_TX_BYTES, |
214 | skb->len + ETH_HLEN); | 214 | skb->len + ETH_HLEN); |
215 | batadv_send_skb_packet(skb, hard_iface, batadv_broadcast_addr); | 215 | batadv_send_skb_packet(skb, hard_iface, batadv_broadcast_addr); |
216 | } | 216 | } |
@@ -1256,8 +1256,8 @@ static int batadv_iv_ogm_receive(struct sk_buff *skb, | |||
1256 | if (bat_priv->bat_algo_ops->bat_ogm_emit != batadv_iv_ogm_emit) | 1256 | if (bat_priv->bat_algo_ops->bat_ogm_emit != batadv_iv_ogm_emit) |
1257 | return NET_RX_DROP; | 1257 | return NET_RX_DROP; |
1258 | 1258 | ||
1259 | batadv_inc_counter(bat_priv, BAT_CNT_MGMT_RX); | 1259 | batadv_inc_counter(bat_priv, BATADV_CNT_MGMT_RX); |
1260 | batadv_add_counter(bat_priv, BAT_CNT_MGMT_RX_BYTES, | 1260 | batadv_add_counter(bat_priv, BATADV_CNT_MGMT_RX_BYTES, |
1261 | skb->len + ETH_HLEN); | 1261 | skb->len + ETH_HLEN); |
1262 | 1262 | ||
1263 | packet_len = skb_headlen(skb); | 1263 | packet_len = skb_headlen(skb); |
diff --git a/net/batman-adv/routing.c b/net/batman-adv/routing.c index 4d632215f92f..aa8325e8f8bf 100644 --- a/net/batman-adv/routing.c +++ b/net/batman-adv/routing.c | |||
@@ -607,7 +607,7 @@ int batadv_recv_tt_query(struct sk_buff *skb, struct hard_iface *recv_if) | |||
607 | 607 | ||
608 | switch (tt_query->flags & BATADV_TT_QUERY_TYPE_MASK) { | 608 | switch (tt_query->flags & BATADV_TT_QUERY_TYPE_MASK) { |
609 | case TT_REQUEST: | 609 | case TT_REQUEST: |
610 | batadv_inc_counter(bat_priv, BAT_CNT_TT_REQUEST_RX); | 610 | batadv_inc_counter(bat_priv, BATADV_CNT_TT_REQUEST_RX); |
611 | 611 | ||
612 | /* If we cannot provide an answer the tt_request is | 612 | /* If we cannot provide an answer the tt_request is |
613 | * forwarded | 613 | * forwarded |
@@ -622,7 +622,7 @@ int batadv_recv_tt_query(struct sk_buff *skb, struct hard_iface *recv_if) | |||
622 | } | 622 | } |
623 | break; | 623 | break; |
624 | case TT_RESPONSE: | 624 | case TT_RESPONSE: |
625 | batadv_inc_counter(bat_priv, BAT_CNT_TT_RESPONSE_RX); | 625 | batadv_inc_counter(bat_priv, BATADV_CNT_TT_RESPONSE_RX); |
626 | 626 | ||
627 | if (batadv_is_my_mac(tt_query->dst)) { | 627 | if (batadv_is_my_mac(tt_query->dst)) { |
628 | /* packet needs to be linearized to access the TT | 628 | /* packet needs to be linearized to access the TT |
@@ -678,7 +678,7 @@ int batadv_recv_roam_adv(struct sk_buff *skb, struct hard_iface *recv_if) | |||
678 | if (is_broadcast_ether_addr(ethhdr->h_source)) | 678 | if (is_broadcast_ether_addr(ethhdr->h_source)) |
679 | goto out; | 679 | goto out; |
680 | 680 | ||
681 | batadv_inc_counter(bat_priv, BAT_CNT_TT_ROAM_ADV_RX); | 681 | batadv_inc_counter(bat_priv, BATADV_CNT_TT_ROAM_ADV_RX); |
682 | 682 | ||
683 | roam_adv_packet = (struct roam_adv_packet *)skb->data; | 683 | roam_adv_packet = (struct roam_adv_packet *)skb->data; |
684 | 684 | ||
@@ -900,8 +900,8 @@ static int batadv_route_unicast_packet(struct sk_buff *skb, | |||
900 | unicast_packet->header.ttl--; | 900 | unicast_packet->header.ttl--; |
901 | 901 | ||
902 | /* Update stats counter */ | 902 | /* Update stats counter */ |
903 | batadv_inc_counter(bat_priv, BAT_CNT_FORWARD); | 903 | batadv_inc_counter(bat_priv, BATADV_CNT_FORWARD); |
904 | batadv_add_counter(bat_priv, BAT_CNT_FORWARD_BYTES, | 904 | batadv_add_counter(bat_priv, BATADV_CNT_FORWARD_BYTES, |
905 | skb->len + ETH_HLEN); | 905 | skb->len + ETH_HLEN); |
906 | 906 | ||
907 | /* route it */ | 907 | /* route it */ |
diff --git a/net/batman-adv/soft-interface.c b/net/batman-adv/soft-interface.c index b77e598fb2b0..19a80d276585 100644 --- a/net/batman-adv/soft-interface.c +++ b/net/batman-adv/soft-interface.c | |||
@@ -366,6 +366,7 @@ struct net_device *batadv_softif_create(const char *name) | |||
366 | struct net_device *soft_iface; | 366 | struct net_device *soft_iface; |
367 | struct bat_priv *bat_priv; | 367 | struct bat_priv *bat_priv; |
368 | int ret; | 368 | int ret; |
369 | size_t cnt_len = sizeof(uint64_t) * BATADV_CNT_NUM; | ||
369 | 370 | ||
370 | soft_iface = alloc_netdev(sizeof(*bat_priv), name, | 371 | soft_iface = alloc_netdev(sizeof(*bat_priv), name, |
371 | batadv_interface_setup); | 372 | batadv_interface_setup); |
@@ -411,8 +412,7 @@ struct net_device *batadv_softif_create(const char *name) | |||
411 | bat_priv->primary_if = NULL; | 412 | bat_priv->primary_if = NULL; |
412 | bat_priv->num_ifaces = 0; | 413 | bat_priv->num_ifaces = 0; |
413 | 414 | ||
414 | bat_priv->bat_counters = __alloc_percpu(sizeof(uint64_t) * BAT_CNT_NUM, | 415 | bat_priv->bat_counters = __alloc_percpu(cnt_len, __alignof__(uint64_t)); |
415 | __alignof__(uint64_t)); | ||
416 | if (!bat_priv->bat_counters) | 416 | if (!bat_priv->bat_counters) |
417 | goto unreg_soft_iface; | 417 | goto unreg_soft_iface; |
418 | 418 | ||
@@ -542,14 +542,14 @@ static void batadv_get_ethtool_stats(struct net_device *dev, | |||
542 | struct bat_priv *bat_priv = netdev_priv(dev); | 542 | struct bat_priv *bat_priv = netdev_priv(dev); |
543 | int i; | 543 | int i; |
544 | 544 | ||
545 | for (i = 0; i < BAT_CNT_NUM; i++) | 545 | for (i = 0; i < BATADV_CNT_NUM; i++) |
546 | data[i] = batadv_sum_counter(bat_priv, i); | 546 | data[i] = batadv_sum_counter(bat_priv, i); |
547 | } | 547 | } |
548 | 548 | ||
549 | static int batadv_get_sset_count(struct net_device *dev, int stringset) | 549 | static int batadv_get_sset_count(struct net_device *dev, int stringset) |
550 | { | 550 | { |
551 | if (stringset == ETH_SS_STATS) | 551 | if (stringset == ETH_SS_STATS) |
552 | return BAT_CNT_NUM; | 552 | return BATADV_CNT_NUM; |
553 | 553 | ||
554 | return -EOPNOTSUPP; | 554 | return -EOPNOTSUPP; |
555 | } | 555 | } |
diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c index 156c3094c12b..f36d1d52bff9 100644 --- a/net/batman-adv/translation-table.c +++ b/net/batman-adv/translation-table.c | |||
@@ -1471,7 +1471,7 @@ static int batadv_send_tt_request(struct bat_priv *bat_priv, | |||
1471 | dst_orig_node->orig, neigh_node->addr, | 1471 | dst_orig_node->orig, neigh_node->addr, |
1472 | (full_table ? 'F' : '.')); | 1472 | (full_table ? 'F' : '.')); |
1473 | 1473 | ||
1474 | batadv_inc_counter(bat_priv, BAT_CNT_TT_REQUEST_TX); | 1474 | batadv_inc_counter(bat_priv, BATADV_CNT_TT_REQUEST_TX); |
1475 | 1475 | ||
1476 | batadv_send_skb_packet(skb, neigh_node->if_incoming, neigh_node->addr); | 1476 | batadv_send_skb_packet(skb, neigh_node->if_incoming, neigh_node->addr); |
1477 | ret = 0; | 1477 | ret = 0; |
@@ -1599,7 +1599,7 @@ static bool batadv_send_other_tt_response(struct bat_priv *bat_priv, | |||
1599 | res_dst_orig_node->orig, neigh_node->addr, | 1599 | res_dst_orig_node->orig, neigh_node->addr, |
1600 | req_dst_orig_node->orig, req_ttvn); | 1600 | req_dst_orig_node->orig, req_ttvn); |
1601 | 1601 | ||
1602 | batadv_inc_counter(bat_priv, BAT_CNT_TT_RESPONSE_TX); | 1602 | batadv_inc_counter(bat_priv, BATADV_CNT_TT_RESPONSE_TX); |
1603 | 1603 | ||
1604 | batadv_send_skb_packet(skb, neigh_node->if_incoming, neigh_node->addr); | 1604 | batadv_send_skb_packet(skb, neigh_node->if_incoming, neigh_node->addr); |
1605 | ret = true; | 1605 | ret = true; |
@@ -1720,7 +1720,7 @@ static bool batadv_send_my_tt_response(struct bat_priv *bat_priv, | |||
1720 | orig_node->orig, neigh_node->addr, | 1720 | orig_node->orig, neigh_node->addr, |
1721 | (tt_response->flags & TT_FULL_TABLE ? 'F' : '.')); | 1721 | (tt_response->flags & TT_FULL_TABLE ? 'F' : '.')); |
1722 | 1722 | ||
1723 | batadv_inc_counter(bat_priv, BAT_CNT_TT_RESPONSE_TX); | 1723 | batadv_inc_counter(bat_priv, BATADV_CNT_TT_RESPONSE_TX); |
1724 | 1724 | ||
1725 | batadv_send_skb_packet(skb, neigh_node->if_incoming, neigh_node->addr); | 1725 | batadv_send_skb_packet(skb, neigh_node->if_incoming, neigh_node->addr); |
1726 | ret = true; | 1726 | ret = true; |
@@ -2038,7 +2038,7 @@ static void batadv_send_roam_adv(struct bat_priv *bat_priv, uint8_t *client, | |||
2038 | "Sending ROAMING_ADV to %pM (client %pM) via %pM\n", | 2038 | "Sending ROAMING_ADV to %pM (client %pM) via %pM\n", |
2039 | orig_node->orig, client, neigh_node->addr); | 2039 | orig_node->orig, client, neigh_node->addr); |
2040 | 2040 | ||
2041 | batadv_inc_counter(bat_priv, BAT_CNT_TT_ROAM_ADV_TX); | 2041 | batadv_inc_counter(bat_priv, BATADV_CNT_TT_ROAM_ADV_TX); |
2042 | 2042 | ||
2043 | batadv_send_skb_packet(skb, neigh_node->if_incoming, neigh_node->addr); | 2043 | batadv_send_skb_packet(skb, neigh_node->if_incoming, neigh_node->addr); |
2044 | ret = 0; | 2044 | ret = 0; |
diff --git a/net/batman-adv/types.h b/net/batman-adv/types.h index fd538ea68117..fcbac82e9c47 100644 --- a/net/batman-adv/types.h +++ b/net/batman-adv/types.h | |||
@@ -143,20 +143,20 @@ struct bcast_duplist_entry { | |||
143 | }; | 143 | }; |
144 | #endif | 144 | #endif |
145 | 145 | ||
146 | enum bat_counters { | 146 | enum batadv_counters { |
147 | BAT_CNT_FORWARD, | 147 | BATADV_CNT_FORWARD, |
148 | BAT_CNT_FORWARD_BYTES, | 148 | BATADV_CNT_FORWARD_BYTES, |
149 | BAT_CNT_MGMT_TX, | 149 | BATADV_CNT_MGMT_TX, |
150 | BAT_CNT_MGMT_TX_BYTES, | 150 | BATADV_CNT_MGMT_TX_BYTES, |
151 | BAT_CNT_MGMT_RX, | 151 | BATADV_CNT_MGMT_RX, |
152 | BAT_CNT_MGMT_RX_BYTES, | 152 | BATADV_CNT_MGMT_RX_BYTES, |
153 | BAT_CNT_TT_REQUEST_TX, | 153 | BATADV_CNT_TT_REQUEST_TX, |
154 | BAT_CNT_TT_REQUEST_RX, | 154 | BATADV_CNT_TT_REQUEST_RX, |
155 | BAT_CNT_TT_RESPONSE_TX, | 155 | BATADV_CNT_TT_RESPONSE_TX, |
156 | BAT_CNT_TT_RESPONSE_RX, | 156 | BATADV_CNT_TT_RESPONSE_RX, |
157 | BAT_CNT_TT_ROAM_ADV_TX, | 157 | BATADV_CNT_TT_ROAM_ADV_TX, |
158 | BAT_CNT_TT_ROAM_ADV_RX, | 158 | BATADV_CNT_TT_ROAM_ADV_RX, |
159 | BAT_CNT_NUM, | 159 | BATADV_CNT_NUM, |
160 | }; | 160 | }; |
161 | 161 | ||
162 | struct bat_priv { | 162 | struct bat_priv { |