Skip to content

Commit 7ef779c

Browse files
ajaykathatclaudiubeznea
authored andcommitted
staging: wilc1000: use correct length for cmd response for SPI
The SPI cmd response length was not set correctly in wilc_spi_special_cmd(). Updated 'resp_len' with the expected length to receive and parse response. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
1 parent 715f42f commit 7ef779c

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

  • drivers/staging/wilc1000

drivers/staging/wilc1000/spi.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -769,6 +769,7 @@ static int wilc_spi_special_cmd(struct wilc *wilc, u8 cmd)
769769
memset(c->u.simple_cmd.addr, 0xFF, 3);
770770

771771
cmd_len = offsetof(struct wilc_spi_cmd, u.simple_cmd.crc);
772+
resp_len = sizeof(*r);
772773

773774
if (!spi_priv->crc_off) {
774775
c->u.simple_cmd.crc[0] = wilc_get_crc7(wb, cmd_len);

0 commit comments

Comments
 (0)