This commits changes how data on the disk is accessed. There are disk
structures which are packed and their fields are stored in little endian
byte order. To use data in the program structures it has to be translated
from little endian to cpu endianness.
Signed-off-by: Franciszek Zdobylak <fzdobylak@antmicro.com>
- `ext2_file` and `ext2_dir` merged into one struct and allocated from
dedicated slab
- `ext2_inode` allocated from dedicated slab
- `ext2_disk_dentry` allocated from heap (because their size is not
constant)
- `ext2_bgroup` and `ext2_disk_superblock` statically allocated
Signed-off-by: Franciszek Zdobylak <fzdobylak@antmicro.com>
Fix the behavior when data should be written to storage device. Now all
writes are done directly to disk_access layer (where it might possibly
be cached).
Signed-off-by: Franciszek Zdobylak <fzdobylak@antmicro.com>
Added funtion that takes specified action when file system corruption is
detected. Possible actions are: do nothing, make mount point read-only,
panic.
Signed-off-by: Franciszek Zdobylak <fzdobylak@antmicro.com>
Changes:
- Added few assertions to check if some assumptions are correct
- Fix removing blocks during trucate and inode removal
- Clear entry in inode table after inode has been removed
Signed-off-by: Franciszek Zdobylak <fzdobylak@antmicro.com>
Changes:
- Add fs::sync function
- Make correct file system in mkfs
- Add few assertions to ensure that all assumptions are correct
Signed-off-by: Franciszek Zdobylak <fzdobylak@antmicro.com>
Flaky tests give innacurate test summary indicating a misleading
passing test suite. Add new status for flaky tests.
Signed-off-by: Al Semjonovs <asemjonovs@google.com>
When a PAwR sync connects to a PAwR advertiser and CONFIG_BT_PRIVACY
is enabled a Resolvable Private Address will be used. Use that
as responder address instead of the identity address to match what
the central sees.
Signed-off-by: Herman Berget <herman.berget@nordicsemi.no>
The separate done memq was introduced to handle the old LLCP
stalling processing of the rx queue; This is no longer an issue with
the new LLCP, so we can remove it
Signed-off-by: Troels Nilsson <trnn@demant.com>
Upon receiving a L2CAP PDU, only send credits back if the L2CAP channel
hasn't been disconnected. The recv() callback called from
l2cap_chan_le_recv() can trigger a disconnect, which would cause an
assert failure when attempting to send credits back.
Signed-off-by: Donatien Garnier <donatien.garnier@blecon.net>
The PPP TX thread handles the transmission of packets at PPP layer.
Make it's priority configurable, so it's priority can be configured higher
then higher protocol layers.
Signed-off-by: Sjors Hettinga <s.a.hettinga@gmail.com>
The TCP work queue is handles all TCP transmission and maintenance tasks.
Make it's priority configurable, so it can be configured to a lower
priority than the lower level network layers to avoid it consuming all
net_bufs before handing over execution to the lower layer network layers.
Signed-off-by: Sjors Hettinga <s.a.hettinga@gmail.com>
Use 64bit timestamps from k_uptime_get() so they don't
roll over during the expected device lifetime.
Fixes#60826
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Engine now allows registering service callbacks that are
called only once on a given timestamp.
This allows tickless services to be developed.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Allow socket-loop to wake up immediately, if there are changes,
instead of waiting for zsock_poll() to timeout.
This change makes engine more reactive and removes
hard coded timeout from zsock_poll().
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
This fixes setting invalid List_Item_Length in Current Calls List.
The fix complements 9c7ef8e.
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
This was recently refactored (in #58440). But it introduced a bug in which
some channels were connected but not the whole list asked for by the peer.
In that case, `result` will not be `SUCCESS` but we still want to call the
`connected` callback as the peer will consider those channels to be
connected when we send the response.
The symptom is that EATT channels are being instantiated, but not
considered connected (ie. usable by the stack).
Also introduce a test that has asymmetric channel resources (5 on central
vs 2 on peripheral) to reproduce the bug.
Fixes#60212
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
Make `bt_eatt_count()` return what it says on the tin, ie. the number of
channels that are actually connected.
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
When the target board does not have heap by default, allows
statically reserving the space for required socketpairs.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Likely this trigger of the send_data_timer was an alternative for the
function that has been filled in by the ZWP transmission.
At the moment this timer has the potential to cause spurious
retransmissions that can degrade the throughput of the network stack.
Second to that it can accelerate the retransmission process, quickly
running to the number of retransmissions, causing a connection failure.
Signed-off-by: Sjors Hettinga <s.a.hettinga@gmail.com>
Add support for setting advanced broadcast ISO parameters
using the ISO test commands. This allows the host to set
ISO parameters that the controller normally would handle.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add support for setting advanced unicast ISO parameters
using the ISO test commands. This allows the host to
set ISO parameters that the controller normally would
handle.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Fixes an issue whereby the data packets were not checked to ensure
that the client has not attempted to write more data than the size
that was provided in the original upload packet.
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Fixes an issue whereby upload image size would not be checked in
the first packet of an upload, which would allow an image to be
uploaded until it reached the point of it being too large to
fit anymore.
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
At any ack, the retransmission timer was cancelled. This means when an ACK
is only partially acknowledging pending data, followed by a packet loss,
the connection ended in a deadlock eventually timing out.
By checking if there is any pending data for transmission before canceling
the retransmission timer, there is no risk of this lock-up any more.
Signed-off-by: Sjors Hettinga <s.a.hettinga@gmail.com>
Nordic Semiconductor has been testing the feature extensively on its CI.
The tests includes the sample data and the PTS tests.
Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
It would be strange to enforce padding for other bus participants but not
use it yourself. This default suggests the likely proper usage, although
it is not a hard dependency
Signed-off-by: Grant Ramsay <gramsay@enphaseenergy.com>
ISOTP_ENABLE_TX_PADDING makes the device transmit frames with TX padding.
ISOTP_REQUIRE_RX_PADDING ensures other devices on the bus use TX padding,
by rejecting non-padded RX frames
Signed-off-by: Grant Ramsay <gramsay@enphaseenergy.com>
The IEEE 802.15.4 API and networking subsystem were using several
inconsistent timestamp resolutions and types. This change defines all
timestamps with nanosecond resolution and reduces the number of
available types to represent timestamps to two:
* `struct net_ptp_time` for PTP timestamps
* `net_time_t` for all other high resolution timestamps
All timestamps (including PTP timestamps) are now referred to a
"virtual" local network subsystem clock source based on the well-defined
types above. It is the responsibility of network subsystem L2/driver
implementations (notably Ethernet and IEEE 802.15.4 L2 stacks) to ensure
consistency of all timestamps and radio timer values exposed by the
driver API to such a network subsystem uptime reference clock
independent of internal implementation details.
The "virtual" network clock source may be implemented based on arbitrary
hardware peripherals (e.g. a coarse low power RTC counter during sleep
time plus a high resolution/high precision radio timer while receiving
or sending). Such implementation details must be hidden from API
clients, as if the driver used a single high resolution clock source
instead.
For IEEE 802.15.4, whenever timestamps refer to packet send or receive
times, they are measured when the end of the IEEE 802.15.4 SFD (message
timestamp point) is present at the local antenna (reference plane).
Due to its limited range of ~290 years, net_time_t timestamps (and
therefore net_pkt timestamps and times) must not be used to represent
absolute points in time referred to an external epoch independent of
system uptime (e.g. UTC, TAI, PTP, NTP, ...).
Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
The usb_msc.h header does not provide any API. The content is only
used by the MSC implementation for the current USB device stack and
is not required for any use of MSC by the application.
The content has no proper namespace and must not be reused for
anything else in (new) USB support.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
MCUmgr client basic implementation for support Image and OS grpup
commands.
Image Group:
* Image state read/write
* Image Upload secondary slot
* Image Erase secondary slot
OS group:
* Reset
* Echo service, disabled by default
Opeartion's are blocked call and cant't call inside worker queue.
IMG and OS need to be SMP client object for transport.
Signed-off-by: Juha Heiskanen <juha.heiskanen@nordicsemi.no>
SMP client support for generate request and handling
response message.
Updated SMP transport for send request.
Added API for register SMP transport.
Signed-off-by: Juha Heiskanen <juha.heiskanen@nordicsemi.no>