Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove array-macro dependency #253

Merged
merged 1 commit into from
Oct 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ pcnet = []
[dependencies]
acpi = "4.0.0"
aml = "0.16.0"
array-macro = "2.1.0"
base64 = { version = "0.13.0", default-features = false }
bit_field = "0.10.0"
bootloader = { version = "0.9.19", features = ["map_physical_memory"] }
Expand Down
5 changes: 2 additions & 3 deletions src/sys/net/pcnet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ use crate::sys::net::Stats;
use alloc::collections::BTreeMap;
use alloc::sync::Arc;
use alloc::vec::Vec;
use array_macro::array;
use bit_field::BitField;
use core::sync::atomic::{AtomicUsize, Ordering};
use smoltcp::Result;
Expand Down Expand Up @@ -155,8 +154,8 @@ impl PCNET {
stats: Stats::new(),
ports: Ports::new(io_base),
eth_addr: None,
rx_buffers: array![PhysBuf::new(MTU); RX_BUFFERS_COUNT],
tx_buffers: array![PhysBuf::new(MTU); TX_BUFFERS_COUNT],
rx_buffers: [(); RX_BUFFERS_COUNT].map(|_| PhysBuf::new(MTU)),
tx_buffers: [(); TX_BUFFERS_COUNT].map(|_| PhysBuf::new(MTU)),
rx_des: PhysBuf::new(RX_BUFFERS_COUNT * DE_LEN),
tx_des: PhysBuf::new(TX_BUFFERS_COUNT * DE_LEN),
rx_id: Arc::new(AtomicUsize::new(0)),
Expand Down
3 changes: 1 addition & 2 deletions src/sys/net/rtl8139.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ use crate::sys::allocator::PhysBuf;
use crate::sys::net::Stats;
use alloc::collections::BTreeMap;
use alloc::vec::Vec;
use array_macro::array;
use core::convert::TryInto;
use smoltcp::iface::{EthernetInterfaceBuilder, NeighborCache, Routes};
use smoltcp::phy;
Expand Down Expand Up @@ -157,7 +156,7 @@ impl RTL8139 {
rx_buffer: PhysBuf::new(RX_BUFFER_LEN + MTU),

rx_offset: 0,
tx_buffers: array![PhysBuf::new(TX_BUFFER_LEN); TX_BUFFERS_COUNT],
tx_buffers: [(); TX_BUFFERS_COUNT].map(|_| PhysBuf::new(TX_BUFFER_LEN)),

// Before a transmission begin the id is incremented,
// so the first transimission will start at 0.
Expand Down