[PATCH 03/20] driver: nl80211: hold wdev identification for P2P device

Peer, Ilan ilan.peer at intel.com
Tue May 21 14:21:17 EDT 2013



> -----Original Message-----
> From: Arend van Spriel [mailto:arend at broadcom.com]
> Sent: Tuesday, May 21, 2013 13:18
> To: Peer, Ilan
> Cc: Jouni Malinen; Johannes Berg; hostap at lists.shmoo.com
> Subject: Re: [PATCH 03/20] driver: nl80211: hold wdev identification for P2P
> device
> 
> On 05/19/2013 11:13 PM, Arend van Spriel wrote:
> > On 05/19/2013 08:13 PM, Peer, Ilan wrote:
> >>
> >>
> >>> -----Original Message-----
> >>> From: hostap-bounces at lists.shmoo.com [mailto:hostap-
> >>> bounces at lists.shmoo.com] On Behalf Of Arend van Spriel
> >>> Sent: Thursday, May 16, 2013 16:28
> >>> To: Jouni Malinen
> >>> Cc: hostap at lists.shmoo.com
> >>> Subject: [PATCH 03/20] driver: nl80211: hold wdev identification for
> >>> P2P device
> >>>
> >>
> >> The title of the patch might be a bit misleading :)
> >>
> >>> From: David Spinadel <david.spinadel at intel.com>
> >>>
> >>> Add wdev_id to i802_bss.
> >>> Init wdev_id to -1 by default.
> >>> Use wdev_id if assigned, instead of ifindex.
> >>> Use wdev_id for events that come from the kernel to identify the
> >>> relevant interface.
> >>>
> >>> Signed-off-by: David Spinadel <david.spinadel at intel.com>
> >>> ---
> >>>   src/drivers/driver_nl80211.c |   84
> >>> ++++++++++++++++++++++++++++++++------
> >>> ----
> >>>   1 file changed, 64 insertions(+), 20 deletions(-)
> >>>
> >>> diff --git a/src/drivers/driver_nl80211.c
> >>> b/src/drivers/driver_nl80211.c index
> >>> b304ddd..ec877f2 100644
> >>> --- a/src/drivers/driver_nl80211.c
> >>> +++ b/src/drivers/driver_nl80211.c
> >>> @@ -12,7 +12,7 @@
> >>>
> >>>   #include "includes.h"
> >>>   #include <sys/ioctl.h>
> >>> -#include <sys/types.h>
> >>> +#include <inttypes.h>
> >>>   #include <sys/stat.h>
> >>>   #include <fcntl.h>
> >>>   #include <net/if.h>
> >>> @@ -183,6 +183,7 @@ struct i802_bss {
> >>>       struct wpa_driver_nl80211_data *drv;
> >>>       struct i802_bss *next;
> >>>       int ifindex;
> >>> +    int64_t wdev_id;
> >>>       char ifname[IFNAMSIZ + 1];
> >>>       char brname[IFNAMSIZ];
> >>>       unsigned int beacon_set:1;
> >>> @@ -464,6 +465,17 @@ struct family_data {
> >>>       int id;
> >>>   };
> >>>
> >>> +static int nl80211_set_iface_id(struct nl_msg *msg, struct i802_bss
> >>> +*bss) {
> >>
> >> It is possible to always add both attributes (and this can actually
> >> be done for all the nl commands ...). The kernel should be able to
> >> handle this.
> >
> > That was my initial take as well, but Johannes pointed out to keep
> > wpa_supplicant usable for kernel version with wdev_id.
> 
> I meant to say: kernel version *without* wdev_id. Sorry for the confusion.

I think that older kernel versions will ignore the WDEV attribute so that should not be an issue. Anyway, I'm also ok with the current approach :) thanks.

> 
> >
> 



More information about the HostAP mailing list