aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv/bat_iv_ogm.c
diff options
context:
space:
mode:
authorSven Eckelmann <sven@narfation.org>2012-05-11 20:09:42 -0400
committerAntonio Quartulli <ordex@autistici.org>2012-06-20 16:15:32 -0400
commit3193e8fdfa355289892661d206d1954114a7be95 (patch)
tree4fce7c85cd572389433a128db0ed180a3928e968 /net/batman-adv/bat_iv_ogm.c
parentd0f714f472967577067853acc8dabe0abc75ae8f (diff)
batman-adv: Prefix main non-static functions with batadv_
batman-adv can be compiled as part of the kernel instead of an module. In that case the linker will see all non-static symbols of batman-adv and all other non-static symbols of the kernel. This could lead to symbol collisions. A prefix for the batman-adv symbols that defines their private namespace avoids such a problem. Reported-by: David Miller <davem@davemloft.net> Signed-off-by: Sven Eckelmann <sven@narfation.org>
Diffstat (limited to 'net/batman-adv/bat_iv_ogm.c')
-rw-r--r--net/batman-adv/bat_iv_ogm.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/net/batman-adv/bat_iv_ogm.c b/net/batman-adv/bat_iv_ogm.c
index 62b52b663afb..0430063d3a7d 100644
--- a/net/batman-adv/bat_iv_ogm.c
+++ b/net/batman-adv/bat_iv_ogm.c
@@ -204,7 +204,7 @@ static void bat_iv_ogm_send_to_if(struct forw_packet *forw_packet,
204 batadv_inc_counter(bat_priv, BAT_CNT_MGMT_TX); 204 batadv_inc_counter(bat_priv, BAT_CNT_MGMT_TX);
205 batadv_add_counter(bat_priv, BAT_CNT_MGMT_TX_BYTES, 205 batadv_add_counter(bat_priv, BAT_CNT_MGMT_TX_BYTES,
206 skb->len + ETH_HLEN); 206 skb->len + ETH_HLEN);
207 batadv_send_skb_packet(skb, hard_iface, broadcast_addr); 207 batadv_send_skb_packet(skb, hard_iface, batadv_broadcast_addr);
208 } 208 }
209} 209}
210 210
@@ -255,7 +255,7 @@ static void bat_iv_ogm_emit(struct forw_packet *forw_packet)
255 /* skb is only used once and than forw_packet is free'd */ 255 /* skb is only used once and than forw_packet is free'd */
256 batadv_send_skb_packet(forw_packet->skb, 256 batadv_send_skb_packet(forw_packet->skb,
257 forw_packet->if_incoming, 257 forw_packet->if_incoming,
258 broadcast_addr); 258 batadv_broadcast_addr);
259 forw_packet->skb = NULL; 259 forw_packet->skb = NULL;
260 260
261 goto out; 261 goto out;
@@ -263,7 +263,7 @@ static void bat_iv_ogm_emit(struct forw_packet *forw_packet)
263 263
264 /* broadcast on every interface */ 264 /* broadcast on every interface */
265 rcu_read_lock(); 265 rcu_read_lock();
266 list_for_each_entry_rcu(hard_iface, &hardif_list, list) { 266 list_for_each_entry_rcu(hard_iface, &batadv_hardif_list, list) {
267 if (hard_iface->soft_iface != soft_iface) 267 if (hard_iface->soft_iface != soft_iface)
268 continue; 268 continue;
269 269
@@ -425,7 +425,7 @@ static void bat_iv_ogm_aggregate_new(const unsigned char *packet_buff,
425 /* start timer for this packet */ 425 /* start timer for this packet */
426 INIT_DELAYED_WORK(&forw_packet_aggr->delayed_work, 426 INIT_DELAYED_WORK(&forw_packet_aggr->delayed_work,
427 batadv_send_outstanding_bat_ogm_packet); 427 batadv_send_outstanding_bat_ogm_packet);
428 queue_delayed_work(bat_event_workqueue, 428 queue_delayed_work(batadv_event_workqueue,
429 &forw_packet_aggr->delayed_work, 429 &forw_packet_aggr->delayed_work,
430 send_time - jiffies); 430 send_time - jiffies);
431 431
@@ -984,7 +984,7 @@ static void bat_iv_ogm_process(const struct ethhdr *ethhdr,
984 batman_ogm_packet->header.version, has_directlink_flag); 984 batman_ogm_packet->header.version, has_directlink_flag);
985 985
986 rcu_read_lock(); 986 rcu_read_lock();
987 list_for_each_entry_rcu(hard_iface, &hardif_list, list) { 987 list_for_each_entry_rcu(hard_iface, &batadv_hardif_list, list) {
988 if (hard_iface->if_status != IF_ACTIVE) 988 if (hard_iface->if_status != IF_ACTIVE)
989 continue; 989 continue;
990 990
@@ -1259,18 +1259,18 @@ int __init batadv_iv_init(void)
1259 int ret; 1259 int ret;
1260 1260
1261 /* batman originator packet */ 1261 /* batman originator packet */
1262 ret = recv_handler_register(BAT_IV_OGM, bat_iv_ogm_receive); 1262 ret = batadv_recv_handler_register(BAT_IV_OGM, bat_iv_ogm_receive);
1263 if (ret < 0) 1263 if (ret < 0)
1264 goto out; 1264 goto out;
1265 1265
1266 ret = bat_algo_register(&batman_iv); 1266 ret = batadv_algo_register(&batman_iv);
1267 if (ret < 0) 1267 if (ret < 0)
1268 goto handler_unregister; 1268 goto handler_unregister;
1269 1269
1270 goto out; 1270 goto out;
1271 1271
1272handler_unregister: 1272handler_unregister:
1273 recv_handler_unregister(BAT_IV_OGM); 1273 batadv_recv_handler_unregister(BAT_IV_OGM);
1274out: 1274out:
1275 return ret; 1275 return ret;
1276} 1276}