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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
This commit simplifies the access to structure members and omits
unnecessary variable initializations.
Specific adjustments include:
- Moving from pointer-based access (`(®d)->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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Implement if_indextoname(), if_freenameindex(), if_nameindex(),
and if_nametoindex() by wrapping around networking subystem
calls.
Signed-off-by: Chris Friedt <chrisfriedt@gmail.com>