Skip to content

Commit

Permalink
mrf24j40: avoid uninitialized byte in SPI transfer to radio.
Browse files Browse the repository at this point in the history
isr function issues SPI read command to mrf to obtain INTSTAT.
SPI transfer is 2 bytes, but value of 2nd byte is not defined.
This had the effect that only the first ISR worked as intended. The
second ISR read incorrect INTSTAT values. Observed on Raspberry PI B+.

Signed-off-by: Walter Mack <wmack@componentsw.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
  • Loading branch information
Walter Mack authored and Marcel Holtmann committed Jul 12, 2016
1 parent 12d8689 commit 3faf564
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/ieee802154/mrf24j40.c
Original file line number Diff line number Diff line change
Expand Up @@ -1054,6 +1054,8 @@ static irqreturn_t mrf24j40_isr(int irq, void *data)
disable_irq_nosync(irq);

devrec->irq_buf[0] = MRF24J40_READSHORT(REG_INTSTAT);
devrec->irq_buf[1] = 0;

/* Read the interrupt status */
ret = spi_async(devrec->spi, &devrec->irq_msg);
if (ret) {
Expand Down

0 comments on commit 3faf564

Please sign in to comment.