aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ieee802154
diff options
context:
space:
mode:
authorAlexander Aring <alex.aring@gmail.com>2015-08-27 21:49:18 +0200
committerMarcel Holtmann <marcel@holtmann.org>2015-09-17 13:20:05 +0200
commited4a26b0995baf10807ebb3f18fba3db2c6539fc (patch)
tree438fa2a9edf1775ee394df6e6c9ff78195858206 /drivers/net/ieee802154
parentat86rf230: change trac status check behaviour (diff)
downloadlinux-dev-ed4a26b0995baf10807ebb3f18fba3db2c6539fc.tar.xz
linux-dev-ed4a26b0995baf10807ebb3f18fba3db2c6539fc.zip
at86rf230: interrupt tx with force trx_off
To abort a TX_ARET_BUSY state it's recommended to switch into TRX_OFF state by doing STATE_TRX_FORCE_OFF. This patch will do always a TRX_OFF state change when the transceiver stucks in any state. From TRX_OFF we can switch to the states which are also possible by TX_ON state. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'drivers/net/ieee802154')
-rw-r--r--drivers/net/ieee802154/at86rf230.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/net/ieee802154/at86rf230.c b/drivers/net/ieee802154/at86rf230.c
index 39485d06bea1..1e71a9781f33 100644
--- a/drivers/net/ieee802154/at86rf230.c
+++ b/drivers/net/ieee802154/at86rf230.c
@@ -377,14 +377,6 @@ at86rf230_async_read_reg(struct at86rf230_local *lp, const u8 reg,
}
}
-static inline u8 at86rf230_state_to_force(u8 state)
-{
- if (state == STATE_TX_ON)
- return STATE_FORCE_TX_ON;
- else
- return STATE_FORCE_TRX_OFF;
-}
-
static void
at86rf230_async_state_assert(void *context)
{
@@ -426,7 +418,7 @@ at86rf230_async_state_assert(void *context)
u8 state = ctx->to_state;
if (lp->tx_retry >= AT86RF2XX_MAX_TX_RETRIES)
- state = at86rf230_state_to_force(state);
+ state = STATE_FORCE_TRX_OFF;
lp->tx_retry++;
at86rf230_async_state_change(lp, ctx, state,