Re: [GIT]: Networking (WEXT events and 64/32 compat)

From: Jouni Malinen
Date: Thu Sep 18 2008 - 18:24:57 EST


On Wed, Sep 17, 2008 at 01:11:33PM -0700, David Miller wrote:
> Moving to a new event with a strictly sized datastructure, instead of
> one that has variable sized members like pointers and crap which are
> impossible to compat layer'ify, is indeed my preference.
>
> But in that case, we might as well make nl80211 usable instead.

Would you be fine with continuing to use IFLA_WIRELESS for this or
should we reserve a new identifier for the nl80211 case? I'm assuming
that the base mechanism would continue to remain as a broadcast
rtnetlink message and the main difference to WEXT is in defining all
events as data with fixed size fields instead of C structures.

IFLA_WIRELESS messages start with two fixed size fields (16-bit len
and cmd) which would allow us to reserve a new cmd value for nl80211
messaages and then we could even share the helper functions in
wireless/wext.c and just replace wireless_send_event() with a new
function that generates the new event type.

As a first porting step, wireless_send_event() could be extended to send
both messages so that we do not need to modify all drivers to use the
new mechanism in the beginning (and the old WEXT events would continue
to be available for anyone who uses 32/32-bit or 64/64-bit
kernel/userspace).

As far as userspace is concerned, I would assume apps would eventually
start moving to using the new events. As an example, wpa_supplicant has
support for using either WEXT or nl80211 (though, this is still using
WEXT for places that nl80211 does not support yet) and I would likely
leave the WEXT case as-is and modify nl80211 interface to use only the
new event messages.

--
Jouni Malinen PGP id EFC895FA
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/