Commit Graph

1182 Commits

Author SHA1 Message Date
Christian Helmuth
cd6701c483 depot: update recipe hashes 2024-12-11 08:35:22 +01:00
Christian Helmuth
011b44c282 depot: update recipe hashes 2024-11-20 08:58:39 +01:00
Stefan Kalkowski
591aadea54 lx_emul: take usb device lock before resetting it
Fix genodelabs/genode#5381
2024-11-20 08:58:39 +01:00
Alexander Boettcher
188080e15f intel/display: add i915_gem_evict_for_node
When the aperture is close to full or such fragmented, this unimplemented
function may be invoked.

Fixes #5377
2024-11-08 16:45:51 +01:00
Josef Söntgen
7fe7ca1968 driver/wifi: provide best practices in README 2024-11-08 16:11:03 +01:00
Christian Helmuth
30f3ef25ad depot: update recipe hashes 2024-10-30 14:02:44 +01:00
Josef Söntgen
fe93df27d1 driver/wifi: fix invalid network check
This commit alignes the implementation to the intention of dismissing
invalid '<network>' entries. We only accept entries when they contain
a valid SSID and additionally a valid PSK if the network is protected.

Issue #5356.
2024-10-30 08:14:53 +01:00
Stefan Kalkowski
4f084d1f9e lx_emul: unify NIC uplink binding
Fix genodelabs/genode#5361
2024-10-30 08:05:33 +01:00
Sebastian Sumpf
77d53f13ca lx_emul: handle pin controller irqs
Register Global_irq_controller as Device so interrupts get forwarded to
irqchip.c code. Otherwise, pin-controller interrupts will get lost.

Fixed #5363
Related #5356
2024-10-30 08:05:33 +01:00
Josef Söntgen
be70fddbb8 nic/pc: disable IRQ coalescing in R8169 driver
This commit patches the DDE Linux contrib code to remove IRQ coalescing
from the R8169 driver that for reason not yet known leads to interrupts
occurring irregularly.

Issue #5356.
2024-10-15 08:42:03 +02:00
Josef Söntgen
7760116478 linux-firmware: add QCA9377 FW (MNT Pocket Reform)
Issue #5360.
2024-10-11 14:48:01 +02:00
Josef Söntgen
95c439e758 driver/wifi: fix firmware pointer check
Issue #5360.
2024-10-11 14:47:48 +02:00
Josef Söntgen
e0874baa8f
driver/wifi: remove auto_connect attribute
This commit does away with controlling the join-intent via an attribute
but couples it to the existence of a '<network>' node. With this change
all '<network>' nodes within the configuration are always
unconditionally considered for joining.

Issue #5356.
2024-10-08 14:21:20 +02:00
Josef Söntgen
e4d2a4df42
driver/wifi: split hidden network scanning
This commit splits the intent to scan for a hidden network and the
actual configuration of a network itself by introducing
'<explicit_scan>' nodes. Like the '<network>' node these also feature
a 'ssid' attribute and each node is incorporated into the SCAN request
if its SSID is valid.

For more information please consult 'repos/src/driver/wifi/README'.

Issue #5356.
2024-10-08 14:20:56 +02:00
Josef Söntgen
40f2b58098
pc_wifi: use wifi_config.inc helper
Introduce helper that does away with the redundant config generation
snippets.

Issue #5356.
2024-10-08 14:20:22 +02:00
Christian Helmuth
61c9706353 depot: update recipe hashes 2024-10-08 11:30:26 +02:00
Sebastian Sumpf
c27e25b5ca lx_emul: shmem_file.h adapt to folio changes
Everything related to compound pages is gradually removed and replaced
with folios.

issue #5264
2024-10-08 09:09:23 +02:00
Sebastian Sumpf
8530aa7540 lx_emul/start: move lx_emul_setup_arch behind kmem_cache_init
Call lx_emul_setup arch after kmem_cache_init, because
unflatten_device_tree requires 'memblock_alloc' which  does not work
when using native slub.c/memblock.c on ARM platforms.

