]> 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)
commit5580aeb5001911900189ee749a449229cd34ca06
tree23e24586b627d3703460f10351c65dcaae28a9e4
parent892c0ce8513beb9670057a6a1f3c7e7923858b52
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