3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-10-03 01:48:49 +02:00

netdev: Move disconnect_cmd_id reset

This operation logically belongs in the callback, not a common operation
that is also invoked from event handlers.
This commit is contained in:
Denis Kenzior 2021-04-27 16:15:24 -05:00
parent 9d9c516596
commit 775f4643b5

View File

@ -752,8 +752,6 @@ static void netdev_connect_failed(struct netdev *netdev,
netdev_event_func_t event_filter = netdev->event_filter;
void *connect_data = netdev->user_data;
netdev->disconnect_cmd_id = 0;
/* Done this way to allow re-entrant netdev_connect calls */
netdev_connect_free(netdev);
@ -769,6 +767,7 @@ static void netdev_disconnect_cb(struct l_genl_msg *msg, void *user_data)
{
struct netdev *netdev = user_data;
netdev->disconnect_cmd_id = 0;
netdev_connect_failed(netdev, netdev->result, netdev->last_code);
}