eiwd

no dbus iwd with iwctl functionality
git clone https://git.daat.foo/repos/eiwd.git
Log | Files | Refs | Submodules | README | LICENSE

commit 77c366ba2ec8cb40df823c52976820741abb7bc6
parent 103eeb2cc6c398b60bec2263c7e98bde550714df
Author: James Prestwood <prestwoj@gmail.com>
Date:   Tue,  9 Aug 2022 16:04:26 -0700

netdev: handle packet loss notification

This attribute was already handled and simply printed. Now a
netdev event will be sent to notify any listeners.

Diffstat:
Msrc/netdev.c | 8+++++---
1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/netdev.c b/src/netdev.c @@ -1073,6 +1073,7 @@ static void netdev_cqm_event(struct l_genl_msg *msg, struct netdev *netdev) const void *data; uint32_t *rssi_event = NULL; int32_t *rssi_val = NULL; + uint32_t *pkt_event = NULL; if (!l_genl_attr_init(&attr, msg)) return; @@ -1096,8 +1097,7 @@ static void netdev_cqm_event(struct l_genl_msg *msg, struct netdev *netdev) if (len != 4) continue; - l_debug("Packets lost event: %d", - *(uint32_t *) data); + pkt_event = (uint32_t *) data; break; case NL80211_ATTR_CQM_BEACON_LOSS_EVENT: @@ -1128,7 +1128,9 @@ static void netdev_cqm_event(struct l_genl_msg *msg, struct netdev *netdev) l_debug("Signal change event (above=%d)", *rssi_event); netdev_cqm_event_rssi_threshold(netdev, *rssi_event); } - } + } else if (pkt_event && netdev->event_filter) + netdev->event_filter(netdev, NETDEV_EVENT_PACKET_LOSS_NOTIFY, + pkt_event, netdev->user_data); } static void netdev_rekey_offload_event(struct l_genl_msg *msg,