]> git.ipfire.org Git - thirdparty/hostap.git/log
thirdparty/hostap.git
10 years agoFix p2p service discovery android-jb
Irfan Sheriff [Thu, 9 Aug 2012 15:40:48 +0000 (18:40 +0300)] 
Fix p2p service discovery

- Fix listen timing to improve SD reliability
- Fix SD packet scheduling

Bug: 6629112
Change-Id: I01365279439116256372d019bdbfd4b2113bf2ce

10 years agoAndroid: Implement SETBAND for scan requests
Jouni Malinen [Fri, 9 Mar 2012 05:28:13 +0000 (21:28 -0800)] 
Android: Implement SETBAND for scan requests

This provides partial SETBAND driver command implementation by
converting the request into a filter for which channels are scanned
by wpa_supplicant.

10 years agoAndroid: Do not use separate private lib
Jouni Malinen [Wed, 16 Nov 2011 12:57:40 +0000 (14:57 +0200)] 
Android: Do not use separate private lib

The separate private library mechanism used in Android ICS is not
very robust when wpa_supplicant/hostapd version changes since the
external code is accessing some internal data structures directly.
Avoid this type of issues by integrating the private library to be
part of wpa_supplicant/hostapd build.

10 years agonl80211: Add get_noa() support for WFD certification (BRCM)
Dmitry Shmidt [Wed, 28 Sep 2011 20:29:53 +0000 (13:29 -0700)] 
nl80211: Add get_noa() support for WFD certification (BRCM)

BUG: b/5367351

Change-Id: I14ed79e10ade205c5dd4cdc0d2e888ed1279d1bb
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
10 years agonl80211: Add set_noa, set_p2p_powersave, set_ap_wps_ie
Dmitry Shmidt [Tue, 27 Sep 2011 19:29:26 +0000 (12:29 -0700)] 
nl80211: Add set_noa, set_p2p_powersave, set_ap_wps_ie

Fix WFD and WPS certification problem for GO (BRCM)

Change-Id: I5bbac818aad7c0a14fddb3beb88a6a2d87c07ea0
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
10 years agonl80211: Disable offchannel TX offload in ANDROID_P2P build
Dmitry Shmidt [Thu, 9 Aug 2012 20:27:48 +0000 (23:27 +0300)] 
nl80211: Disable offchannel TX offload in ANDROID_P2P build

TODO: Is this really needed anymore? If so, why? This breaks offchannel
TX offloading that some drivers need.

10 years agonl80211: Add P2P support for BRCM cfg80211 driver
Dmitry Shmidt [Thu, 21 Jul 2011 22:19:46 +0000 (15:19 -0700)] 
nl80211: Add P2P support for BRCM cfg80211 driver

This is a merge of following commits that first added vendor specific
extensions in ICS and moved closer to upstream implementation in JB:

Add P2P support for BRCM CFG80211 driver (nl80211)

Change-Id: Iafec4bedbd33836d0a64e7ea054d8a46ef8ec204
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
nl80211: Add MLME events (BRCM)

Fix WFD and WPS certification problem for GO (BRCM)

Change-Id: I5bbac818aad7c0a14fddb3beb88a6a2d87c07ea0
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
nl80211: Use native cfg80211 sta events

Change-Id: Id59cc4af50dbccd283db2ec3e7b0b6f8c2146e68
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
10 years agoAndroid: Add private commands support for nl80211
Dmitry Shmidt [Wed, 23 Nov 2011 14:21:15 +0000 (16:21 +0200)] 
Android: Add private commands support for nl80211

Change-Id: If189933aaf6e629fe8ede0f4e0d0b527f3b47f2e
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
10 years agoAndroid: nl80211: Add driver_cmd POWERMODE and GETPOWER
Dmitry Shmidt [Fri, 25 Nov 2011 18:19:26 +0000 (20:19 +0200)] 
Android: nl80211: Add driver_cmd POWERMODE and GETPOWER

10 years agonl80211: Add private function support
Dmitry Shmidt [Thu, 7 Jul 2011 21:22:14 +0000 (14:22 -0700)] 
nl80211: Add private function support

Change-Id: Iba9b2ac21f5c7760900c57826b7048ee58928338
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
10 years agoFix reporting hidden APs during scan
Dmitry Shmidt [Mon, 22 Aug 2011 22:04:04 +0000 (15:04 -0700)] 
Fix reporting hidden APs during scan

Change-Id: I2f3274c6f89ac0100331f4987c40e23f36577817
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
10 years agoAdd WPA_UNICODE_SSID support
Dmitry Shmidt [Fri, 15 Jul 2011 22:32:26 +0000 (15:32 -0700)] 
Add WPA_UNICODE_SSID support

Change-Id: I1f938b97169d4468ee5b05316826ee509a10d9ad
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
10 years agoAndroid: wext: Suppress additional DISASSOCIATE events
Dmitry Shmidt [Fri, 25 Nov 2011 20:00:43 +0000 (22:00 +0200)] 
Android: wext: Suppress additional DISASSOCIATE events

Change-Id: Id65428908bca59e71a3ab479b63d992eff96e433
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
10 years agoAndroid: wext: Add combo_scan()
Dmitry Shmidt [Fri, 25 Nov 2011 19:32:19 +0000 (21:32 +0200)] 
Android: wext: Add combo_scan()

10 years agoAndroid: Convert driver_cmd BGSCAN-START/STOP to proper driver_ops
Jouni Malinen [Wed, 23 Nov 2011 15:48:31 +0000 (17:48 +0200)] 
Android: Convert driver_cmd BGSCAN-START/STOP to proper driver_ops

Instead of driver specific specific command, use a cleaner design
for handling the Android BGSCAN-START/STOP commands.

10 years agoSet ap_scan to default in case of disassociation
Dmitry Shmidt [Mon, 11 Apr 2011 22:58:40 +0000 (15:58 -0700)] 
Set ap_scan to default in case of disassociation

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
10 years agoFix scan notification in case of canceling scan
Dmitry Shmidt [Fri, 8 Apr 2011 22:35:17 +0000 (15:35 -0700)] 
Fix scan notification in case of canceling scan

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
10 years agoAndroid: Add src directory symlinks
Dmitry Shmidt [Tue, 15 Nov 2011 14:00:34 +0000 (16:00 +0200)] 
Android: Add src directory symlinks

These are from Android wpa_supplicant_8.git initial 0.8.X commit
8d520ff1dc2da35cdca849e982051b86468016d8.

Change-Id: I26aec5afbbd4f4a1f5fd900912545b6f5050de64
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
10 years agoAndroid: Add MODULE_LICENSE_BSD_LIKE
Dmitry Shmidt [Tue, 15 Nov 2011 13:58:56 +0000 (15:58 +0200)] 
Android: Add MODULE_LICENSE_BSD_LIKE

These are from Android wpa_supplicant_8.git initial 0.8.X commit
8d520ff1dc2da35cdca849e982051b86468016d8.

Change-Id: I26aec5afbbd4f4a1f5fd900912545b6f5050de64
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
10 years agoAndroid: Add top level CleanSpec.mk
Dmitry Shmidt [Tue, 15 Nov 2011 13:56:58 +0000 (15:56 +0200)] 
Android: Add top level CleanSpec.mk

This are from Android wpa_supplicant_8.git initial 0.8.X commit
8d520ff1dc2da35cdca849e982051b86468016d8.

Change-Id: I26aec5afbbd4f4a1f5fd900912545b6f5050de64
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
10 years agoAndroid: Add CONFIG_ACS option to makefile
Dmitry Shmidt [Fri, 8 Nov 2013 02:06:28 +0000 (18:06 -0800)] 
Android: Add CONFIG_ACS option to makefile

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
10 years agotests: Remove special start.sh option for concurrent P2P tests
Jouni Malinen [Sun, 24 Nov 2013 18:55:15 +0000 (20:55 +0200)] 
tests: Remove special start.sh option for concurrent P2P tests

These were not really used in practice and better quality test cases for
concurrent P2P operations are now available in tests_p2p_concurrency.py
using the standard test framework design. Remove the special concurrent
option for start.sh and the run-all.sh concurrent and
concurrent-valgrind operations to clean up scripts.

Signed-hostap: Jouni Malinen <j@w1.fi>

10 years agotests: Add test cases for concurrent P2P operations
Jouni Malinen [Sun, 24 Nov 2013 18:50:11 +0000 (20:50 +0200)] 
tests: Add test cases for concurrent P2P operations

Signed-hostap: Jouni Malinen <j@w1.fi>

10 years agoUse wpa_radio data for get_shared_radio_freqs()
Jouni Malinen [Sun, 24 Nov 2013 18:06:00 +0000 (20:06 +0200)] 
Use wpa_radio data for get_shared_radio_freqs()

This replaces the now unnecessary iteration of get_radio_name() calls.

Signed-hostap: Jouni Malinen <j@w1.fi>

10 years agoUse wpa_radio data for wpas_wpa_is_in_progress()
Jouni Malinen [Sun, 24 Nov 2013 18:03:40 +0000 (20:03 +0200)] 
Use wpa_radio data for wpas_wpa_is_in_progress()

This replaces the now unnecessary iteration of get_radio_name() calls.

Signed-hostap: Jouni Malinen <j@w1.fi>

10 years agoUse wpa_radio data for wpas_p2p_search_delay()
Jouni Malinen [Sun, 24 Nov 2013 18:01:07 +0000 (20:01 +0200)] 
Use wpa_radio data for wpas_p2p_search_delay()

This replaces the now unnecessary iteration of get_radio_name() calls.

Signed-hostap: Jouni Malinen <j@w1.fi>

10 years agoUse wpa_radio data for channel list updates
Jouni Malinen [Sun, 24 Nov 2013 17:59:28 +0000 (19:59 +0200)] 
Use wpa_radio data for channel list updates

This replaces the now unnecessary iteration of get_radio_name() calls.

Signed-hostap: Jouni Malinen <j@w1.fi>

10 years agoUse wpa_radio data for scan result updates
Jouni Malinen [Sun, 24 Nov 2013 17:57:43 +0000 (19:57 +0200)] 
Use wpa_radio data for scan result updates

This replaces the now unnecessary iteration of get_radio_name() calls.

Signed-hostap: Jouni Malinen <j@w1.fi>

10 years agoAdd shared per-radio structure for wpa_supplicant
Jouni Malinen [Sun, 24 Nov 2013 17:53:19 +0000 (19:53 +0200)] 
Add shared per-radio structure for wpa_supplicant

struct wpa_radio is used as a shared data structure between all struct
wpa_supplicant instances that share the same physical radio.

Signed-hostap: Jouni Malinen <j@w1.fi>

10 years agoMove wpa_supplicant driver initialization into a helper function
Jouni Malinen [Sun, 24 Nov 2013 17:36:29 +0000 (19:36 +0200)] 
Move wpa_supplicant driver initialization into a helper function

Signed-hostap: Jouni Malinen <j@w1.fi>

