nic: remove usage of deprecated env()

This commit includes changes to the Nic::Session_component interface.
We now pass the entire env to the component instead of only ram, rm and
the ep because we need the env to open connections from within the
Session_component implemenation. So far only the cadence_gem driver
needs this, though.

Issue #2280.
This commit is contained in:
Josef Söntgen
2017-02-13 20:51:27 +01:00
committed by Christian Helmuth
parent e6e1d8c144
commit 15821e32ec
28 changed files with 112 additions and 127 deletions

View File

@ -179,12 +179,9 @@ class Usb_nic::Session_component : public Nic::Session_component
Session_component(Genode::size_t const tx_buf_size,
Genode::size_t const rx_buf_size,
Genode::Allocator &rx_block_md_alloc,
Genode::Ram_session &ram_session,
Genode::Region_map &region_map,
Genode::Entrypoint &ep,
Genode::Env &env,
Device *device)
: Nic::Session_component(tx_buf_size, rx_buf_size, rx_block_md_alloc,
ram_session, region_map, ep),
: Nic::Session_component(tx_buf_size, rx_buf_size, rx_block_md_alloc, env),
_device(device)
{ _device->session(this); }
@ -258,9 +255,7 @@ class Root : public Root_component
return new (Root::md_alloc())
Usb_nic::Session_component(tx_buf_size, rx_buf_size,
Lx::Malloc::mem(),
_env.ram(), _env.rm(),
_env.ep(), _device);
Lx::Malloc::mem(), _env, _device);
}
public:

View File

@ -90,11 +90,8 @@ class Wifi_session_component : public Nic::Session_component
Wifi_session_component(Genode::size_t const tx_buf_size,
Genode::size_t const rx_buf_size,
Genode::Allocator &rx_block_md_alloc,
Genode::Ram_session &ram_session,
Genode::Region_map &region_map,
Genode::Entrypoint &ep, net_device *ndev)
: Session_component(tx_buf_size, rx_buf_size, rx_block_md_alloc,
ram_session, region_map, ep),
Genode::Env &env, net_device *ndev)
: Session_component(tx_buf_size, rx_buf_size, rx_block_md_alloc, env),
_ndev(ndev)
{
_ndev->lx_nic_device = this;
@ -198,9 +195,7 @@ class Root : public Genode::Root_component<Wifi_session_component,
session = new (md_alloc())
Wifi_session_component(tx_buf_size, rx_buf_size,
*md_alloc(),
_env.ram(), _env.rm(),
_env.ep(), device);
*md_alloc(), _env, device);
return session;
}