Implement function and necessary callbacks to handle Energy Scan feature
of the nRF radio driver needed by some radio stacks.
Signed-off-by: Marek Porwisz <marek.porwisz@nordicsemi.no>
Add the Energy Scan capability to the possible capabilities list.
Create new energy scan callback function type to make its usage
more readable.
Signed-off-by: Marek Porwisz <marek.porwisz@nordicsemi.no>
Add a simple test to verify that the bind() can be called multiple
times if AF_PACKET is set and there are multiple network interfaces
in the system.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
If the system has more than one network interface, then it should
be possible to bind a AF_PACKET socket to each interface if the
network interface index is set when bind() is called. This was
not possible earlier as the code was always using default network
interface with AF_PACKET socket bind().
Fixes#23153
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
According to LWM2M specification, when Queue Mode is used, the LWM2M
client should keep the reciever on for specified time after sending A
CoAP message. This commit adds a new LWM2M event,
`LWM2M_RD_CLIENT_EVENT_QUEUE_MODE_RX_OFF`, to facilitate the process by
notifying the application when it's safe to turn the receiver off.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Add Kconfig option to enable Queue Mode binding. With this option
enabled, the LWM2M client will register with `UQ` binding, instead of
`U`.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
timespec_to_timeoutms calls clock_gettime that requires
CONFIG_POSIX_CLOCK. ifdef this function to avoid undefined reference.
Fixes#20137
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Fix to return the max tx/rx time back to set default time
after using mandatory minimum PDU length and time while
switching back from Coded PHY to 1M PHY.
Also fixes#23109.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix Data Length Update transmit and receive time calculation
on PHY update procedure completion.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
When an unsupported SCSI command is received, an error status reply
is sent even if the Host expects data prior to the status.
This fix stalls the data reply before sending the error status.
Signed-off-by: Audun Korneliussen <audun.korneliussen@nordicsemi.no>
Data toggle should be reset after SetConfiguration or
SetInterface request.
Always reset data toggle in usb_dc_ep_enable.
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
USB Host expects dtoggle to be cleared after ClearFeature(Halt):
"[...] clearing the Halt feature via a ClearFeature(ENDPOINT_HALT)
request results in the endpoint no longer returning a STALL.
For endpoints using data toggle, regardless of whether an endpoint
has the Halt feature set, a ClearFeature(ENDPOINT_HALT) request always
results in the data toggle being reinitialized to DATA0."
- Subsection 9.4.5 of usb 2.0 spec (usb_20.pdf)
Signed-off-by: Audun Korneliussen <audun.korneliussen@nordicsemi.no>
Print the name of the discovered toolchain as well as the variable
used to initialize it.
This is nice to know when doing remote support, since users will
sometimes misconfigure their toolchain and not know what that means.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
The header printed at the beginning of every west build is kind of
annoying. Let's remove it and just print the application source
directory at cmake time instead. The build directory and board are
already printed there, anyway, and that's all IDE users will see.
Let's clean up the BOARD to make it say "board" instead. That matches
the west build --board option name a bit more closely and is still
legible.
Likewise, let's not print any west build messages if we're just
incrementally recompiling. That's noisy.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Add I2C and SPI bus communication routines in separate files,
and register one or the other as read/write callbacks based
on bus selection in DTS.
This commit is fixing issue #22348 as well, as the SPI part
is handling in the proper way the CS GPIO part.
Signed-off-by: Armando Visconti <armando.visconti@st.com>
mtls_session_setup checks early if the given mode is valid and return
an error if not. CRYPTO_CIPHER_MODE_CTR is not a valid one so there is
no needed to have it in the switch.
CID: 20600
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
The `irq_update` UART API function must always return 1 according to
the API documentations.
This commit fixes the `irq_update` API function to unconditionally
return `1`.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
The `irq_update` UART API function must always return 1 according to
the API documentations.
This commit fixes the `irq_update` API function to unconditionally
return '1'.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
This commit fixes the multiple SERCOM interrupt handling for the SAM
D5x and E5x devices by replacing the obsolete device tree symbol with
the new `DT_INST` symbol.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
The driver for STM32's independent watchdog already exists and is
compatible with the stm32g0 SoC. Enable the independent watchdog
for the stm32g0 series for use with this driver.
Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
Since driver is shared with other devices, it must be enabled
conditionally based on the number of instances. This avoid show
invalid options for devices with lower port count like SAM4S/SAM4E.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
SAMV71 uses same driver of SAME70 and this enables the feature. Since
driver is shared with other devices, it must be enabled conditionally
based on the number of instances. This avoid show invalid options for
devices with lower port count like SAM4S/SAM4E.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
When added SAM4E and SAMV71 platform the huge amount of refactor left
out this two configurations. This add missing configuration for all
supported devices.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
The UART API now supports configure and configure_get functions,
however no tests were written for those functions. This
commit adds the framework and implementing tests for configure
and configure_get for UART API.
Fixes (#12872)
Signed-off-by: Jennifer Williams <jennifer.m.williams@intel.com>
Instead of hardcoding the "zeth" network interface name, use the
name defined in Kconfig so that user can change it if needed.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Calculate length based on provided SSID string, so user does not have to
provide length explicitly over shell.
This patch also removes requirement of minimum 3 characters SSID, as
the shortest SSID can be even 1 character.
Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
Older OT code used preprocessor #if conditionals, while newer code
used IS_ENABLED macro. Unify the approach by switching to the latter
option.
Additinally, fix inclusion issue that came out after switching to
IS_ENABLED.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Add new transport handler for MQTT, with sendmsg-like functionality.
This allows TCP transport to send PUBLISH packets w/o fragmentation at
the TCP layer. Implement this new functionality for all existing
transports.
Fixes#22679
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
`mqtt_transport_write` failue was logged with `errno` value which is not
correct as the return value from the function is valid in this case.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
This option specifies the name of the client.
See https://tools.ietf.org/html/rfc2132#section-3.14
This is useful for identification when looking in DHCP lease table.
Signed-off-by: Luuk Bosma <l.bosma@interay.com>
We now negotiate DNS servers in the IPCP configuration. This has been
observed to speed up the connection setup. The received DNS servers
are used by the DNS resolver library, but we leave it optional since
the static server list might be preferable.
Increase MAX_IPCP_OPTIONS to 4 so that we can nack all RFC 1877
options.
Signed-off-by: Göran Weinholt <goran.weinholt@endian.se>
It is not unusual that the peer does not provide an IP address in the
ipcp negotiation. But because ppp is a peer-to-peer protocol, we do
not actually need to know the peer's address to use the network.
Signed-off-by: Göran Weinholt <goran.weinholt@endian.se>
Move auto-negotiate sequence from driver initialization to link up event
Previously when booting without ethernet cable connected the
initialization would fail and never recover.
Now we can connect the ethernet cable any time and multiple times.
This also drastically reduces boot time to main.
Logging Link up and Link down events.
Logging speed and duplex from eth_gecko logger instead of eth_gecko_phy.
Signed-off-by: Luuk Bosma <l.bosma@interay.com>