We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 7c22c31 + ba6d227 commit f811713Copy full SHA for f811713
2 files changed
src/dma/tx/descriptor.rs
@@ -135,7 +135,9 @@ impl TxDescriptor {
135
fn set_buffer1_len(&mut self, len: usize) {
136
unsafe {
137
self.desc.modify(1, |w| {
138
- (w & !TXDESC_1_TBS_MASK) | ((len as u32) << TXDESC_1_TBS_SHIFT)
+ let masked_len = w & !TXDESC_1_TBS_MASK;
139
+ let with_len = masked_len | ((len as u32) << TXDESC_1_TBS_SHIFT);
140
+ with_len
141
});
142
}
143
src/dma/tx/mod.rs
@@ -80,7 +80,7 @@ impl<'ring> TxRing<'ring> {
80
81
/// If this returns `true`, the next `send` will succeed.
82
pub fn next_entry_available(&self) -> bool {
83
- !self.entries[self.next_entry].is_available()
+ self.entries[self.next_entry].is_available()
84
85
86
/// Check if we can send the next TX entry.
0 commit comments