10 years agoAdd CONFIG_CODE_COVERAGE=y option for gcov
Jouni Malinen [Sun, 24 Nov 2013 17:16:12 +0000 (19:16 +0200)] 
Add CONFIG_CODE_COVERAGE=y option for gcov

This can be used to measure code coverage from test scripts.

Signed-hostap: Jouni Malinen <j@w1.fi>

10 years agoEAP server: Handle EAP method initialization failures more cleanly
Jouni Malinen [Sun, 24 Nov 2013 16:26:05 +0000 (18:26 +0200)] 
EAP server: Handle EAP method initialization failures more cleanly

Allow another EAP method to be tried if one of the enabled methods
fails. If all the remaining methods fail, reject connection by adding a
new METHOD_REQUEST -> FAILURE transition. Previously, this case resulted
in the state machine trying to send a message when none was available
and then waiting for a following event until timeout.

Signed-hostap: Jouni Malinen <j@w1.fi>

10 years agoEAP server: Initialize TLS context based on private_key
Jouni Malinen [Sun, 24 Nov 2013 16:08:45 +0000 (18:08 +0200)] 
EAP server: Initialize TLS context based on private_key

It is possible for the authentication server to be configured with a
PKCS #12 file that includes a private key, a server certificate, and a
CA certificate. This combination could result in server_cert and ca_cert
parameters not being present and that should still result in TLS context
getting initialized.

Signed-hostap: Jouni Malinen <j@w1.fi>

10 years agoReject TLS-based EAP server method if TLS context not initialized
Jouni Malinen [Sun, 24 Nov 2013 16:01:12 +0000 (18:01 +0200)] 
Reject TLS-based EAP server method if TLS context not initialized

It was possible to configure hostapd in a way that could try to
initialize a TLS-based EAP method even when TLS library context was not
initialized (e.g., due to not configuring server or CA certificate).
Such a case could potentially result in NULL pointer dereference in the
TLS library, so check for this condition and reject EAP method
initialization.

Signed-hostap: Jouni Malinen <j@w1.fi>

10 years agotests: Verify P2P operations with a separate group interface
Jouni Malinen [Sun, 24 Nov 2013 13:32:52 +0000 (15:32 +0200)] 
tests: Verify P2P operations with a separate group interface

This extends P2P test coverage to include the case of separate group
interface use with autonomous GO and group formation through GO
negotiation.

Signed-hostap: Jouni Malinen <j@w1.fi>

10 years agonl80211: Fix regression in P2P group interface removal
Jouni Malinen [Sun, 24 Nov 2013 10:41:32 +0000 (12:41 +0200)] 
nl80211: Fix regression in P2P group interface removal

Commit 390e489c0d9415caf103367136eaa534b559837c extended hostapd BSS
interface removal capabilities. However, it ended up causing a
regression in wpa_supplicant P2P group interface handling. That P2P
group interface is removed through another driver_nl80211.c BSS context
and as such, the bss->added_if is not set. Fix this by verifying whether
the request is for another ifindex and if so, removing the interface
even if added_if is not marked.

Signed-hostap: Jouni Malinen <j@w1.fi>

10 years agoP2P: Handle INTERFACE_DISABLED event on a P2P GO interface
Ilan Peer [Mon, 2 Sep 2013 12:40:59 +0000 (15:40 +0300)] 
P2P: Handle INTERFACE_DISABLED event on a P2P GO interface

An INTERFACE_DISABLED event received on an interface that is
currently operating a P2P GO means that the group session ended.
In such a case, if the interface was dynamically added remove it, and
if not, remove all the network blocks that are temporary, assuming
that if needed a new session will be started by an external entity.

The use case was triggering rfkill (both SW and HW). This case popped up
as part of a testing cycle, where after a toggle in the rfkill state,
the result was that the interface was not deleted, but on the other hand
the wpa_supplicant did not configure the kernel to re-start the AP
functionality again.

Signed-hostap: Ilan Peer <ilan.peer@intel.com>

10 years agoAP: Fix inactivity STA timer trigger for driver offload case
Mohammed Shafi Shajakhan [Thu, 16 May 2013 14:44:31 +0000 (20:14 +0530)] 
AP: Fix inactivity STA timer trigger for driver offload case

Some non-mac80211 drivers, such as ath6kl, support STA inactivity timer
in firmware and may not provide connected stations' idle time to the
userspace. If the driver indicates support for offloaded operation, do
not start the inactivity timer in the hostapd.

Signed-hostap: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>

10 years agoRestore scan_req if sta scan is rescheduled in the scan results event
Loic Poulain [Fri, 31 May 2013 10:15:56 +0000 (12:15 +0200)] 
Restore scan_req if sta scan is rescheduled in the scan results event

On scan results event if a concurrent P2P scan was triggered previously,
scan results processing is canceled, p2p_find executed, and a new sta
scan is triggered (pending scan). However, this new sta scan does not
restore the scan_req value of the previous scan (whose scan result has
been canceled).

If we are currently connected to an AP and use ap_scan=2, the new
triggered scan will cause an associtation-without-scan in
wpa_supplicant_scan:
(ap_scan == 2 & scan_req != MANUAL_SCAN_REQ)
=> wpa_supplicant_assoc_try()
causing an association error and a disconnection.

This patch fixes this issue by restoring the previous scan_req value.

Signed-off-by: Loic Poulain <loicx.poulain@intel.com>
10 years agoD-Bus: Add support to set pkcs11_{engine,module}_path
Michael Schaller [Sat, 23 Nov 2013 08:38:07 +0000 (10:38 +0200)] 
D-Bus: Add support to set pkcs11_{engine,module}_path

