In the commit dd52b8ea02 ("Bluetooth: controller: Fix
first connection interval timing"), instead of using just a
tick unit as workaround, microseconds corresponding to a
tick unit was used while calculating the window offset to be
used at the connection update instant. This introduced an
error in scheduling the first event with new connection
parameters, causing supervision timeout of connection update
procedure.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Mesh Profile Specification v1.0, 4.4.1.2.8:
"When an element receives a Config Model Subscription Add message
or a Config Model Subscription Virtual Address Add message that
is not successfully processed (i.e., it results in an error condition
listed in Table 4.113), it shall respond with the Config Model
Subscription Status message, setting its fields to the values
of the corresponding fields (i.e., the identically named fields)
of the incoming message and setting the Status field to a status code
(defined in Table 4.113), and setting all other fields to 0."
The same applies to other Model Subscription messages.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
It's possible that tx_notify still contains items when a Disconnect
Complete happens. Since the normal path for processing tx_notify is
not taken when the connection is not in CONNECTED state, we must make
sure to process the list latest in conn_cleanup() that's called as one
last thing before the connection object is freed up.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
If the caller has passed net_pkt to prepare_segment(), then
it is caller responsibility to unref it in a case of error.
Fixes#4292
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Does the opposite of k_object_access_grant(); the provided thread will
lose access to that kernel object.
If invoked from userspace the caller must hace sufficient access
to that object and permission on the thread being revoked access.
Fix documentation for k_object_access_grant() API to reflect that
permission on the thread parameter is needed as well.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Indicate to users that this feature isn't fully baked yet.
This will be reverted for 1.11 release.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
A space-constrained device wouldn't enable this feature.
Fixes build errors since these tests constrain the size of
the IDT.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This has extra stack overhead, no need to impose this on the caller
unless it's needed to avoid doing a system call for every
character.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
We add macros to define test cases that should be run with the CPU
in user mode, if the CPU supports it.
ztest_test_suite() declarations are now static as they can't go on
the main thread stack; the data gets shared between multiple threads.
It's better here anyway as a large test suite could fill up the main
stack, which is by default reduced to 512 bytes.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
By default, threads are created only having access to their own thread
object and nothing else. This new flag to k_thread_create() gives the
thread access to all objects that the parent had at the time it was
created, with the exception of the parent thread itself.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This requires openocd version 0.10 or later.
Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
Signed-off-by: Christophe Priouzeau <christophe.priouzeau@linaro.org>
- When flashing with dfu-util while alt is not a number, the name must
be quoted.
- Add missing commas in self.list_pattern
- Always call dfu-util with the VID/PID
Fixes: 257fa4af9 ("scripts: zephyr_flash_debug: flash like dfuutil.sh")
Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
All commands need to have quotation marks stripped.
Fixes: bee6f9e73 ("scripts: zephyr_flash_debug: flash like openocd.sh")
Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
This patch adds composite support for USB class drivers.
It acts as a relay between the usb_device stack and
class or function drivers.
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Add common device descriptor for USB class devices.
The common descriptor allows easy configuration of Manufacturer,
Product, SerialNumber strings and PID/VID.
It also allows future support for composite devices.
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Add Mass Storage Class header. The header is based on mass_storage.h,
has been cleaned up and extended by the Class and Protocol Codes.
mass_storage.h will be removed after mass_storage.c has been reworked.
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
1. After calling sendto(), the packet will be unreferenced.
Call coap_pending_cycle() to make sure the packet is referenced until
we got the response from the peer or retransmission timeout.
2. In retransmit_request(), we rearrange the order to avoid the issue.
3. Remove IPv4 configuration for source code is expecting IPv6
4. Correct a typo in README.rst
5. Initialize the interface w/ IPv6 address
Signed-off-by: Robert Chou <robert.ch.chou@acer.com>
When testing against etsi_coaptest.sh, test cases TD_COAP_BLOCK_03/04
will get stuck. This is because these testcases send out a blockwise
transfer but with an empty payload. Although this should be a legit
request, large-update/create handlers did not check "MORE" flag in
block1 option and always return an error when request comes with empty
payload.
Corrected as below
1. Initialize coap_block_context when first block arrives.
(SIZE1 option is not always available. In the case that SIZE1 is
unavailable, the zoap_block_context will be re-initialized each time
a new block has arrived)
2. Check "MORE" flag of block1 option. If it's the last block, then
an empty payload should be allowed.
3. Response w/ 2.04 CHANGED when the last block has arrived for
large-update
4. Response w/ 2.02 CREATE when the last block has arrived for
large-create
5. Remove adding block2 option to the response since we are not sending
back any data to the caller
Signed-off-by: Robert Chou <robert.ch.chou@acer.com>
Some chips are smart enough to handle the ACK request flag on
transmitted frames, so it's unneccessary for the L2 to wait for it.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This is both required in L2's radio part as well as it might be useful
on some ieee802154 radio drivers.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Finally removing set_ieee_addr, set_short_addr and set_pan_id which have
been replaced by set_filter.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
set_ieee_addr, set_short_addr and set_pan_id are now unused by L2, so
removing their exposure through the radio API.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
These are now fully replaced by set_filter() thus removing their usage
by the L2 layer.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
If the hw supports filtering, L2 will apply the ieee address, short
address or PAN ID filters.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This will replace the current mandatory set_ieee_addr, set_short_addr
and set_pan_id functions, which are only valid if the hardware is
supporting filtering. Which is not the case on some chips.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Using radio's get_capabilities, it is possible to know if the driver can
get CSMA work handed-over.
For now, up to device drivers to use
CONFIG_NET_L2_IEEE802154_RADIO_CSMA_CA_* parameters.
Let's see if it will be interesting at some point to enable runtime
modification of these parameters.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Further support will need work per-driver basis, as soon as the L2 will
be able to make usage of such support.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This will be useful to know various generic hardware aspects that can be
used relevantly by the L2 layer.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Now that lqi and rssi are embedded into net_pkt, there is no need for
that function.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Instead of having dedicated function on the radio api level for 15.4,
let's just add the relevant values to the net_pkt structure (if only
IEEE802154 is enabled). It's simpler and make the values relevantly
tied to the received packet.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Fixed a missing reset of FC feature on HCI reset. This
feature provided a simple connection handle based event
exclusions, but this is no longer needed with the
support for controller to host flow control. This feature
should be removed in the future.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>