issue #5264
2024-10-08 09:09:23 +02:00
Josef Söntgen
d4e4b8bf60 driver/wifi: rework CTRL interface manager
This commit streamlines the interaction between the Wifi::Manager
and the wpa_supplicant's CTRL interface.

As user-facing changes it alters some default settings and introduces
new features:

* Every configured network now needs to explicitly have its
  'auto_connect' (to be considered an option for joining) attribute
  set to 'true' whereas this was previously the default value if the
  attribute was not set at all.

* The 'log_level' attribute is added and configures the supplicant's
  verbosity. Valid values correspond to levels used by the supplicant
  and are as follows 'excessive', 'msgdump', 'debug', 'info', 'warning'
  and 'error'. The default value is 'error' and configures the least
  amount of verbosity.

* The 'bgscan' attribute may be used to configure the way the
  supplicant performs background-scanning to steer or rather optimize
  roaming decision within the same network. The default value is set
  to 'simple:30:-70:600'. It can be disabled by specifying an empty
  value, e.g. 'bgscan=""'.

* The 'verbose_state' attribute was removed alltogether and similar
  functionality is now coverted by 'verbose' attribute.

Implementation-wise the internals changed significantly and are
outlined in the following paragraphs.

Formerly the interaction between the manager and the supplicant
was handled in an apparent way where the internal state of each
interaction was in plain sight. This made the flow cumbersome to
follow and therefor each interaction is now confined to its own
'Action' object that encapsulates the ping-pong of commands and
responses between the manager and the supplicant. All actions are
processed in an sequential way and thus there is no longer any
need to defer pending actions depending on the interal state of
the current interaction. Configuration changes as well as events
issued by the supplicant where new actions can be created are
handled in this fashion. Of note are both signal-handlers,
'_handle_cmds' and '_handle_events' respectively.

The state report, which provides the information about the current
state of connectivity to a given wireless network, was dealt with
in the same vein and its handling was spread across the manager
implementation. Again, to make it easier to follow, the generation
of the state report is now purely driven by the 'Join_state' object.
This object encapsulates the state of connectivity and is normally
updated by events issued from the supplicant (see '_handle_events').
It is also incorporated when handling command responses (see
'_handle_cmds').

Handling of timed-actions, like scan and signal quality
update requests, was done by setting a timeout at the Timer session
directly and thus only one timed-action could be pending at any time.
This excluded dealing with timed-actions like connected-scanning
and signal quality polling concurrently. This was changed and now
a One_shot_timeout is used to programm each concurrent timed-action.

For implementing the communication channel for the CTRL interface the
manager and supplicant use a shared memory buffer, the Msg_buffer.
Since the CTRL interface for Genode was implemented using C, some
shenanigans were performed to access the memory buffer. Now the
CTRL interface implementation uses C++ and only exports the functions
required by the supplicant as C. This simplifies the usage of the
Msg_buffer and allows for removing the global functions needed for
synchronizing the Msg_buffer access as those are now part of the
object itself via the 'Notify_interface'.

Fixes #5341.
2024-10-08 09:09:22 +02:00
Josef Söntgen
6b474e059c wpa_supplicant: update to version 2.11
Issue #5341.
2024-10-07 15:54:59 +02:00
Josef Söntgen
42dae6e570 lib/wifi: make errno conversion function public
The 'convert_errno_from_linux' function was already used internally to
convert the Linux errno values to the matching FreeBSD libc ones when
calling socket functions.

It will now also be used to convert the error values included in
netlink messages as those, naturally, also correspond to the Linux
ones.

Issue #5341.
2024-10-07 15:54:59 +02:00
Christian Helmuth
26002a5482 depot: update recipe hashes 2024-08-29 12:32:25 +02:00
Sebastian Sumpf
1446da8aec lx_emul: add 'wake_q_add_safe' implementation
Enable 'wake_q_add_safe' for 6.6 based Linux versions and remove it from
generated_dummies.c of affected drivers.

