ieee802154: add rx LQI from userspace
authorRomuald CARI <romuald.cari@devialet.com>
Thu, 7 Jun 2018 14:08:02 +0000 (16:08 +0200)
committerStefan Schmidt <stefan@datenfreihafen.org>
Fri, 13 Jul 2018 16:18:18 +0000 (12:18 -0400)
commit811e299f4645588cc7a1b78d97b6847c155324b9
treeab73de5d56f6d2ac75a1cecc4096184abe6dda5f
parent430ac34de9693bfe4bea0bab830e0ca0be9ef4b9
ieee802154: add rx LQI from userspace

The Link Quality Indication data exposed by drivers could not be accessed from
userspace. Since this data is per-datagram received, it makes sense to make it
available to userspace application through the ancillary data mechanism in
recvmsg rather than through ioctls. This can be activated using the socket
option WPAN_WANTLQI under SOL_IEEE802154 protocol.

This LQI data is available in the ancillary data buffer under the SOL_IEEE802154
level as the type WPAN_LQI. The value is an unsigned byte indicating the link
quality with values ranging 0-255.

Signed-off-by: Romuald Cari <romuald.cari@devialet.com>
Signed-off-by: Clément Peron <clement.peron@devialet.com>
Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
include/net/af_ieee802154.h
net/ieee802154/socket.c