diff options
author | Sven Eckelmann <sven@narfation.org> | 2012-06-03 16:19:17 -0400 |
---|---|---|
committer | Antonio Quartulli <ordex@autistici.org> | 2012-06-28 02:45:05 -0400 |
commit | 42d0b044b7c9e5821f1bf3e2b4ea7861417c11c2 (patch) | |
tree | 3dedf87facfbc4dd0392256e93088c18509e1391 /net/batman-adv/bridge_loop_avoidance.c | |
parent | edbf7ff72312afcc502014ccf3c72c49fa55722a (diff) |
batman-adv: Prefix main defines with BATADV_
Reported-by: Martin Hundebøll <martin@hundeboll.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Diffstat (limited to 'net/batman-adv/bridge_loop_avoidance.c')
-rw-r--r-- | net/batman-adv/bridge_loop_avoidance.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/net/batman-adv/bridge_loop_avoidance.c b/net/batman-adv/bridge_loop_avoidance.c index 42b8a2079250..db20b688ee25 100644 --- a/net/batman-adv/bridge_loop_avoidance.c +++ b/net/batman-adv/bridge_loop_avoidance.c | |||
@@ -949,7 +949,7 @@ static void batadv_bla_purge_backbone_gw(struct bat_priv *bat_priv, int now) | |||
949 | if (now) | 949 | if (now) |
950 | goto purge_now; | 950 | goto purge_now; |
951 | if (!batadv_has_timed_out(backbone_gw->lasttime, | 951 | if (!batadv_has_timed_out(backbone_gw->lasttime, |
952 | BLA_BACKBONE_TIMEOUT)) | 952 | BATADV_BLA_BACKBONE_TIMEOUT)) |
953 | continue; | 953 | continue; |
954 | 954 | ||
955 | batadv_dbg(DBG_BLA, backbone_gw->bat_priv, | 955 | batadv_dbg(DBG_BLA, backbone_gw->bat_priv, |
@@ -1001,7 +1001,7 @@ static void batadv_bla_purge_claims(struct bat_priv *bat_priv, | |||
1001 | primary_if->net_dev->dev_addr)) | 1001 | primary_if->net_dev->dev_addr)) |
1002 | continue; | 1002 | continue; |
1003 | if (!batadv_has_timed_out(claim->lasttime, | 1003 | if (!batadv_has_timed_out(claim->lasttime, |
1004 | BLA_CLAIM_TIMEOUT)) | 1004 | BATADV_BLA_CLAIM_TIMEOUT)) |
1005 | continue; | 1005 | continue; |
1006 | 1006 | ||
1007 | batadv_dbg(DBG_BLA, bat_priv, | 1007 | batadv_dbg(DBG_BLA, bat_priv, |
@@ -1075,7 +1075,7 @@ static void batadv_bla_start_timer(struct bat_priv *bat_priv) | |||
1075 | { | 1075 | { |
1076 | INIT_DELAYED_WORK(&bat_priv->bla_work, batadv_bla_periodic_work); | 1076 | INIT_DELAYED_WORK(&bat_priv->bla_work, batadv_bla_periodic_work); |
1077 | queue_delayed_work(batadv_event_workqueue, &bat_priv->bla_work, | 1077 | queue_delayed_work(batadv_event_workqueue, &bat_priv->bla_work, |
1078 | msecs_to_jiffies(BLA_PERIOD_LENGTH)); | 1078 | msecs_to_jiffies(BATADV_BLA_PERIOD_LENGTH)); |
1079 | } | 1079 | } |
1080 | 1080 | ||
1081 | /* periodic work to do: | 1081 | /* periodic work to do: |
@@ -1162,9 +1162,9 @@ int batadv_bla_init(struct bat_priv *bat_priv) | |||
1162 | } | 1162 | } |
1163 | 1163 | ||
1164 | /* initialize the duplicate list */ | 1164 | /* initialize the duplicate list */ |
1165 | for (i = 0; i < DUPLIST_SIZE; i++) | 1165 | for (i = 0; i < BATADV_DUPLIST_SIZE; i++) |
1166 | bat_priv->bcast_duplist[i].entrytime = | 1166 | bat_priv->bcast_duplist[i].entrytime = |
1167 | jiffies - msecs_to_jiffies(DUPLIST_TIMEOUT); | 1167 | jiffies - msecs_to_jiffies(BATADV_DUPLIST_TIMEOUT); |
1168 | bat_priv->bcast_duplist_curr = 0; | 1168 | bat_priv->bcast_duplist_curr = 0; |
1169 | 1169 | ||
1170 | if (bat_priv->claim_hash) | 1170 | if (bat_priv->claim_hash) |
@@ -1216,14 +1216,15 @@ int batadv_bla_check_bcast_duplist(struct bat_priv *bat_priv, | |||
1216 | /* calculate the crc ... */ | 1216 | /* calculate the crc ... */ |
1217 | crc = crc16(0, content, length); | 1217 | crc = crc16(0, content, length); |
1218 | 1218 | ||
1219 | for (i = 0 ; i < DUPLIST_SIZE; i++) { | 1219 | for (i = 0; i < BATADV_DUPLIST_SIZE; i++) { |
1220 | curr = (bat_priv->bcast_duplist_curr + i) % DUPLIST_SIZE; | 1220 | curr = (bat_priv->bcast_duplist_curr + i) % BATADV_DUPLIST_SIZE; |
1221 | entry = &bat_priv->bcast_duplist[curr]; | 1221 | entry = &bat_priv->bcast_duplist[curr]; |
1222 | 1222 | ||
1223 | /* we can stop searching if the entry is too old ; | 1223 | /* we can stop searching if the entry is too old ; |
1224 | * later entries will be even older | 1224 | * later entries will be even older |
1225 | */ | 1225 | */ |
1226 | if (batadv_has_timed_out(entry->entrytime, DUPLIST_TIMEOUT)) | 1226 | if (batadv_has_timed_out(entry->entrytime, |
1227 | BATADV_DUPLIST_TIMEOUT)) | ||
1227 | break; | 1228 | break; |
1228 | 1229 | ||
1229 | if (entry->crc != crc) | 1230 | if (entry->crc != crc) |
@@ -1238,7 +1239,8 @@ int batadv_bla_check_bcast_duplist(struct bat_priv *bat_priv, | |||
1238 | return 1; | 1239 | return 1; |
1239 | } | 1240 | } |
1240 | /* not found, add a new entry (overwrite the oldest entry) */ | 1241 | /* not found, add a new entry (overwrite the oldest entry) */ |
1241 | curr = (bat_priv->bcast_duplist_curr + DUPLIST_SIZE - 1) % DUPLIST_SIZE; | 1242 | curr = (bat_priv->bcast_duplist_curr + BATADV_DUPLIST_SIZE - 1); |
1243 | curr %= BATADV_DUPLIST_SIZE; | ||
1242 | entry = &bat_priv->bcast_duplist[curr]; | 1244 | entry = &bat_priv->bcast_duplist[curr]; |
1243 | entry->crc = crc; | 1245 | entry->crc = crc; |
1244 | entry->entrytime = jiffies; | 1246 | entry->entrytime = jiffies; |