Commit graph

93233 commits

Author SHA1 Message Date
Jukka Rissanen b4bf23220d doc: migration-guide-3.7: Add NET_SOCKETS_POSIX_NAMES info
Add CONFIG_NET_SOCKETS_POSIX_NAMES deprecation information.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-27 13:40:13 -05:00
Jukka Rissanen 9dad97ae95 doc: net: Remove the mention of NET_SOCKETS_POSIX_NAMES
The option is deprecated so remove it from documentation.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-27 13:40:13 -05:00
Jukka Rissanen 515f547348 mgmt: mcumgr: transport: udp: Select POSIX_API
The NET_SOCKET_POSIX_NAMES is deprecated so enable POSIX_API
to use the socket API.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-27 13:40:13 -05:00
Jukka Rissanen f27a26f9ec mgmt: updatehub: Use zsock_ API functions
The library should be using internal socket API functions
so that we do not need to depend on POSIX_API.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-27 13:40:13 -05:00
Jukka Rissanen 5c3fa85bc8 samples: net: Change to use CONFIG_POSIX_API
Change the sample applications that use network socket API to
use the POSIX_API config because the NET_SOCKETS_POSIX_NAMES is
deprecated. Convert also the zsock_ API calls to plain BSD
socket API calls when applicable.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-27 13:40:13 -05:00
Jukka Rissanen 0512e7ffae tests: net: sockets: Remove use of NET_SOCKETS_POSIX_NAMES
The setting is deprecated so change the code to either use the
native zsock_* API or enable POSIX_API to use the BSD socket API.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-27 13:40:13 -05:00
Jukka Rissanen d67fb8321c tests: net: socket: tls_ext: Use POSIX_API
The test expects to use various POSIX APIs so enable the config.
Enabling POSIX_API requires also increase of max file descriptors.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-27 13:40:13 -05:00
Jukka Rissanen 1b07425ead net: websocket: Use zsock_ API calls
Use zsock_ API calls so that we do not need to enable POSIX_API.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-27 13:40:13 -05:00
Jukka Rissanen de52f8924f net: socks: Remove socket selection
Currently the socks library does not use sockets so there
is no need to select socket symbols.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-27 13:40:13 -05:00
Jukka Rissanen 79585d5355 net: tftp: Use zsock_ API functions
The library should be using internal socket API functions
so that we do not need to depend on POSIX_API inside the
network stack.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-27 13:40:13 -05:00
Jukka Rissanen 4a128c0d2a net: sockets: Fix the documentation to use POSIX_API
Fix the documentation and promote POSIX_API instead of
NET_SOCKET_POSIX_NAMES

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-27 13:40:13 -05:00
Jukka Rissanen e6e6bb4242 net: socket: Create zsock_fcntl and fsock_ioctl functions
Have special wrappers for zsock_fcntl and zsock_ioctl functions
so that gcc warning can be avoided.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-27 13:40:13 -05:00
Jukka Rissanen dc203f0d75 net: socket: Rework the zephyr/net/socket.h header
Avoid circular inclusion of socket related header files.
This way applications can still continue to include
zephyr/net/socket.h and not need to separately include
POSIX socket headers.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-27 13:40:13 -05:00
Jukka Rissanen 3eeb0f0c7f net: sockets: Deprecate CONFIG_NET_SOCKETS_POSIX_NAMES
The CONFIG_NET_SOCKETS_POSIX_NAMES option is marked as deprecated in
favor of using normal POSIX socket API includes found under the
include/zephyr/posix directory. If you want to use BSD socket API calls,
you need to select POSIX_API and use the socket headers found in the
POSIX subsystem. If you do not want to or cannot enable POSIX_API,
then you must use zsock_ prefix when working with BSD socket calls.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-27 13:40:13 -05:00
Hake Huang f419ea7990 runner: linkerserver : remove the probe ID hardcode
linkserver is hardcoded to probe ID, now with #70343 merged
the probe ID restriction can be removed.

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2024-03-27 15:19:15 +00:00
Declan Snyder 353c6a66cb dts: bindings: ethernet: Remove fixed link
Remove ethernet-fixed-link binding as it is redundant with the
phy bindings. Clearly, ethernet does not work without the L1
layer, which is a phy device, or an integrated mac/phy device,
and all of these things should be described properly in DT.
The schema did not even come with a compatible, meaning nodelabels
were hardcoded into the drivers, which is unacceptable.

