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

Arend van Spriel arend
Tue May 21 03:18:17 PDT 2013


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.

>





More information about the Hostap mailing list