]> git.baikalelectronics.ru Git - kernel.git/commit
drivers/net/wireless/ti/wl*/spi.c: Simplify CRC computation
authorGeorge Spelvin <linux@horizon.com>
Sun, 11 May 2014 10:07:43 +0000 (06:07 -0400)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 16 May 2014 18:26:53 +0000 (14:26 -0400)
commitb6a1c574704d5c6fd2e35ce1f33661d0659276f7
tree23e24586b627d3703460f10351c65dcaae28a9e4
parent5d436b2bd715483c5ad8ada139467d9c1e17158d
drivers/net/wireless/ti/wl*/spi.c: Simplify CRC computation

These devices require commands stored in buffers in an odd order,
different from that in which the CRC is computed.

Rather than make two copies of the commands in two different orders,
form the commands in logical (CRC) order, append the CRC, then byte-swap
in place to the desired order.

The old code worked fine, I'm just scratching an "ugh, that's ugly"
itch.

Signed-off-by: George Spelvin <linux@horizon.com>
Reviewed-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ti/wl1251/spi.c
drivers/net/wireless/ti/wlcore/spi.c