From: Alexander Aring <alex.aring@gmail.com>
To: linux-wpan@vger.kernel.org
Cc: kernel@pengutronix.de, Alexander Aring <alex.aring@gmail.com>
Subject: [PATCH bluetooth-next 2/4] at86rf230: interrupt tx with force trx_off
Date: Thu, 27 Aug 2015 21:49:18 +0200 [thread overview]
Message-ID: <1440704960-10515-3-git-send-email-alex.aring@gmail.com> (raw)
In-Reply-To: <1440704960-10515-1-git-send-email-alex.aring@gmail.com>
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>
---
drivers/net/ieee802154/at86rf230.c | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/drivers/net/ieee802154/at86rf230.c b/drivers/net/ieee802154/at86rf230.c
index 39485d0..1e71a97 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,
--
2.5.0
next prev parent reply other threads:[~2015-08-27 19:49 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-27 19:49 [PATCH bluetooth-next 0/4] at86rf230: trac debugfs support Alexander Aring
2015-08-27 19:49 ` [PATCH bluetooth-next 1/4] at86rf230: change trac status check behaviour Alexander Aring
2015-08-28 8:11 ` Stefan Schmidt
2015-08-27 19:49 ` Alexander Aring [this message]
2015-08-28 8:11 ` [PATCH bluetooth-next 2/4] at86rf230: interrupt tx with force trx_off Stefan Schmidt
2015-08-27 19:49 ` [PATCH bluetooth-next 3/4] at86rf230: add debugfs support Alexander Aring
2015-08-28 8:14 ` Stefan Schmidt
2015-08-27 19:49 ` [PATCH bluetooth-next 4/4] at86rf230: detailed edge triggered irq warning Alexander Aring
2015-08-28 8:15 ` Stefan Schmidt
2015-08-28 8:18 ` [PATCH bluetooth-next 0/4] at86rf230: trac debugfs support Stefan Schmidt
2015-09-03 14:31 ` Marcel Holtmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1440704960-10515-3-git-send-email-alex.aring@gmail.com \
--to=alex.aring@gmail.com \
--cc=kernel@pengutronix.de \
--cc=linux-wpan@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.