Commit graph

79 commits

Author SHA1 Message Date
Jukka Rissanen
0e57844b2d drivers: wifi: esp_at: Bind DNS to device net interface
Make sure received DNS server information is bound to the
wifi network interface.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-06-17 16:08:56 +02:00
Joakim Andersson
995440b706 drivers: modem: Use modem command send_data_nolock
Use the new modem command send_data_nolock function where it was
previously just written directly to the interface.

Signed-off-by: Joakim Andersson <joerchan@gmail.com>
2025-05-06 18:24:01 +02:00
Chun-Chieh Li
069d439119 drivers: wifi: esp_at: handle IP unquoted parsing with ESP-AT version <2.0
This fixes parsing error on AT+CIPDINFO with ESP-AT version discrepancy.

Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
2025-02-07 10:25:35 +01:00
Chun-Chieh Li
d74cf047b1 drivers: wifi: esp_at: enable CONFIG_WIFI_ESP_AT_CIPDINFO_USE automatically
This fixes DNS resolve failure (CONFIG_DNS_RESOLVER) by enabling
CONFIG_WIFI_ESP_AT_CIPDINFO_USE (AT+CIPDINFO) automatically to get
peer ip-address and port, required by CONFIG_DNS_RESOLVER.

Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
2025-02-07 10:25:35 +01:00
Jilay Pandya
8db97b5bf6 drivers: wifi: esp_at: fix null pointer dereference issue
fix null pointer dereference issue by checking if *sock is null or not

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2024-12-27 15:42:41 +01:00
Hongquan Li
13ea58775b drivers/wifi/esp_at: Use mode 2 to connect when using as a UDP server
Mode 0 cannot establish a connection when used as a UDP server,
replace mode 0 with mode 2 to save the client's IP and port as
the communication address when a message is received.

Fixes #82898

Signed-off-by: Hongquan Li <hongquan.prog@gmail.com>
2024-12-18 15:31:55 +01:00
Hongquan Li
41e33573e8 drivers: wifi: esp_at: Fix serial receive interrupt can't exit
If a character is received immediately after modem_iface_uart_init called,
the modem_iface_uart_isr function will not read the data in the serial port
fifo register as the context has not been registered at this time,
which will result in the program not being able to exit the interrupt,
so the context should registered before the serial port is initialised.

Signed-off-by: Hongquan Li <hongquan.prog@gmail.com>
2024-11-21 20:12:00 +01:00
Daniel Mangum
a80af336c2 drivers: wifi: esp_at: only log errors in active mode with full IPD
Removes constant error logging when parsing IPD headers in active mode and
waiting on remote IP and port. Currently an error message is logged for
every character in the remote IP and port until the full length obtained.

Signed-off-by: Daniel Mangum <georgedanielmangum@gmail.com>
2024-09-06 12:04:49 -05:00
Daniel Mangum
126e3ee6c3 driver: wifi: esp_at: fix typo in CIPDINFO option
Fixes typo in the CIPDINFO option description.

Signed-off-by: Daniel Mangum <georgedanielmangum@gmail.com>
2024-09-05 09:49:33 +02:00
Marcin Niestroj
460b111fb4 drivers: wifi: esp_at: support listening UDP sockets in active mode
So far receving was possible in active mode, but IP and port information
was not fetched nor propagated to application layer. Support fetching that
information even in active mode, so that using bind() with recvfrom() is
working accordingly.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-08-01 12:36:07 +02:00
Marcin Niestroj
086ae6e84f drivers: wifi: esp_at: move socket allocation to cmd_ipd_parse_hdr()
This is just a step forward to make cmd_ipd_parse_hdr() capable of parsing
IP address and port when CONFIG_WIFI_ESP_AT_PASSIVE_MODE=n. After obtaining
this information (IP and port) it will be simply much easier to write this
information into 'struct esp_socket' directly, instead of passing to upper
layer.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-08-01 12:36:07 +02:00
Marcin Niestroj
0e11b68a32 drivers: wifi: esp_at: utilize esp_pull*() in cmd_ipd_parse_hdr()
Use common utilities for consuming parameters from AT response string.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-08-01 12:36:07 +02:00
Marcin Niestroj
d093783606 drivers: wifi: esp_at: handle ':' in esp_pull()
Treat ':' similar as ',', '\r' and '\n', so that AT response parameter
parsing can be gracefully stopped.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-08-01 12:36:07 +02:00
Marcin Niestroj
1caab70918 drivers: wifi: esp_at: introduce esp_pull_long() helper
Use it to get information about RSSI. In subsequent commits this helper
will be used to get other information as well.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-08-01 12:36:07 +02:00
Marcin Niestroj
806842b759 drivers: wifi: esp_at: s/ntohs/htons/ after parsing port number
'struct sockaddr_in' should contain port number in network byte order. This
means that htons() macro should be used, instead of ntohs().