issue #5264
2024-08-27 15:33:32 +02:00
Josef Söntgen
e363af476b pc_wifi: update to Linux 6.6.47
Issue #5264
2024-08-27 15:33:32 +02:00
Sebastian Sumpf
653dfed0c5 wireguard: update to 6.6.47
Issue #5264
2024-08-27 15:33:32 +02:00
Sebastian Sumpf
189fb008b3 test/driver_time: update to 6.6.47
Issue #5264
2024-08-27 15:33:32 +02:00
Sebastian Sumpf
056c755708 usb_net: update to 6.6.47
Issue #5264
2024-08-27 15:33:32 +02:00
Sebastian Sumpf
dbb51786fc usb_hid: update to 6.6.47
Issue #5264
2024-08-27 15:33:31 +02:00
Sebastian Sumpf
2014046f77 lxip: update to 6.6.47
Now, we schedule before unblocking the rx_task. This is done in order to
execute a potentially ready ksoftirqd before unblocking the rx_task,
which in turn may execute soft-interrupt handlers through bottom half
code leading to double lock attempts of the socket spinlock.

Issue #5264
2024-08-27 15:33:31 +02:00
Sebastian Sumpf
92b34837cb lx_emul: adjust to Linux 6.6.47
Issue #5264
2024-08-27 15:33:31 +02:00
Sebastian Sumpf
bb214af3eb virt_linux: update to 6.6.47
Issue #5264
2024-08-27 15:33:31 +02:00
Sebastian Sumpf
40009986ee dde_linux: Linux 6.6.47 port
Issue #5264
2024-08-27 15:33:31 +02:00
Sebastian Sumpf
4a7a4cfac5 dde_linux: move linux.port to legacy_linux.port
This is prerequisite for the Linux update. All dependencies relying on
the 'linux' have been adjusted to use 'legacy_linux'.

