In the count_s() function, with -Wchar-subscripts, GCC warns
about array subscript having type ‘char’ with the isalpha()
call. Since isalpha() takes an int, so do a type-cast there
to get rid of the warning.
This happens on XCC which is based on GCC 4.2.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The EXTRA_CPPFLAGS is applied via zephyr_compile_definitions()
instead of zephyr_compile_options(), which makes all specified
options as macros. So fix it.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Commit 27e5dd13 fixed a bunch of uses of "device tree" in the
documentation, but accidentally hit the part of the documentation
that stated that "devicetree" should be preferred over "device tree".
Signed-off-by: Josh Gao <josh@jmgao.dev>
Uses the generated device tree macros, DT_NXP_LPC_USART_USART_*, in the
mcux flexcomm driver and removes the now unused dts fixups from the
lpc54xxx and lpc55xxx socs.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Renames the lpc usart shim driver to more accurately reflect the
flexcomm hardware IP and to prepare for instantiating it on an SoC
outside the LPC family.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Fix leak of the node_rx buffer when processing the LL version ind as a
priority event. This leak meant being able to establish new connections
was no longer possible, because there weren't enough events to process
the all the events during connection establishment. And instead the LL
ignored the connection request sent by the peer.
Removed the inline extern declaration of a function which had a proper
header included.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Clean up and update release tagging procedures. Use new
document tabs to separate instructions for release
candidate and final releases.
Signed-off-by: David Leach <david.leach@nxp.com>
This documents the special cases where -EAGAIN is returned which leads
the buffer to be queued.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Now that bt_l2cap_send_cb can fail the buffer state needs to be save
and restored otherwise the data stored on it would be lost.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This introduces BT_L2CAP_STATUS_SHUTDOWN which is used to indicate when
a channel has been shutdown.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Packets shall never fail to be sent now that they are queued, so if an
error occured there is no point in keep the channel connected.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This offloads the processing of tx_queue to a work so the callbacks
calling resume don't start sending packets directly which can cause
stack overflow.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Drop packets received while disconnecting since they would most likely
be flushed once peer respond there is no gain in keeping them on a
queue.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This prevents disconnect request packets to not being sent due to lack
of buffers normally caused by flooding or congestion.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
If NET_L2_BT is enabled we need enough acl_in_pool needs to be big
enough to contain a full IP packet since that is no longer processed by
RX thread buffer would be queued to syswq to reassemble the SDU.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
When NET_L2_BT the memory pressure for fragments can be quite high
since that would be transfering IP packets which are considerable big
so this makes our frag_pool to be of the same size as NET_BUF_TX_COUNT.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This enable chaning the function and line number making it easier to
debug where a buffer allocation is blocking.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
When a segment could not be allocated it should be possible to resume
sending it later once previous segments complete, the only exception is
when there is no previous activity and we are unable to alocate even the
very first segment which should indicate to the caller that it would
block since that only happens on syswq the caller might need to defer to
another thread or resubmit the work.
Fixes#20640
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Now using only Path and PurePath in zephyr_modules.py to handle module
processing.
This make the code cleaner as well as remove an issue where a module
name would become an empty string when module path contained trailing
path separators.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Functions like `setup_ipv4` or `setup_ipv6` might already use the
`counter` semaphore, therefore it should be initialized before these
functions are called.
As a result of this issue, the network stack could stall until timeout
under certain circumstances (e.g. when OpenThread was used).
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Add command to print all existing connections. Useful for verifying that
connections are actually released when debugging.
More information can be retrieved with `bt info <addr>` using the
address printed by this command for each connection.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Add command to print all existing bonds. Useful for verifying that bonds
are actually cleared when debugging.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Fix implementation for the missing reset of version
information procedure request state value.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
An expired IPv6 router would cause an infinite loop where
iface_router_run_timer() repeatedly scheduled a work item. In some
conditions it would schedule with negative delay, in other conditions
the infinite loop wouldn't happen until a router was added again.
Get rid of the router from active_router_timers when it is removed.
Fixes#21339
Signed-off-by: Jonas Norling <jonas.norling@greeneggs.se>
Add initial Atmel at86rf2xx transceiver driver. This driver uses device
tree to configure the physical interface. The driver had capability to
use multiple transceiver and systems with multiple bands can be used.
With this, 2.4GHz ISM and Sub-Giga can be used simultaneous.
Below a valid DT example. This samples assume same SPI port with two
transceivers.
&spi0 {
status = "okay";
label = "SPI_RF2XX";
cs-gpios = <&porta 31 0 &porta 30 0>;
rf2xx@0 {
compatible = "atmel,rf2xx";
reg = <0x0>;
label = "RF2XX_0";
spi-max-frequency = <7800000>;
irq-gpios = <&portb 2 0>;
reset-gpios = <&porta 3 0>;
slptr-gpios = <&portb 3 0>;
status = "okay";
};
rf2xx@1 {
compatible = "atmel,rf2xx";
reg = <0x1>;
label = "RF2XX_1";
spi-max-frequency = <7800000>;
irq-gpios = <&portb 4 0>;
reset-gpios = <&porta 4 0>;
slptr-gpios = <&portb 4 0>;
status = "okay";
};
};
At the moment driver assume two transceiver are enouth for majority of
appications. Sub-Giga band will be enabled in future.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
In addition to not assuming all pointers fit in a u32_t,
logic is added to find the privilege mode stack on x86_64
and several error messages now contain more information.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This test has a problem, specifically in the scenario for
test_mem_domain_remove_partitions. A low priority thread (10)
is created which is expected to produce an exception. Then
the following happens:
- The thread indeed crashes and ends up in the custom fatal
error handler, on the stack used for exceptions
- The call to ztest_test_pass() is made
- ztest_test_pass() gives the test_end_signal semaphore
- We then context switch to the ztest main thread which is
higher priority, leaving the thread that crashed context
switched out *on the exception stack*
- More tests are run, and some of them also produce exceptions
- Eventually we do a sleep and the original crashed thread is
swapped in again
- Since several other exceptions have taken place on the
exception stack since then, resuming context results in
an unexpected error, causing the test to fail
Only seems to affect arches that have a dedicated stack for
exceptions, like x86_64. For now, increase the priority of
the child thread so it's cleaned up immediately. Longer-term,
this all needs to be re-thought in the test case to make this
less fragile.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
The requests are somewhat larger on 64-bit since we
are allocating structs with pointer members. Increase
these to a larger multiple of the minimum block size.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
These are not C strings, just pointers to kernel objects.
Improves output when working with a debugger.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
We need a format code for struct packing that fits in
a pointer value, "I" is fixed at 32-bit.
The conversion of string to pointer value now prints
8 bytes. This works for 32-bit since the leading
4 digits are always zero.
The replaced length check uses sizeof(void *) and not 4.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
64-bit systems generate some compiler warnings about
data type sizes, use uintptr_t where int/u32_t was being cast
to void *.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
We need a size_t and not a u32_t for partition sizes,
for 64-bit compatibility.
Additionally, app_memdomain.h was also casting the base
address to a u32_t instead of a uintptr_t.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Configure as GPIOs pins that by default are not GPIOs
Enable pinmux for port F
Enable ADC, PWM drivers by default, but keep SPI disabled.
Swap I2C instances since I2C0 is multiplexed with UART2
Select VTR3 as 1.8V
Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>