Add SetPKCS11EngineAndModulePath D-Bus method. Add PKCS11EnginePath
and PKCS11ModulePath D-Bus property getters.

Signed-hostap: Michael Schaller <misch@google.com>

10 years agoClear beacon_data before usage
Janusz Dziedzic [Fri, 22 Nov 2013 20:21:25 +0000 (21:21 +0100)] 
Clear beacon_data before usage

struct beacon_data contains a lot of pointers. Make sure it gets cleared
to zero if hostapd_build_beacon_data() gets called from a path that does
not clear the structure first.

Signed-hostap: Janusz Dziedzic <janusz.dziedzic@tieto.com>

10 years agoAndroid: Revert static field back to send_and_recv_msgs()
Dmitry Shmidt [Fri, 22 Nov 2013 20:39:07 +0000 (12:39 -0800)] 
Android: Revert static field back to send_and_recv_msgs()

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
10 years agoAndroid: wpa_supplicant: Use Ver 0.8.X as default
Dmitry Shmidt [Fri, 22 Nov 2013 18:37:07 +0000 (10:37 -0800)] 
Android: wpa_supplicant: Use Ver 0.8.X as default

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
10 years agoAndroid: P2P: Remember country locale
Dmitry Shmidt [Thu, 12 Sep 2013 19:39:30 +0000 (12:39 -0700)] 
Android: P2P: Remember country locale

This updates P2P modules based on the Android specific
DRIVER COUNTRY command.

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
10 years agoAndroid: Add driver_cmd for arbitrary driver commands
Jouni Malinen [Thu, 7 Nov 2013 14:16:15 +0000 (16:16 +0200)] 
Android: Add driver_cmd for arbitrary driver commands

This is a mechanism used in Android to extend driver interface in vendor
specific ways. This is included only for the purpose of Android
compatibility. Proper interface commands should be used for any new
functionality.

Signed-hostap: Jouni Malinen <j@w1.fi>

10 years agoAndroid: Add P2P/WPS wrappers for private lib
Jouni Malinen [Thu, 7 Nov 2013 14:18:44 +0000 (16:18 +0200)] 
Android: Add P2P/WPS wrappers for private lib

Android uses a vendor specific library for implementing couple of driver
interface functions. Add the wrapper code to allow that mechanism to be
used.

Signed-hostap: Jouni Malinen <j@w1.fi>

10 years agoAndroid: Clean entire socket directory
Dmitry Shmidt [Thu, 5 Sep 2013 21:52:18 +0000 (14:52 -0700)] 
Android: Clean entire socket directory

Despite interface (and group) related sockets are not used
for control, they are created and may be left.

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
10 years agohostapd: Set proper VHT capabilities
Marek Kwaczynski [Thu, 21 Nov 2013 12:45:32 +0000 (13:45 +0100)] 
hostapd: Set proper VHT capabilities

Set VHT capabilities defined in config file instead only supported
by the driver.

Signed-hostap: Marek Kwaczynski <marek.kwaczynski@tieto.com>

10 years agohostapd: Fix set beacon in multiple BSSID scenario
Marek Kwaczynski [Thu, 21 Nov 2013 12:33:09 +0000 (13:33 +0100)] 
hostapd: Fix set beacon in multiple BSSID scenario

Check if the BSS interface has started before setting beacon.
Lack of this condition can cause segmantation fault.

Signed-hostap: Marek Kwaczynski <marek.kwaczynski@tieto.com>

10 years agoTDLS: Do not reenable TDLS link on retransmitted setup frame
Sunil Dutt [Thu, 21 Nov 2013 15:37:50 +0000 (21:07 +0530)] 
TDLS: Do not reenable TDLS link on retransmitted setup frame

A reenable of the TDLS link while the host driver is already processing
the same (due to the retransmitted M2/M3 frames) might result in a
failed TDLS setup handshake due to some host driver's implementation.
Thus, issue enable link only when the peer's TDLS status signifies no
prior link (tpk_success=0).

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

10 years agoVHT: Fix memory leak in STA entry
Jouni Malinen [Fri, 22 Nov 2013 11:48:02 +0000 (13:48 +0200)] 
VHT: Fix memory leak in STA entry

Commit de3cdf354a30256ece16866ff5a283b66e1471ae adding copying of the
STA's VHT capabilities into the STA entry on the AP. This was done in
allocated memory, but that new memory allocation was not freed anywhere.

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

10 years agotests: Verify that re-invoked P2P group is identified as persistent
Jouni Malinen [Thu, 21 Nov 2013 09:39:12 +0000 (11:39 +0200)] 
tests: Verify that re-invoked P2P group is identified as persistent

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

10 years agoUse monotonic clock for relative time for eloop if available
Johannes Berg [Wed, 20 Nov 2013 10:01:09 +0000 (11:01 +0100)] 
Use monotonic clock for relative time for eloop if available

Relative time shouldn't be calculated based on gettimeofday
because that clock can jump (e.g., when the time is adjusted
by the system administrator.)

On systems where that is available, use CLOCK_BOOTTIME (on
fairly recent Linux systems, this clock takes into account
the time spend suspended) or CLOCK_MONOTONIC (on Linux and
some POSIX systems, this clock is just freely running with
no adjustments.)

Reported-by: Holger Schurig <holgerschurig@gmail.com>
Signed-hostap: Johannes Berg <johannes.berg@intel.com>