Issue #5264
2024-08-27 15:33:31 +02:00
Josef Söntgen
2b3a2b875b wifi: fix double free during FW loading
The commit that added firmware loading via the VFS (see #4861)
introduces a double-free bug where the memory that contains the
image is freed twice, once from the callback and once from the
work function.

As alle examined drivers call 'release_firmware' from the callback
function themselves, remove the erroneous 'kfree' call from the
work function.

Issue #5264.
2024-08-27 15:29:37 +02:00
Josef Söntgen
bc64d53a77 driver/wifi: update the connected signal quality
This commit introduces support for querying and updating the signal
quality of the established connection to the current accesspoint.

By setting the 'update_quality_interval' to a non-zero value specified
in seconds the 'state' report will be updated to incorporate the
current signal quality. It uses the same approximation as is already
in use by the scan results.

Fixes #5262.
2024-08-27 15:29:37 +02:00
Stefan Kalkowski
e5c0d5247e simplify interactive USB HID test metric
To circumvent recurring false-positives whenever things
in the USB drivers or its environment changes, limit
the checks to the event listener itself.
2024-08-27 15:29:36 +02:00
Josef Söntgen
6889959f59 linux-firmware: add AX200, 9560 and T430/T530
This commit adds the firmware image for the AX200 device as found
in the Tuxedo Pulse 15 Gen1, the 9560 as found in the Starlite and
the for devices found in the T430/T530.

Fixes #5282.
2024-08-27 15:26:51 +02:00
Christian Helmuth
044d8bca44 dde_linux: improve handling of IRQ masking and ack
Unmasking of a pending interrupt did not lead to immediate IRQ handler
execution in all cases.

This commit also addresses some style concerns risen during the issue
discussion.

- Replace multi-boolean IRQ state by state enum
- EOI and ACK should be same in DDE context
- Unify x86 and ARM irqchip.c
- Remove Pending_irq type
- Remove dde_irq_set_wake()

Fixes #5164
2024-08-27 15:26:51 +02:00
Christian Helmuth
a441bdf59a lx_emul: enable SLUB allocator (pc, virt)
The use of the Linux-internal SLUB allocator is supported by lx_emul and
drivers may now decide between the Linux implementation or our emulation
of kmem_cache. Drivers for pc and virt already use SLUB, while other
drivers still use the emulation and may be adapted step-by-step incl.
the testing on the devices.

Fixes #5236
2024-08-27 15:26:51 +02:00
Christian Helmuth
992b412be2 lx_emul: silently drop KEY_FN in evdev
The Fn key on keyboards should never be reported as real scancode event,
as it is just a hardware switch that changes the reported scancodes of
other keys. The behavior of Linux hid-apple.c is wrong as it on one hand
reports different scancodes for the same hard key depending on the Fn
state but sends the Fn press and release events too. Thus from now on,
we just drop KEY_FN events for all drivers as otherwise, scancodes
generated generated by Fn+key combinations would never be single-key
events on upper layers, for example KEY_FN + KEY_F12 on the Matias Apple
keyboard clone in the fixed issue.

Fixes #5288
2024-08-27 15:24:20 +02:00
Christian Helmuth
62061c5596 wg_fetchurl.run: create data file early (fix linux) 2024-08-27 15:24:20 +02:00
Christian Helmuth
c0f6d9ba7e lx_emul: cache_line_size and cpufeature on arm64
Issue #5236
2024-08-27 15:24:20 +02:00
Norman Feske
19c13877ca Replace use of 'typedef' by 'using'
Issue #5227
2024-07-02 12:00:11 +02:00
Norman Feske
299951ced5 depot: update recipe hashes 2024-06-20 12:59:00 +02:00
Christian Helmuth
65957e024d Transfer 2x16 MiB in wg_fetchurl test 2024-06-20 12:56:20 +02:00
Christian Helmuth
258c06df03 virt/lx_emul: init boot_cpu_data on x86
Values are used by arch/x86/lib/delay.c and slub allocator.

Issue #5236
2024-06-20 12:56:20 +02:00
Johannes Schlatow
16b863fc6e tool/run: use xmlcatalog for xsd file paths
With libxml2 >= 2.13, the `-path` argument can no longer be used for
setting search paths for xsd files. Instead, we use an XML catalog to
replace genode:// URIs with absolute paths.

Fixes #5248
2024-06-20 12:56:20 +02:00
Martin Stein
a450110b97 run/nic_router_uplinks: use test component
So far, this test used dynamic_rom for the re-configuration of the nic router
and tested for the expected ping results by inspecting the log with the run
tool. However, this approach had two issues:

* Timing differs significantly on different targets and so the dynamic_rom had
  the difficult task of compensating with heuristics without bloating the test
  duration too much.

* In case of a failing test, it was difficult to determine the cause as the
  test kept running and produced output for quite some time and there was also
  no specific error message but only a generic timeout.

These two issues are now fixed by introducing a test component that listens to
the ping-result report and manages the nic router configuration. The new
component exits early on failure and provides information on the error
circumstances. Furthermore, the component advances to the next test step only
after having seen the expected result of the active test step and thereby
removes the need for heuristics about target timing.

Fixes #5192
2024-06-20 12:56:19 +02:00
Norman Feske
7de2f57ef2 Remove Xml_node::attribute accessors
This patch removes the two 'Xml_node::attribute' accessors along with
the 'Nonexistent_attribute' exception.

Issue #5245
Fixes #5246
2024-06-20 12:56:19 +02:00
Christian Helmuth
791dd38160 wireguard: clean up build order/structure
- Move C++ sources from lib/wireguard to app/wireguard, which require
  Genode include paths (that conflict with linux)
- Rename lib/wireguard_lx_inc_dirs to lib/wireguard, which builds linux
  sources with linux include paths
2024-06-20 12:54:30 +02:00