Skip to content

Commit b7bafef

Browse files
committed
From smoltcp mac address impls
1 parent 57cb8c9 commit b7bafef

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/mac/frame_filtering/mod.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,20 @@ impl defmt::Format for Mac {
315315
}
316316
}
317317

318+
#[cfg(feature = "smoltcp-phy")]
319+
impl From<smoltcp::wire::EthernetAddress> for Mac {
320+
fn from(value: smoltcp::wire::EthernetAddress) -> Self {
321+
Self::new(value.0)
322+
}
323+
}
324+
325+
#[cfg(feature = "smoltcp-phy")]
326+
impl From<Mac> for smoltcp::wire::EthernetAddress {
327+
fn from(value: Mac) -> Self {
328+
smoltcp::wire::EthernetAddress::from_bytes(&value.0)
329+
}
330+
}
331+
318332
#[derive(Debug, Clone, Copy)]
319333
/// The type of an address filter.
320334
pub enum AddressFilterType {

0 commit comments

Comments
 (0)