Now when role is sink and source sends data, stream recv callback is
not registered, apps works fail. so stream recv callback should be
checked.
Signed-off-by: Cheng Chang <cheng.chang@nxp.com>
clang reports a warning about a label followed by a variable
declaration:
label followed by a declaration is a C23 extension
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Fix one leftover unaligned access warning generated by clang:
warning: taking address of packed member 'th_seq' of class or
structure 'tcphdr' may result in an unaligned pointer value
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
- In bap_unicast_client, it was assumed that ASE is binded with CIS
handler during sending "received_stop_ready" to unicast_server.
- In case where unicast_client has not started the stream with
"receiver_start_ready" att command to server, but wants to disable
ASE which was Enabled previously (but not stream!) causes failure
since there is no cis_create has happened and linked to ASE.
- In BAP_TS, "BAP/UCL/SCC/BV-103-C" has a same test conditions where
client first enables the ASE, disable the ASE, and expecting
"receiver_stop_ready" att command from client to server followed by
server notification to enter its ASE in QoS_configured state.
- Removed this condition checks to send expected att command to
server from Enabling ASE state to Disable ASE.
Signed-off-by: Nirav Agrawal <nirav.agrawal@nxp.com>
Based on TCP Spec., if the incoming packet seqnum is old but with
new data (seqnum + len > conn->ack), that part of valid data should
be accepted. Now Zephyr doesn't support it.
This patch will add support to such scenario.
Signed-off-by: Shrek Wang <inet_eman@outlook.com>
Fix LLCP to use event_counter value used during prepare to
compare instant to be the value as when in prepare and not
incorrectly use a stale value (when two radio events
overlap).
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fixes an issue for MCUboot DFU whereby images would always be
uploaded to slot1 instead of slot0 meaning that updates would
never take effect, but retains uploading to slot1 if the
application is running from slot0
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
The alignment value tells the amount of alignment of buffer length
when allocating net_buf data for sending. By default there is no
special alignment. This is needed for example with Nordic Wi-Fi
chip that uses SPI driver that expects 4 byte alignment for the
length of the data that is being sent.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Make the interface interface state array static, ensuring that the array
is zeroed at boot. This enables interfaces which initialise earlier than
the CONN_MGR module to set flags in their init functions.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Fix a potential NULL pointer dereference for skip_fields in the function
ull_adv_sync_copy_pdu_header. This issue been reported by Coverity.
Coverity CID: 392529
Signed-off-by: Loic Domaigne <tech@domaigne.com>
Not sure why this vestigal struct member was here at this point (18
months ago...) but its unused and was causing problems for certain
parts.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
K_TICKS_FOREVER is defined as -1. Guard logic has been added for the case
when `ticks - exit_latency_ticks == -1` to prevent sys_clock_set_timeout()
from incorrectly setting a forever timeout.
Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
The implementation used BT_L2CAP_ECRED_MIN_MTU to check the lower limits
of both MTU and MPS, instead of BT_L2CAP_ECRED_MIN_MPS for MPS. While
these are the same here, confusion may arise. This commit fixes the
confusion.
Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
There are cases, for example when peer is requesting two DNS
addresses, but we can only give one, we should reject the secondary
DNS request first, before sending NAK to acceptable options.
Option parser can reject a parameter by returning -ENOTSUP and when
it wants to NAK the parameter, it returns -EINVAL.
On RFC 1661:
Configure-Reject
If some Configuration Options received in a Configure-Request are
not recognizable or are not acceptable for negotiation (as
configured by a network administrator), then the implementation
MUST transmit a Configure-Reject.
Configure-Nak
If every instance of the received Configuration Options is
recognizable, but some values are not acceptable, then the
implementation MUST transmit a Configure-Nak.
So as stated by RFC, we should start the negotiation by rejecting all
parameters that we cannot configure. I added an example of rejecting
DNS requests, if we don't have those.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
When Kconfig option CONFIG_NET_L2_PPP_OPTION_DNS_USE is enabled,
Zephyr should request two DNS addresses in IPCP negotiation by sending
IPCP ConfReq for DNS otions using 0.0.0.0 as an address.
Remote peer may offer DNS by sending IPCP ConfNak with proper address.
This is explained in RFC 1332 and RFC 1877 (DNS extension).
When no DNS is required, we should only send IPCP ConfReq for IP
address, without having DNS fields in the same request.
However, when PPP is configured to serve a DNS using Kconfig option
CONFIG_NET_L2_PPP_OPTION_SERVE_DNS it should serve the DNS address in the
IPCP ConfNak message and from the ipcp.peer_options structure, not from
the ipcp.my_options.
This might break backward compatibility outside this repository
as DNS addresses used to be served from ipcp.my_options.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Some APIs taken in_addr/in6_addr pointer w/o const qualifier, while they
do not actually intend to modify the provided address. This commit
adds the missing const qualifier where applicable.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
add bt_conn_br_switch_role and bt_conn_br_set_role_switchable to control
the role switch, add DEFAULT_ROLE_SWITCHABLE Kconfig to control the default
role switch state.
Signed-off-by: Mark Wang <yichang.wang@nxp.com>
Zbus currently does only support default heap sizes.
The configuration option allows to decrease rom-footprint for embedded
applications. Adding the option to ZBus improves its flexibility and
while not increasing its complexity.
Add default of 0 value to compensate for previous cases where
HEAP_MEM_POOL_ADD_SIZE_ZBUS was defined as "".
Consistent naming 'Zbus'/'zbus' to 'ZBus'
Signed-off-by: Matthias Plöger <matthias.ploeger@phoenixcontact.com>
Adds a I2C+GPIO Target device binding for MCTP communication over I2C.
The binding requires an i2c bus and gpio pin, along with a specified I2C
and endpoint address pair. These are then used to create an MCTP binding
which can be used to communicate in a peer to peer manner among other
MCTP endpoints.
Each message transmit signals to the bus controller using a GPIO logical
high and is unset on transmission completion. Pending transmitters are
queued using a semaphore avoiding memcpy being needed to asynchronously
transmit mctp pktbufs.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
Adds a custom MCTP binding for an I2C bus controller using GPIO signaling
for write requests rather than mode switching.
This binding operates a lot like the I3C binding specification DMTF has
for MCTP. The controller expects to receive interrupts (from GPIO pins)
and upon getting an interrupt read a message from the I2C target device.
The macro does a lot of the heavy lifting to setup all the state needed
for capturing GPIOs, being able to do asynchronous reads/writes, and
such. The entire controller works using state machines driven by
interrupts leading to low latency and clear ram costs.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
Unfortunately libc malloc/free are wrapped with a sys_mutex which is
troublesome for mctp as we likely want to allocate from interrupts in many
cases.
Supply mctp with a dedicated heap initialized and assigned at boot
saving applications a step. The default size is quite small and works
well so long as messages are small.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
Now in other mode rather than basic mode, configuration parameters
include MTU, Flush Time and QoS have been checked.
But in basic mode, they also need to be checked, so the code about this
should not be controlled by macro CONFIG_BT_L2CAP_RET_FC.
Signed-off-by: Cheng Chang <cheng.chang@nxp.com>
Added bt_le_set_default_phy in hci. This handles
the HCI_LE_Set_Default_PHY HCI command.
Added call to bt_conn_le_set_default_phy in central_gatt_write and
peripheral_gatt_write samples.
Signed-off-by: Ravinder Singh <ravinder.singh2@infineon.com>
Add settings_its backend in order for a non-secure
Bluetooth application to be able to save Bluetooth
settings to persistent storage.
Signed-off-by: Sean Kyer <Sean.Kyer@analog.com>
- Add a new callback to support the situation when a unit info command is
received, and add an API to respond to the unit info command.
Signed-off-by: Make Shi <make.shi@nxp.com>
- Only AVRCP connect and disconnect api for AVRCP common functions.
- Added _ct prefixes to all CT callback functions and feature APIs.
- Updated shell demo code for AVRCP API changes.
Signed-off-by: Make Shi <make.shi@nxp.com>
It is not possible to build anymore in that mode, so we do not
need to support it in this driver cmake files.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
It is not possible to build anymore in that mode, so we do not
need to support it in this driver cmake files.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Coverity (CID 516253) reported that the return value of
initialize_tx_with_sid_disabled() was set but not used, leading to
potential silent failures.
Check if the return value is negative and propagate the error through the
existing cleanup path.
Fixes: CID 516253
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Offloaded socket implementations need to create the socket operations
vtable, therefore need access to struct socket_op_vtable. So far this
has been defined in a private header, so implementations needed to add
the header location to the include path in CMake.
Therefore, move struct socket_op_vtable definition to the internal part
of the public socket header, so it's no longer needed to include a
private header. This is also more consistent with the rest of the public
header content, as for example macros needed to register a socket
implementation are already there.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
for DEVICE_PM and DEVICE_PM_RUNTIME, ztest need
hold status like CONFIG_PM, otherwise the following
flash will be blocked for some SOC
Signed-off-by: Hake Huang <hake.huang@nxp.com>
Both bt_le_adv_stop() and bt_le_adv_resume() were logging same
error message. Add aditional context to it so that logs are
distinguishable.
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
Correct not resetting compression extension,
when checking for an uncompressed file,
in case if compression is enabled, but no compressed file found.
Signed-off-by: Andrey Dodonov <Andrey.Dodonov@endress.com>
According to CoAP RFC (7252, ch. 4.2), Reset cannot be sent in a
response for an ACK reply, rejected ACKs should be silently ignored
instead. Therefore, in case an unrecognized response is received, verify
the response type before sending Reset.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
The ieee802154_radio_send() function does not decrease reference counter
of the net_pkt, it's instead done one layer above in ieee802154_send().
This commit updates the mgmt functions using ieee802154_radio_send() to
always free the used net_pkt afterward.
Signed-off-by: Simon Piriou <spiriou31@gmail.com>
When received the valid S frame, the retransmission timer should not
be restarted if unacknowledged I-frames have been sent but the
retransmission timer has not elapsed.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Fix Tx Ack FIFO's first index being advanced beyond a
recorded ack_last value in a node_rx when under race
between ll_rx_get() being pre-empted while executing the
`tx_cmplt_get()` and a call to `ll_rx_put()` in an
interrupt service routine.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Bump the argc check from 3 to 4 as the shell scan command has 3 required
parameters, the last being the scan duration:
- argv[0]
- passive|active
- channels
- per-channel duration in ms
Signed-off-by: Simon Piriou <spiriou31@gmail.com>
Based on a discussion around P4WQ limitations for our application, it
was determined that the RTIO workqueue required the ability to use
additional threads from the pool in spite of work items blocked.
Since this is not covered, nor desired for the P4WQ, then remove this
dependency and re-implement it in a way that covers also this use-case.
Signed-off-by: Luis Ubieda <luisf@croxel.com>