This was working before since both htons() and ntohs() end up in calling
BSWAP_16().

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-08-01 12:36:07 +02:00
Marcin Niestroj
c368c332c4 drivers: wifi: esp_at: fix UDP socket setup
Right now AT+CIPSTART command is called with both "remote port" and "local
port" being set to the same number. This means that for outgoing UDP
traffic (e.g. when resolving DNS or when reaching out some application
server with CoAP over UDP) always the same outgoing port is used. Such
behavior is wrong, since by default a random outgoing port should be used.

Reusing the same port confuses server implementation that is reached out,
since especially in context of DTLS over UDP, outgoing port defines TLS
context/session to be used. Such servers often ignore TLS packets from new
sessions (e.g. after device reboot) and result in failed DTLS connection
attempts.

Commit dbf3d6e911 ("drivers: esp_at: implement bind() and recvfrom() for
UDP sockets") added support for "server-side listening" for incoming
traffic on UDP sockets, which introduced broken behavior of using the same
remote and local port.

In esp_bind() implementation assign newly intorduced 'src' member, instead
of reusing 'dst'. Don't call AT+CIPSTART yet at this stage, as in case of
connect() Zephyr syscall esp_bind() (via bind_default() helper function) is
called implicitly to assign random generated local port, so remote port is
yet to be assigned. Check in esp_recv() whether socket was already
connected (i.e. esp_connect() was called) and if not, invoke
AT+CIPSTART (via _sock_connect()) to start listening on "server-side" UDP
socket.

This patch fixes broken behavior of always reusing the same local port for
outgoing UDP traffic. Instead, randomly generated (by Zephyr net_context
subsys) local port is used. Additionally bind() and recvfrom()
implementation (to handle server-side UDP sockets) is improved, so that
binding to 0.0.0.0 (on any interface) is possible.

Fixes: dbf3d6e911 ("drivers: esp_at: implement bind() and recvfrom() for
  UDP sockets")
Fixes: 424ea9f5e4 ("drivers: wifi: esp_at: do not connect socket on
  bind(INADDR_ANY)")
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-07-09 19:06:12 +02:00
Marcin Niestroj
2e956c239b drivers: wifi: esp_at: check if MAC address was parsed successfully
Log an error when MAC address was not parsed successfully.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-07-05 18:45:47 +02:00
Marcin Niestroj
4150765549 drivers: wifi: esp_at: use memcpy() to copy SSID
Target SSID buffer might not be NULL terminated, so use memcpy() instead of
strncpy() for copying it from temporary (AT response fragment) buffer.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-07-05 18:45:29 +02:00
John Johnson
15a1b6d5c2 drivers: esp_at: make esp_pull_quoted() to only return -EAGAIN
If no " character is found in buffer by esp_pull_quoted() it
returns -EAGAIN which causes a loop that never ends. This is because
the buffer dont get filled up with new data so no " chrachter will be
found. This commit changes esp_pull_quoted() to only return -EAGAIN,
so the buffer can get filled with new data and thus the loop can come
to an end.

Signed-off-by: John Johnson <john.filip.johnson@gmail.com>
2024-05-15 14:59:03 +02:00
Marcin Niestroj
3431d09f09 drivers: wifi: esp_at: fix missing channel in scan result
WiFi scan results were not updated with information about channel, after
scan results parsing was updated. Fix that.

Fixes: a6b06004c2 ("drivers: wifi: esp_at: handle commas in SSIDs during
  scan and status")
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-04-12 16:51:52 -04:00
Marcin Niestroj
424ea9f5e4 drivers: wifi: esp_at: do not connect socket on bind(INADDR_ANY)
All connect() syscalls result in EISCONN error, since underlying
_sock_connect() is attempted to be called twice. Once from net_context.c'
bind_default() (with INADDR_ANY) as part of esp_bind() and second time as
part of esp_connect().

Do not call _sock_connect() from esp_bind(INADDR_ANY), which happens as
part of connect().

Fixes: dbf3d6e911 ("drivers: esp_at: implement bind() and recvfrom() for
  UDP sockets")
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-04-10 12:23:12 -05:00
Jukka Rissanen
8860a81cfe drivers: Change drivers to support new IPv4 netmask setting API
Make sure that the drivers use the new IPv4 netmask setting API.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-03 18:58:29 +01:00
Marcin Niestroj
a6b06004c2 drivers: wifi: esp_at: handle commas in SSIDs during scan and status
SSIDs can contains commas (,) when receiving scan results (+CWLAP) or
status (+CWJAP) over AT command from ESP-AT chip. This is in conflict with
modem subsystem argument parsing, which separates arguments automatically
whenever comma is encountered.

Use a direct modem command parsing, so that commas within quoted strings
are taken into account to be part of that string, instead of being treated
as delimiter.

This solves `wifi scan` and `wifi status` Zephyr shell commands output, for
networks containing commas (like "My_2,4GHz_AP") as part of SSID.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-02-28 18:02:44 +00:00
Marcin Niestroj
de30757d21 drivers: wifi: esp_at: escape SSID and PSK
According to [1], SSID and PSK need to be escaped:

  Escape character syntax is needed if SSID or password contains any
  special characters, such as , or " or \

Implement character escaping to fix connection attempt to WiFi APs
containing special characters as part of SSID, like "My_2,4GHz_AP".
Increase "connect command" buffer length to handle worst-case scenario of
all the SSID and PSK characters being special characters.

[1] https://docs.espressif.com/projects/esp-at/en/release-v2.4.0.0/esp32/AT_Command_Set/Wi-Fi_AT_Commands.html#id6

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-02-28 18:02:44 +00:00
John Johnson
dbf3d6e911 drivers: esp_at: implement bind() and recvfrom() for UDP sockets
Implement bind() and recvfrom() for UDP sockets. This is achived by
setting remote field in net_pkt which in return makes recvfrom() fill
in *src_addr. This is only implemented for passiv mode and CIPDINFO needs
to be enabled. Also set net_if to non-dormant when enabling AP mode to
make binding to a port and address possible.

Signed-off-by: John Johnson <john.filip.johnson@gmail.com>
2024-02-26 12:21:47 +01:00
Thomas Stranger
ade3c72a35 drivers: wifi: esp_at: fix ssid_len calucation for AP query.
The driver seems to be designed to use the very last byte of the
buffer(scan, connect), so null terminating the status query
might have unintended consequences.
However we should not use strlen to determine the ssid_len,
to avoid depending on the following buffer(bssid) to be zeroed.
Related to CID 316354

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2024-02-16 10:15:37 -06:00
Jordan Yates
ef21569ac9 wifi: conn_mgr connectivity bindings
Bind WiFi network devices to the generic WiFi connectivity backend if
the appropriate option is set.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2024-01-30 18:51:46 -05:00
Jordan Yates
7e7ab495c3 wifi: esp_at: compile without NET_NATIVE_IPV4
Allow the driver to compile without `CONFIG_NET_NATIVE_IPV4`. This can
happen if the driver is only desired for SSID scanning.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2024-01-17 14:42:19 +01:00
Chun-Chieh Li
173e4983fd drivers: wifi: esp_at: fix last rx data loss in Passive Receive mode
In Passive Receive mode, ESP modem will buffer rx data.
This fix makes the data still available to user,
even though the peer has closed the socket.
Otherwise, user will fail to get the last rx data,
when the socket is closed by the peer.

Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
2024-01-03 10:21:09 +01:00
Krzysztof Chruściński
0f79f3a4c0 drivers: wifi: esp_at: Add dependency to UART runtime configuration
Force enabling of the UART runtime configuration for ESP AT driver.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2023-11-15 10:02:18 +01:00
Benedikt Schmidt
a03f1010b8 drivers: fix thread function signatures
Fix thread function signatures to avoid stack corruption on thread exit.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2023-10-30 12:24:34 +01:00
Fabio Baltieri
2a2b314fc4 drivers: fix few mismatched CONTAINER_OF
Fix few mismatched CONTAINER_OF, one missing k_work_delayable_from_work
conversion and few cases where the target should be pointing at the
first element explicitly.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-08-30 10:21:23 +02:00
Chaitanya Tata
a132487fec net: wifi: Move Wi-Fi ops to a separate struct
Decouple interface and Wi-Fi APIs, Wi-Fi APIs are common independent of
Wi-Fi offload or implemented natively (This is preparation for
introducing Native Wi-Fi).

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2023-07-11 14:55:30 +02:00
Jordan Yates
3a10923bbf drivers: wifi: esp_at: use dormant states
Update ESP AT modem driver to control the network interface dormant
state based on the network connection status, as described in the docs.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2023-07-07 09:16:31 +02:00
Jordan Yates
21ed808ba1 drivers: wifi: esp_at: handle external reset sources
Add an option that signifies that the ESP modem may be reset at the same
time as the SoC by an external source. When this is the case, we first
wait for an unsolicited "ready" message from the modem, before
attempting to reset the device. This prevents two initialisation
sequences attempting to run at the same time.

We still want to wait for the complete initialisation sequence to
complete before returning in this case.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2023-07-05 14:14:51 +02:00
Jordan Yates
542aec673d drivers: wifi: esp_at: don't disable carrier in init
Don't unconditionally set the carrier to the off state in
`esp_iface_init`, as this is already done in `esp_reset` and the
function may be called after the modem has already completed the init
sequence and called `net_if_carrier_on`.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2023-07-05 14:14:51 +02:00
Jordan Yates
91d6561bf4 drivers: wifi: esp_at: wait for init again
Wait for the init process to finish again, previously removed in
a8e6fc0b83. The original reasoning (deadlock with net interface locking)
no longer applies now that `esp_reset` is called in the device init
function, not in `esp_iface_init` (332a6f084a).

Without this change, if `reset-gpios` or `power-gpios` is set,
`device_is_ready` will return true even if the chip has fallen off the
board, as no communication is validated with the board.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2023-07-05 14:14:51 +02:00
Ajay Parida
69fead1998 net: mgmt: Support for forced Passive scan
Default scan mode is Active. User can force the scan mode to passive
through Kconfig option or using 'passive' option from shell.
Using either of this option will override regulatory settings and
forces all scan channels to be passive only.

Signed-off-by: Ajay Parida <ajay.parida@nordicsemi.no>
2023-06-29 21:05:41 +02:00
Chaitanya Tata
7987098497 drivers: wifi: Register Wi-Fi architecture type
Identify the Wi-Fi capability to the networking stack and also the type
of Wi-Fi (Native vs Offloaded), this helps identifying Wi-Fi interfaces
that can be used by applications.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2023-06-26 16:12:32 +02:00
Bjarki Arge Andreasen
aa6ecc59d1 drivers/modem/modem_cmd_handler: Update API
There is currently not a clear separation between
user configuration and internal context when using the
modem_cmd_handler library. This update adds a clear
separation, placing user configuration in a seperate
struct passed to modem_cmd_handler_init alongside the
internal context modem_cmd_handler_data.

There is also a lack of documentation of the user
configurations, these have been added to the new config
struct.

The new API function modem_cmd_handler_process has been
added to remove the need for the user to directly access
the process member of the internal context. This ensures
that the user is not encouraged to access any internal
context members.

Some whitespace errors exist in the modem_cmd_handler.c
file, these are outside of the scope of this PR. These
can be addressed in a later PR as they are not functional
changes.

Signed-off-by: Bjarki Arge Andreasen <baa@trackunit.com>
2023-04-11 11:42:00 +02:00
Bjarki Arge Andreasen
a4afcf8c93 drivers/modem/modem_iface_uart: Update API
The UART IFACE API currently exposes the context struct
modem_iface_uart_data, expecting the user to fill in some
of the fields, with no documentation specifying which fields
and what they mean.

This API update moves all user configurable values in the context
out into a config struct, modem_iface_uart_config, within which
members are documented.

This prevents the user from interacting directly with the context
making use of the library safer and more readable.

The config structure helps make code readable by using "named args"
in a const struct instead of a long, nameless, parameter list passed
to the modem_iface_uart_init function.

The new API function modem_iface_uart_rx_wait is added to prevent the
user from having to interact with the rx sem in the context directly.

The context can now be safely interated with without direct access to
any of its members.

Pointers to the ring buffer params in the context have been moved to
config struct, as these are only useful during initialization of the
context.

Signed-off-by: Bjarki Arge Andreasen <baa@trackunit.com>
2023-04-11 11:42:00 +02:00
Georges Oates_Larsen
3c6b7dc35a net: dummy L2 for offloaded ifaces
Adds dummy link layer for offloaded ifaces, allowing
ifaces to directly receive l2_enable calls

Signed-off-by: Georges Oates_Larsen <georges.larsen@nordicsemi.no>
2023-03-20 09:53:25 +01:00
Marcin Niestroj
2087579d8e drivers: wifi: esp_at: support WiFi 'iface_status' callback
This allows to fetch information about currently connected WiFi network,
e.g. with WiFi mgmt shell commands:

  uart:~$ wifi status
  Status: successful
  ==================
  State: COMPLETED
  Interface Mode: STATION
  Link Mode: UNKNOWN
  SSID: Tp-Link
  BSSID: xx:xx:xx:xx:xx:xx
  Band: 2.4GHz
  Channel: 13
  Security: UNKNOWN
  MFP: UNKNOWN
  RSSI: -39

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2023-02-21 18:09:40 +01:00
Marcin Niestroj
650b244215 drivers: wifi: esp_at: fetch version of ESP-AT firmware
For development and debugging purposes it is good to know what is the
version of ESP-AT firmware used on modem. This can be fetched with AT+GMR
command.

Fetch this information during driver init and log all available version
strings, so they look like that:

  wifi_esp_at: AT version: 2.1.0.0(883f7f2 - Jul 24 2020 11:50:07)
  wifi_esp_at: SDK version: v4.0.1-193-ge7ac221
  wifi_esp_at: compile time: (0ad6331):Jul 28 2020 02:47:21
  wifi_esp_at: Bin version: 2.1.0(WROOM-32)

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2023-02-21 15:04:08 +01:00
Robert Lubos
5798a7b359 drivers: wifi: esp_at: Align driver with iface status upgrade
Align the offloaded esp_at driver with interface state handling update.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2022-10-20 10:00:31 +02:00
Gerard Marull-Paretas
cfd3560e1b device: s/Z_DEVICE_DT_DEV_NAME/Z_DEVICE_DT_DEV_ID
Rename Z_DEVICE_DT_DEV_NAME to Z_DEVICE_DT_DEV_ID to make it more clear,
as the macro is generating a token that identifies the created struct
device.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-10-04 10:13:34 +02:00
Florian Grandel
c57650c403 net: context: clean up net_context_get()
* reduced cyclomatic complexity
* group validation by family to make the validation easier to understand
and extend
* change preprocessor markup where possible to allow for complete code
elimination when features (esp. IP) are disabled
* renamed net_context_get/set_ip_proto() to net_context_get_proto()

While the latter is formally part of the public API and might therefore
have to be deprecated rather than renamed, it is considered internal API
by the net developers, see
https://github.com/zephyrproject-rtos/zephyr/pull/48751#discussion_r942402612

Signed-off-by: Florian Grandel <jerico.dev@gmail.com>
2022-09-05 14:35:17 +00:00
Kumar Gala
25cb2bff74 drivers: wifi: Update drivers to use devicetree Kconfig symbol
Update Wifi drivers to use DT_HAS_<compat>_ENABLED Kconfig symbol
to expose the driver and enable it by default based on devicetree.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-31 21:57:06 +00:00
Sylvio Alves
20c3256016 net: wifi: Allow to use offloaded wifi_mgmt API with native stack
wifi drivers that depends on native ethernet stack cannot perform
wifi API calls missing availability. This changes adds the ethernet_api
interface in wifi_mgmt so that it becomes possible.

Naming "offload" in "struct net_wifi_mgmt_offload" is kept because
Zephyr still has no supplicant to handle a full non-offloaded driver.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2022-08-29 17:31:17 +02:00
Aleksandar Markovic
9b0a506cf0 wifi: esp_at: Fix Coverity issues related to ESP_MAX_DNS
If the preprocessor constant ESP_MAX_DNS is defined as 0,
Coverity reports a condition that can never be true, and some
dead code as well. This also violates MISRA rules on dead code.

This is caused by this segment in drivers/wifi/esp_at/esp.h:

 #if defined(CONFIG_WIFI_ESP_AT_DNS_USE)
 #define ESP_MAX_DNS	MIN(3, CONFIG_DNS_RESOLVER_MAX_SERVERS)
 #else
 #define ESP_MAX_DNS	0
 #endif

Fix this by never setting ESP_MAX_DNS to 0, as is the currently
case. Define ESP_MAX_DNS only if it is configured through
CONFIG_WIFI_ESP_AT_DNS_USE and CONFIG_DNS_RESOLVER_MAX_SERVERS:

 #if defined(CONFIG_WIFI_ESP_AT_DNS_USE)
 #define ESP_MAX_DNS	MIN(3, CONFIG_DNS_RESOLVER_MAX_SERVERS)
 #endif

Since CONFIG_DNS_RESOLVER_MAX_SERVERS is 1 or greater, ESP_MAX_DNS
will always be greater than 0.

If, on the other hand, ESP_MAX_DNS is not defined, relevant
functions will be reduced to empty stubs, since in that case
they do not make sense.

There could be a cleaner solution to this, but this one is the
least intrusive (involves less code changes).

Coverity-CID: 219490
Coverity-CID: 219513
Coverity-CID: 219520
Coverity-CID: 219524

Signed-off-by: Aleksandar Markovic <aleksandar.markovic.sa@gmail.com>
2022-07-04 16:06:41 +02:00