Use legacy NL80211 STA events for older drivers

This allows tethering on devices with older bcmdhd
drivers to be fixed.  It conditionally reverts
b638fe75d3cb9d21c67386173f10afe65053cc4d
"nl80211: Use native cfg80211 sta events" for these
boards.

Use BOARD_LEGACY_NL80211_STA_EVENTS to enable
this conditional revert.

Forward-port to JB MR1, squashed in Steve Kondik's commit
to handle additional changes.

Change-Id: I4e436c57819944515455725cfd7ac7eeb31552ca
wext: Re-add support for SIGNAL_POLL and DRIVER

Both of these are still used by JB, and wext wifi drivers have some
weird behaviors without it (like a reported poor connection 100% of
the time)

Change-Id: I15339dbea4e15831465e2bb52b11675cb20dc34c
nl80211: add ifndef on AP SME condition

The condition causes problems on driver initialization if the
NL80211_ATTR_DEVICE_AP_SME is not available. Needs
BOARD_NO_APSME_ATTR:=true.

Change-Id: I88e91996d8e6a70f46a5a84d6540bf3d3b628ddd
Fix regression in LEAP

Commit 458cb3019108b6cb8c0c1cab94ae6ebf244eda27 broke LEAP since it
rejects EAP-Success packet that is used within LEAP and this frame does
not have a payload. Fix LEAP by relaxing the generic EAP packet
validation if LEAP has been negotiated.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
enable CONFIG_PCSC

try to fix #5203
http://code.google.com/p/cyanogenmod/issues/detail?id=5203

As said in the file, we need config_pcsc if config_eap_sim is enable.
Revert "enable CONFIG_PCSC"

This reverts commit d04091d01db0ddfb13e0c1279e232bf9c3365cfb.
Save frequency to network config

Also save frequency in wpa_config_write_network().

This is necessary for creating IBSS networks which requires the
frequency to be set.

Change-Id: Ic051d1ca1ce3b1d4bad231d46e86c21e818af5de
Add capability flag for IBSS and get_capabiliy modes

Add a driver capability flag for drivers which support IBSS mode and
set it for nl80211 drivers which have set the NL80211_IFTYPE_ADHOC.

Add a new option "modes" to "get_capability" which will return
"AP" and "IBSS" if the corresponding capability flags are set.

Change-Id: I7991ae49b6ac6bc154d4edb0b01af774f4e8522c
wpa_supplicant_8 - Hostapd: Android related changes for sockets

Android related changes for socket handling.
Similar to ctrl_iface.c in wpa_supplicant/ctrl_iface.c

Ported from jellybean (was Change-Id: I3f72f5e4746ccdd007f647a923d41629afc17d94)
http://review.cyanogenmod.org/20317

Signed-off-by: Vishal Mahaveer <a0271468@ti.com>
Signed-off-by: Michael Bestas <mikeioannina@gmail.com>

Change-Id: Ibf95b753d60e47fa2e04d7b703c40851d2a13875
wpa_supplicant: Add get_capability freq

Add "get_capability freq" command to print a more verbose list of channels and
frequencies in MHz. The tag "NO_IBSS" is added, if IBSS mode is not allowed on
a channel. This allows userspace programs to get the frequencies and
limitations associated with each channel.

This extends the information already provided in "get_capability channel" but a
new interface is chosen because of backwards compatibility considerations.

Signed-hostap: Bruno Randolf <br1@einfach.org>
Change-Id: Ic05a080b3cdea3ab095127d8c2e86eb16408bb4f
Revert "wpa_supplicant: Add get_capability freq"

This reverts commit 5735c9995574669adeed9380e86fbf0f24287477.
Revert "Add capability flag for IBSS and get_capabiliy modes"

This reverts commit 4d29f0d12afde09b0f84b8220c5ebeadefde9a8d.
Revert "Save frequency to network config"

This reverts commit a526cad2b2713d368003f40c0a23e89c5ec3d4d2.
Merge tag 'android-4.3_r2.1' into cm-10.2

Android 4.3 release 2.1

Conflicts:
	wpa_supplicant/events.c

Change-Id: Ib673f7f1003ceddea708b20805929a374b046dd2
Revert "Revert "wpa_supplicant: Add get_capability freq""

This reverts commit 71b5d367f8de5e8b668ed6710974bd38a1949686.
P2P: Increase GTK rekeying period to 24 hours

Strong ciphers do not need frequent rekeying, so
increase the default GTK rekeying period to 24 hours.

CR-fixed: 469048
Git-commit: 2a07a276ecd73b08961e68b0c72bec4be1b61a0c
Git-repo : git://w1.fi/srv/git/hostap.git
Signed-hostap: Jouni Malinen <j@w1.fi>

Change-Id: I1abc1404db65b9d4cb82e758cfffd832af459254
WPS: Remove duplicate networks after WPS.

Each attempt to connect to the same network using WPS would result
in the duplicate configuration getting added. Avoid such redundant
additions by comparing the network configuration with an already
existing one and remove the older network if the new credential
provisioned through WPS is identical.
Git-commit: 741ed9fc2503550270eb3e47803373de5c8994fd
Git-repo: git://w1.fi/srv/git/hostap.git
CRs-fixed: 474579
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>

Change-Id: I825698dcd64b951741d2035172e356a19ecc0975
Defer scan if connection is in progress on any of the shared interfaces

Scanning can delay concurrent operations considerably, so it is better
to avoid that while trying to connect on any of the virtual interfaces
that share the same radio.
CRs-Fixed: 477388
Git-commit: 36b9883d84c9b9af35999fa7edd464b97c7a4e68
Git-repo: git://w1.fi/srv/git/hostap.git
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>

Change-Id: I0ff2e5ebcaab6b9308a193dc9d43480f0e5cdba5
wpa_supplicant_8: Remove android specific code in handling assoc reject events

Change-Id: I7064515b6592d60ac9215ab32f01c22ae3dfd514
CRs-fixed: 424592
wpa_supplicant_8: Don't expire peers when in P2P_PENDING_PD.

A p2p_expiration_timeout during Provisional Discovery (when PD
request is sent before p2p_connect) shall result in the device
entry getting removed.Blocking the same from getting removed .
(cherry picked from commit 5a5ea05885457412de6f1dabce73d92865c5a75e)

Change-Id: Ic25ea00000ce22b34cdcdb618239ff8c6097ae39