diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/rslib.h | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/include/linux/rslib.h b/include/linux/rslib.h index 980c8f74d8dc..ace25acfdc97 100644 --- a/include/linux/rslib.h +++ b/include/linux/rslib.h | |||
@@ -1,15 +1,15 @@ | |||
1 | /* | 1 | /* |
2 | * include/linux/rslib.h | 2 | * include/linux/rslib.h |
3 | * | 3 | * |
4 | * Overview: | 4 | * Overview: |
5 | * Generic Reed Solomon encoder / decoder library | 5 | * Generic Reed Solomon encoder / decoder library |
6 | * | 6 | * |
7 | * Copyright (C) 2004 Thomas Gleixner (tglx@linutronix.de) | 7 | * Copyright (C) 2004 Thomas Gleixner (tglx@linutronix.de) |
8 | * | 8 | * |
9 | * RS code lifted from reed solomon library written by Phil Karn | 9 | * RS code lifted from reed solomon library written by Phil Karn |
10 | * Copyright 2002 Phil Karn, KA9Q | 10 | * Copyright 2002 Phil Karn, KA9Q |
11 | * | 11 | * |
12 | * $Id: rslib.h,v 1.3 2004/10/05 22:08:22 gleixner Exp $ | 12 | * $Id: rslib.h,v 1.4 2005/11/07 11:14:52 gleixner Exp $ |
13 | * | 13 | * |
14 | * This program is free software; you can redistribute it and/or modify | 14 | * This program is free software; you can redistribute it and/or modify |
15 | * it under the terms of the GNU General Public License version 2 as | 15 | * it under the terms of the GNU General Public License version 2 as |
@@ -21,20 +21,20 @@ | |||
21 | 21 | ||
22 | #include <linux/list.h> | 22 | #include <linux/list.h> |
23 | 23 | ||
24 | /** | 24 | /** |
25 | * struct rs_control - rs control structure | 25 | * struct rs_control - rs control structure |
26 | * | 26 | * |
27 | * @mm: Bits per symbol | 27 | * @mm: Bits per symbol |
28 | * @nn: Symbols per block (= (1<<mm)-1) | 28 | * @nn: Symbols per block (= (1<<mm)-1) |
29 | * @alpha_to: log lookup table | 29 | * @alpha_to: log lookup table |
30 | * @index_of: Antilog lookup table | 30 | * @index_of: Antilog lookup table |
31 | * @genpoly: Generator polynomial | 31 | * @genpoly: Generator polynomial |
32 | * @nroots: Number of generator roots = number of parity symbols | 32 | * @nroots: Number of generator roots = number of parity symbols |
33 | * @fcr: First consecutive root, index form | 33 | * @fcr: First consecutive root, index form |
34 | * @prim: Primitive element, index form | 34 | * @prim: Primitive element, index form |
35 | * @iprim: prim-th root of 1, index form | 35 | * @iprim: prim-th root of 1, index form |
36 | * @gfpoly: The primitive generator polynominal | 36 | * @gfpoly: The primitive generator polynominal |
37 | * @users: Users of this structure | 37 | * @users: Users of this structure |
38 | * @list: List entry for the rs control list | 38 | * @list: List entry for the rs control list |
39 | */ | 39 | */ |
40 | struct rs_control { | 40 | struct rs_control { |
@@ -58,7 +58,7 @@ int encode_rs8(struct rs_control *rs, uint8_t *data, int len, uint16_t *par, | |||
58 | uint16_t invmsk); | 58 | uint16_t invmsk); |
59 | #endif | 59 | #endif |
60 | #ifdef CONFIG_REED_SOLOMON_DEC8 | 60 | #ifdef CONFIG_REED_SOLOMON_DEC8 |
61 | int decode_rs8(struct rs_control *rs, uint8_t *data, uint16_t *par, int len, | 61 | int decode_rs8(struct rs_control *rs, uint8_t *data, uint16_t *par, int len, |
62 | uint16_t *s, int no_eras, int *eras_pos, uint16_t invmsk, | 62 | uint16_t *s, int no_eras, int *eras_pos, uint16_t invmsk, |
63 | uint16_t *corr); | 63 | uint16_t *corr); |
64 | #endif | 64 | #endif |
@@ -75,7 +75,7 @@ int decode_rs16(struct rs_control *rs, uint16_t *data, uint16_t *par, int len, | |||
75 | #endif | 75 | #endif |
76 | 76 | ||
77 | /* Create or get a matching rs control structure */ | 77 | /* Create or get a matching rs control structure */ |
78 | struct rs_control *init_rs(int symsize, int gfpoly, int fcr, int prim, | 78 | struct rs_control *init_rs(int symsize, int gfpoly, int fcr, int prim, |
79 | int nroots); | 79 | int nroots); |
80 | 80 | ||
81 | /* Release a rs control structure */ | 81 | /* Release a rs control structure */ |
@@ -87,9 +87,9 @@ void free_rs(struct rs_control *rs); | |||
87 | * @x: the value to reduce | 87 | * @x: the value to reduce |
88 | * | 88 | * |
89 | * where | 89 | * where |
90 | * rs->mm = number of bits per symbol | 90 | * rs->mm = number of bits per symbol |
91 | * rs->nn = (2^rs->mm) - 1 | 91 | * rs->nn = (2^rs->mm) - 1 |
92 | * | 92 | * |
93 | * Simple arithmetic modulo would return a wrong result for values | 93 | * Simple arithmetic modulo would return a wrong result for values |
94 | * >= 3 * rs->nn | 94 | * >= 3 * rs->nn |
95 | */ | 95 | */ |