mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-04 08:17:46 +00:00
wifi: wilc1000: correct CRC7 calculation
Document ATWILC1000/ATWILC3000 Baremetal Wi-Fi/BLE Link Controller Software Design Guide https://tinyurl.com/yer2xhyc says that bit 0 of the CRC7 code must always be a 1. I confirmed that today with a logic analyzer: setting bit 0 causes wilc1000 to accept a command with CRC7 enabled, whereas clearing bit 0 causes wilc1000 to reject the command with a CRC error. Signed-off-by: David Mosberger-Tang <davidm@egauge.net> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20240207050736.2717641-1-davidm@egauge.net
This commit is contained in:
parent
162bf67f74
commit
c08a986344
1 changed files with 1 additions and 1 deletions
|
@ -473,7 +473,7 @@ static int spi_data_write(struct wilc *wilc, u8 *b, u32 sz)
|
|||
********************************************/
|
||||
static u8 wilc_get_crc7(u8 *buffer, u32 len)
|
||||
{
|
||||
return crc7_be(0xfe, buffer, len);
|
||||
return crc7_be(0xfe, buffer, len) | 0x01;
|
||||
}
|
||||
|
||||
static int wilc_spi_single_read(struct wilc *wilc, u8 cmd, u32 adr, void *b,
|
||||
|
|
Loading…
Add table
Reference in a new issue