There is no need to set this bit in start callback.

Signed-off-by: Alexander Aring <alex.ar...@gmail.com>
---
 drivers/net/ieee802154/at86rf2xx.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ieee802154/at86rf2xx.c 
b/drivers/net/ieee802154/at86rf2xx.c
index 3525931..28d2455 100644
--- a/drivers/net/ieee802154/at86rf2xx.c
+++ b/drivers/net/ieee802154/at86rf2xx.c
@@ -813,13 +813,8 @@ err:
 static int
 at86rf2xx_start(struct ieee802154_dev *dev)
 {
-       struct at86rf2xx_local *lp = dev->priv;
        u8 rc;
 
-       rc = at86rf2xx_write_subreg(lp, SR_RX_SAFE_MODE, 1);
-       if (rc)
-               return rc;
-
        rc = at86rf2xx_state(dev, STATE_TX_ON);
        if (rc)
                return rc;
@@ -1106,6 +1101,10 @@ static int at86rf2xx_hw_init(struct at86rf2xx_local *lp)
        if (rc)
                return rc;
 
+       rc = at86rf2xx_write_subreg(lp, SR_RX_SAFE_MODE, 1);
+       if (rc)
+               return rc;
+
        rc = at86rf2xx_write_subreg(lp, SR_IRQ_MASK, IRQ_TRX_END);
        if (rc)
                return rc;
-- 
2.0.0


------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Linux-zigbee-devel mailing list
Linux-zigbee-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-zigbee-devel

Reply via email to