From e175569c4639872b5cf242c9d4a71cc40c5f3c29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Mon, 7 May 2007 20:33:31 -0400 Subject: firewire: Use lib/ implementation of CRC ITU-T. With the CRC ITU-T implementation available in lib/ we can use that instead. This also fixes a bug in the topology map crc computation. Signed-off-by: Kristian Hoegsberg Signed-off-by: Stefan Richter (fixed Kconfig) --- drivers/firewire/fw-topology.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'drivers/firewire/fw-topology.c') diff --git a/drivers/firewire/fw-topology.c b/drivers/firewire/fw-topology.c index bc8a3487c83a..018c6b8afba6 100644 --- a/drivers/firewire/fw-topology.c +++ b/drivers/firewire/fw-topology.c @@ -465,14 +465,13 @@ static void update_topology_map(struct fw_card *card, u32 *self_ids, int self_id_count) { int node_count; - u32 crc; card->topology_map[1]++; node_count = (card->root_node->node_id & 0x3f) + 1; card->topology_map[2] = (node_count << 16) | self_id_count; - crc = crc16_itu_t(card->topology_map + 1, self_id_count + 2); - card->topology_map[0] = ((self_id_count + 2) << 16) | crc; + card->topology_map[0] = (self_id_count + 2) << 16; memcpy(&card->topology_map[3], self_ids, self_id_count * 4); + fw_compute_block_crc(card->topology_map); } void -- cgit v1.2.1