- Remove the binding file for ethernet-fixed-link.yaml.
- Remove fixed link functionality from the nxp s32 gmac driver.
  Since this functionality is already covered by the phy support,
  it is redundant.
- Remove fixed link include from the s32 gmac binding.
- Remove fixed link include from the nuvoton numaker binding.
  As far as I can tell the corresonding driver does not even
  use it anyways, and I did not find any board with this device
  that describes a "fixed link".
- Move the definition into the nxp,kinetis-ethernet binding
  as the eth_mcux driver, which is already being deprecated,
  does use this, contain the debt to the legacy driver.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-03-27 15:18:54 +00:00
Raffael Rostagno b17712364c drivers: systimer: Removed mention to ESP32C3
Removed mention to C3 SoC, so files are not SoC specific. Ready for C6
integration.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-03-27 15:18:45 +00:00
Jordan Yates 5c8f357f61 west_commands: sign: suppress imgtool prints
If `args.quiet` is set, suppress the useless `print` statements output
by `imgtool` (mcuboot script) by capturing `stdout`.

Old output:
```
[44/44] Linking C executable zephyr/zephyr.elf
Memory region         Used Size  Region Size  %age Used
           FLASH:      415192 B       824 KB     49.21%
             RAM:      163124 B       256 KB     62.23%
        IDT_LIST:          0 GB         2 KB      0.00%
image.py: sign the payload
image.py: sign the payload
```
New output:
```
[44/44] Linking C executable zephyr/zephyr.elf
Memory region         Used Size  Region Size  %age Used
           FLASH:      415192 B       824 KB     49.21%
             RAM:      163124 B       256 KB     62.23%
        IDT_LIST:          0 GB         2 KB      0.00%
```

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2024-03-27 15:18:23 +00:00
Fabian Kainka 24c03bfacb serial: uart_native_tty: Polling thread fix
Addresses an issue where attempts to transmit data fail.
The identified cause of this failure is the handling of the
`rx_irq_enable` and `tx_irq_enable` flags. The `else if` handling the
`tx_irq_enable` was replaced by an `if` so both flags can be true,
and both functions can be called. This fix was tested with the
`cellular_modem` example successfully.

Signed-off-by: Fabian Kainka <kainka@cognid.de>
2024-03-27 15:18:11 +00:00
Nithin Ramesh Myliattil a1893c5890 Bluetooth: Audio: Scan Delegator: update bass_source_is_duplicate fn
Address type is passed as an argument instead of the entire address.

Signed-off-by: Nithin Ramesh Myliattil <niym@demant.com>
2024-03-27 15:18:01 +00:00
Fredrik Danebjer 0fe8ddd75e Bluetooth: Audio: Scan Delegator: Guard for duplication in add_source
Added a check for duplication of add source operation in the Scan
Delagator. BAP 6.5.4 states that an assistant may not perform add
source operation if it results in a duplication of a source. While
this is not mentioned for the Scan Delegator, the spirit of the spec.
must be that no duplications can exists in the recv_state, which is
what this commit fixes.

Signed-off-by: Fredrik Danebjer <frdn@demant.com>
2024-03-27 15:18:01 +00:00
Jonathan Rico d73b6e50b9 doc: bsim: Add three more rules
On the request of the maintainer.

Background:

We have recently had issues with tests timing out because of the
difference of speed between CI runners and a standard developer machine.

In that case, the logs are printed, and some tests (by yours truly) are
a bit on the chatty side. Github's UI chokes (for a good minute or more
lol) on more than a few hundred lines, so it's a bad experience for
contributors.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-03-27 14:34:01 +00:00
Jonathan Rico 97d47204c5 doc: bsim: Reword test script conventions
Try to make it more terse, and remove duplicate lines.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-03-27 14:34:01 +00:00
Jonathan Rico da7ce2f333 doc: bsim: Add paragraph about runner conventions
Alberto had a bad time.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-03-27 14:34:01 +00:00
Pisit Sawangvonganan e145eb9201 net: wifi: shell: adopt getopt_state for safer optarg access
By using `getopt_state` to access `optarg`, offering a better alternative
to direct global `optarg` access.

