Commit 2168746c authored by Alexander Aring's avatar Alexander Aring Committed by David S. Miller
Browse files

at86rf230: fix __at86rf230_read_subreg function

The __at86rf230_read_subreg function don't mask and shift register
contents which it should do. This patch adds the necessary masks and
shift operations in this function.

Since we have csma support this can make some trouble on state changes.
Since CSMA support turned on some bits in the TRX_STATUS register that
used to be zero, not masking broke checking of the TRX_STATUS field
after commanding a state change.
Signed-off-by: default avatarAlexander Aring <>
Reviewed-by: default avatarWerner Almesberger <>
Signed-off-by: default avatarDavid S. Miller <>
parent bb78864a
......@@ -365,7 +365,7 @@ __at86rf230_read_subreg(struct at86rf230_local *lp,
dev_vdbg(&lp->spi->dev, "buf[1] = %02x\n", buf[1]);
if (status == 0)
*data = buf[1];
*data = (buf[1] & mask) >> shift;
return status;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment