[PATCH] Add P2P IEs to probe requests only when in P2P

Eyal Shapira eyal at wizery.com
Mon Aug 13 17:38:13 EDT 2012

On 13 August 2012 21:53, Jouni Malinen <j at w1.fi> wrote:
> On Mon, Aug 13, 2012 at 04:59:44PM +0300, Eyal Shapira wrote:
>> The current code caused P2P and consquently WPS IEs to be added
>> to any probe as the check was for non null global->p2p.
>> global->p2p gets set whenever P2P is initialized globally
>> and that occurs on the first interface init.
> This is done on purpose since "normal scans" can be used to discover P2P
> groups and to allow other devices discover us. The P2P element (and WPS
> IE if no active WPS operation is in progress) are removed if P2P is
> disabled.
>> Fix this by indicating wps is in use only when in active P2P
>> discovery or connection establishement.
>> (i.e. not P2P_IDLE - either doing search, neg or provisioning)
> What does this fix?

ok. thanks. I wasn't aware this was by design and therefore referred
to it as a problem. Anyways, the reasoning here was:

1. Adding P2P+WPS IEs to all probes makes them significantly bigger
(the actual size is dependent on variable size parameters in the WPS IE
like model name/device name/model number/manufacturer). On our
default dev platform it goes from probes of 70 bytes to 250 bytes.
Given that these go out in 1Mbps multiple times on all channels this
has an impact
on power and total scan time. The effect is worse once you're probing multiple
networks with SSID specific probes (scan_ssid networks) as there are
more probes in that case.

2. We've seen some old APs having issues with big probe requests.

3. When multiple interfaces are used (like in Android JB - wlan0 and p2p0)
since P2P struct is "global" having P2P initialized on one interface (e.g. p2p0)
affect probes going out on other interfaces
Does this make sense given the different MACs ?

4. Focusing on Android - we're looking at Galaxy Nexus as the reference behavior
for STA + P2P. Looks like only probes related to P2P (i.e. once you go into
WiFi Direct UI and P2P_FIND begins) go out with P2P+WPS IE. Normal STA scans
don't include the P2P IE. I know it's not necessarily a good argument
here but still
worth noting as a reference.
Maybe make this an Android specific patch ?


> --
> Jouni Malinen                                            PGP id EFC895FA
> _______________________________________________
> HostAP mailing list
> HostAP at lists.shmoo.com
> http://lists.shmoo.com/mailman/listinfo/hostap

More information about the HostAP mailing list