nl80211: Resubscribe to nl80211 events on global nl_event socket
authorJouni Malinen <j@w1.fi>
Sun, 22 Feb 2015 16:03:42 +0000 (18:03 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 22 Feb 2015 16:03:42 +0000 (18:03 +0200)
commitf51f54a007e0de1d413dee3523472d3bbeed2ecc
treeb246051f43c21ea2c98b63be963ed1b026e45f96
parent52352802eecc1eb2a3a9a78f9a2faee983ed0aa0
nl80211: Resubscribe to nl80211 events on global nl_event socket

This allows wpa_supplicant to recover from some of the cases where
cfg80211 is unloaded and reloaded without restarting wpa_supplicant. The
netlink socket used for nl80211 events (global->nl_event) seemed to end
up in otherwise functionality state, but with all the event memberships
lost when cfg80211 gets reloaded.

There does not seem to be any clear way of determining when this has
happened, so it looks simplest to just try to re-subscribe to all the
events whenever an interface is re-enabled or added.

Signed-off-by: Jouni Malinen <j@w1.fi>
src/drivers/driver_nl80211.c