10 years agoFix and work around some MinGW compilation issues
Jouni Malinen [Wed, 20 Nov 2013 21:12:03 +0000 (23:12 +0200)] 
Fix and work around some MinGW compilation issues

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

10 years agoFix compiler warning for OpenSSL without HAVE_OCSP
Jouni Malinen [Wed, 20 Nov 2013 20:52:11 +0000 (22:52 +0200)] 
Fix compiler warning for OpenSSL without HAVE_OCSP

Commit 080585c01a1e0ffc42577dd10d475f3ab01d0280 added ssl_ctx outside
ifdef HAVE_OCSP block that was the only user for this.

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

10 years agohostapd: Fix interface enabling/disabling and DFS
Michal Kazior [Tue, 19 Nov 2013 10:08:47 +0000 (11:08 +0100)] 
hostapd: Fix interface enabling/disabling and DFS

The 'started' state was tracked incorrectly. It also broke DFS
as it was using hostapd_enable/disable_iface() functions.

Signed-hostap: Michal Kazior <michal.kazior@tieto.com>

10 years agoSTA: Cancel sched_scan while initiating wps_reassoc
Jithu Jance [Wed, 20 Nov 2013 13:50:56 +0000 (19:20 +0530)] 
STA: Cancel sched_scan while initiating wps_reassoc

Scan initiated from wps_nfc command context was ketp on
getting rescheduled due to an on-going scheduled scan. So
cancel sched_scan before issuing a reassociation scan.

Signed-hostap: Jithu Jance <jithu@broadcom.com>

10 years agoAdd Wi-Fi Direct to the build configuration example
Jouni Malinen [Wed, 20 Nov 2013 18:49:48 +0000 (20:49 +0200)] 
Add Wi-Fi Direct to the build configuration example

In addition, include Wi-Fi Direct support for Android builds by
default.

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

10 years agodbus_new: Add documentation for D-Bus TDLS methods
Paul Stewart [Mon, 18 Nov 2013 22:31:25 +0000 (14:31 -0800)] 
dbus_new: Add documentation for D-Bus TDLS methods

Signed-hostap: Paul Stewart <pstew@chromium.org>

10 years agohwsim tests: Check kernel messages for lockdep complaints
Johannes Berg [Mon, 18 Nov 2013 15:38:06 +0000 (16:38 +0100)] 
hwsim tests: Check kernel messages for lockdep complaints

Lockdep complaints are never good, so check for them in the
kernel messages, not just for warnings and bugs.

Signed-hostap: Johannes Berg <johannes.berg@intel.com>

10 years agoP2P: Short scan wait to speed up the group re-invocation
Rashmi Ramanna [Tue, 12 Nov 2013 14:17:35 +0000 (19:47 +0530)] 
P2P: Short scan wait to speed up the group re-invocation

The shorter 250 ms wait for the next scan request can be used also for
the case of persistent group re-invocation instead of just formation of
a new group. This speeds up the process and makes this more robust
especially in cases where the GO is using MCC.

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

10 years agoFix QoS Map Configure frame use
Jouni Malinen [Wed, 20 Nov 2013 10:08:09 +0000 (12:08 +0200)] 
Fix QoS Map Configure frame use

The QoS Map Set element was passed in full to the driver instead of just
the payload of the element. This resulted in the updated QoS Map being
rejected. Validate the element id/len and send only the payload to the
driver.

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

10 years agoP2P: Prefer U-NII-3 over U-NII-1 during channel selection
Jouni Malinen [Tue, 19 Nov 2013 11:04:21 +0000 (13:04 +0200)] 
P2P: Prefer U-NII-3 over U-NII-1 during channel selection

Some devices disable use of U-NII-1 (channels 36-48) for P2P due to it
being indoor use only in number of locations. If U-NII-3 (channels
149-161) is available, try to pick a channel from that range first
during random channel selection to reduce likelihood of interoperability
issues.

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

10 years agoP2P: Fix channel preference use for MCC p2p_connect
Jouni Malinen [Tue, 19 Nov 2013 10:39:29 +0000 (12:39 +0200)] 
P2P: Fix channel preference use for MCC p2p_connect

Only force_freq was used in the wpas_p2p_set_own_freq_preference() call
which allowed the P2P module channel re-selection to ignore the
preference for using a channel we are already using. Fix this by setting
either force_freq or pref_freq as the preference based on which one is
set. This allows p2p_ignore_shared_freq parameter to be used whether to
prefer the shared frequency in this case.

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

10 years agoP2P: Optimize default case for own freq preference setting
Jouni Malinen [Tue, 19 Nov 2013 10:29:25 +0000 (12:29 +0200)] 
P2P: Optimize default case for own freq preference setting

There is no need to use wpas_p2p_num_unused_channels() here in the
default configuration of p2p_ignore_sahred_freq=0, so re-order the
conditions to skip that operation. This is a bit more efficient and the
debug log is also a bit cleaner in the default case.

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

10 years agoP2P: Fix p2p_ignore_shared_freq=1 when inviting a peer
Jouni Malinen [Tue, 19 Nov 2013 10:26:16 +0000 (12:26 +0200)] 
P2P: Fix p2p_ignore_shared_freq=1 when inviting a peer

p2p_ignore_shared_freq=1 was supposed to allow a MCC-capable device to
ignore a preference for using the same channel on multiple interfaces.
However, it was not used when inviting a peer to re-invoke a persistent
group. This case needs special handling since the peer's channel list is
not available to perform channel reselection and the operating channel
indicated in the Invitation Request frames ends up getting used as the
operating channel if the transmitted of that frames becomes the GO.

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

