Fixes:
subsys/bluetooth/host/hci_core.c: In function ‘set_static_addr’:
subsys/bluetooth/host/hci_core.c:4043:1: error: label ‘generate’ defined
but not used [-Werror=unused-label]
generate:
^~~~~~~~
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
As the nRF5x BLE controller uses TIMER1, TIMER2 and PPI
indices 0-13 (and 14-15, if PA/LNA feature is enabled),
the software based PWM driver needing 6 PPI channels has
to use PPI indices outside the BLE controller used range.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
PA/LNA feature being not default enabled, keeping the PPI
indices used for this feature at the higher indices would
allow use of these PPI indices by other drivers, for
instance the nRF5 software PWM driver.
Software PWM driver provides 3 PWM pins/channels using upto
6 PPI channels. If BLE controler where to use 0-13, then
14-19 PPI indices can be used by the PWM driver.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
The echo-server compilation failed because mbedtls config file
was not found. Added suitable magic to CMakeLists.txt fixing that.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Run file through doxygen -u doc/zephyr.doxyfile and generate
a clean config with latest options and documentation.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
When sending TCP sample packet, just fill the packet to max and
ignore any overflow error.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
- Renaming NET_L2_RAW_CHANNEL to NET_RAW_MODE
- Create a generic IEEE 802.15.4 raw mode for drivers
- Modify the IEEE 802.15.4 drivers so it passes the packet unmodified,
up to code using that mode to apply the necessary changes on the
received net_pkt according to their needs
- Modify wpanusb/wpan_serial relevantly
Fixes#5004
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Replace use if void * declaration related to memq links with
more readable memq_link_t.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Check that we do not try to access fragment when UDP packet is
received if pkt is NULL. In practice this should not happen for
UDP but do the checks in proper order anyway.
Coverity-CID: 179252
Fixes#5057
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
As we are checking that pkt is not NULL already in the start
of the function, remove the checks later in the code in function
zperf_tcp_receiver.c:tcp_received()
Coverity-CID: 179248
Fixes#5061
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The generic Bluetooth shell was never intended to be enabled. Also
make the default advertised name a bit nicer.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
The Poll Timeout needs to be at least 24 bits, so u16_t doesn't
suffice and will potentially result in truncation. Use u32_t, thereby
also fixing a coverity warning.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
The bt_mesh_model_publish() is supposed to return a "not supported"
error if the publish context doesn't exist. Fixing the premature
dereferencing also fixes coverity warnings.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
The separate checking for "now < reftime" is unnecessary, since the
integer over/under-flow for unsigned 32-bit values resulting from
subtraction will give the right delta even if 'now' is less than the
reference.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
The qemu main() seems to require more stack than the arm equivalent.
Increase the stack size to 320 to avoid crashes.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
After the Publish Retransmit state was introduced the Publish Period
measurement would begin once the previous Publish message has finished
transmitting. This will however cause inaccurate periods, which is
particularly an issue with the PTS that expects accuracy of less than
0.5 seconds (apparently).
Since the publication timer is also used for the retransmissions we
can't simultaneously use if for the period as well. Therefore, we
introduce a new variable called period_start which makes a note of
when the period was supposed to start, and then once all
retransmissoins are done initializes the timer with the send duration
taken into account.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
The app was declaring model publication contexts but missing buffers
for the publication messages.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This app isn't (at least yet) using the model publication for
anything, and in fact this could cause trouble due to missing
publication net_buf_simple buffer.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
The only generally available model supporting publication that's
convenient to be used for testing is the Health Server Model.
Unfortunately since this model supports period publication, the
non-periodic side got less attention and had some bugs.
The first thing that needs to be done is to verify that the period
returned by bt_mesh_model_pub_period_get() is positive. If it's zero
then no periodic publication should take place.
Another thing that this patch cleans up is the naming of the callback
used for periodic publishing. There's no need do require the callback
to call bt_mesh_model_publish() since this must happen no matter what,
so instead rename the callback from 'func' to 'update' and have the
access layer call bt_mesh_model_publish() if the callback was
successful.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
When a small amount of supported connections is configured (especially
the default number of 1), connectable advertising may fail. This is
perfectly fine since as soon as a disconnection event happens the
advertising will be successfully restarted. To avoid causing
unnecessary user worries, downgrade the resulting errors to warnings.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
There were some things that were working only when receiving a Node
Reset message from someone else, but not when the app called
bt_mesh_reset() directly. There was also some state cleanup missing
for the transport layer. This patch addresses all of these issues.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
As flash address changes between different boards of same Soc,
it is derived from .dts file instead of hard coding in .dtsi.
Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
In 90b471fe4, there was a change to make k_poll() return EINTR error
if it was cancelled with k_fifo_cancel_wait(). Handle this change, or
otherwise sockets EOF handling was broken.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Previously, the connection will be reset easily due to a forged TCP
reset with a random sequence number.
As described in RFC793 p.69, we should check if the sequence number
falls into the receiver window at first.
Signed-off-by: Aska Wu <aska.wu@linaro.org>
In case K_POLL_STATE_NOT_READY is set the return will be set to -EINTR
indicating that the poll was interrupted.
Fixes#5026
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Relies on loopback network interface added recently and being able
to run QEMU without connecting to host networking.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
The Configuration Client is such a generally useful feature for the
shell that it makes sense to have it as a mandatory dependency (the
shell wasn't anyway compiling at the moment without it).
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Optimised the parameter passing order of memq interface such
that the compiled code uses less space and execution time.
Having a parameter that gets returned as the first parameter
passed to a function avoids instructions required to have
the result in the return register.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>