diff options
author | Walter Mack <wmack@componentsw.com> | 2016-07-12 03:02:16 (GMT) |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2016-07-12 09:54:53 (GMT) |
commit | 3faf56437239326113a3c4b99ab8204e2b09c2e4 (patch) | |
tree | 0dc7508fbc51b3931c81e5e5b5bf48f37604ebf0 /drivers/net/ieee802154 | |
parent | 12d868964f7352e8b18e755488f7265a93431de1 (diff) | |
download | linux-3faf56437239326113a3c4b99ab8204e2b09c2e4.tar.xz |
mrf24j40: avoid uninitialized byte in SPI transfer to radio.
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>
Diffstat (limited to 'drivers/net/ieee802154')
-rw-r--r-- | drivers/net/ieee802154/mrf24j40.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ieee802154/mrf24j40.c b/drivers/net/ieee802154/mrf24j40.c index f446db8..7b131f8 100644 --- a/drivers/net/ieee802154/mrf24j40.c +++ b/drivers/net/ieee802154/mrf24j40.c @@ -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) { |