The echo-server sample was using removed net_app_server_tls_disable()
function, the correct one is called net_app_server_disable()
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Replace net_udp_get_hdr and net_udp_set_hdr macros with static inline
function definitions to avoid unused variable build warnings when
NET_UDP is not defined.
This fixes the following warning:
subsys/net/ip/6lo.c: In function 'compress_IPHC_header':
subsys/net/ip/6lo.c:759:22: warning: unused variable 'hdr' [-Wunused-variable]
struct net_udp_hdr hdr, *udp;
^~~
Signed-off-by: Ricardo Salveti <ricardo.salveti@linaro.org>
k_delayed_work_cancel now only fail if it hasn't been submitted which
means it is not in use anyway so it safe to reset its data regardless
of its return.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
For some reason, the ESP32 HAL defines XCHAL_EXCM_LEVEL to 3. This
enables a version of _Level4Vector that doesn't work on this hardware.
Without complete visibility if the version that should work be axed,
keep both in the tree, but build the working other version instead
if building for ESP32.
Jira: ZEP-2556
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
If the interrupt isn't acknowledged, the callback will continue to be
called.
Jira: ZEP-2556
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
Zephyr Security WG requests listing a point of contact on the main
GitHub repo README for security-related inquiries. (This section of
the README is also included in the project intro page, via include
directive.)
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
SYS_DLIST_FOR_EACH_CONTAINER is preferable over using
SYS_DLIST_FOR_EACH_NODE as that avoid casting directly which assumes the
node field is always at the beginning.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Updated doc for release 1.9 for :-
1. Added device tree support for Intel Quark based microcontroller
boards.
Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
This tests the situation when there are multiple threads calling
k_queue_get which was causing issues when using k_poll.
Jira: ZEP-2553
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This is necessary in order for k_queue_get to work properly since that
is used with buffer pools which might be used by multiple threads asking
for buffers.
Jira: ZEP-2553
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Updated doc for rel 1.9 for :-
1. TICKLESS Kernel support for nrf RTC timer.
2. Added test cases for stress test round robin scheduling and priority
premptive scheduling.
Signed-off-by: Youvedeep Singh <youvedeep.singh@intel.com>
Refactor the Connection Parameter Request Procedure to be
separate from and not overlap the variables of the
Connection Update Procedure.
Also, added missing implementations to pass all Connection
Parameter Request Procedure related Conformance Tests.
Jira: ZEP-1918
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Implement the LE Read Channel Map HCI command, along with making the
reading of the multi-byte channel map value from the connection pointer
thread-safe in case the ISR triggers while we are reading the value.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Although the current BLE controller only supports a single TX power (0
dBm), the qualification tests require the 2 Read TX Power to be
present and supported in the controller, so implement them while
returning always 0 dBm.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
When the CONFIG_BT_CTLR_CONN_RSSI option is set, the connection RSSI is
available in the controller, and can be reported to the Host via the
Read RSSI command. Implement the command, which is required for
qualification.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Arguments are not needed and in some cases are being set as unused in
the same function. The test_main function is called from ztest main
routine without any arguments.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The boot banner is being printed after static threads have started, for
example this is visible with tests using ztest.
This puts the banner message before starting any threads.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
We have a few systems with small amounts of flash that this test can't
fit into. For now I set the limit right above 32k, however that might
need to get bumped up if we have any systems with flash sizes between
32k and 64k.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
The zedboard_pulpino has a small amount of flash so we should have that
in the yaml for any tests thats might filter on code size footprint.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
The original commit 8ebaf29927 ("net: http: dont timeout
on HTTP requests w/o body") was intended to handle a case
where an HTTP response had been retrieved from the server but
the HTTP parser couldn't meet the criteria for calling
"on_message_complete". For example, a POST to a REST API
where the server doesn't return anything but an HTTP
status code.
It was a really bad idea to check a semaphore count. There
is a lot of kernel logic built into semaphores and how the
count is adjusted. The assumption that the value is 0
after the k_sem_give() is incorrect. It's STILL 0 if
something is pending with a k_sem_take(). By the time
k_sem_give() is done executing the other thread has now
been kicked and the count is back to 0.
This caused the original check to always pass and in turn
breakage was noticed in the http_client sample.
Let's do this the right way by setting a flag when
on_message_complete is called and if that flag is not set
by the time we reach recv_cb, let's give back the semaphore
to avoid a timeout.
Jira: ZEP-2561
Signed-off-by: Michael Scott <michael.scott@linaro.org>
Masks for level- and edge-triggering levels are 0, so the following
check will be always true:
if ((flags & GPIO_INT_ACTIVE_LOW) == GPIO_INT_ACTIVE_LOW)
Invert the evaluation order, by checking the masks that are not 0
first.
Jira: ZEP-2557
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
Adds an #elif for ESP32 boards. Connect a wire from pin IO2 to pin IO4
so that the test can be executed.
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
patch add device tree support for develoement board of
quark_se_c1000. Previously pushed patch was flashing binary
at wrong address because of which UART was not working
Jira:ZEP-2459
test
Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
The compilation of the i2c_ll_stm32 fails when we
enable the interrupt mode. The struct i2c_stm32_data
is needed to initialize the semaphore. This patch adds
the missing struct for interrupt mode.
Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
BLE is the only networking interface on 96b_carbon, so if
CONFIG_NETWORKING is set, automatically use 6lowpan/BLE link
layer. This will allow to make networking apps work "out of the
box" on 96b_carbon, similar to e.g. qemu_x86 (which automatically
uses SLIP) or frdm_k64f (which automatically uses Ethernet).
This also enables NET_L2_BT_ZEP1656, because most 6LoWPAN/BLE samples
in Zephyr currently use that option, and it is required to achieve
working 6LoWPAN/BLE with Linux kernels currently widely accessible
to the end users. E.g. the latest Ubuntu LTS release, 16.04, ships
with 4.4 kernel, and can be upgraded with a special effort to HWE
kernel which is currently at 4.10. NET_L2_BT_ZEP1656 is needed for
both these kernels.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
When transmitting to the UART interface using polled mode, the ESP32
driver would return 0 regardless of the success state. Return the
character that has been transmitted to comply with the API.
Jira: ZEP-2552
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
The HTTP header field pointers are saved for each HTTP request.
But the counter that saves the pointers was never reset to initial
value when the connection was dropped. This meant that the header
field values were only proper for first HTTP request.
Jira: ZEP-2463
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The size of the interrupt descriptor table is not really
relevant to this test.
If any driver enabled for the target board gets enabled and
has a priority level outside the IDT range, gen_idt.py is properly
reporting an error. The old C-based gen_idt seems to have allowed
this to slide by.
Issue: ZEP-2496
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
The stack name was incorrectly specified in mqtt_publisher sample
application, this cause compilation error when certain Kconfig
options were specified.
Jira: ZEP-2566
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The server needs global enable/disable status instead of only being
able to enable or disable just the TLS server part.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
If we have specified AF_UNSPEC when initializing application
server local address, then we try to bind to both IPv4 and IPv6
addresses. The old code did not honor the port number in this
case but used some random value for port.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
If user has specified a specific local address, then honor that
and do not try to bind IPv4 context if only IPv6 is defined,
and vice versa for IPv6.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Zeroing-out all bytes from a connection structure when it's
unregistered ensures all state from a previous connection is gone and
can't be mistakenly reused.
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
If either a remote or a local address were supplied to the
net_conn_register() function, the IP stack would proceed to copy
sizeof(struct sockaddr) bytes from the respective remote_addr
or local_addr pointers, regardless of the actual size of the storage
these pointers point to.
Use the proper size depending on the socket address family.
Coverity-ID: 173630
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
There are 2 possible interpretations regarding the address to return in
response to the Read Peer RPA HCI Command:
1) The RPA that the local controller generates to be used in certain
packets it sends
2) The RPA generated and used by the peer device in its packets
We used to return 1) but our interpretation turned out to be incorrect
when reading the HCI test specification, so this commit switches to
returning 2).
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
The :download: directive doesn't format well on output, and also
links to files that likely have linux line endings that don't
display well on Windows systems.
fixes: #1204
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>