diff --git a/embassy-stm32-wpan/src/mac/control.rs b/embassy-stm32-wpan/src/mac/control.rs index ded41920..8a13de81 100644 --- a/embassy-stm32-wpan/src/mac/control.rs +++ b/embassy-stm32-wpan/src/mac/control.rs @@ -34,8 +34,8 @@ impl<'a> Control<'a> { where T: MacCommand, { - let _wm = self.runner.write_mutex.lock().await; let rm = self.runner.read_mutex.lock().await; + let _wm = self.runner.write_mutex.lock().await; let token = EventToken::new(self.runner, rm); self.runner.mac_subsystem.send_command(cmd).await?; diff --git a/embassy-stm32-wpan/src/mac/responses.rs b/embassy-stm32-wpan/src/mac/responses.rs index 9c407a36..544fdaae 100644 --- a/embassy-stm32-wpan/src/mac/responses.rs +++ b/embassy-stm32-wpan/src/mac/responses.rs @@ -87,7 +87,7 @@ impl ParseableMacEvent for GtsConfirm {} #[cfg_attr(feature = "defmt", derive(defmt::Format))] pub struct ResetConfirm { /// The result of the reset operation - status: MacStatus, + pub status: MacStatus, /// byte stuffing to keep 32 bit alignment a_stuffing: [u8; 3], } @@ -101,7 +101,7 @@ impl ParseableMacEvent for ResetConfirm {} #[cfg_attr(feature = "defmt", derive(defmt::Format))] pub struct RxEnableConfirm { /// Result of the request to enable or disable the receiver - status: MacStatus, + pub status: MacStatus, /// byte stuffing to keep 32 bit alignment a_stuffing: [u8; 3], } @@ -197,7 +197,7 @@ impl ParseableMacEvent for DpsConfirm {} #[cfg_attr(feature = "defmt", derive(defmt::Format))] pub struct SoundingConfirm { /// Results of the sounding measurement - sounding_list: [u8; MAX_SOUNDING_LIST_SUPPORTED], + pub sounding_list: [u8; MAX_SOUNDING_LIST_SUPPORTED], status: u8, } diff --git a/embassy-stm32-wpan/src/mac/runner.rs b/embassy-stm32-wpan/src/mac/runner.rs index 482321b9..1be6df8a 100644 --- a/embassy-stm32-wpan/src/mac/runner.rs +++ b/embassy-stm32-wpan/src/mac/runner.rs @@ -95,7 +95,7 @@ impl<'a> Runner<'a> { .await .unwrap(); - msdu_handle += 1; + msdu_handle = msdu_handle.wrapping_add(1); // The tx channel should always be of equal capacity to the tx_buf channel self.tx_buf_channel.try_send(buf).unwrap();