Commit Graph

239 Commits

Author SHA1 Message Date
Josef Söntgen
ac59b68257 wifi_drv: split front end notification
Issue #3139.
2019-02-12 10:33:15 +01:00
Christian Prochaska
369d60bc21 dde_linux: iterate over PCI devices in ascending BDF order
On a Lenovo ThinkCentre M57p, the system locks up when the UHCI controller
BIOS handoff (disabling bit 4 in the LEGSUP register) for the controller
with PCI BDF 00:1d:2 is attempted before the handoff for the controller
with BDF 00:1a:0.

Fixes #3138
2019-02-12 10:33:15 +01:00
Christian Prochaska
e9e048c4ea dde_linux: fix timer callback compatibility with older drivers
Fixes #3137
2019-02-12 10:33:15 +01:00
Christian Helmuth
845253af3a dde_linux: prevent truncation in update_jiffies()
Before, jiffies wrapped after 2**32 microseconds (71.5 minutes) to 0.
2019-02-12 10:33:15 +01:00
47c6377ac0 Remove libc_lxip
The libc_lxip library is superceded by vfs_lwip.

Fix #2960
Fix #2535
2019-02-12 10:33:14 +01:00
Norman Feske
f23579532e dde_*: remove the use of deprecated APIs
Issue #1987
Issue #3125
2019-01-30 13:49:54 +01:00
Christian Prochaska
e8ea28d897 socket fs: support non-blocking 'connect()'
Fixes #3113
2019-01-30 13:35:28 +01:00
Christian Helmuth
6315e4503e dde_linux: adapt to changes in os/duration.h
The Linux emulation library provides preprocessor macros for min() and
max(), which now clash with implementation in duration.h. So, we disable
those macros in the delay implementation.
2019-01-07 12:25:44 +01:00
a2bdcc68c2 Throw exception for invalid packets at packet streams
Some application code is dereferencing the pointer returned by
'packet_content' at packet streams without checking that it is valid.
Throw an exception rather than return a null pointer, except for
zero-length packets, which have somewhat implicit invalid content and
that we believe to be properly handled in all current cases.

The client-side of a packet stream cannot take corrective action if the
server-side is sending packets with invalid content, but the servers
that provide packet streams should catch this exception to detect
misbehaving clients.

Ref #3059
2018-11-29 11:54:29 +01:00
Christian Helmuth
9ca214eee8 usb: quickfix pointer-emulation for touch screen
Move button-event reporting behind pointer-position update.

This is just a quickfix to restore correct pointer emulation with
dde_linux usb_drv. It does not change usb_hid_drv because the approach
is a questionable workaround of the current input event handling, which
reports events promptly on occurrence of inputs events and ignores
synchronization events completely. The original contrib code reported
the button press before absolute x and y positioning followed by a sync
event.

Issue #3019
2018-10-29 09:36:22 +01:00
Alexander Boettcher
5446c52c43 base: make Entrypoint placeable on specific cpu
Fixes #3008
2018-10-29 09:36:22 +01:00
Christian Prochaska
9c6120ccad usb_drv: call 'mod_timer()' with absolute timeout value
Fixes #3001
2018-10-01 10:41:46 +02:00
Josef Söntgen
ecccbb46cb wifi_drv: add hidden network support
Fixes #2988.
2018-09-20 09:06:17 +02:00
Josef Söntgen
8193e7b3b4 wifi_drv: schedule on socket call kick
Issue #2988.
2018-09-20 09:06:17 +02:00
Josef Söntgen
040eae4806 wifi_drv: fix tasklet_schedule
The tasklet_schedule implementation was missing the unblock call, which
was no problem in the past because the correspending task would get un-
blocked by other work items. Now that every workqueue has its own task,
there is nobody left to unblock the task and thereby execute the
tasklet. As a tasklet is the only way to transmit any pending frames
after transmission was temporarily suspended - because the device/fw
was not able to process the TX request - this rendered 6xxx devices
unusable whenever this situation occurred.

Fixes #2973.
2018-09-13 15:21:13 +02:00
Stefan Kalkowski
1ec2f43713 dde_linux: use correct type in lx_emul's min
* use a macro for `min` inside lx_emul/kernel.h
* unify the definition of the clamp function

Fix #2964
2018-09-13 14:54:20 +02:00
Alexander Boettcher
dbb37607c5 usb: fix regression in setup_timer
introduced by update to 4.16.3. Fixes page faults in OHCI USB driver part.

