Don't stop scan results processing due to pending P2P (INTERNAL)

The removed code unnecessarily discarded scan results
as well as fueled a ping pong between P2P search scans
and STA scans.

In Android whenever STA is connected further frameworks scans
are performed with changing ap_scan to 2 prior to the actual scan.
The combo of the current code and ap_scan == 2 would sometimes
lead to P2P search getting stuck as it wasn't being restarted
following STA scan.

[A similar patch by Neeraj is discussed on hostap but hasn't been
taken yet due to Jouni's rejection  so currently mark this as INTERNAL
and consider replacing it with the upstream version once approved]

Change-Id: I86abb93587e76f90b2c63280f596133e02f163bd
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Do not delay p2p search in case of concurrent operations (INTERNAL)

In our case there's no real need for the 500ms delay.
Canceling it improves the peer detection speed and user experience.
If a STA is connected then the p2p find won't affect it except
for a possible throughput hit but we prefer a better that in order
to get a beter user experience during the find.
If a STA is attempting to connect or scanning the p2p find will
be restarted as it's resilient to failures in scan and listen phases.

Change-Id: I455ce99be9fa54521cf2cea96bd023e9f14b64eb
Signed-off-by: Eyal Shapira <eyal@wizery.com>
wpa_supplicant: Remove snprintf call from interface= extension

BUG: b/6826116

Change-Id: I35023ce94152a402da94c34083de8ea1387cc758
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Use SSL_OP_NO_TLSv1_1 SSL_OP_NO_TLSv1_2 SSL_OP_NO_TICKET for better wpa_supplicant_8 interoperability

Bug: https://bugs.launchpad.net/ubuntu/+source/wpasupplicant/+bug/969343/comments/72
Bug: http://w1.fi/bugz/show_bug.cgi?id=447#c7
Bug: http://code.google.com/p/android/issues/detail?id=34212
Bug: 6883259
Change-Id: Ib53326cc8cd40e800454b7b92586c052bc910ba8
Get rid of LOCAL_MODULE_TAGS := user

Change-Id: I6d9ed4e6e1d94cfedcb703eec4adfe227d35b473
Use bssid instead of pending_bssid

pending_bssid is not valid during roaming, use bssid

Bug: 6915644
Change-Id: Ib2181a41845f90812bd7428dbef6433adfe9f749
Add action parameter to service discovery functionality

Change-Id: Ibc74c4053996e91f2f577b57695c68c86b5603c2
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Add delimiter for bss command

With the availability of MASK option, the number of lines per BSS is not obvious,
add a delimiter to make parsing less flaky

Bug: 2961159
Change-Id: I9e5523f8da183e0735dbc06f0c09c9f841060504
p2p: various fixes

- Allow group idle timeout to run during WPS disconnect
- Perform single channel scan if we know the channel of the GO joined

Change-Id: I7e9e15b9c44804196bc98c01d51a71e24412b91d
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Restore p2p_group_formation pointer

Restore the pointer till the 4-way handshake completes for the p2p client

Change-Id: I976659ae5dac4cf01ecdd7995ff9abb6bf914bc1
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
hostapd: Allow hostapd_cli to work on Android

Add definitions of the Android specific directories used for control
interface sockets so that hostapd_cli can connect to the Android
hostapd.

Change-Id: Iabcd8d70ef61fae6656066991240d55e65a032e4
Fix join for p2p_connect

wps_pbc with interface command stripped out ends up as a null character.
Supplicant tries to interpret that as a bssid. Fix it to ignore null
character as empty bssid

Change-Id: Ic91d6657efaf03fbe5c4a03e9e630b4b3ff5dec4
Add WFD dev info in device found event

Change-Id: If25804d41e7ea1d028a30c180290d8de547f43e8
clear wfd_dev_info_hex before use

Change-Id: Ic5cdb4df220834faf9e7da5cc1cc0a4191e6abd1
Increase channel delay to 100ms

There is an inherent flaw in the p2p protocol design where an ACK loss right
before channel switch leads to peers being out of sync.

A work around of 50ms was added persistent case, but it turns out in heavy lossy
conditions that is not enough. Increase it to 100ms.

Experimental evaluation showed 100ms improves the reliability of p2p persistence
reinvocation.

Bug: 7359500
Change-Id: I73ab1b64e32b87101e95b0e487c90818c2c0aaf3
Increase timeouts for p2p

Dongles can be slow to respond and a quick turn around time on packets does not help.
Allow for upto 350ms on retry attempts for provision discovery, negotiation and invitation

This will catch slow responses within the first attempt and prevent any kind of issues
with sequence number handling

Bug: 7445415
Change-Id: I88a849d400b10f42ac298bad6d01f49803fcc8ba
Android.mk: update version string

Update version string to differentiate this tree from Google tree

Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
android: remove redundant define from driver_nl80211

The AOSP libnl already contains this define. Defining it twice creates a
conflict during compilation.

Change-Id: I5a9183e1377f358b40ed3942cdde3da7dd229e3f
Signed-off-by: Arik Nemtsov <arik@wizery.com>
driver_nl80211: ignore useless driver commands (ANDROID)

These are not used, so just return success to avoid creating spurious
errors in logcat.

Change-Id: I458a8969647f3cff391766b9f86a046600ed7d36
Signed-off-by: Arik Nemtsov <arik@wizery.com>
p2p: accommodate peers that use the GO address in prov_disc_resp

Don't try to perform another PD with the remote peer if we already have
one with its interface (GO) address. Usually the dev address is used in
this case.

This is compatibility fix for the Google CTS testing suite.

Change-Id: Ie8c53fc66cc845c3e0c35ece88b520590045e350
Signed-off-by: Arik Nemtsov <arik@wizery.com>