aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ieee802154
diff options
context:
space:
mode:
authorAlexander Aring <alex.aring@gmail.com>2014-07-03 00:20:49 +0200
committerDavid S. Miller <davem@davemloft.net>2014-07-07 21:29:25 -0700
commit6bd2b132bfbaea46abbcc65f1be57709b2fb601a (patch)
tree9493292261b280336ab4c37bd9916e485ae72e97 /drivers/net/ieee802154
parentat86rf230: rework transmit and receive handling (diff)
downloadlinux-dev-6bd2b132bfbaea46abbcc65f1be57709b2fb601a.tar.xz
linux-dev-6bd2b132bfbaea46abbcc65f1be57709b2fb601a.zip
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: Alexander Aring <alex.aring@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ieee802154')
-rw-r--r--drivers/net/ieee802154/at86rf230.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/net/ieee802154/at86rf230.c b/drivers/net/ieee802154/at86rf230.c
index 39c3c117340d..492fb7e7675d 100644
--- a/drivers/net/ieee802154/at86rf230.c
+++ b/drivers/net/ieee802154/at86rf230.c
@@ -1010,13 +1010,8 @@ err:
static int
at86rf230_start(struct ieee802154_dev *dev)
{
- struct at86rf230_local *lp = dev->priv;
u8 rc;
- rc = at86rf230_write_subreg(lp, SR_RX_SAFE_MODE, 1);
- if (rc)
- return rc;
-
rc = at86rf230_state(dev, STATE_TX_ON);
if (rc)
return rc;
@@ -1300,6 +1295,10 @@ static int at86rf230_hw_init(struct at86rf230_local *lp)
if (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);
if (rc)
return rc;