Issue #2963
2018-09-05 11:08:25 +02:00
Christian Helmuth
44a8bec56a dde_linux: streamline strlcpy/strlcat implementations 2018-08-28 16:48:46 +02:00
Christian Prochaska
aa909702c6 vfs_lxip: fix 'sendmsg()' result interpretation
Issue #2920
2018-08-28 16:45:24 +02:00
Josef Söntgen
ec9e8ecfaa wifi_drv: enable soft RFKILL and new front end
* TODO
2018-08-28 16:18:34 +02:00
Josef Söntgen
870505bcd9 wifi: update iwlwifi to 4.16.3 2018-08-28 16:18:33 +02:00
Josef Söntgen
80104f5192 usb: adapt to lx_kit/lx_emul update 2018-08-28 16:18:32 +02:00
Josef Söntgen
ced585fd5e lxip: adapt to lx_kit/lx_emul updates 2018-08-08 13:33:38 +02:00
a7e5d4ef03 LxIP: propagate write errors using SYNC_ERR_INVALID
The libc sockets implementation already syncs socket control files after
writes, so sync errors will induce failures for operations such as
"connect".

Fix #2920
2018-08-02 14:36:49 +02:00
Sebastian Sumpf
037a0d6822 usb_drv: add isochronous packet support
Commit extents USB session an driver accordingly.

issue #2910
2018-08-02 14:36:46 +02:00
Christian Prochaska
b2f7a6a934 vfs_lxip: look up path in 'leaf_path()'
Fixes #2913
2018-08-02 14:36:43 +02:00
Christian Prochaska
38ae718509 usb_drv: wait for keyboard LED registry in 'led_connect()'
It can happen that a keyboard gets plugged in and 'led_connect()' is
called while the keyboard LED of another keyboard is just being updated
(and the registry is locked).

Fixes #2869
2018-06-29 10:44:56 +02:00
Christian Helmuth
91b2e023b8 vfs/lxip: make gateway config attribute optional
This enables the application in router/gateway-less network
configurations, e.g., test environments.
2018-06-12 12:11:46 +02:00
401ba6e7fd Manage socket_fs socket lifetime via handles
Socket_fs sockets are now created each time a 'new_socket' control file
is opened, not each time a 'new_socket' file is read. When a handle on a
'new_socket' file is closed the socket and its socket files are
destroyed. The accept control file on a listening socket reads "1" or
reads nothing to indicate a client connection is queued. Client sockets
are accepted by opening an 'accept_socket' file in the listen socket
directory. This file behaves like the aforementioned 'new_socket' file.

Ref #2707
2018-05-03 15:31:57 +02:00
Norman Feske
afcad2a968 os: new Input::Event representation
This commit changes the 'Input::Event' type to be more safe and to
deliver symbolic character information along with press events.

Issue #2761
Fixes #2786
2018-05-03 15:31:25 +02:00
82a683eccc VFS: construct file-systems using Vfs::Env object
Reduce the size and forward compatibility of VFS file-system
constructors by passing an object holding accessors for 'Genode::Env',
'Genode::Allocator', response handlers, and the root file-system.

Fix #2742
2018-04-19 12:38:27 +02:00
Norman Feske
b0b92e4ee2 vfs: pass root directory to plugins
This patch enables the use of the VFS from VFS plugins by passing a
reference of the root directory to the constructors of file-system
instances. Since it changes the signature of 'Vfs::Dir_file_system',
any code that uses the VFS directly requires an adaptation.

Fixes #2701
2018-04-10 11:09:17 +02:00
Sebastian Sumpf
eab4c887ec usb: fix memory leaks during device disconnect
fixes #2731
2018-04-10 11:09:17 +02:00
Boris Mulder
964aac599c wpa_supplicant: report auth_failures
Fixes #2668
2018-03-08 15:45:34 +01:00
590f51dbe1 dde_linux: Build net/ipv4/datagram.c for UDP connect
Fix #2683
2018-02-28 11:01:32 +01:00
f177107a4f Fix string handling in Lxip
Use a utility method to copy application provided strings into control
file buffers. This fixes an potential connect error.

Ref #2535
2018-02-28 11:01:31 +01:00
01800ad1a3 vfs_lxip: check that socket is ready for I/O
Check that the Linux socket structure is populated before performing
read or write operations on control files.

Fix #2679
2018-02-28 11:01:31 +01:00
Norman Feske
366bba0227 Exclude higher-level repos from strict warnings
This is a follow-up commit to "Increase default warning level", which
overrides Genode's new default warning level for targets contained in
higher-level repositories. By explicitly whitelisting all those targets,
we can selectively adjust them to the new strictness over time - by
looking out for 'CC_CXX_WARN_STRICT' in the target description files.

