mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-22 23:09:34 +01:00
netdev: Handle CMD_DISCONNECT without "by AP" flag
There are situations including after beacon loss and during FT where the cfg80211 will detect we're now disconnected (in some cases will send a Deauthenticate frame too) and generate this event, or the driver may do this. For example in ieee80211_report_disconnect in net/mac80211/mlme.c will (through cfg80211) generate a CMD_DEAUTHENTICATE followed by a CMD_DISCONNECT.
This commit is contained in:
parent
5c4313bcc2
commit
cb9c6e8ade
@ -659,9 +659,15 @@ static void netdev_disconnect_event(struct l_genl_msg *msg,
|
|||||||
event_data = netdev->user_data;
|
event_data = netdev->user_data;
|
||||||
netdev_connect_free(netdev);
|
netdev_connect_free(netdev);
|
||||||
|
|
||||||
if (disconnect_by_ap && event_filter)
|
if (!event_filter)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (disconnect_by_ap)
|
||||||
event_filter(netdev, NETDEV_EVENT_DISCONNECT_BY_AP,
|
event_filter(netdev, NETDEV_EVENT_DISCONNECT_BY_AP,
|
||||||
event_data);
|
event_data);
|
||||||
|
else
|
||||||
|
event_filter(netdev, NETDEV_EVENT_DISCONNECT_BY_SME,
|
||||||
|
event_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void netdev_cmd_disconnect_cb(struct l_genl_msg *msg, void *user_data)
|
static void netdev_cmd_disconnect_cb(struct l_genl_msg *msg, void *user_data)
|
||||||
|
Loading…
Reference in New Issue
Block a user