10 years agoP2P: Fix p2p_ignore_shared_freq=1 during invitation processing
Jouni Malinen [Tue, 19 Nov 2013 10:15:45 +0000 (12:15 +0200)] 
P2P: Fix p2p_ignore_shared_freq=1 during invitation processing

p2p_ignore_shared_freq=1 was supposed to allow a MCC-capable device to
ignore a preference for using the same channel on multiple interfaces.
However, it was not used during processing of an Invitation Request. Fix
that case to use channel preference instead of channel forcing if free
channels are available. This allows p2p_ignore_shared_freq=1 case to
ignore the preference.

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

10 years agoP2P: Clean up wpas_p2p_setup_freqs() debug message
Jouni Malinen [Mon, 18 Nov 2013 16:16:27 +0000 (18:16 +0200)] 
P2P: Clean up wpas_p2p_setup_freqs() debug message

It is confusing to talk about current operating channels being
unavailable for P2P when there are no current operating channels. Make
the debug message easier to understand.

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

10 years agoP2P: Clean up wpas_p2p_init_go_params()
Jouni Malinen [Mon, 18 Nov 2013 16:13:15 +0000 (18:13 +0200)] 
P2P: Clean up wpas_p2p_init_go_params()

It is clearer if there is only a single loop of the channel list and
shared debug prints. In addition, the note about current operating
channels not being available is quite confusing if there are no
operating group, so make that part of the message conditional.

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

10 years agoP2P: Prefer VHT channels for initial pick
Jouni Malinen [Mon, 18 Nov 2013 15:58:14 +0000 (17:58 +0200)] 
P2P: Prefer VHT channels for initial pick

If there are no other preferences from local configuration or driver,
prefer a random VHT channel instead of falling back to the fixed
pre-configured channel or 5 GHz/HT40 channel preference.

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

10 years agoP2P: Prefer HT40 channels for initial pick
Jouni Malinen [Mon, 18 Nov 2013 15:57:07 +0000 (17:57 +0200)] 
P2P: Prefer HT40 channels for initial pick

If there are no other preferences from local configuration or driver,
prefer a random HT40 channel instead of falling back to the fixed
pre-configured channel or 5 GHz channel preference.

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

10 years agoP2P: Prefer 5 GHz channels for initial pick
Jouni Malinen [Mon, 18 Nov 2013 15:55:04 +0000 (17:55 +0200)] 
P2P: Prefer 5 GHz channels for initial pick

If there are no other preferences from local configuration or driver,
prefer a random 5 GHz channel instead of falling back to the fixed
pre-configured channel (which is selected by default to be 1, 6, or 11).

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

10 years agoP2P: Select VHT channel at random instead of using the first entry
Jouni Malinen [Mon, 18 Nov 2013 15:46:14 +0000 (17:46 +0200)] 
P2P: Select VHT channel at random instead of using the first entry

Use the new p2p_channel_select() function to select a VHT channel
at random when no other preferences are in effect.

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

10 years agoP2P: Select HT40 channel at random instead of using the first entry
Jouni Malinen [Mon, 18 Nov 2013 15:44:28 +0000 (17:44 +0200)] 
P2P: Select HT40 channel at random instead of using the first entry

Use the new p2p_channel_select() function to select an HT40 channel
at random when no other preferences are in effect.

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

10 years agoP2P: Move random channel selection into a helper function
Jouni Malinen [Mon, 18 Nov 2013 15:41:39 +0000 (17:41 +0200)] 
P2P: Move random channel selection into a helper function

The new p2p_channel_select() function can be re-used to implement
random channel selection from a set of operating classes in all
places that need such functonality.

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

10 years agoP2P: Fix channel selection for MCC case
Jouni Malinen [Mon, 18 Nov 2013 14:53:44 +0000 (16:53 +0200)] 
P2P: Fix channel selection for MCC case

Commit 0d08efa447a5c5fb20bbed18a2ced36a8afe9221 modified
wpas_p2p_setup_freqs() design to use number of MCC channels capability
from the driver. However, it resulted in regression on how the preferred
vs. forced channel selection is done in the case of a MCC device.
force_freq was set unconditionally even though this was supposed to be
done only if no additional channels are available. pref_freq needs to be
used when possible to avoid preventing connection.

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

10 years agoHandle legacy scan interruption of sched_scan/PNO
Jithu Jance [Thu, 17 Oct 2013 06:26:02 +0000 (11:56 +0530)] 
Handle legacy scan interruption of sched_scan/PNO

While starting from PNO start context, the scheduled scan was not
setting the flag wpa_s->scanning. This was resulting in the subsequent
SCAN command to proceed further and send command to nl80211/cfg80211.
The expected behavior of cancelling sched_scan was not happening here.

While sched_scan is in progress and a legacy scan comes on the
cli/socket, the sched_scan is cancelled and normal scan is allowed to
continue. However, sometimes sched_scan cancelled event comes a bit
delayed and we will send out the scan command before the wpa_s->scanning
is cleared. Instead, reschedule the incoming scan req if the
wpa_s->scanning shows that it is still in progress.

Signed-hostap: Jithu Jance <jithu@broadcom.com>

10 years agowlantest: Add more pcapng notes on EAPOL processing
Jouni Malinen [Sun, 17 Nov 2013 21:43:11 +0000 (23:43 +0200)] 
wlantest: Add more pcapng notes on EAPOL processing

Some of the MIC validation steps were not logged in the pcapng notes.
Add these to make the entries more consistent and to provide more
information to ease debugging.

