]> git.baikalelectronics.ru Git - kernel.git/commit
wilc1000: Add support for enabling CRC
authorDavid Mosberger-Tang <davidm@egauge.net>
Sat, 27 Feb 2021 17:31:38 +0000 (17:31 +0000)
committerKalle Valo <kvalo@codeaurora.org>
Sat, 17 Apr 2021 17:47:40 +0000 (20:47 +0300)
commit127eb7759617fa71bb1354bd5e892f104fa5a931
tree4e8920a43a45192b35518e83b84d74acb8bb7aaf
parent8fb5f3aace2523e7dae659a9b495787e381c7bd6
wilc1000: Add support for enabling CRC

The driver so far has always disabled CRC protection.  This means any
data corruption that occurrs during the SPI transfers could go
undetected.  This patch adds module parameters enable_crc7 and
enable_crc16 to selectively turn on CRC7 (for command transfers) and
CRC16 (for data transfers), respectively.

The default configuration remains unchanged, with both CRC7 and CRC16
off.

The performance impact of CRC was measured by running ttcp -t four
times in a row on a SAMA5 device:

 CRC7 CRC16 Throughput: Standard deviation:
 ---- ----- ----------- -------------------
  off   off 1720  +/- 48 KB/s
   on   off 1658  +/- 58 KB/s
   on    on 1579  +/- 84 KB/s

Signed-off-by: David Mosberger-Tang <davidm@egauge.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20210227172818.1711071-4-davidm@egauge.net
drivers/net/wireless/microchip/wilc1000/Kconfig
drivers/net/wireless/microchip/wilc1000/spi.c