3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-25 17:59:25 +01:00

netdev: handle packet loss notification

This attribute was already handled and simply printed. Now a
netdev event will be sent to notify any listeners.
This commit is contained in:
James Prestwood 2022-08-09 16:04:26 -07:00 committed by Denis Kenzior
parent 103eeb2cc6
commit 77c366ba2e

View File

@ -1073,6 +1073,7 @@ static void netdev_cqm_event(struct l_genl_msg *msg, struct netdev *netdev)
const void *data; const void *data;
uint32_t *rssi_event = NULL; uint32_t *rssi_event = NULL;
int32_t *rssi_val = NULL; int32_t *rssi_val = NULL;
uint32_t *pkt_event = NULL;
if (!l_genl_attr_init(&attr, msg)) if (!l_genl_attr_init(&attr, msg))
return; return;
@ -1096,8 +1097,7 @@ static void netdev_cqm_event(struct l_genl_msg *msg, struct netdev *netdev)
if (len != 4) if (len != 4)
continue; continue;
l_debug("Packets lost event: %d", pkt_event = (uint32_t *) data;
*(uint32_t *) data);
break; break;
case NL80211_ATTR_CQM_BEACON_LOSS_EVENT: 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); l_debug("Signal change event (above=%d)", *rssi_event);
netdev_cqm_event_rssi_threshold(netdev, *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, static void netdev_rekey_offload_event(struct l_genl_msg *msg,