Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d06c2199 authored by Alexander Aring's avatar Alexander Aring Committed by Marcel Holtmann
Browse files

at86rf230: add missing error handling



This patch adds an async error handling function if sync state change
runs into a timeout. The async error handling function tries to recover
the phy state machine into a valid state.

Signed-off-by: default avatarAlexander Aring <alex.aring@gmail.com>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent 464f0299
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -690,8 +690,10 @@ at86rf230_sync_state_change(struct at86rf230_local *lp, unsigned int state)


	rc = wait_for_completion_timeout(&lp->state_complete,
	rc = wait_for_completion_timeout(&lp->state_complete,
					 msecs_to_jiffies(100));
					 msecs_to_jiffies(100));
	if (!rc)
	if (!rc) {
		at86rf230_async_error(lp, &lp->state, -ETIMEDOUT);
		return -ETIMEDOUT;
		return -ETIMEDOUT;
	}


	return 0;
	return 0;
}
}