diff --git a/src/frame-xchg.c b/src/frame-xchg.c index 4a4db561..4ecfc45d 100644 --- a/src/frame-xchg.c +++ b/src/frame-xchg.c @@ -1313,7 +1313,6 @@ static void frame_xchg_config_notify(struct l_genl_msg *msg, void *user_data) if (!wdev) { wdev = l_new(struct wdev_info, 1); wdev->id = wdev_id; - wdev->iftype = iftype; if (!wdevs) wdevs = l_queue_new(); @@ -1322,11 +1321,7 @@ static void frame_xchg_config_notify(struct l_genl_msg *msg, void *user_data) break; } - if (wdev->iftype != iftype) { - wdev->iftype = iftype; - frame_watch_wdev_remove(wdev_id); - } - + wdev->iftype = iftype; break; case NL80211_CMD_DEL_INTERFACE: diff --git a/src/netdev.c b/src/netdev.c index 940e3c4b..eb0e467b 100644 --- a/src/netdev.c +++ b/src/netdev.c @@ -4877,8 +4877,10 @@ static void netdev_set_interface_event(struct l_genl_msg *msg, struct netdev *netdev) { uint32_t iftype; + uint64_t wdev_id; if (nl80211_parse_attrs(msg, NL80211_ATTR_IFTYPE, &iftype, + NL80211_ATTR_WDEV, &wdev_id, NL80211_ATTR_UNSPEC) < 0) return; @@ -4889,6 +4891,7 @@ static void netdev_set_interface_event(struct l_genl_msg *msg, netdev_iftype_to_string(netdev->type), netdev_iftype_to_string(iftype)); netdev->type = iftype; + frame_watch_wdev_remove(wdev_id); /* Set RSSI threshold for CQM notifications */ if (netdev->type == NL80211_IFTYPE_STATION)