Messages in this thread | | | Date | Mon, 9 Jul 2018 17:17:54 -0400 | From | Alexander Aring <> | Subject | Re: [PATCH] ieee802154: add rx LQI from userspace |
| |
On Mon, Jul 09, 2018 at 10:49:08AM +0200, Stefan Schmidt wrote: > Hello Clement. > > Finally coming to review the patch. Sorry for the delay. .... > > > > + if (ro->want_lqi) { > > + err = put_cmsg(msg, SOL_IEEE802154, WPAN_WANTLQI, > > + sizeof(uint8_t), &(mac_cb(skb)->lqi)); > > + if (err) > > + goto done; > > + } > > + > > I am wondering a bit about the LQI you get back here. Maybe Alex can > also shed some lights on it. The LQI value stored here is always from > the last frame send (to any peer)? Or is it the last frame send to this > specific peer? >
LQI is available only for per received frame [0], it's important to store it always when address information are available for the received frame. The peer you get from the socket layer so far I understood.
Storing means: maybe with some intelligent logic behind to calculate the average... one LQI value alone don't say anything. With this patch you can do such logic in user space as a LQI to peer database[1].
Otherwise we already talked about a similar handling as wireless does with "iw ... station dump" to have such handling in kernel - out of scope of this discussion.
Side notes:
[0] Ack frames has no address information but it refers to a transmitted frame with address information... so not always true. But ack handling is offloaded anyhow in the most cases.
[1] Getting complicated how to map a short/pan _and_ extended to _ONE_ peer entry. -> MLME assoc()/IPv6 ndisc information are needed here.
- Alex
| |