3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-22 14:49:24 +01:00

rrm: React to IFTYPE_CHANGE events

If a netdev iftype is changed, all frame registrations are removed.
Make sure to re-register for the appropriate frame notifications in case
our iftype is switched back to 'station'.  In any other iftype, no frame
watches are registered and rrm_state object is effectively dormant.
This commit is contained in:
Denis Kenzior 2021-04-16 17:02:32 -05:00
parent 5e0069e146
commit a83bb33ea5

View File

@ -835,7 +835,15 @@ static void rrm_netdev_watch(struct netdev *netdev,
l_free(rrm);
}
return;
break;
case NETDEV_WATCH_EVENT_IFTYPE_CHANGE:
rrm = l_queue_find(states, match_ifindex,
L_UINT_TO_PTR(ifindex));
if (rrm && netdev_get_iftype(netdev) == NETDEV_IFTYPE_STATION)
rrm_add_frame_watches(rrm);
break;
default:
break;
}