zephyr/subsys/net/ip
Florian Grandel b224a099fd net: l2: ieee802154: standardize RSSI value
The RSSI value in net_pkt (net_pkt_cb_ieee802154.rssi) was used
inconsistently across drivers. Some drivers did cast a signed dBm value
directly to net_pkt's unsigned byte value. Others were assigning the
negative value of the signed dBm value and again others were offsetting
and stretching the signed dBm value linearly onto the full unsigned byte
range.

This change standardizes net_pkt's rssi attribute to represent RSSI on
the RX path as an unsigned integer ranging from 0 (–174 dBm) to 254 (80
dBm) and lets 255 represent an "unknown RSSI" (IEEE 802.15.4-2020,
section 6.16.2.8). On the TX path the rssi attribute will always be
zero. Out-of-range values will be truncated to max/min values.

The change also introduces conversion functions to and from signed dBm
values and introduces these consistently to all existing call sites. The
"unknown RSSI" value is represented as INT16_MIN in this case.

In some cases drivers had to be changed to calculate dBm values from
internal hardware specific representations.

The conversion functions are fully covered by unit tests.

Fixes: #58494

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2023-06-17 07:16:32 -04:00
..
6lo_private.h
6lo.c net: ip: 6lo: Fix corner case with packet format after IPHC 2023-02-19 20:33:36 -05:00
6lo.h
canbus_socket.c
canbus_socket.h
CMakeLists.txt
connection.c
connection.h
dhcpv4.c net: DHCPv4: Add option callback 2023-05-22 15:25:40 +02:00
dhcpv4.h net: DHCPv4: Add option callback 2023-05-22 15:25:40 +02:00
icmpv4.c
icmpv4.h
icmpv6.c
icmpv6.h net: icmpv6: Implement IPv6 RA Recursive DNS Server option 2023-02-21 10:59:18 +01:00
igmp.c net: iface: Improve thread safety of net_if_ipv*_maddr_* functions 2023-05-10 11:06:15 +02:00
ipv4_autoconf_internal.h
ipv4_autoconf.c net: ipv4: Fix subnet mask setting when autoconf is used 2023-02-06 10:10:54 +01:00
ipv4_fragment.c net: ipv4: Fix fragmented packet NULL dereference possible 2023-04-26 14:34:23 +02:00
ipv4.c
ipv4.h net: context: Set priority based on DSCP 2023-05-16 13:21:25 +02:00
ipv6_fragment.c
ipv6_mld.c net: iface: Improve thread safety of net_if_ipv*_maddr_* functions 2023-05-10 11:06:15 +02:00
ipv6_nbr.c net: if: Add possibility to disable ND per interface 2023-04-29 12:24:49 +02:00
ipv6.c
ipv6.h net: context: Set priority based on DSCP 2023-05-16 13:21:25 +02:00
Kconfig net: allow UDP missing checksum by default 2023-05-23 22:09:47 +02:00
Kconfig.debug
Kconfig.ipv4 net: DHCPv4: Add option callback 2023-05-22 15:25:40 +02:00
Kconfig.ipv6 net: ipv6: Fix Kconfig dependencies when native IPv6 is disabled 2023-03-21 18:11:06 +00:00
Kconfig.mgmt net: Make net_mgmt queue timeout configurable 2023-04-28 10:35:27 -05:00
Kconfig.stack
Kconfig.stats
nbr.c
nbr.h
net_context.c net: context: Verify that laddr was set before use in connect 2023-06-12 14:03:04 -04:00
net_core.c init: remove the need for a dummy device pointer in SYS_INIT functions 2023-04-12 14:28:07 +00:00
net_if.c iterable_sections: move to specific header 2023-05-22 10:42:30 +02:00
net_mgmt.c net: Make net_mgmt queue timeout configurable 2023-04-28 10:35:27 -05:00
net_pkt.c net: pkt: Fix possible NULL dereference at net_pkt_cursor_operate() 2023-05-08 17:40:41 +09:00
net_private.h net: wifi_mgmt: Support to provide raw scan data 2023-05-12 10:50:21 +00:00
net_shell.c net: l2: ieee802154: standardize RSSI value 2023-06-17 07:16:32 -04:00
net_shell.h
net_stats.c
net_stats.h
net_tc_mapping.h
net_tc.c
net_timeout.c
packet_socket.c
packet_socket.h
promiscuous.c
route.c
route.h
tcp_internal.h net: socket: asynchronous connect 2023-04-17 11:35:20 +02:00
tcp_private.h net: socket: asynchronous connect 2023-04-17 11:35:20 +02:00
tcp.c net: tcp: Fix possible double TCP context dereferencing 2023-06-06 11:11:22 -04:00
tcp.h net: tcp: Remove net_tcp_unref() 2023-01-26 12:34:04 +00:00
tp_priv.h
tp.c
tp.h
trickle.c
udp_internal.h
udp.c
utils.c net: utils: fix offset used before range check 2023-06-16 05:46:05 -04:00