mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-23 23:42:32 +00:00
nic_bridge: cache card's MAC address (Fixes #869)
This commit is contained in:
parent
26ba81175b
commit
6484edb657
@ -127,7 +127,8 @@ bool Net::Nic::handle_ip(Ethernet_frame *eth, Genode::size_t size) {
|
||||
|
||||
Net::Nic::Nic()
|
||||
: _tx_block_alloc(Genode::env()->heap()),
|
||||
_nic(&_tx_block_alloc, BUF_SIZE, BUF_SIZE)
|
||||
_nic(&_tx_block_alloc, BUF_SIZE, BUF_SIZE),
|
||||
_mac(_nic.mac_address().addr)
|
||||
{
|
||||
_nic.rx_channel()->sigh_ready_to_ack(_sink_ack);
|
||||
_nic.rx_channel()->sigh_packet_avail(_sink_submit);
|
||||
|
@ -34,16 +34,16 @@ class Net::Nic : public Net::Packet_handler
|
||||
BUF_SIZE = ::Nic::Session::QUEUE_SIZE * PACKET_SIZE,
|
||||
};
|
||||
|
||||
::Nic::Packet_allocator _tx_block_alloc;
|
||||
::Nic::Connection _nic;
|
||||
::Nic::Packet_allocator _tx_block_alloc;
|
||||
::Nic::Connection _nic;
|
||||
Ethernet_frame::Mac_address _mac;
|
||||
|
||||
public:
|
||||
|
||||
Nic();
|
||||
|
||||
::Nic::Connection *nic() { return &_nic; }
|
||||
|
||||
Ethernet_frame::Mac_address mac() { return _nic.mac_address().addr; }
|
||||
::Nic::Connection *nic() { return &_nic; }
|
||||
Ethernet_frame::Mac_address mac() { return _mac; }
|
||||
|
||||
|
||||
/******************************
|
||||
|
Loading…
Reference in New Issue
Block a user