This approach mitigates the risks associated with concurrent access to
the global variable.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-03-27 14:33:51 +00:00
Pisit Sawangvonganan a6865c4191 net: wifi: shell: apply struct option as static const
This change marks each instance of the `struct option` as `static const`.

The rationale is that `struct option` is a read-only variable.
By using `static const`, we ensure immutability, leading to usage of only
the `.rodata` section and a reduction in the `.data` area.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-03-27 14:33:51 +00:00
Pisit Sawangvonganan d9c6d30c25 net: wifi: shell: streamlined local variable initializations
This commit simplifies the access to structure members and omits
unnecessary variable initializations.

Specific adjustments include:
- Moving from pointer-based access (`(&regd)->chan_info`) to
  direct structure member access (`regd.chan_info`).
- Removing explicit initializations where not required.
- Removing excess backslashes '\' before '%' in the format string.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-03-27 14:33:51 +00:00
Aleksander Wasaznik d4d84b0ac9 Bluetooth: tests: bsim: host/adv/resume2
This test is an attempt at formalizing at least part of the behavior
described in commit 6a79c3deae.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2024-03-27 14:33:31 +00:00
Arkadiusz Cholewinski 370dadbdab CI: Fix coverage analysis.
Fix for parsing testplan.

Signed-off-by: Arkadiusz Cholewinski <arkadiuszx.cholewinski@intel.com>
2024-03-27 14:32:53 +00:00
Jukka Rissanen d1ef9167da net: if: Make sure no other interface has same name
When setting a name to a network interface, verify that no other
interface has the same name as that would make very difficult to
select an interface by a name.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-27 14:32:34 +00:00
Andy Sinclair c7f59c9e40 drivers: mfd: npm1300: Added long press reset config
Added configuration of long press reset functionality.
Includes ship/hibernate to wake debounce time and
disabled/one_button/two_button mode selection.

Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
2024-03-27 14:32:17 +00:00
Kamil Paszkiet fff833eda4 scripts: tests: Blackbox test expansion - filter
Adds tests related to filter flags:
--arch
--vendor

Signed-off-by: Kamil Paszkiet <kamilx.paszkiet@intel.com>
2024-03-27 14:31:43 +00:00
Angelo Dureghello e0a1e69262 drivers: ethernet: eth_adin2111: use NET_ETH_ADDR_LEN
Use new NET_ETH_ADDR_LEN definition.

Signed-off-by: Angelo Dureghello <adureghello@baylibre.com>
2024-03-27 14:31:21 +00:00
Angelo Dureghello 180c423c80 drivers: ethernet: eth_adin2111: fix port to port_idx
Fix all references of port to port_idx to be uniform.

Signed-off-by: Angelo Dureghello <adureghello@baylibre.com>
2024-03-27 14:31:21 +00:00
Angelo Dureghello 569ebc247a drivers: ethernet: eth_adin2111: enable promiscuous mode
Add promiscuous mode support.

Signed-off-by: Angelo Dureghello <adureghello@baylibre.com>
2024-03-27 14:31:21 +00:00
Angelo Dureghello 2cebc0f307 drivers: ethernet: eth_adin2111: extend api support
Extend api support with new functionalities.

Signed-off-by: Angelo Dureghello <adureghello@baylibre.com>
2024-03-27 14:31:21 +00:00
Angelo Dureghello dd8072abb3 drivers: ethernet: eth_adin2111: adjust multicast filter
Multicast rule as 01:00:00:00:00:00 is actually shadowing
broadcast rule, enabling broadcast packets to be received/forwarded
even if broadcast rule/filter is not set.

Set the multicast filter with an appropriate mask.

Signed-off-by: Angelo Dureghello <adureghello@baylibre.com>
2024-03-27 14:31:21 +00:00
Angelo Dureghello 9eef10d436 net: ethernet: add definition for mac address length
Add a define for the mac address length, to be used as needed
in place of hardcoded 6.

Signed-off-by: Angelo Dureghello <adureghello@baylibre.com>
2024-03-27 14:31:21 +00:00
Ioannis Karachalios 5cf6133dae boards: renesas: smartbond: Update display settings
This commit should fix configuration conflicts that
came up upon merging both MIPI DBI and display panel
drivers.

