diff --git a/drivers/include/net/netdev.h b/drivers/include/net/netdev.h index d69e238674c724894e1e25f02cd1662c323796ec..70f44c2b4db2563fcd526255ae447899cbcd8922 100644 --- a/drivers/include/net/netdev.h +++ b/drivers/include/net/netdev.h @@ -245,7 +245,7 @@ typedef enum { * May be different for certain radios. */ struct netdev_radio_rx_info { - uint8_t rssi; /**< RSSI of a received packet */ + int16_t rssi; /**< RSSI of a received packet in dBm */ uint8_t lqi; /**< LQI of a received packet */ }; diff --git a/sys/include/net/gnrc/netif/hdr.h b/sys/include/net/gnrc/netif/hdr.h index b1e101efd6bae771eb1a57d78b864d28fb5c495f..b4ab577f97640ee805c23e40562eca8dd9d17b16 100644 --- a/sys/include/net/gnrc/netif/hdr.h +++ b/sys/include/net/gnrc/netif/hdr.h @@ -85,7 +85,7 @@ typedef struct { uint8_t dst_l2addr_len; /**< length of l2 destination address in byte */ kernel_pid_t if_pid; /**< PID of network interface */ uint8_t flags; /**< flags as defined above */ - uint8_t rssi; /**< rssi of received packet (optional) */ + int16_t rssi; /**< rssi of received packet in dBm (optional) */ uint8_t lqi; /**< lqi of received packet (optional) */ } gnrc_netif_hdr_t; diff --git a/sys/net/gnrc/netif/hdr/gnrc_netif_hdr_print.c b/sys/net/gnrc/netif/hdr/gnrc_netif_hdr_print.c index bec00cef9e435492200dd6fa8f20dfdf41f47b24..403941daa17282d259dba385724a0e7108816944 100644 --- a/sys/net/gnrc/netif/hdr/gnrc_netif_hdr_print.c +++ b/sys/net/gnrc/netif/hdr/gnrc_netif_hdr_print.c @@ -23,7 +23,7 @@ void gnrc_netif_hdr_print(gnrc_netif_hdr_t *hdr) char addr_str[GNRC_NETIF_HDR_L2ADDR_PRINT_LEN]; printf("if_pid: %u ", (unsigned) hdr->if_pid); - printf("rssi: %u ", (unsigned) hdr->rssi); + printf("rssi: %d ", (signed) hdr->rssi); printf("lqi: %u\n", (unsigned) hdr->lqi); printf("flags: ");