The RF2xy chips can be taken to RX_ON only from a certain set of states.
If the chip is running, we can always enter TRX_OFF, though, so first
enter TRX_OFF and then RX_ON.

This also fixes a bug I've experienced, in which my RF212 radio would
only receive packets after a wpan device on the radio was taken up,
down, and up again.

Signed-off-by: Phoebe Buckheister <phoebe.buckheis...@itwm.fraunhofer.de>
---
 drivers/net/ieee802154/at86rf230.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/ieee802154/at86rf230.c 
b/drivers/net/ieee802154/at86rf230.c
index d88c586..b54661e 100644
--- a/drivers/net/ieee802154/at86rf230.c
+++ b/drivers/net/ieee802154/at86rf230.c
@@ -570,6 +570,10 @@ at86rf230_start(struct ieee802154_dev *dev)
        if (rc)
                return rc;
 
+       rc = at86rf230_state(dev, STATE_FORCE_TRX_OFF);
+       if (rc)
+               return rc;
+
        return at86rf230_state(dev, STATE_RX_ON);
 }
 
-- 
1.7.9.5


------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
_______________________________________________
Linux-zigbee-devel mailing list
Linux-zigbee-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-zigbee-devel

Reply via email to