Skip to content

Commit ed4a26b

Browse files
alexaringholtmann
authored andcommitted
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>
1 parent 346ce4b commit ed4a26b

1 file changed

Lines changed: 1 addition & 9 deletions

File tree

‎drivers/net/ieee802154/at86rf230.c‎

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -377,14 +377,6 @@ at86rf230_async_read_reg(struct at86rf230_local *lp, const u8 reg,
377377
}
378378
}
379379

380-
static inline u8 at86rf230_state_to_force(u8 state)
381-
{
382-
if (state == STATE_TX_ON)
383-
return STATE_FORCE_TX_ON;
384-
else
385-
return STATE_FORCE_TRX_OFF;
386-
}
387-
388380
static void
389381
at86rf230_async_state_assert(void *context)
390382
{
@@ -426,7 +418,7 @@ at86rf230_async_state_assert(void *context)
426418
u8 state = ctx->to_state;
427419

428420
if (lp->tx_retry >= AT86RF2XX_MAX_TX_RETRIES)
429-
state = at86rf230_state_to_force(state);
421+
state = STATE_FORCE_TRX_OFF;
430422
lp->tx_retry++;
431423

432424
at86rf230_async_state_change(lp, ctx, state,

0 commit comments

Comments
 (0)