[PATCH v2] wpa_supplicant: Denitialize the driver if the last user went away

Jouni Malinen j
Sun Nov 23 12:12:59 PST 2014

On Sun, Nov 23, 2014 at 09:55:24PM +0200, Jouni Malinen wrote:
> On Tue, Nov 11, 2014 at 02:05:53PM +0100, Lubomir Rintel wrote:
> > Correct. What would be the other possible fix? Address that in kernel?
> It could be enough to just re-initialize the netlink sockets in global
> context within driver_nl80211.c if they start showing errors that could
> indicate that cfg80211 has been reloaded.

Actually, it may be easier to simply always deinit the nl80211_global
allocated resources when the last interface gets removed from
nl80211_global::interfaces list at the end of
wpa_driver_nl80211_deinit() (and then re-init them on next interface add
in wpa_driver_nl80211_drv_init()). I'd assume this would be pretty close
to what you were trying to do, but limited to be within driver_nl80211.c
and as such, not affecting any other uses of the global driver wrapper
Jouni Malinen                                            PGP id EFC895FA

More information about the Hostap mailing list