mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-26 02:19:26 +01:00
frame-xchg: iftype changes to be managed by netdev
Since netdev now keeps track of iftype changes, let it call frame_watch_wdev_remove on netdevs that it manages to clear frame registrations that should be cleared due to an iftype change. Note that P2P_DEVICE wdevs are not managed by any netdev object, but since their iftype cannot be changed, they should not be affected by this change.
This commit is contained in:
parent
7a2719f314
commit
b8ef64f6e3
@ -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:
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user