aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ieee802154
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ieee802154')
-rw-r--r--drivers/net/ieee802154/at86rf230.c25
1 files changed, 3 insertions, 22 deletions
diff --git a/drivers/net/ieee802154/at86rf230.c b/drivers/net/ieee802154/at86rf230.c
index 20596be61028..345b2eeb5a14 100644
--- a/drivers/net/ieee802154/at86rf230.c
+++ b/drivers/net/ieee802154/at86rf230.c
@@ -926,18 +926,9 @@ static int at86rf230_hw_init(struct at86rf230_local *lp)
926 if (rc) 926 if (rc)
927 return rc; 927 return rc;
928 928
929 dev_info(&lp->spi->dev, "Status: %02x\n", status); 929 rc = at86rf230_write_subreg(lp, SR_TRX_CMD, STATE_FORCE_TRX_OFF);
930 if (status == STATE_P_ON) { 930 if (rc)
931 rc = at86rf230_write_subreg(lp, SR_TRX_CMD, 931 return rc;
932 STATE_FORCE_TRX_OFF);
933 if (rc)
934 return rc;
935 msleep(1);
936 rc = at86rf230_read_subreg(lp, SR_TRX_STATUS, &status);
937 if (rc)
938 return rc;
939 dev_info(&lp->spi->dev, "Status: %02x\n", status);
940 }
941 932
942 /* configure irq polarity, defaults to high active */ 933 /* configure irq polarity, defaults to high active */
943 if (pdata->irq_type & (IRQF_TRIGGER_FALLING | IRQF_TRIGGER_LOW)) 934 if (pdata->irq_type & (IRQF_TRIGGER_FALLING | IRQF_TRIGGER_LOW))
@@ -965,16 +956,6 @@ static int at86rf230_hw_init(struct at86rf230_local *lp)
965 /* Wait the next SLEEP cycle */ 956 /* Wait the next SLEEP cycle */
966 msleep(100); 957 msleep(100);
967 958
968 rc = at86rf230_write_subreg(lp, SR_TRX_CMD, STATE_TX_ON);
969 if (rc)
970 return rc;
971 msleep(1);
972
973 rc = at86rf230_read_subreg(lp, SR_TRX_STATUS, &status);
974 if (rc)
975 return rc;
976 dev_info(&lp->spi->dev, "Status: %02x\n", status);
977
978 rc = at86rf230_read_subreg(lp, SR_DVDD_OK, &status); 959 rc = at86rf230_read_subreg(lp, SR_DVDD_OK, &status);
979 if (rc) 960 if (rc)
980 return rc; 961 return rc;