Issue #465
2018-01-17 12:14:36 +01:00
Norman Feske
eba9c15746 Follow practices suggested by "Effective C++"
The patch adjust the code of the base, base-<kernel>, and os repository.
To adapt existing components to fix violations of the best practices
suggested by "Effective C++" as reported by the -Weffc++ compiler
argument. The changes follow the patterns outlined below:

* A class with virtual functions can no longer publicly inherit base
  classed without a vtable. The inherited object may either be moved
  to a member variable, or inherited privately. The latter would be
  used for classes that inherit 'List::Element' or 'Avl_node'. In order
  to enable the 'List' and 'Avl_tree' to access the meta data, the
  'List' must become a friend.

* Instead of adding a virtual destructor to abstract base classes,
  we inherit the new 'Interface' class, which contains a virtual
  destructor. This way, single-line abstract base classes can stay
  as compact as they are now. The 'Interface' utility resides in
  base/include/util/interface.h.

* With the new warnings enabled, all member variables must be explicitly
  initialized. Basic types may be initialized with '='. All other types
  are initialized with braces '{ ... }' or as class initializers. If
  basic types and non-basic types appear in a row, it is nice to only
  use the brace syntax (also for basic types) and align the braces.

* If a class contains pointers as members, it must now also provide a
  copy constructor and assignment operator. In the most cases, one
  would make them private, effectively disallowing the objects to be
  copied. Unfortunately, this warning cannot be fixed be inheriting
  our existing 'Noncopyable' class (the compiler fails to detect that
  the inheriting class cannot be copied and still gives the error).
  For now, we have to manually add declarations for both the copy
  constructor and assignment operator as private class members. Those
  declarations should be prepended with a comment like this:

        /*
         * Noncopyable
         */
        Thread(Thread const &);
        Thread &operator = (Thread const &);

  In the future, we should revisit these places and try to replace
  the pointers with references. In the presence of at least one
  reference member, the compiler would no longer implicitly generate
  a copy constructor. So we could remove the manual declaration.

Issue #465
2018-01-17 12:14:35 +01:00
Christian Helmuth
d5518aa938 lib/vfs/lxip: support configuration of MTU
The MTU can be set via the "mtu" attribute like follows.

  <vfs> <lxip mtu="1200" dhcp="yes"/> </vfs>
2017-11-30 11:23:18 +01:00
Christian Helmuth
64c8b06377 dde_linux: fix mod_delayed_work(delay)
'delay' is a relative timeout while mod_timer() needs an absolute point
in time.
2017-11-30 11:23:17 +01:00
Martin Stein
ea76b08f9f lib/vfs/lxip: provide nic link state in a file 2017-11-30 11:23:17 +01:00
Sebastian Sumpf
9d0518661b usb: remove warning in 'find_next_zero_bit_le'
in case no zero bit is found.
2017-11-30 11:23:13 +01:00
Sebastian Sumpf
fe4f304815 usb: LED suppport 2017-11-30 11:23:11 +01:00
Josef Söntgen
b3b10c1439 dde_linux: create wifi recipe 2017-11-30 11:23:07 +01:00
Martijn Verschoor
55a014acbc dde_linux wifi: firmware for Intel Wireless 3160
Fixes #2572
2017-11-30 11:23:02 +01:00
Stefan Kalkowski
83a88d46b7 dde_linux: remove timer optimization
Instead of storing whether the first item in the timeout list was already
programmed using the timer service, just program the first timeout in the
list unconditionally. In the past we lost a timeout at least when using the
usb ethernet driver on hw/arndale sporadically.
2017-11-30 11:23:01 +01:00
Josef Söntgen
bc6f523c8d wifi: initialize 'struct device' member properly
Normally this is done in 'platform_device_add()' but let's do it in
our 'platform_device_register_simple()' implementation.
2017-11-09 12:18:41 +01:00
Norman Feske
96351801c9 wifi_drv: implement vzalloc
This function is called by the rarely executed error handling code
(iwl_mvm_fw_error_dump) of wifi.lib.so.
2017-11-09 12:18:41 +01:00
Alexander Senier
77010d6434 dde_linux/usb: Don't treat trimming SKB to current len as error
The rndis_host driver calls skb_trim with the current SKB length which
results in many "errors" logged. We shouldn't treat this condition
as an error.
2017-11-09 12:18:39 +01:00