diff options
author | Kristian Høgsberg <krh@redhat.com> | 2007-05-07 20:33:31 -0400 |
---|---|---|
committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2007-05-10 12:24:13 -0400 |
commit | e175569c4639872b5cf242c9d4a71cc40c5f3c29 (patch) | |
tree | c962499ff5db9cc91d7b618524221563f2ccf452 /drivers/firewire/fw-topology.c | |
parent | 3e7cbae7c6dda18d427335b3ad98f1a0d40ef30c (diff) |
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 <krh@redhat.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (fixed Kconfig)
Diffstat (limited to 'drivers/firewire/fw-topology.c')
-rw-r--r-- | drivers/firewire/fw-topology.c | 5 |
1 files changed, 2 insertions, 3 deletions
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 | |||
465 | update_topology_map(struct fw_card *card, u32 *self_ids, int self_id_count) | 465 | update_topology_map(struct fw_card *card, u32 *self_ids, int self_id_count) |
466 | { | 466 | { |
467 | int node_count; | 467 | int node_count; |
468 | u32 crc; | ||
469 | 468 | ||
470 | card->topology_map[1]++; | 469 | card->topology_map[1]++; |
471 | node_count = (card->root_node->node_id & 0x3f) + 1; | 470 | node_count = (card->root_node->node_id & 0x3f) + 1; |
472 | card->topology_map[2] = (node_count << 16) | self_id_count; | 471 | card->topology_map[2] = (node_count << 16) | self_id_count; |
473 | crc = crc16_itu_t(card->topology_map + 1, self_id_count + 2); | 472 | card->topology_map[0] = (self_id_count + 2) << 16; |
474 | card->topology_map[0] = ((self_id_count + 2) << 16) | crc; | ||
475 | memcpy(&card->topology_map[3], self_ids, self_id_count * 4); | 473 | memcpy(&card->topology_map[3], self_ids, self_id_count * 4); |
474 | fw_compute_block_crc(card->topology_map); | ||
476 | } | 475 | } |
477 | 476 | ||
478 | void | 477 | void |