diff options
| author | Dario Nieuwenhuis <[email protected]> | 2023-07-28 13:47:49 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-07-28 13:47:49 +0000 |
| commit | d752a3f9808ec9be64c720d3f80f152f0b7507df (patch) | |
| tree | e60ba0f545a7377f3c377c7397e5b48f693c9a8e | |
| parent | 3690af9bea5968653780d296146a91c63994d89d (diff) | |
| parent | 973b152375d8ace2c247c602d39aea7b01fb636e (diff) | |
Merge pull request #1702 from rubdos/ieee802154-fixes
Allow ethernet and 802.15.4 to coexist
| -rwxr-xr-x | ci.sh | 2 | ||||
| -rw-r--r-- | embassy-net/src/lib.rs | 10 |
2 files changed, 8 insertions, 4 deletions
| @@ -27,6 +27,8 @@ cargo batch \ | |||
| 27 | --- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,dhcpv4,medium-ethernet,nightly \ | 27 | --- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,dhcpv4,medium-ethernet,nightly \ |
| 28 | --- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,dhcpv4,medium-ethernet,unstable-traits,nightly \ | 28 | --- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,dhcpv4,medium-ethernet,unstable-traits,nightly \ |
| 29 | --- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv6,medium-ethernet \ | 29 | --- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv6,medium-ethernet \ |
| 30 | --- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv6,medium-ieee802154 \ | ||
| 31 | --- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv6,medium-ethernet,medium-ieee802154 \ | ||
| 30 | --- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv6,medium-ethernet,unstable-traits \ | 32 | --- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv6,medium-ethernet,unstable-traits \ |
| 31 | --- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv6,medium-ethernet,nightly \ | 33 | --- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv6,medium-ethernet,nightly \ |
| 32 | --- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv6,medium-ethernet,unstable-traits,nightly \ | 34 | --- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv6,medium-ethernet,unstable-traits,nightly \ |
diff --git a/embassy-net/src/lib.rs b/embassy-net/src/lib.rs index 81c751a2c..3f9150168 100644 --- a/embassy-net/src/lib.rs +++ b/embassy-net/src/lib.rs | |||
| @@ -32,12 +32,14 @@ pub use smoltcp::iface::MulticastError; | |||
| 32 | use smoltcp::iface::{Interface, SocketHandle, SocketSet, SocketStorage}; | 32 | use smoltcp::iface::{Interface, SocketHandle, SocketSet, SocketStorage}; |
| 33 | #[cfg(feature = "dhcpv4")] | 33 | #[cfg(feature = "dhcpv4")] |
| 34 | use smoltcp::socket::dhcpv4::{self, RetryConfig}; | 34 | use smoltcp::socket::dhcpv4::{self, RetryConfig}; |
| 35 | #[cfg(feature = "medium-ethernet")] | ||
| 36 | pub use smoltcp::wire::EthernetAddress; | ||
| 37 | #[cfg(any(feature = "medium-ethernet", feature = "medium-ieee802154"))] | ||
| 38 | pub use smoltcp::wire::HardwareAddress; | ||
| 35 | #[cfg(feature = "udp")] | 39 | #[cfg(feature = "udp")] |
| 36 | pub use smoltcp::wire::IpListenEndpoint; | 40 | pub use smoltcp::wire::IpListenEndpoint; |
| 37 | #[cfg(feature = "medium-ethernet")] | ||
| 38 | pub use smoltcp::wire::{EthernetAddress, HardwareAddress}; | ||
| 39 | #[cfg(feature = "medium-ieee802154")] | 41 | #[cfg(feature = "medium-ieee802154")] |
| 40 | pub use smoltcp::wire::{HardwareAddress, Ieee802154Address}; | 42 | pub use smoltcp::wire::{Ieee802154Address, Ieee802154Frame}; |
| 41 | pub use smoltcp::wire::{IpAddress, IpCidr, IpEndpoint}; | 43 | pub use smoltcp::wire::{IpAddress, IpCidr, IpEndpoint}; |
| 42 | #[cfg(feature = "proto-ipv4")] | 44 | #[cfg(feature = "proto-ipv4")] |
| 43 | pub use smoltcp::wire::{Ipv4Address, Ipv4Cidr}; | 45 | pub use smoltcp::wire::{Ipv4Address, Ipv4Cidr}; |
| @@ -583,7 +585,7 @@ impl SocketStack { | |||
| 583 | impl<D: Driver + 'static> Inner<D> { | 585 | impl<D: Driver + 'static> Inner<D> { |
| 584 | #[cfg(feature = "proto-ipv4")] | 586 | #[cfg(feature = "proto-ipv4")] |
| 585 | fn apply_config_v4(&mut self, s: &mut SocketStack, config: StaticConfigV4) { | 587 | fn apply_config_v4(&mut self, s: &mut SocketStack, config: StaticConfigV4) { |
| 586 | #[cfg(feature = "medium-ethernet")] | 588 | #[cfg(any(feature = "medium-ethernet", feature = "medium-ieee802154"))] |
| 587 | let medium = self.device.capabilities().medium; | 589 | let medium = self.device.capabilities().medium; |
| 588 | 590 | ||
| 589 | debug!("Acquired IP configuration:"); | 591 | debug!("Acquired IP configuration:"); |
