Re: [PATCHv2 wpan-next 4/6] at86rf230: remove unnecessary tx state change

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 04/29/2015 01:04 PM, Alexander Aring wrote:

> All supported transceivers can do a valid state change from TRX_OFF to
> AACK_ON. This patach removes the state change chain from TRX_OFF ->

s/patach/patch

> TX_ON -> AACK_ON instead we doing a directly state change from TRX_OFF
> to AACK_ON.
>
> Signed-off-by: Alexander Aring <alex.aring@xxxxxxxxx>
> ---
>  drivers/net/ieee802154/at86rf230.c | 16 +++-------------
>  1 file changed, 3 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/net/ieee802154/at86rf230.c b/drivers/net/ieee802154/at86rf230.c
> index f99dce5..6285145 100644
> --- a/drivers/net/ieee802154/at86rf230.c
> +++ b/drivers/net/ieee802154/at86rf230.c
> @@ -781,16 +781,6 @@ at86rf230_tx_on(void *context)
>  }
>  
>  static void
> -at86rf230_tx_trac_error(void *context)
> -{
> -	struct at86rf230_state_change *ctx = context;
> -	struct at86rf230_local *lp = ctx->lp;
> -
> -	at86rf230_async_state_change(lp, ctx, STATE_TX_ON,
> -				     at86rf230_tx_on, true);
> -}
> -
> -static void
>  at86rf230_tx_trac_check(void *context)
>  {
>  	struct at86rf230_state_change *ctx = context;
> @@ -799,12 +789,12 @@ at86rf230_tx_trac_check(void *context)
>  	const u8 trac = (buf[1] & 0xe0) >> 5;
>  
>  	/* If trac status is different than zero we need to do a state change
> -	 * to STATE_FORCE_TRX_OFF then STATE_TX_ON to recover the transceiver
> -	 * state to TX_ON.
> +	 * to STATE_FORCE_TRX_OFF then STATE_RX_AACK_ON to recover the
> +	 * transceiver.
>  	 */
>  	if (trac)
>  		at86rf230_async_state_change(lp, ctx, STATE_FORCE_TRX_OFF,
> -					     at86rf230_tx_trac_error, true);
> +					     at86rf230_tx_on, true);
>  	else
>  		at86rf230_tx_on(context);
>  }

-- 
Varka Bhadram

--
To unsubscribe from this list: send the line "unsubscribe linux-wpan" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux