summaryrefslogtreecommitdiffstats
path: root/net/batman-adv/types.h
diff options
context:
space:
mode:
authorAntonio Quartulli <ordex@autistici.org>2013-04-24 16:37:51 +0200
committerAntonio Quartulli <antonio@meshcoding.com>2013-10-09 21:22:31 +0200
commitced72933a5e8ab52bb066a4a4083840b6f7f62ff (patch)
tree65415ac977b3f0bf1e0d09b5e0c7fd752d815bd4 /net/batman-adv/types.h
parent122edaa05940c021a55492d8c12f7663ce5168de (diff)
downloadlinux-ced72933a5e8ab52bb066a4a4083840b6f7f62ff.tar.bz2
batman-adv: use CRC32C instead of CRC16 in TT code
CRC32C has to be preferred to CRC16 because of its possible HW native support and because of the reduced collision probability. With this change the Translation Table component now uses CRC32C to compute the local and global table checksum. Signed-off-by: Antonio Quartulli <ordex@autistici.org> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Diffstat (limited to 'net/batman-adv/types.h')
-rw-r--r--net/batman-adv/types.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/batman-adv/types.h b/net/batman-adv/types.h
index bdabbc21eb41..e98915ac2a66 100644
--- a/net/batman-adv/types.h
+++ b/net/batman-adv/types.h
@@ -150,7 +150,7 @@ struct batadv_orig_node {
uint8_t flags;
uint8_t capabilities;
atomic_t last_ttvn;
- uint16_t tt_crc;
+ uint32_t tt_crc;
unsigned char *tt_buff;
int16_t tt_buff_len;
spinlock_t tt_buff_lock; /* protects tt_buff & tt_buff_len */
@@ -377,7 +377,7 @@ struct batadv_priv_tt {
spinlock_t req_list_lock; /* protects req_list */
spinlock_t roam_list_lock; /* protects roam_list */
atomic_t local_entry_num;
- uint16_t local_crc;
+ uint32_t local_crc;
unsigned char *last_changeset;
int16_t last_changeset_len;
/* protects last_changeset & last_changeset_len */