aboutsummaryrefslogtreecommitdiff
path: root/embassy-stm32-wpan/src/mac
diff options
context:
space:
mode:
authorxoviat <[email protected]>2023-07-21 17:02:36 -0500
committerxoviat <[email protected]>2023-07-21 17:02:36 -0500
commitf4d6a23f92c8f6d3eb97a09e5bc51bac5e8d6837 (patch)
treead109082d957fced3b0e9a33ba74f3a47ea1da54 /embassy-stm32-wpan/src/mac
parent2cdd593290ea318d0ca9d71a270ac3b63e30470e (diff)
wpan/mac: misc fixes
Diffstat (limited to 'embassy-stm32-wpan/src/mac')
-rw-r--r--embassy-stm32-wpan/src/mac/control.rs2
-rw-r--r--embassy-stm32-wpan/src/mac/responses.rs6
-rw-r--r--embassy-stm32-wpan/src/mac/runner.rs2
3 files changed, 5 insertions, 5 deletions
diff --git a/embassy-stm32-wpan/src/mac/control.rs b/embassy-stm32-wpan/src/mac/control.rs
index ded419203..8a13de81c 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> {
34 where 34 where
35 T: MacCommand, 35 T: MacCommand,
36 { 36 {
37 let _wm = self.runner.write_mutex.lock().await;
38 let rm = self.runner.read_mutex.lock().await; 37 let rm = self.runner.read_mutex.lock().await;
38 let _wm = self.runner.write_mutex.lock().await;
39 let token = EventToken::new(self.runner, rm); 39 let token = EventToken::new(self.runner, rm);
40 40
41 self.runner.mac_subsystem.send_command(cmd).await?; 41 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 9c407a369..544fdaae8 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 {}
87#[cfg_attr(feature = "defmt", derive(defmt::Format))] 87#[cfg_attr(feature = "defmt", derive(defmt::Format))]
88pub struct ResetConfirm { 88pub struct ResetConfirm {
89 /// The result of the reset operation 89 /// The result of the reset operation
90 status: MacStatus, 90 pub status: MacStatus,
91 /// byte stuffing to keep 32 bit alignment 91 /// byte stuffing to keep 32 bit alignment
92 a_stuffing: [u8; 3], 92 a_stuffing: [u8; 3],
93} 93}
@@ -101,7 +101,7 @@ impl ParseableMacEvent for ResetConfirm {}
101#[cfg_attr(feature = "defmt", derive(defmt::Format))] 101#[cfg_attr(feature = "defmt", derive(defmt::Format))]
102pub struct RxEnableConfirm { 102pub struct RxEnableConfirm {
103 /// Result of the request to enable or disable the receiver 103 /// Result of the request to enable or disable the receiver
104 status: MacStatus, 104 pub status: MacStatus,
105 /// byte stuffing to keep 32 bit alignment 105 /// byte stuffing to keep 32 bit alignment
106 a_stuffing: [u8; 3], 106 a_stuffing: [u8; 3],
107} 107}
@@ -197,7 +197,7 @@ impl ParseableMacEvent for DpsConfirm {}
197#[cfg_attr(feature = "defmt", derive(defmt::Format))] 197#[cfg_attr(feature = "defmt", derive(defmt::Format))]
198pub struct SoundingConfirm { 198pub struct SoundingConfirm {
199 /// Results of the sounding measurement 199 /// Results of the sounding measurement
200 sounding_list: [u8; MAX_SOUNDING_LIST_SUPPORTED], 200 pub sounding_list: [u8; MAX_SOUNDING_LIST_SUPPORTED],
201 201
202 status: u8, 202 status: u8,
203} 203}
diff --git a/embassy-stm32-wpan/src/mac/runner.rs b/embassy-stm32-wpan/src/mac/runner.rs
index 482321b95..1be6df8a4 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> {
95 .await 95 .await
96 .unwrap(); 96 .unwrap();
97 97
98 msdu_handle += 1; 98 msdu_handle = msdu_handle.wrapping_add(1);
99 99
100 // The tx channel should always be of equal capacity to the tx_buf channel 100 // The tx channel should always be of equal capacity to the tx_buf channel
101 self.tx_buf_channel.try_send(buf).unwrap(); 101 self.tx_buf_channel.try_send(buf).unwrap();