at86rf230: various fixes
Subsystems (3)
cover at86rf230: various fixes
Hi,
I currently working on a big cleanup for the at86rf230 and I detect some bugs in the current implementation. I will send patch stacks if net-next is open again.
It's funny to find the forgotten shift and mask in the __at86rf230_read_subreg function but it only makes trouble if csma is activated that's why it still works before for me.
- Alex
Alexander Aring (2):
at86rf230: remove check if AVDD settled
at86rf230: fix __at86rf230_read_subreg function
drivers/net/ieee802154/at86rf230.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-)
Signature · 9 lines
1.9.2 ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/NeoTech
A message that is not in the archive (sent off-list or not yet received): 1397491606-7290-1-git-send-email-alex.aring-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
PATCH 2/2 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.
--- drivers/net/ieee802154/at86rf230.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ieee802154/at86rf230.c +1 -1
@@ -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; }
Signature · 9 lines
1.9.2 ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/NeoTech
Alexander Aring
maintainerPATCH 1/2 at86rf230: remove check if AVDD settled
In reply to Alexander AringThe AVDD regulator is only settled TX_ON (PLL_ON) state. Since commit 7dcbd22a97eb0689e6c583ad630ae0e7341e34c1 ("ieee802154: ensure that first RF212 state comes from TRX_OFF"). We are in TRX_OFF state at the beginning.
--- drivers/net/ieee802154/at86rf230.c | 8 -------- 1 file changed, 8 deletions(-)
drivers/net/ieee802154/at86rf230.c +0 -8
@@ -1025,14 +1025,6 @@ static int at86rf230_hw_init(struct at86rf230_local *lp)return -EINVAL ; } - rc =at86rf230_read_subreg (lp,SR_AVDD_OK , &status); -if (rc) -return rc; -if (!status) { -dev_err (&lp->spi->dev,"AVDD error\n" ); -return -EINVAL ; - } -return 0 ; }
Signature · 1 line
1.9.2