[PATCH v2 6/6] nl80211: Use global netlink objects.

Ben Greear greearb
Thu Oct 20 19:59:52 PDT 2011


On 10/20/2011 04:23 PM, Jouni Malinen wrote:

> [PATCH 2/6] nl80211: Initialize global context with hostapd
> is kind of ugly and if I understood correctly, missing the global deinit
> call (unless 5/6 handles that somehow).. This should really be moved to
> core hostapd code to get similar design to wpa_supplicant.
 >
 > I don't understand why
 > [PATCH 3/6] nl80211: Validate global_init/deinit use
 > would be needed.

I thought some more about 2 and 3.  Why not make the init deinit automatic,
much as it is now for hostapd.  We can remove the global init/destruct
hooks for nl80211 and just let the driver take care of creating the global
struct when the first device is added, and destruct when the last one is
destroyed.

There is no reason that I know of to open the sockets and such if we
have no devices actually using that driver.

If you are OK with that, then I can either re-work the patches slightly
to do this, or we could apply them as they are and I'll post follow-up patches
to make the changes.  I think it's mostly correct now except the driver
doesn't ever deinit itself in hostapd mode.  In practice, I doubt this
will be a problem, especially if it's soon fixed properly.

Thanks,
Ben

-- 
Ben Greear <greearb at candelatech.com>
Candela Technologies Inc  http://www.candelatech.com



More information about the Hostap mailing list