From aa7845ca98d3b5d1116f8d495c7f629298c9e90a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alvin=20=C5=A0ipraga?= Date: Thu, 5 Aug 2021 17:40:24 +0200 Subject: [PATCH] netdev: update frequency on channel switch events While we correctly emit a NETDEV_EVENT_CHANNEL_SWITCHED event from netdev for other modules to respond to, we fail to actually update the frequency of the netdev object in question. Since the netdev frequency is used elsewhere (e.g. to send action frames), it needs updating too. Fixes: 5eb0b7ca8e04 ("netdev: add a channel switch event") --- src/netdev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/netdev.c b/src/netdev.c index d7182d64..2ae76a1e 100644 --- a/src/netdev.c +++ b/src/netdev.c @@ -4710,6 +4710,8 @@ static void netdev_channel_switch_event(struct l_genl_msg *msg, l_debug("Channel switch event, frequency: %u", *freq); + netdev->frequency = *freq; + if (!netdev->event_filter) return;