Signed-hostap: Jouni Malinen <j@w1.fi>

10 years agowlantest: Allow additional PTKs to be specified from a file
Jouni Malinen [Sun, 17 Nov 2013 20:52:15 +0000 (22:52 +0200)] 
wlantest: Allow additional PTKs to be specified from a file

A text file with a hexdump of PTK (KCK|KEK=TK with 48 octets for CCMP or
64 octets for TKIP or alternative 16 or 32 octet TK for CCMP/TKIP) can
now be read from a file specified with the -T command line argument. If
the current known PTK fails to decrypt a frame (or if no current PTK is
known) all listed PTKs are iterated to see if any of them matches.

Signed-hostap: Jouni Malinen <j@w1.fi>

10 years agotests: Use per-test case log/capture file from wlantest
Jouni Malinen [Sun, 17 Nov 2013 19:25:17 +0000 (21:25 +0200)] 
tests: Use per-test case log/capture file from wlantest

Signed-hostap: Jouni Malinen <j@w1.fi>

10 years agowlantest: Add support for debug log timestamps
Jouni Malinen [Sun, 17 Nov 2013 19:44:53 +0000 (21:44 +0200)] 
wlantest: Add support for debug log timestamps

The new command line argument -t can now be used to request wlantest to
include a timestamp in the log entries.

Signed-hostap: Jouni Malinen <j@w1.fi>

10 years agowlantest: Add support for log output into a file
Jouni Malinen [Sun, 17 Nov 2013 19:16:29 +0000 (21:16 +0200)] 
wlantest: Add support for log output into a file

This allows wlantest debug log output to be directed to a file so that
RELOG command can be used to rotate files more easily than stdout.

Signed-hostap: Jouni Malinen <j@w1.fi>

10 years agowlantest: Add RELOG command to reopen log/capture files
Jouni Malinen [Sun, 17 Nov 2013 19:11:35 +0000 (21:11 +0200)] 
wlantest: Add RELOG command to reopen log/capture files

This can be used similarly to the wpa_supplicant RELOG command to
rotate log and capture files.

Signed-hostap: Jouni Malinen <j@w1.fi>

10 years agoValidate P802.11ac test vector result
Jouni Malinen [Sun, 17 Nov 2013 18:32:32 +0000 (20:32 +0200)] 
Validate P802.11ac test vector result

Verify the expected value against P802.11ac/D7.0 CCMP-256, GCMP-256,
BIP-GMAC-128, and BIP-GMAC-256 test vectors.

Signed-hostap: Jouni Malinen <j@w1.fi>

10 years agoExtend GCMP test vectors to include both MPDUs
Jouni Malinen [Sun, 17 Nov 2013 18:23:51 +0000 (20:23 +0200)] 
Extend GCMP test vectors to include both MPDUs

IEEE Std 802.11ad-2012 includes two test vectors for GCMP. Verify both
of those and also verify that the results match the values in the
standard instead of just verifying that decrypted frame matches
original.

Signed-hostap: Jouni Malinen <j@w1.fi>

10 years agotests: Verify GO channel switch behavior
Jouni Malinen [Sun, 17 Nov 2013 14:45:34 +0000 (16:45 +0200)] 
tests: Verify GO channel switch behavior

Signed-hostap: Jouni Malinen <j@w1.fi>

10 years agoAdd chan_switch to ctrl interface of wpa_supplicant and hostapd
Andrei Otcheretianski [Thu, 14 Nov 2013 10:28:32 +0000 (12:28 +0200)] 
Add chan_switch to ctrl interface of wpa_supplicant and hostapd

Add chan_switch to the control interface of wpa_supplicant and hostapd,
and also to wpa_cli and hostapd_cli.

Signed-hostap: Andrei Otcheretianski <andrei.otcheretianski@intel.com>

10 years agoAdd AP channel switch mechanism
Andrei Otcheretianski [Thu, 14 Nov 2013 10:28:31 +0000 (12:28 +0200)] 
Add AP channel switch mechanism

Build CSA settings and call the driver to perform the switch. Construct
Beacon, Probe Response, and (Re)Association Response frames both for CSA
period and for the new channel. These frames are built based on the
current configuration. Add CSA IE in Beacon and Probe Response frames.

Signed-hostap: Andrei Otcheretianski <andrei.otcheretianski@intel.com>

10 years agoMove AP parameter filling into a helper function
Andrei Otcheretianski [Thu, 14 Nov 2013 10:28:31 +0000 (12:28 +0200)] 
Move AP parameter filling into a helper function

Signed-hostap: Andrei Otcheretianski <andrei.otcheretianski@intel.com>

10 years agonl80211: Add channel switch implementation
Andrei Otcheretianski [Thu, 14 Nov 2013 10:28:30 +0000 (12:28 +0200)] 
nl80211: Add channel switch implementation

Implement nl80211 switch_channel() operation.
Publish flags indicating kernel support for channel switch.

Signed-hostap: Andrei Otcheretianski <andrei.otcheretianski@intel.com>

10 years agowpa_supplicant: Update channel switch driver interface
Andrei Otcheretianski [Thu, 14 Nov 2013 10:28:29 +0000 (12:28 +0200)] 
wpa_supplicant: Update channel switch driver interface

Add csa_settings struct which holds parameters for CSA. Change driver
interface for switch_channel(), so that it will receive this struct and
not only the new frequency as it was before. This allows wpa_supplicant
to provide all the required parameters (beacons, proberesp, assocresp,
CSA IE) which are required by cfg80211 implementation.

Signed-hostap: Andrei Otcheretianski <andrei.otcheretianski@intel.com>

