mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2025-04-15 06:28:00 +02:00
device/netdev: init scan in netdev instead of device
Commit 1057d8aa743a changed the device interface creation logic from being unconditional inside netdev.c to instead use NETDEV_WATCH_* events. However, this broke the assumption that the device interface was created before all others. The effect is that the scan_wdev_add might no longer be called prior to station interface being created. Fix this by moving scan_wdev_add/remove calls to netdev.c instead. Fixes: 1057d8aa743a ("device: Move device creation from netdev.c to event watch")
This commit is contained in:
parent
d2556a48b7
commit
738184d491
@ -322,8 +322,6 @@ static struct device *device_create(struct wiphy *wiphy, struct netdev *netdev)
|
|||||||
l_info("Unable to register %s interface",
|
l_info("Unable to register %s interface",
|
||||||
L_DBUS_INTERFACE_PROPERTIES);
|
L_DBUS_INTERFACE_PROPERTIES);
|
||||||
|
|
||||||
scan_wdev_add(netdev_get_wdev_id(device->netdev));
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* register for AP roam transition watch
|
* register for AP roam transition watch
|
||||||
*/
|
*/
|
||||||
@ -345,8 +343,6 @@ static void device_free(struct device *device)
|
|||||||
{
|
{
|
||||||
l_debug("");
|
l_debug("");
|
||||||
|
|
||||||
scan_wdev_remove(netdev_get_wdev_id(device->netdev));
|
|
||||||
|
|
||||||
netdev_frame_watch_remove(device->netdev, device->ap_roam_watch);
|
netdev_frame_watch_remove(device->netdev, device->ap_roam_watch);
|
||||||
wiphy_state_watch_remove(device->wiphy, device->wiphy_rfkill_watch);
|
wiphy_state_watch_remove(device->wiphy, device->wiphy_rfkill_watch);
|
||||||
|
|
||||||
|
@ -626,6 +626,8 @@ static void netdev_free(void *data)
|
|||||||
WATCHLIST_NOTIFY(&netdev_watches, netdev_watch_func_t,
|
WATCHLIST_NOTIFY(&netdev_watches, netdev_watch_func_t,
|
||||||
netdev, NETDEV_WATCH_EVENT_DEL);
|
netdev, NETDEV_WATCH_EVENT_DEL);
|
||||||
|
|
||||||
|
scan_wdev_remove(netdev->wdev_id);
|
||||||
|
|
||||||
watchlist_destroy(&netdev->frame_watches);
|
watchlist_destroy(&netdev->frame_watches);
|
||||||
watchlist_destroy(&netdev->station_watches);
|
watchlist_destroy(&netdev->station_watches);
|
||||||
|
|
||||||
@ -4204,6 +4206,8 @@ static void netdev_initial_up_cb(int error, uint16_t type, const void *data,
|
|||||||
|
|
||||||
l_debug("Interface %i initialized", netdev->index);
|
l_debug("Interface %i initialized", netdev->index);
|
||||||
|
|
||||||
|
scan_wdev_add(netdev->wdev_id);
|
||||||
|
|
||||||
WATCHLIST_NOTIFY(&netdev_watches, netdev_watch_func_t,
|
WATCHLIST_NOTIFY(&netdev_watches, netdev_watch_func_t,
|
||||||
netdev, NETDEV_WATCH_EVENT_NEW);
|
netdev, NETDEV_WATCH_EVENT_NEW);
|
||||||
netdev->events_ready = true;
|
netdev->events_ready = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user