mac80211: update to 2012-09-07, adds ath9k beacon fixes, mesh/adhoc fixes, and more
[openwrt.git] / package / mac80211 / patches / 022-remove_crc8_and_cordic.patch
1 --- a/compat/Makefile
2 +++ b/compat/Makefile
3 @@ -47,8 +47,6 @@ compat-$(CONFIG_COMPAT_KERNEL_3_3) += \
4  compat-$(CONFIG_COMPAT_KERNEL_3_4) += compat-3.4.o
5  compat-$(CONFIG_COMPAT_KERNEL_3_7) += compat-3.7.o
6  
7 -compat-$(CONFIG_COMPAT_CORDIC) += cordic.o
8 -compat-$(CONFIG_COMPAT_CRC8) += crc8.o
9  
10  ifndef CONFIG_64BIT
11  ifndef CONFIG_GENERIC_ATOMIC64
12 --- a/include/linux/cordic.h
13 +++ /dev/null
14 @@ -1,48 +0,0 @@
15 -/*
16 - * Copyright (c) 2011 Broadcom Corporation
17 - *
18 - * Permission to use, copy, modify, and/or distribute this software for any
19 - * purpose with or without fee is hereby granted, provided that the above
20 - * copyright notice and this permission notice appear in all copies.
21 - *
22 - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
23 - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
24 - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
25 - * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
26 - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
27 - * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
28 - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
29 - */
30 -#ifndef __CORDIC_H_
31 -#define __CORDIC_H_
32 -
33 -#include <linux/types.h>
34 -
35 -/**
36 - * struct cordic_iq - i/q coordinate.
37 - *
38 - * @i: real part of coordinate (in phase).
39 - * @q: imaginary part of coordinate (quadrature).
40 - */
41 -struct cordic_iq {
42 -       s32 i;
43 -       s32 q;
44 -};
45 -
46 -/**
47 - * cordic_calc_iq() - calculates the i/q coordinate for given angle.
48 - *
49 - * @theta: angle in degrees for which i/q coordinate is to be calculated.
50 - * @coord: function output parameter holding the i/q coordinate.
51 - *
52 - * The function calculates the i/q coordinate for a given angle using
53 - * cordic algorithm. The coordinate consists of a real (i) and an
54 - * imaginary (q) part. The real part is essentially the cosine of the
55 - * angle and the imaginary part is the sine of the angle. The returned
56 - * values are scaled by 2^16 for precision. The range for theta is
57 - * for -180 degrees to +180 degrees. Passed values outside this range are
58 - * converted before doing the actual calculation.
59 - */
60 -struct cordic_iq cordic_calc_iq(s32 theta);
61 -
62 -#endif /* __CORDIC_H_ */
63 --- a/include/linux/crc8.h
64 +++ /dev/null
65 @@ -1,101 +0,0 @@
66 -/*
67 - * Copyright (c) 2011 Broadcom Corporation
68 - *
69 - * Permission to use, copy, modify, and/or distribute this software for any
70 - * purpose with or without fee is hereby granted, provided that the above
71 - * copyright notice and this permission notice appear in all copies.
72 - *
73 - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
74 - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
75 - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
76 - * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
77 - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
78 - * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
79 - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
80 - */
81 -#ifndef __CRC8_H_
82 -#define __CRC8_H_
83 -
84 -#include <linux/types.h>
85 -
86 -/* see usage of this value in crc8() description */
87 -#define CRC8_INIT_VALUE                0xFF
88 -
89 -/*
90 - * Return value of crc8() indicating valid message+crc. This is true
91 - * if a CRC is inverted before transmission. The CRC computed over the
92 - * whole received bitstream is _table[x], where x is the bit pattern
93 - * of the modification (almost always 0xff).
94 - */
95 -#define CRC8_GOOD_VALUE(_table)        (_table[0xFF])
96 -
97 -/* required table size for crc8 algorithm */
98 -#define CRC8_TABLE_SIZE                        256
99 -
100 -/* helper macro assuring right table size is used */
101 -#define DECLARE_CRC8_TABLE(_table) \
102 -       static u8 _table[CRC8_TABLE_SIZE]
103 -
104 -/**
105 - * crc8_populate_lsb - fill crc table for given polynomial in regular bit order.
106 - *
107 - * @table:     table to be filled.
108 - * @polynomial:        polynomial for which table is to be filled.
109 - *
110 - * This function fills the provided table according the polynomial provided for
111 - * regular bit order (lsb first). Polynomials in CRC algorithms are typically
112 - * represented as shown below.
113 - *
114 - *     poly = x^8 + x^7 + x^6 + x^4 + x^2 + 1
115 - *
116 - * For lsb first direction x^7 maps to the lsb. So the polynomial is as below.
117 - *
118 - * - lsb first: poly = 10101011(1) = 0xAB
119 - */
120 -void crc8_populate_lsb(u8 table[CRC8_TABLE_SIZE], u8 polynomial);
121 -
122 -/**
123 - * crc8_populate_msb - fill crc table for given polynomial in reverse bit order.
124 - *
125 - * @table:     table to be filled.
126 - * @polynomial:        polynomial for which table is to be filled.
127 - *
128 - * This function fills the provided table according the polynomial provided for
129 - * reverse bit order (msb first). Polynomials in CRC algorithms are typically
130 - * represented as shown below.
131 - *
132 - *     poly = x^8 + x^7 + x^6 + x^4 + x^2 + 1
133 - *
134 - * For msb first direction x^7 maps to the msb. So the polynomial is as below.
135 - *
136 - * - msb first: poly = (1)11010101 = 0xD5
137 - */
138 -void crc8_populate_msb(u8 table[CRC8_TABLE_SIZE], u8 polynomial);
139 -
140 -/**
141 - * crc8() - calculate a crc8 over the given input data.
142 - *
143 - * @table:     crc table used for calculation.
144 - * @pdata:     pointer to data buffer.
145 - * @nbytes:    number of bytes in data buffer.
146 - * @crc:       previous returned crc8 value.
147 - *
148 - * The CRC8 is calculated using the polynomial given in crc8_populate_msb()
149 - * or crc8_populate_lsb().
150 - *
151 - * The caller provides the initial value (either %CRC8_INIT_VALUE
152 - * or the previous returned value) to allow for processing of
153 - * discontiguous blocks of data.  When generating the CRC the
154 - * caller is responsible for complementing the final return value
155 - * and inserting it into the byte stream.  When validating a byte
156 - * stream (including CRC8), a final return value of %CRC8_GOOD_VALUE
157 - * indicates the byte stream data can be considered valid.
158 - *
159 - * Reference:
160 - * "A Painless Guide to CRC Error Detection Algorithms", ver 3, Aug 1993
161 - * Williams, Ross N., ross<at>ross.net
162 - * (see URL http://www.ross.net/crc/download/crc_v3.txt).
163 - */
164 -u8 crc8(const u8 table[CRC8_TABLE_SIZE], u8 *pdata, size_t nbytes, u8 crc);
165 -
166 -#endif /* __CRC8_H_ */