-
Notifications
You must be signed in to change notification settings - Fork 2.1k
at86rf2xx: Dead lock when sending while receiving #8242
Copy link
Copy link
Open
Labels
Area: driversArea: Device driversArea: Device driversArea: networkArea: NetworkingArea: NetworkingCommunity: help wantedThe contributors require help from other members of the communityThe contributors require help from other members of the communityImpact: majorThe PR changes a significant part of the code base. It should be reviewed carefullyThe PR changes a significant part of the code base. It should be reviewed carefullyType: bugThe issue reports a bug / The PR fixes a bug (including spelling errors)The issue reports a bug / The PR fixes a bug (including spelling errors)
Description
The at86rf2xx driver doesn't check the current state when sending. Therefor it is possible, that a deadlock occurs. at86rf2xx_tx_prepare tries to set the state to AT86RF2XX_STATE_TX_ARET_ON, however, if the receiver is currently in BUSY_RX state, the idle_state will be set accordingly.
The send afterwards is still successful, however, the idle_state is wrong. The _isr method of at86rf2xx_netdev.c will set the idle_state afterwards, however it will never be reached and this results in a dead lock.
I will provide a fix shortly: Add busy waiting before sending / switching states.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Area: driversArea: Device driversArea: Device driversArea: networkArea: NetworkingArea: NetworkingCommunity: help wantedThe contributors require help from other members of the communityThe contributors require help from other members of the communityImpact: majorThe PR changes a significant part of the code base. It should be reviewed carefullyThe PR changes a significant part of the code base. It should be reviewed carefullyType: bugThe issue reports a bug / The PR fixes a bug (including spelling errors)The issue reports a bug / The PR fixes a bug (including spelling errors)