Date:2011-07-07 15:15:31 (9 years 2 months ago)
Author:Werner Almesberger
Commit:e21c6ed8f48f10726f75d5f02f57f2a3c510e15a
Message:at86rf230: we may be in BUSY_RX after commanding RX_ON

Checking arrival in RX_ON races with incoming traffic. If frame
reception begins before we have a chance to see that we've arrived
in RX_ON, at86rf230_state complains about unexpectedly finding the
transceiver in BUSY_RX.

This isn't the prettiest solution (and it doesn't check if we're
in BUSY_RX before even commanding the change, although I think
this shouldn't happen), but it makes the problem go away.

Signed-off-by: Werner Almesberger <werner@almesberger.net>
Files: drivers/ieee802154/at86rf230.c (1 diff)

Change Details

drivers/ieee802154/at86rf230.c
322322
323323    if (val == desired_status)
324324        return 0;
325    if (state == STATE_RX_ON && val == STATE_BUSY_RX)
326        return 0;
325327
326328    pr_err("%s unexpected state change: %d, asked for %d\n", __func__,
327329            val, state);

Archive Download the corresponding diff file



interactive