Skip to content

Commit

Permalink
nrf52840: ieee802154: better error check on busy
Browse files Browse the repository at this point in the history
Co-authored-by: Tyler Potyondy <77175673+tyler-potyondy@users.noreply.github.com>
  • Loading branch information
bradjc and tyler-potyondy committed May 23, 2024
1 parent 7ad872d commit f722b2d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions chips/nrf52840/src/ieee802154_radio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1351,9 +1351,7 @@ impl<'a> kernel::hil::radio::RadioData<'a> for Radio<'a> {
) -> Result<(), (ErrorCode, &'static mut [u8])> {
if self.state.get() == RadioState::OFF {
return Err((ErrorCode::OFF, buf));
} else if self.tx_buf.is_some() {
// tx_buf is only occupied when a transmission is underway. This
// check insures we do not interrupt an ongoing transmission.
} else if self.busy() {
return Err((ErrorCode::BUSY, buf));
} else if buf.len() < radio::PSDU_OFFSET + frame_len + radio::MFR_SIZE {
// Not enough room for CRC
Expand Down

0 comments on commit f722b2d

Please sign in to comment.