diff --git a/embassy-net-driver/src/lib.rs b/embassy-net-driver/src/lib.rs index ab17d190..b64c1000 100644 --- a/embassy-net-driver/src/lib.rs +++ b/embassy-net-driver/src/lib.rs @@ -12,6 +12,8 @@ pub enum HardwareAddress { Ethernet([u8; 6]), /// An eight-octet IEEE802.15.4 address Ieee802154([u8; 8]), + /// Indicates that a Driver is IP-native, and has no hardware address + Ip, } /// Main `embassy-net` driver API. diff --git a/embassy-net/src/lib.rs b/embassy-net/src/lib.rs index 7587b46f..746acae4 100644 --- a/embassy-net/src/lib.rs +++ b/embassy-net/src/lib.rs @@ -236,6 +236,8 @@ fn to_smoltcp_hardware_address(addr: driver::HardwareAddress) -> HardwareAddress driver::HardwareAddress::Ethernet(eth) => HardwareAddress::Ethernet(EthernetAddress(eth)), #[cfg(feature = "medium-ieee802154")] driver::HardwareAddress::Ieee802154(ieee) => HardwareAddress::Ieee802154(Ieee802154Address::Extended(ieee)), + #[cfg(feature = "medium-ip")] + driver::HardwareAddress::Ip => HardwareAddress::Ip, #[allow(unreachable_patterns)] _ => panic!("Unsupported address {:?}. Make sure to enable medium-ethernet or medium-ieee802154 in embassy-net's Cargo features.", addr),