mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-03 00:54:09 +08:00
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>
This commit is contained in:
parent
1d15d6b5b9
commit
6bd2b132bf
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user