[RFC 06/10] nl80211_driver: add support for P2P device in adding and removing interface

Arend van Spriel arend
Mon Feb 11 03:53:54 PST 2013


On 02/11/2013 12:15 PM, Arend van Spriel wrote:
> From: David Spinadel <david.spinadel at intel.com>
> 
> Don't try to assign ifindex for P2P device interface and
> check that the ifindex is valid before trying to remove it.
> 
> Don't try to set TX rates for P2P device interface since it's
> not a network device.
> 
> Signed-hostap: David Spinadel <david.spinadel at intel.com>
> ---
>  src/drivers/driver_nl80211.c |   12 ++++++++++--
>  1 file changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
> index f0306f1..183761a 100644
> --- a/src/drivers/driver_nl80211.c
> +++ b/src/drivers/driver_nl80211.c
> @@ -6051,6 +6051,13 @@ static int nl80211_create_iface_once(struct wpa_driver_nl80211_data *drv,
>  		return ret;
>  	}
>  

For P2P_DEVICE an additional parameter should be given in the
NEW_INTERFACE command to allow wpa_supplicant to determine the P2P
device address:

NLA_PUT(msg, NL80211_ATTR_MAC, ETH_ALEN, p2p_dev_addr);

See wireless-next commit 1c18f1452a772dfe884ed25677bddb3ecaf9c43a
Author: Arend van Spriel <arend at broadcom.com>
Date:   Tue Jan 8 10:17:27 2013 +0100

    nl80211: allow user-space to set address for P2P_DEVICE

> +	if (iftype == NL80211_IFTYPE_P2P_DEVICE) {
> +		wpa_printf(MSG_DEBUG,
> +			   "nl80211 New P2P device interface %s created",
> +			   ifname);
> +		return 0;
> +	}
> +





More information about the Hostap mailing list