Commit 6bd2b132 authored by Alexander Aring's avatar Alexander Aring Committed by David S. Miller

at86rf230: move RX_SAFE_MODE setting to hw_init

There is no need to set this bit in start callback which could be
called more than once.
Signed-off-by: default avatarAlexander Aring <alex.aring@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1d15d6b5
...@@ -1010,13 +1010,8 @@ at86rf230_state(struct ieee802154_dev *dev, int state) ...@@ -1010,13 +1010,8 @@ at86rf230_state(struct ieee802154_dev *dev, int state)
static int static int
at86rf230_start(struct ieee802154_dev *dev) at86rf230_start(struct ieee802154_dev *dev)
{ {
struct at86rf230_local *lp = dev->priv;
u8 rc; u8 rc;
rc = at86rf230_write_subreg(lp, SR_RX_SAFE_MODE, 1);
if (rc)
return rc;
rc = at86rf230_state(dev, STATE_TX_ON); rc = at86rf230_state(dev, STATE_TX_ON);
if (rc) if (rc)
return rc; return rc;
...@@ -1300,6 +1295,10 @@ static int at86rf230_hw_init(struct at86rf230_local *lp) ...@@ -1300,6 +1295,10 @@ static int at86rf230_hw_init(struct at86rf230_local *lp)
if (rc) if (rc)
return rc; return rc;
rc = at86rf230_write_subreg(lp, SR_RX_SAFE_MODE, 1);
if (rc)
return rc;
rc = at86rf230_write_subreg(lp, SR_IRQ_MASK, IRQ_TRX_END); rc = at86rf230_write_subreg(lp, SR_IRQ_MASK, IRQ_TRX_END);
if (rc) if (rc)
return rc; return rc;
......
Markdown is supported
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