10 years agoeloop: Remove eloop_none.c
Jouni Malinen [Sun, 17 Nov 2013 13:51:28 +0000 (15:51 +0200)] 
eloop: Remove eloop_none.c

This was supposed to be a minimal sample of eloop wrapper, but it is
unclear whether this is of that much use and the file has not been kept
up-to-date. Remove this file to reduce maintenance effort. The other
eloop*.c files can be used as a starting point if something new is
needed.

Signed-hostap: Jouni Malinen <j@w1.fi>

10 years agoSync with wireless-testing.git include/uapi/linux/nl80211.h
Jouni Malinen [Sun, 17 Nov 2013 10:30:44 +0000 (12:30 +0200)] 
Sync with wireless-testing.git include/uapi/linux/nl80211.h

Signed-hostap: Jouni Malinen <j@w1.fi>

10 years agoAndroid: Add state message sent after 'status' command
Dmitry Shmidt [Mon, 11 Nov 2013 20:52:59 +0000 (12:52 -0800)] 
Android: Add state message sent after 'status' command

This triggers re-transmission of CTRL-EVENT-STATE-CHANGE and
CTRL-EVENT-CONNECTED events on STATUS command for Android framework
specific processing.

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
10 years agoAndroid: Add SSID in supplicant change event
Dmitry Shmidt [Mon, 11 Nov 2013 20:25:17 +0000 (12:25 -0800)] 
Android: Add SSID in supplicant change event

In addition, change wpa_s->pending_bssid to wpa_s->bssid for the BSSID
value in the event.

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
10 years agoSCARD: Clean up SIM/USIM selection
Masashi Honma [Sun, 17 Nov 2013 10:17:09 +0000 (12:17 +0200)] 
SCARD: Clean up SIM/USIM selection

Commit eb324600295a570199a5e25eb64e60781a04fb74 left an unneeded
sim_type argument to scard_init(). Remove that unnecessary argument to
clean up the implementation.

Signed-hostap: Masashi Honma <masashi.honma@gmail.com>

10 years agodbus_new: Add DBus TDLS methods
Paul Stewart [Mon, 11 Nov 2013 20:13:55 +0000 (12:13 -0800)] 
dbus_new: Add DBus TDLS methods

Add DBus methods for TDLS operations similar to those available
for the control interface. This includes Discover, Setup, and
Teardown commands. While here, add a method to query the TDLS
link status and add a DBus method for it.

Tested with CONFIG_TDLS enabled, on a TDLS-enabled host and
peer capable of TDLS:

    dbus-send --system --dest=fi.w1.wpa_supplicant1 --print-reply \
        /fi/w1/wpa_supplicant1/Interfaces/0 \
        fi.w1.wpa_supplicant1.Interface.TDLSStatus string:<peer-mac-address>

    yields: string "peer does not exist"

    dbus-send --system --dest=fi.w1.wpa_supplicant1 --print-reply \
        /fi/w1/wpa_supplicant1/Interfaces/0 \
        fi.w1.wpa_supplicant1.Interface.TDLSDiscover string:<peer-mac-address>

    yields no error

    dbus-send --system --dest=fi.w1.wpa_supplicant1 --print-reply \
        /fi/w1/wpa_supplicant1/Interfaces/0 \
        fi.w1.wpa_supplicant1.Interface.TDLSSetup string:<peer-mac-address>

    yields no error

    dbus-send --system --dest=fi.w1.wpa_supplicant1 --print-reply \
        /fi/w1/wpa_supplicant1/Interfaces/0 \
        fi.w1.wpa_supplicant1.Interface.TDLSStatus string:<peer-mac-address>

    yields: string "connected" after TDLS completes

    dbus-send --system --dest=fi.w1.wpa_supplicant1 --print-reply \
        /fi/w1/wpa_supplicant1/Interfaces/0 \
        fi.w1.wpa_supplicant1.Interface.TDLSTeardown string:<peer-mac-address>

    yields no error

    dbus-send --system --dest=fi.w1.wpa_supplicant1 --print-reply \
        /fi/w1/wpa_supplicant1/Interfaces/0 \
        fi.w1.wpa_supplicant1.Interface.TDLSStatus string:<peer-mac-address>

    yields: string "peer not connected"

Signed-hostap: Paul Stewart <pstew@chromium.org>

10 years agoRequest new scan only for the original interface
Jithu Jance [Sun, 17 Nov 2013 10:23:09 +0000 (12:23 +0200)] 
Request new scan only for the original interface

Request new scan only for the interface for which the original scan
request and results has come. Otherwise while sharing scan results along
with P2P interfaces, the new scan will be requested on P2P interfaces.

Signed-hostap: Jithu Jance <jithu@broadcom.com>

10 years agoRemove old mechanism of skipping scan request rescheduling
Jouni Malinen [Sun, 17 Nov 2013 10:52:08 +0000 (12:52 +0200)] 
Remove old mechanism of skipping scan request rescheduling

Since eloop_deplete_timeout() is doing practically same in
wpa_supplicant_req_scan(), revert the old mechanism from commit
7e1488494e0150ee7fdef83355266b5633c5c1b0 to avoid unnecessary work in
this function.

Signed-hostap: Jouni Malinen <j@w1.fi>

10 years agoDeplete scan request if new time is less than remaining
Dmitry Shmidt [Mon, 11 Nov 2013 19:13:17 +0000 (11:13 -0800)] 
Deplete scan request if new time is less than remaining

This avoids pushing out previous scheduled scan requests based on new
events.

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>