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)
commite757201b8d66b02ed0ff90e5e9c7b8f3143ebfe7
tree23e24586b627d3703460f10351c65dcaae28a9e4
parent9b60fa4a876624f9b57db89ac8fc02b5fcc4f42e
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