mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-21 10:01:57 +00:00
sculpt: refine condition of nic support
A network card can be provided by PCI, and the SoC as well. Therefore, add an additional state variable in the Board_info::Soc, and check it appropriatedly. Issue #5174
This commit is contained in:
parent
47c1e45f28
commit
3b83292205
@ -209,6 +209,7 @@ struct Sculpt::Main : Input_event_handler,
|
|||||||
.usb = false,
|
.usb = false,
|
||||||
.mmc = false,
|
.mmc = false,
|
||||||
.modem = false, /* depends on presence of battery */
|
.modem = false, /* depends on presence of battery */
|
||||||
|
.nic = false,
|
||||||
};
|
};
|
||||||
|
|
||||||
Drivers _drivers { _env, _child_states, *this, *this };
|
Drivers _drivers { _env, _child_states, *this, *this };
|
||||||
|
@ -47,7 +47,7 @@ struct Sculpt::Nic_driver : private Noncopyable
|
|||||||
|
|
||||||
void update(Registry<Child_state> ®istry, Board_info const &board_info)
|
void update(Registry<Child_state> ®istry, Board_info const &board_info)
|
||||||
{
|
{
|
||||||
bool const use_nic = board_info.detected.nic
|
bool const use_nic = (board_info.detected.nic || board_info.soc.nic)
|
||||||
&& board_info.options.nic
|
&& board_info.options.nic
|
||||||
&& !board_info.options.suspending;
|
&& !board_info.options.suspending;
|
||||||
|
|
||||||
|
@ -93,7 +93,7 @@ struct Sculpt::Board_info
|
|||||||
*/
|
*/
|
||||||
struct Soc
|
struct Soc
|
||||||
{
|
{
|
||||||
bool fb, touch, wifi, usb, mmc, modem;
|
bool fb, touch, wifi, usb, mmc, modem, nic;
|
||||||
|
|
||||||
bool operator != (Soc const &other) const
|
bool operator != (Soc const &other) const
|
||||||
{
|
{
|
||||||
|
@ -60,7 +60,7 @@ struct Sculpt::Network_widget : Widget<Frame>
|
|||||||
s.widget(_local, selected);
|
s.widget(_local, selected);
|
||||||
|
|
||||||
if (target.managed() || target.manual_type == Nic_target::WIRED)
|
if (target.managed() || target.manual_type == Nic_target::WIRED)
|
||||||
if (board_info.detected.nic)
|
if (board_info.detected.nic || board_info.soc.nic)
|
||||||
s.widget(_wired, selected);
|
s.widget(_wired, selected);
|
||||||
|
|
||||||
if (target.managed() || target.manual_type == Nic_target::WIFI)
|
if (target.managed() || target.manual_type == Nic_target::WIFI)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user