Skip to content

Commit

Permalink
staging: brcm80211: remove CRC_INNER_LOOP macro
Browse files Browse the repository at this point in the history
With the removal of hndcrc16 and hndcrc32 this macro is not needed
anymore. Also the crc-ccitt library functions provide an equivalent
static inline function for this operation.

Cc: devel@linuxdriverproject.org
Cc: linux-wireless@vger.kernel.org
Cc: Brett Rudley <brudley@broadcom.com>
Cc: Henry Ptasinski <henryp@broadcom.com>
Cc: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Arend van Spriel authored and Greg Kroah-Hartman committed May 3, 2011
1 parent c19cf5d commit 085a5cf
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions drivers/staging/brcm80211/util/bcmutils.c
Original file line number Diff line number Diff line change
Expand Up @@ -564,16 +564,11 @@ static const u8 crc8_table[256] = {
0xF4, 0x03, 0x4D, 0xBA, 0xD1, 0x26, 0x68, 0x9F
};

#define CRC_INNER_LOOP(n, c, x) \
((c) = ((c) >> 8) ^ crc##n##_table[((c) ^ (x)) & 0xff])

u8 hndcrc8(u8 *pdata, /* pointer to array of data to process */
uint nbytes, /* number of input data bytes to process */
u8 crc /* either CRC8_INIT_VALUE or previous return value */
) {
/* hard code the crc loop instead of using CRC_INNER_LOOP macro
* to avoid the undefined and unnecessary (u8 >> 8) operation.
*/
/* loop over the buffer data */
while (nbytes-- > 0)
crc = crc8_table[(crc ^ *pdata++) & 0xff];

Expand Down

0 comments on commit 085a5cf

Please sign in to comment.