os/include/nic: API transition (fix 'deprecated' warnings)

...and adaptation of the users of 'Nic::Root' and 'Nic::Session_component'
to the modified interface.

Issue #1987
This commit is contained in:
Christian Prochaska
2017-01-13 16:52:53 +01:00
committed by Norman Feske
parent a63217b216
commit 9be07d2244
14 changed files with 111 additions and 79 deletions

View File

@ -5,7 +5,7 @@
*/
/*
* Copyright (C) 2012-2013 Genode Labs GmbH
* Copyright (C) 2012-2017 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU General Public License version 2.
@ -180,9 +180,11 @@ class Usb_nic::Session_component : public Nic::Session_component
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,
Device *device)
: Nic::Session_component(tx_buf_size, rx_buf_size, rx_block_md_alloc, ram_session, ep),
: Nic::Session_component(tx_buf_size, rx_buf_size, rx_block_md_alloc,
ram_session, region_map, ep),
_device(device)
{ _device->session(this); }
@ -257,7 +259,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.ram(), _env.rm(),
_env.ep(), _device);
}

View File

@ -6,7 +6,7 @@
*/
/*
* Copyright (C) 2012-2016 Genode Labs GmbH
* Copyright (C) 2012-2017 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU General Public License version 2.
@ -92,8 +92,10 @@ class Wifi_session_component : public Nic::Session_component
Genode::size_t const rx_buf_size,
Genode::Allocator &rx_block_md_alloc,
Genode::Ram_session &ram_session,
Genode::Region_map &region_map,
Server::Entrypoint &ep, net_device *ndev)
: Session_component(tx_buf_size, rx_buf_size, rx_block_md_alloc, ram_session, ep),
: Session_component(tx_buf_size, rx_buf_size, rx_block_md_alloc,
ram_session, region_map, ep),
_ndev(ndev)
{
_ndev->lx_nic_device = this;
@ -198,7 +200,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.ram(), _env.rm(),
_env.ep(), device);
return session;
}