1. Board's display/LVGL Kconfigs should be enabled when
   needed based on the selected display interface.
2. Overwrite the touch controller's I2C pins to avoid
   conflicts with the display panel signals.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2024-03-27 14:30:37 +00:00
Nathan Olff 13deb0365c drivers: sensor: dht20: implement new driver
The DHT20 sensor is a temperature and humidity sensor that uses I2C to
communicate with a microcontroller. The DHT20 sensor is Aosong.

use standard crc

update description to add reference to AHT20 and AM2301B

clean code, use defines and bit manipulation

add dht20 to i2c test suite for build tests

update bit manipulation

use more defines instead of raw numbers

add bindings to allow aht20 or am2301b to be used in devicetree

in all 3 cases, the same dht20.c driver is compiled

Signed-off-by: Nathan Olff <nathan@kickmaker.net>
2024-03-27 14:29:54 +00:00
Robert Zieba 6049bbf4e0 gdbstub: Ignore indexing warning with -Warray-bounds
The current implementation can raise a warning as the compiler sees
an attempt to index an array with a size of zero. This can be fixed by
giving `gdb_mem_num_regions` a default value of zero, but this gets
flagged by CI checks. Disable the warning around the array access.

Signed-off-by: Robert Zieba <robertzieba@google.com>
2024-03-27 09:58:36 -04:00
Chris Friedt 0bcf71e28a doc: posix: add POSIX_NETWORKING Option Group and mark supported
Mark the POSIX_NETWORKING Option Group as supported. The
POSIX_NETWORKING Option Group is required for PSE53 Conformance.

Signed-off-by: Chris Friedt <chrisfriedt@gmail.com>
2024-03-27 07:36:18 -04:00
Chris Friedt fc725a7ce3 tests: posix: headers: uncomment check for sockatmark()
Uncomment the check for sockatmark() to ensure that the function
is declared in sys/socket.h, as a stub implementation was added
in the previous commit.

Signed-off-by: Chris Friedt <chrisfriedt@gmail.com>
2024-03-27 07:36:18 -04:00
Chris Friedt 494493a3b8 posix: net: add a trivial implementation of sockatmark()
Add a trivial implementation of sockatmark().

Signed-off-by: Chris Friedt <chrisfriedt@gmail.com>
2024-03-27 07:36:18 -04:00
Chris Friedt 6720c92f3e tests: posix: headers: uncomment netdb.h tests
Uncomment netdb.h tests now that we have an implementation and
can check for the existence of e.g. hostent, netent, protoent,
and servent structure fields, as well as associated accessor
functions.

Signed-off-by: Chris Friedt <chrisfriedt@gmail.com>
2024-03-27 07:36:18 -04:00
Chris Friedt 62031f5daa posix: net: add trivial netdb function implementations
Add trivial function implementations for those declared in
netdb.h .

Signed-off-by: Chris Friedt <chrisfriedt@gmail.com>
2024-03-27 07:36:18 -04:00
Chris Friedt 9e5f54f017 tests: posix: net: add tests for if_nameindex et al
Add tests for if_indextoname(), if_freenameindex(),
if_nameindex(), and if_nametoindex().

Signed-off-by: Chris Friedt <chrisfriedt@gmail.com>
2024-03-27 07:36:18 -04:00
Chris Friedt 7b9bf85d9b tests: posix: headers: uncomment net/if.h tests
Uncomment net/if.h tests in tests/posix/headers since we now
have an implementation and can check for the existence of
structures, functions, etc.

Signed-off-by: Chris Friedt <chrisfriedt@gmail.com>
2024-03-27 07:36:18 -04:00
Chris Friedt a00eeb638a posix: net: implement if_nameindex() et al
Implement if_indextoname(), if_freenameindex(), if_nameindex(),
and if_nametoindex() by wrapping around networking subystem
calls.

Signed-off-by: Chris Friedt <chrisfriedt@gmail.com>
2024-03-27 07:36:18 -04:00
Chris Friedt bfb91da5ec tests: posix: net: tests for inet_ntoa()
Add tests for inet_ntoa()

Signed-off-by: Chris Friedt <chrisfriedt@gmail.com>
2024-03-27 07:36:18 -04:00