2013-12-18 10:29:25

by Ujjal Roy

[permalink] [raw]
Subject: P2P_DEVICE support in driver

Hi Johannes,

I want to add P2P_DEVICE support in a driver. And it's not described
in the P2P spec. So, please tell me the following points -
1> what do the driver do?
2> register_netdevice() should not be called from driver for the
P2P_DEVICE interface. Then what are the procedures (network stacks) to
add a P2P device from driver's point of view?
3> How the supplicant will communicate with this type of interface?

--
Thanks,
UjjaL Roy


2013-12-18 11:01:27

by Arend van Spriel

[permalink] [raw]
Subject: Re: P2P_DEVICE support in driver

On 12/18/2013 11:29 AM, Ujjal Roy wrote:
> Hi Johannes,
>
> I want to add P2P_DEVICE support in a driver. And it's not described
> in the P2P spec. So, please tell me the following points -
> 1> what do the driver do?
> 2> register_netdevice() should not be called from driver for the
> P2P_DEVICE interface. Then what are the procedures (network stacks) to
> add a P2P device from driver's point of view?
> 3> How the supplicant will communicate with this type of interface?
>

Hi Ujjal,

P2P_DEVICE interface is meant for the P2P discovery phase, which is in
the P2P spec. It is also depending on the driver/firmware whether it
needs this to distinguish between a regular scan and P2P scan. Some
vendors who did have that need created a 'dummy' netdev for that purpose
although it is only used for scanning/listening, ie. no network traffic.
To avoid that waste the P2P_DEVICE interface was cooked up. The
P2P_DEVICE interface is created through nl80211 by recent wpa_supplicant
when driver indicates support.

Regards,
Arend

2013-12-18 10:46:49

by Johannes Berg

[permalink] [raw]
Subject: Re: P2P_DEVICE support in driver

On Wed, 2013-12-18 at 15:59 +0530, Ujjal Roy wrote:
> Hi Johannes,
>
> I want to add P2P_DEVICE support in a driver. And it's not described
> in the P2P spec. So, please tell me the following points -
> 1> what do the driver do?
> 2> register_netdevice() should not be called from driver for the
> P2P_DEVICE interface. Then what are the procedures (network stacks) to
> add a P2P device from driver's point of view?
> 3> How the supplicant will communicate with this type of interface?

A P2P_DEVICE netdev is (always) created by the supplicant if the driver
advertises support for it, and then p2p-device operations are done there
rather than on the wlan0 netdev.

The driver has to support it (interface combinations) and then deal with
add_interface for it. You can see mac80211 with hwsim and iwlmvm for
example.

johannes