[PATCH] wpa_supplicant: fix libnl-tiny support
Jouni Malinen
j at w1.fi
Sat Mar 5 08:52:09 PST 2016
On Sat, Mar 05, 2016 at 05:48:56PM +0200, Dima Krasner wrote:
> On Wed, 02 Mar 2016 15:00:32 +0100
> Johannes Berg <johannes at sipsolutions.net> wrote:
>
> > the code already has the ability to deal with libnl 1.1
> > (or compatible) API, so you don't need to redefine everything afaict.
>
> It's compatible with 2.0 and 3.x, not with 1.1 as far as I see.
Which version of libnl-tiny are you using? The build option for
libnl-tiny was added originally in 2010 and it did not need any extra
defines at the time. If here are now number of different versions of
this with different libnl API support, I'm not sure it is good to assume
that only one API can be hardcoded whenever CONFIG_LIBNL_TINY=y is used.
> Here's a cleaner patch, more in line with the coding style:
> diff --git a/src/drivers/driver_nl80211.h b/src/drivers/driver_nl80211.h
> @@ -17,6 +17,13 @@
> +#ifdef CONFIG_LIBNL_TINY
> +/* libnl-tiny compatibility code */
> +#define nl_handle nl_sock
> +#define nl_handle_alloc_cb nl_socket_alloc_cb
> +#define nl_handle_destroy nl_socket_free
> +#endif
> +
> #ifdef CONFIG_LIBNL20
> /* libnl 2.0 compatibility code */
> #define nl_handle nl_sock
Wouldn't it be enough to define CONFIG_LIBNL20 and use the existing
libnl 2.0 compatibility defines here?
This in .config should do that:
CONFIG_LIBNL_TINY=y
CONFIG_LIBNL20=y
And if there are issues with nl-genl not being available, following
could be used instead:
CONFIG_LIBNL_TINY=y
CFLAGS += -DCONFIG_LIBNL20
--
Jouni Malinen PGP id EFC895FA
More information about the Hostap
mailing list