]> git.ipfire.org Git - thirdparty/hostap.git/log
thirdparty/hostap.git
13 years agoFix hostapd_cli linking without CONFIG_WPA_TRACE=y
Vladimir [Tue, 19 Jul 2011 05:45:33 +0000 (08:45 +0300)] 
Fix hostapd_cli linking without CONFIG_WPA_TRACE=y

13 years agoAdd CONFIG_IEEE80211N to wpa_supplicant defconfig
Jouni Malinen [Mon, 18 Jul 2011 18:34:25 +0000 (21:34 +0300)] 
Add CONFIG_IEEE80211N to wpa_supplicant defconfig

This is needed for AP mode functionality with some drivers.

13 years agoP2P: Set p2p auth/assoc parameter based on connection type
Jouni Malinen [Sun, 17 Jul 2011 17:52:49 +0000 (20:52 +0300)] 
P2P: Set p2p auth/assoc parameter based on connection type

Fix the previous code that was hardcoding the p2p parameter based
on the driver P2P capability regardless of whether the connection
was really used for P2P or not.

13 years agonl80211: Change vif type to P2P_CLI upon P2P authentication
Eliad Peller [Sun, 17 Jul 2011 17:25:58 +0000 (20:25 +0300)] 
nl80211: Change vif type to P2P_CLI upon P2P authentication

Currently, wpa_driver_nl80211_authenticate() changes the interface type
to station. However, in case of P2P, we need to change the interface
type to P2P_CLI.

Add p2p field to the authentication params, and consider it for choosing
the correct interface type.

Signed-off-by: Eliad Peller <eliad@wizery.com>
13 years agonl80211: Consider P2P when changing vif type
Eliad Peller [Sun, 17 Jul 2011 17:22:11 +0000 (20:22 +0300)] 
nl80211: Consider P2P when changing vif type

Commit 9f51b11395646efeb5d6a75d2cabc0bf7626496f added support for P2P
interfaces when adding a new interface. However, it didn't handle the
case in which the same interface is being used and its type is being
changed. Add support for this case.

Consequently, when doing "ap_scan_as_station" we now need to save the
actual AP interface type (AP/P2P GO) in order to restore it properly.
For that, change ap_scan_as_station type from int to nl80211_iftype, and
set it to NL80211_IFTYPE_UNSPECIFED when not used.

Signed-off-by: Eliad Peller <eliad@wizery.com>
13 years agonl80211: Do not re-set iftype when initializing added interface
Jouni Malinen [Sun, 17 Jul 2011 17:03:25 +0000 (20:03 +0300)] 
nl80211: Do not re-set iftype when initializing added interface

There is no need to force the interface into station mode when
wpa_supplicant adds a new interface (e.g., P2P group) with the correct
iftype.

13 years agonl80211: Add more debug info for iftype changes
Jouni Malinen [Sun, 17 Jul 2011 16:47:41 +0000 (19:47 +0300)] 
nl80211: Add more debug info for iftype changes

13 years agonl80211: Ignore ifdown event if mode change triggered it
Jouni Malinen [Sun, 17 Jul 2011 10:56:34 +0000 (13:56 +0300)] 
nl80211: Ignore ifdown event if mode change triggered it

When driver_nl80211.c has to set the netdev down to change iftype, an
RTM_NEWLINK event is generated. Do not generate
EVENT_INTERFACE_DISABLED event based on that.

13 years agohostapd_cli: Start using src/utils/edit*.c
Jouni Malinen [Sat, 16 Jul 2011 14:37:18 +0000 (17:37 +0300)] 
hostapd_cli: Start using src/utils/edit*.c

This brings hostapd_cli closer to the design used in wpa_cli
and allows command history and editing mechanisms to be added.

13 years agoDeauthenticate on reconfiguration
Jouni Malinen [Sat, 16 Jul 2011 13:57:11 +0000 (16:57 +0300)] 
Deauthenticate on reconfiguration

This makes sure that the old connection is not maintained if the new
configuration does not allow it anymore. In addition, it is better to
use wpa_supplicant_clear_connection() instead of just clearing
wpa_s->current_ssid here to keep things in sync.

13 years agoDrop oldest unknown BSS table entries first
Jouni Malinen [Sat, 16 Jul 2011 10:22:58 +0000 (13:22 +0300)] 
Drop oldest unknown BSS table entries first

When the BSS table size limit has been reached, drop first the oldest
BSS entries for which there is not a matching network in the
configuration based on SSID (wildcards are ignored). This makes it
less likely to hit connection issues in environments with huge number
of visible APs.

13 years agoFT: Share IE parser implementation for Authenticator and Supplicant
Jouni Malinen [Sat, 16 Jul 2011 08:13:39 +0000 (11:13 +0300)] 
FT: Share IE parser implementation for Authenticator and Supplicant

These are almost identical, so there is no point in using separate
implementations.

13 years agoFT: Fix FT IE parser to not count TIE as protected IE
Jouni Malinen [Sat, 16 Jul 2011 08:05:28 +0000 (11:05 +0300)] 
FT: Fix FT IE parser to not count TIE as protected IE

13 years agoFT: Fix the calculation of MIC Control field in FTIE
Hong Wu [Sat, 16 Jul 2011 07:57:17 +0000 (10:57 +0300)] 
FT: Fix the calculation of MIC Control field in FTIE

Reassociation Request/Response frame validation need to count all IEs in
the RIC. In addition, TIE is not protected, so it should not be included
in the count.

Signed-off-by: Hong Wu <hong.wu@dspg.com>
13 years agoP2P: Do not reply to Probe Request frame indicating only 802.11b rates
Jouni Malinen [Fri, 15 Jul 2011 18:49:50 +0000 (21:49 +0300)] 
P2P: Do not reply to Probe Request frame indicating only 802.11b rates

Per P2P specification 2.4.1, P2P Device shall shall not respond to
Probe Request frames that indicate support for only 802.11b rates.

13 years agoP2P: Check Device ID match in Probe Request frames in Listen state
Jouni Malinen [Fri, 15 Jul 2011 17:48:06 +0000 (20:48 +0300)] 
P2P: Check Device ID match in Probe Request frames in Listen state

Do not reply to Probe Request frames that include a Device ID that
does not match with our own P2P Device Address.

13 years agoP2P: Filter Probe Request frames based on DA and BSSID in Listen state
Jouni Malinen [Fri, 15 Jul 2011 17:25:53 +0000 (20:25 +0300)] 
P2P: Filter Probe Request frames based on DA and BSSID in Listen state

Only accept Probe Request frames that have a Wildcard BSSID and a
destination address that matches with our P2P Device Address or is the
broadcast address per P2P specification 3.1.2.1.1.

13 years agoCheck random_get_bytes() result before writing entropy file
Jouni Malinen [Fri, 15 Jul 2011 14:17:48 +0000 (17:17 +0300)] 
Check random_get_bytes() result before writing entropy file

13 years agoP2P: Fix p2p_intra_bss with nl80211
Johannes Berg [Fri, 15 Jul 2011 14:13:44 +0000 (17:13 +0300)] 
P2P: Fix p2p_intra_bss with nl80211

The current implementation of p2p_intra_bss doesn't work since the flag
isn't propagated into the corresponding hostapd config, so AP code will
never enable AP isolation and will in fact disable it again after it had
been enabled by the P2P code.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
13 years agoP2P: Remove unused SearchOnly parameter from D-Bus p2p_find
Jouni Malinen [Fri, 15 Jul 2011 13:59:05 +0000 (16:59 +0300)] 
P2P: Remove unused SearchOnly parameter from D-Bus p2p_find

13 years agoP2P: Fix memory leak in D-Bus p2p_find handler
Jouni Malinen [Fri, 15 Jul 2011 13:33:21 +0000 (16:33 +0300)] 
P2P: Fix memory leak in D-Bus p2p_find handler

13 years agoP2P: Coding style cleanup
Jouni Malinen [Fri, 15 Jul 2011 11:41:01 +0000 (14:41 +0300)] 
P2P: Coding style cleanup

13 years agoP2P: Fix error path not to build error message twice
Jouni Malinen [Fri, 15 Jul 2011 11:40:04 +0000 (14:40 +0300)] 
P2P: Fix error path not to build error message twice

13 years agoP2P: Clear entry.key to avoid use of uninitialized value on error path
Jouni Malinen [Fri, 15 Jul 2011 11:39:07 +0000 (14:39 +0300)] 
P2P: Clear entry.key to avoid use of uninitialized value on error path

13 years agoWPS: Check malloc success on workaround path
Jouni Malinen [Fri, 15 Jul 2011 11:21:50 +0000 (14:21 +0300)] 
WPS: Check malloc success on workaround path

ssid->ssid could be NULL here if malloc failed, so better check that
consistently.

13 years agoP2P: Use consistent checking of ssid != NULL
Jouni Malinen [Fri, 15 Jul 2011 11:20:31 +0000 (14:20 +0300)] 
P2P: Use consistent checking of ssid != NULL

13 years agoP2P: Coding style cleanup for D-Bus handlers
Jouni Malinen [Fri, 15 Jul 2011 11:18:29 +0000 (14:18 +0300)] 
P2P: Coding style cleanup for D-Bus handlers

13 years agoP2P: Fix D-Bus error path (potential NULL pointer deref)
Jouni Malinen [Fri, 15 Jul 2011 11:03:41 +0000 (14:03 +0300)] 
P2P: Fix D-Bus error path (potential NULL pointer deref)

The paths pointer could have been NULL when going through the shared
freeing path in error case. Avoid the NULL pointer dereference by
checking whether that is the case. In addition, remove unnecessary
gotos to make the function more readable.

13 years agoP2P: Remove dead code from wpas_p2p_connect()
Jouni Malinen [Fri, 15 Jul 2011 10:57:31 +0000 (13:57 +0300)] 
P2P: Remove dead code from wpas_p2p_connect()

The case of joining a running group is handled before this location
and the P2P client iftype is assigned at a callback function for that
case.

13 years agoMD5: Fix clearing of temporary stack memory to use correct length
Jouni Malinen [Fri, 15 Jul 2011 10:42:06 +0000 (13:42 +0300)] 
MD5: Fix clearing of temporary stack memory to use correct length

sizeof of the structure instead of the pointer was supposed to be used
here. Fix this to clear the full structure at the end of MD5Final().

13 years agowpa_supplicant: Edit BINDIR in dbus and systemd service files
Henry Gebhardt [Fri, 15 Jul 2011 09:25:02 +0000 (12:25 +0300)] 
wpa_supplicant: Edit BINDIR in dbus and systemd service files

This is useful, since in Gentoo BINDIR=/usr/sbin.

13 years agowpa_supplicant: Add systemd support
Henry Gebhardt [Fri, 15 Jul 2011 09:13:40 +0000 (12:13 +0300)] 
wpa_supplicant: Add systemd support

13 years agonl80211: fix interface address assignment
Johannes Berg [Fri, 15 Jul 2011 09:05:19 +0000 (12:05 +0300)] 
nl80211: fix interface address assignment

When a new interface is created and already has a separate MAC address
assigned by the kernel, then we need to use that address, not just when
we've created a locally administered address.

This fixes use_p2p_group_interface=1 for iwlagn as it already makes
mac80211 assign an address for a second interface since the hardware has
two addresses assigned.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
13 years agonl80211: Support GTK rekey offload
Johannes Berg [Tue, 12 Jul 2011 18:22:51 +0000 (21:22 +0300)] 
nl80211: Support GTK rekey offload

Add support to wpa_supplicant for device-based GTK rekeying. In order to
support that, pass the KEK, KCK, and replay counter to the driver, and
handle rekey events that update the latter.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
13 years agoSync with linux/nl80211.h from wireless-testing.git
Jouni Malinen [Tue, 12 Jul 2011 17:53:32 +0000 (20:53 +0300)] 
Sync with linux/nl80211.h from wireless-testing.git

13 years agonl80211: Send STA flags to kernel on station addition
Arik Nemtsov [Tue, 12 Jul 2011 17:28:31 +0000 (20:28 +0300)] 
nl80211: Send STA flags to kernel on station addition

Send STA flags to kernel when adding a new station. This ensures
stations are added with up to date flags by kernel drivers.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
13 years agohostapd: Set STA flags when adding a new station
Arik Nemtsov [Tue, 12 Jul 2011 17:26:52 +0000 (20:26 +0300)] 
hostapd: Set STA flags when adding a new station

When adding a new station, set the STA flags as part of the sta_add()
command. This ensures the flags are up to date when the station is added
by lower level drivers.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
13 years agoFix non D-Bus builds by removing 'void void' in return value
Mikael Wikström [Tue, 12 Jul 2011 12:39:33 +0000 (15:39 +0300)] 
Fix non D-Bus builds by removing 'void void' in return value

13 years agoFT: Clear SME ft_used/ft_ies when disconnecting
Hong Wu [Tue, 5 Jul 2011 18:17:31 +0000 (21:17 +0300)] 
FT: Clear SME ft_used/ft_ies when disconnecting

Previous ft_ies needs to be removed before supplicant starts a new FT
initial association and this requires the ft_used state to be cleared
here.

Signed-off-by: Hong Wu <hong.wu@dspg.com>
13 years agoFT: Disable PMKSA cache for FT-IEEE8021X
Hong Wu [Tue, 5 Jul 2011 17:49:51 +0000 (20:49 +0300)] 
FT: Disable PMKSA cache for FT-IEEE8021X

wpa_supplicant uses XXKEY instead of PMK to derive PMK-R0 and PMK-R1 for
FT-IEEE8021X key mgmt.

Signed-off-by: Hong Wu <hong.wu@dspg.com>
13 years agoAllow PMKSA caching to be disabled on Authenticator
Jouni Malinen [Tue, 5 Jul 2011 14:13:04 +0000 (17:13 +0300)] 
Allow PMKSA caching to be disabled on Authenticator

A new hostapd configuration parameter, disable_pmksa_caching=1, can now
be used to disable PMKSA caching on the Authenticator. This forces the
stations to complete EAP authentication on every association when WPA2
is being used.

13 years agowpa_s AP mode: Enable HT20 if driver supports it
Angie Chinchilla [Tue, 5 Jul 2011 13:49:28 +0000 (16:49 +0300)] 
wpa_s AP mode: Enable HT20 if driver supports it

If the driver supports HT20, set the config parameter ieee80211n
to enable it. This does not enable HT40.

Signed-off-by: Angie Chinchilla <angie.v.chinchilla@intel.com>
13 years agowpa_supplicant AP: Disable AP mode on disassoc paths
Jouni Malinen [Tue, 5 Jul 2011 13:38:30 +0000 (16:38 +0300)] 
wpa_supplicant AP: Disable AP mode on disassoc paths

Regardless of how the AP mode is disabled, wpa_supplicant_ap_deinit()
must be called. Make sure this happens on all paths by calling the
deinit function from wpa_supplicant_mark_disassoc().

13 years agoMove peer certificate wpa_msg() calls to notify.c
Jouni Malinen [Tue, 5 Jul 2011 09:40:37 +0000 (12:40 +0300)] 
Move peer certificate wpa_msg() calls to notify.c

This type of wpa_supplicant specific message construction does not need
to be at the EAP implementation, so better move it up to notify.c.

13 years agoAdd dbus signal for information about server certification
Michael Chang [Tue, 5 Jul 2011 09:22:32 +0000 (12:22 +0300)] 
Add dbus signal for information about server certification

In general, this patch attemps to extend commit
00468b4650998144f794762206c695c962c54734 with dbus support.

This can be used by dbus client to implement subject match text
entry with preset value probed from server. This preset value, if
user accepts it, is remembered and passed to subject_match config
for any future authentication.

Signed-off-by: Michael Chang <mchang@novell.com>
13 years agohostapd: Clear keys configured when hostapd reloads configuration
Yogesh Ashok Powar [Tue, 5 Jul 2011 08:39:26 +0000 (11:39 +0300)] 
hostapd: Clear keys configured when hostapd reloads configuration

Data path is broken when hostapd reloads its configuration
disabling the security which was previously enabled (WEP/WPA),
using kill -1, as old keys were not cleared.

The patch clears the keys configured when hostapd reloads
its configuration.

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
13 years agoTLS: Add support for tls_disable_time_checks=1 in client mode
Jouni Malinen [Tue, 5 Jul 2011 08:29:42 +0000 (11:29 +0300)] 
TLS: Add support for tls_disable_time_checks=1 in client mode

This phase1 parameter for TLS-based EAP methods was already supported
with GnuTLS and this commit extends that support for OpenSSL and the
internal TLS implementation.

13 years agowpa_supplicant: Respect PKG_CONFIG variable if set in the environment
Paul Stewart [Mon, 4 Jul 2011 17:35:38 +0000 (20:35 +0300)] 
wpa_supplicant: Respect PKG_CONFIG variable if set in the environment

This is required for cross-compilation support on certain
platforms to avoid changing the pkg-config files themselves.

Signed-off-by: David James <davidjames@chromium.org>
Signed-off-by: Paul Stewart <pstew@chromium.org>
13 years agowpa_cli: Add missing parameter for P2P_GROUP_ADD command
Marcin Klimczewski [Mon, 4 Jul 2011 17:32:15 +0000 (20:32 +0300)] 
wpa_cli: Add missing parameter for P2P_GROUP_ADD command

Both freq and persistent parameters of P2P_GROUP_ADD could be passed at
one time.

13 years agoP2P: Only call dev_lost() for devices that have been dev_found()
Angie Chinchilla [Mon, 4 Jul 2011 17:30:16 +0000 (20:30 +0300)] 
P2P: Only call dev_lost() for devices that have been dev_found()

Fix a bug with the current dev_found()/dev_lost() usage. Previously
in p2p_device_free() dev_lost() was invoked for devices that had
not been dev_found(). This caused dbus related msgs to stderr like:
"Attempted to unregister path (path[0] = fi path[1] = w1) which isn't
registered"

Signed-off-by: Angie Chinchilla <angie.v.chinchilla@intel.com>
13 years agoDBus/P2P: Rectified type of SecondaryDeviceTypes in device property Get
Jayant Sane [Mon, 4 Jul 2011 17:27:53 +0000 (20:27 +0300)] 
DBus/P2P: Rectified type of SecondaryDeviceTypes in device property Get

To be consistent with what it expected in corresponding Set property as
byte[][].

Signed-off-by: Jayant Sane <jayant.sane@intel.com>
13 years agoDBus/P2P: Adding decl for PersistentGroupRemoved signal
Jayant Sane [Mon, 4 Jul 2011 17:24:45 +0000 (20:24 +0300)] 
DBus/P2P: Adding decl for PersistentGroupRemoved signal

Minor - for completeness sake.

Signed-off-by: Jayant Sane <jayant.sane@intel.com>
13 years agonl80211: Process association/disassociation events in AP mode
Jouni Malinen [Fri, 1 Jul 2011 15:44:09 +0000 (18:44 +0300)] 
nl80211: Process association/disassociation events in AP mode

This allows non-mac80211 drivers that implement AP mode SME/MLME
in firmware or driver to notify hostapd/wpa_supplicant of AP mode
association events.

13 years agonl80211: Allow AP mode to be started without monitor interface
Jouni Malinen [Tue, 28 Jun 2011 18:59:44 +0000 (21:59 +0300)] 
nl80211: Allow AP mode to be started without monitor interface

This is in preparation for supporting AP mode with SME/MLME in the
driver/firmware.

13 years agoFix D-Bus build without CONFIG_P2P=y
Jouni Malinen [Mon, 27 Jun 2011 18:23:22 +0000 (21:23 +0300)] 
Fix D-Bus build without CONFIG_P2P=y

13 years agoClear WPA and EAPOL state machine config pointer on network removal
Jouni Malinen [Mon, 27 Jun 2011 16:02:24 +0000 (19:02 +0300)] 
Clear WPA and EAPOL state machine config pointer on network removal

Make sure that the WPA and EAPOL state machines do not hold a pointer
to a network configuration that is about to be freed. This can fix
potential issues with references to freed memory.

13 years agoatheros: Fix glibc 'invalid pointer' error when WPA_TRACE is enabled
Baruch Siach [Sat, 25 Jun 2011 12:41:46 +0000 (15:41 +0300)] 
atheros: Fix glibc 'invalid pointer' error when WPA_TRACE is enabled

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
13 years agoP2P: Fix WpsFailed signal in P2P D-Bus
Jean-Michel.Bachot [Sat, 25 Jun 2011 12:26:04 +0000 (15:26 +0300)] 
P2P: Fix WpsFailed signal in P2P D-Bus

Fix a NULL pointer dereference in commit
3734552f15856f3247f8bc484ffdb6d2a7d08113 in the case of PBC overlap and
timeout case.

Signed-off-by: Jean-Michel.Bachot <jean-michelx.bachot@intel.com>
Signed-off-by: Jayant Sane <jayant.sane@intel.com>
Signed-off-by: Angie Chinchilla <angie.v.chinchilla@intel.com>
13 years agoP2P: Update listen and operating channel from P2P D-Bus
Jayant Sane [Sat, 25 Jun 2011 09:08:43 +0000 (12:08 +0300)] 
P2P: Update listen and operating channel from P2P D-Bus

Some P2PDevice properties were not updated in p2p->cfg structure:
reg_class, channel, op_reg_class, and op_channel. Hence, update p2p->cfg
parameters through p2p core calls in wpas_p2p_update_config().

Signed-off-by: Jean-Michel.Bachot <jean-michelx.bachot@intel.com>
Signed-off-by: Jayant Sane <jayant.sane@intel.com>
13 years agoP2P: Add WpsFailed signal in P2P D-Bus
Jayant Sane [Sat, 25 Jun 2011 08:47:04 +0000 (11:47 +0300)] 
P2P: Add WpsFailed signal in P2P D-Bus

Signal is triggered if an error occurs during WPS provisioning phase.

Signed-off-by: Jean-Michel.Bachot <jean-michelx.bachot@intel.com>
Signed-off-by: Jayant Sane <jayant.sane@intel.com>
13 years agoP2P: More complete persistent group management over D-Bus
Jayant Sane [Fri, 24 Jun 2011 08:20:19 +0000 (11:20 +0300)] 
P2P: More complete persistent group management over D-Bus

Extend commit c2762e410fa319f75a174aeb12343beddf99fce4 to allow
applications to manage (add/remove) persistent groups and accepted
network object paths while invoking a persistent group.

13 years agoP2P: Add dissasoc_low_ack in P2P device properties
Jayant Sane [Thu, 23 Jun 2011 18:35:20 +0000 (21:35 +0300)] 
P2P: Add dissasoc_low_ack in P2P device properties

This can be used to activate the keep alive mechanism enabled in
mac80211. Allows to trigger Peer Disconnected signal if signal is lost
on a P2P peer.

Signed-off-by: Jean-Michel Bachot <jean-michelx.bachot@linux.intel.com>
Signed-off-by: Jayant Sane <jayant.sane@intel.com>
13 years agoP2P: Fix P2P device signal level type in D-Bus
Jayant Sane [Thu, 23 Jun 2011 18:31:22 +0000 (21:31 +0300)] 
P2P: Fix P2P device signal level type in D-Bus

Signed-off-by: Fabien Marotte <fabienx.marotte@intel.com>
Signed-off-by: Jayant Sane <jayant.sane@intel.com>
13 years agoP2P: Show P2P peer signal level in D-Bus P2P device properties
Jayant Sane [Thu, 23 Jun 2011 18:29:10 +0000 (21:29 +0300)] 
P2P: Show P2P peer signal level in D-Bus P2P device properties

Move level parameter from p2p_device to p2p_device_info in order to
expose this information and modify D-Bus P2P handler to return this new
parameter through the P2P device properties.

Signed-off-by: Fabien Marotte <fabienx.marotte@intel.com>
Signed-off-by: Jayant Sane <jayant.sane@intel.com>
13 years agoP2P: Update D-Bus network object semantics during group formation
Jayant Sane [Thu, 23 Jun 2011 18:25:13 +0000 (21:25 +0300)] 
P2P: Update D-Bus network object semantics during group formation

Do not emit network objects during P2P group formation since such
network objects can confuse certain apps. Instead, a persistent group
object is created to allow apps to keep track of persistent groups.
Persistent group objects only represent the info needed to recreate the
group.

Also fixes a minor bug in the handling of persistent group objects
during WPS operations.

Signed-off-by: Jayant Sane <jayant.sane@intel.com>
13 years agoP2P: Enable P2P capability advertisement on D-Bus
Jayant Sane [Thu, 23 Jun 2011 17:51:27 +0000 (20:51 +0300)] 
P2P: Enable P2P capability advertisement on D-Bus

Append "P2P" to capability information if supported by device.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Jayant Sane <jayant.sane@intel.com>
13 years agohostapd: Don't mask out non-symmetric STA HT caps
Helmut Schaa [Thu, 23 Jun 2011 17:18:21 +0000 (20:18 +0300)] 
hostapd: Don't mask out non-symmetric STA HT caps

Previously hostapd just masked the STAs HT caps with its own. However,
some HT caps are not symmetric and as such need to be handled
different.

hostapd shouldn't overwrite the STAs SMPS mode as otherwise the driver
cannot know it has to use RTS/CTS to wake the receiver from dynamic
SMPS for MCS rates > 7.

hostapd shouldn't mask the RX and TX STBC caps with it's own. They are
already handled in a special case below.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
13 years agoFix CONFIG_NO_WPA_PASSPHRASE=y build
Jouni Malinen [Thu, 23 Jun 2011 16:53:45 +0000 (19:53 +0300)] 
Fix CONFIG_NO_WPA_PASSPHRASE=y build

Need to define CONFIG_NO_PBKDF2 even though the crypto cleanup moved
the function to a separate file since there is conditional code in
wpa_supplicant/config.c. In addition, wpa_passphrase should not be
built at all if passphrase functionality is removed.

13 years agoAdd notes for CONFIG_WPS_ER build configuration option
Jouni Malinen [Thu, 23 Jun 2011 16:30:13 +0000 (19:30 +0300)] 
Add notes for CONFIG_WPS_ER build configuration option

[Bug 407]

13 years agoUse nl80211 as an example instead of WEXT
Jouni Malinen [Thu, 23 Jun 2011 16:28:14 +0000 (19:28 +0300)] 
Use nl80211 as an example instead of WEXT

13 years agoAdd a copyright and license statement for a radiotap header file
Jouni Malinen [Thu, 23 Jun 2011 13:39:26 +0000 (16:39 +0300)] 
Add a copyright and license statement for a radiotap header file

This file is a part of the radiotap parser that Andy Green agreed to
relicense under the BSD license (per email, 11 Aug 2007 07:42:05
+0100). The copyright/license statement was updated in radiotap.c,
but this radiotap_iter.h file was forgotten at that point.

13 years agobsd: Fix set_key() sequence number endian issue
Zhu Yi [Thu, 23 Jun 2011 12:47:21 +0000 (15:47 +0300)] 
bsd: Fix set_key() sequence number endian issue

In set_key handler, the seq[8] is in little endian order defined by
WPA. BSD kernel uses a u_int64_t value ik_keyrsc to represent it
internally. The kernel expects the native endian order for the value.
Thus, we need to detect the endian order and swap bytes when
necessary.

13 years agoFix AP selection to check privacy mismatch and IBSS with WPA/RSN IE
Jouni Malinen [Thu, 23 Jun 2011 12:39:00 +0000 (15:39 +0300)] 
Fix AP selection to check privacy mismatch and IBSS with WPA/RSN IE

These checks were previously skipped if the scan result included WPA
or RSN IE. However, that can result in selecting a network that does
not match local configuration in some cases.

13 years agoFix hostapd build without NEED_AP_MLME=y
Jouni Malinen [Wed, 22 Jun 2011 18:45:14 +0000 (21:45 +0300)] 
Fix hostapd build without NEED_AP_MLME=y

13 years agoAdd EVENT_RX_ACTION handler for hostapd
Jouni Malinen [Tue, 21 Jun 2011 17:55:46 +0000 (20:55 +0300)] 
Add EVENT_RX_ACTION handler for hostapd

This fixes an issue with SA Query Response frames not being processed
anymore after wpa_supplicant started registering a handler for those.
This handler registration is in generic driver_nl80211.c code, so
hostapd uses it, too.

13 years agoRemove a compiler warning on uninitialized variable
Jouni Malinen [Tue, 21 Jun 2011 17:54:17 +0000 (20:54 +0300)] 
Remove a compiler warning on uninitialized variable

This is not really ever used, but better keep the compiler output
cleaner.

13 years agoP2P: Start GO without extra scan step
Jouni Malinen [Tue, 21 Jun 2011 08:47:03 +0000 (11:47 +0300)] 
P2P: Start GO without extra scan step

There are some corner cases, where the wpa_supplicant_req_scan() call
may end up scheduling a scan even if we are about to start a GO. Avoid
this by explicitly marking the GO network to be selected for the next
connection.

13 years agonl80211: Add support for driver-based PMKSA cache
Jouni Malinen [Mon, 20 Jun 2011 07:17:33 +0000 (10:17 +0300)] 
nl80211: Add support for driver-based PMKSA cache

Implement PMKSA cache operations add, remove, and flush using nl80211
commands NL80211_CMD_{SET,DEL,FLUSH}_PMKSA to support PMKSA caching
with drivers that select the AP and generate the RSN IE internally.

13 years agoFix non-P2P D-Bus build
Jouni Malinen [Mon, 20 Jun 2011 06:02:41 +0000 (09:02 +0300)] 
Fix non-P2P D-Bus build

13 years agoFix CONFIG_AP=y build without CONFIG_P2P=y
Jouni Malinen [Mon, 20 Jun 2011 05:58:32 +0000 (08:58 +0300)] 
Fix CONFIG_AP=y build without CONFIG_P2P=y

13 years agoDBus: Fix some typos on comments
Jouni Malinen [Sun, 12 Jun 2011 22:09:32 +0000 (15:09 -0700)] 
DBus: Fix some typos on comments

13 years agoDBus: Add support for P2P primitives
Johannes Berg [Sun, 12 Jun 2011 22:08:19 +0000 (15:08 -0700)] 
DBus: Add support for P2P primitives

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
13 years agoDBus: Refactor array adding, add binary arrays
Johannes Berg [Sun, 12 Jun 2011 21:47:49 +0000 (14:47 -0700)] 
DBus: Refactor array adding, add binary arrays

Some new code we're working on will require the dbus type "aay" (an
array of arrays of bytes). To add this, refactor the array code to
reduce code duplication by given a type string to the array starting
code, and also add code to create and parse such arrays from or into an
array of struct wpabuf respectively.

Since there's no unique DBus type for this, add a "fake"
WPAS_DBUS_TYPE_BINARRAY type that is separate from the regular DBus
types for parsing.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
13 years agoDBus: Move wpas_dbus_new_decompose_object_path()
Fabien Marotte [Sun, 12 Jun 2011 21:41:41 +0000 (14:41 -0700)] 
DBus: Move wpas_dbus_new_decompose_object_path()

Moved wpas_dbus_new_decompose_object_path from dbus_new_handlers.c
to dbus_new_helpers.c.

Signed-off-by: Fabien Marotte <fabienx.marotte@linux.intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
13 years agoP2P: Add group started notification
Jean-Michel Bachot [Sun, 12 Jun 2011 21:35:37 +0000 (14:35 -0700)] 
P2P: Add group started notification

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
13 years agoP2P: Add wpas_notify_p2p_provision_discovery()
Johannes Berg [Sun, 12 Jun 2011 21:31:56 +0000 (14:31 -0700)] 
P2P: Add wpas_notify_p2p_provision_discovery()

Add a notification for P2P provision discovery status/result.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
13 years agoP2P: Add callback for provision discovery failure
Jayant Sane [Sun, 12 Jun 2011 21:26:22 +0000 (14:26 -0700)] 
P2P: Add callback for provision discovery failure

When provision discovery fails, this new callback will be called
so P2P users can react to the failure.

Signed-off-by: Jayant Sane <jayant.sane@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
13 years agoP2P: Retry provision discovery requests in IDLE state
Jayant Sane [Sun, 12 Jun 2011 21:20:39 +0000 (14:20 -0700)] 
P2P: Retry provision discovery requests in IDLE state

Since the peer may not be in Listen state when the provision discovery
request is sent, try to send the request again number of times when in
IDLE state. This was already done when p2p_find is in progress, but this
commit adds retries to the case where no other P2P operations are in
progress.

Signed-off-by: Jayant Sane <jayant.sane@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
13 years agoFix a compiler warning on WPS-AP-without-UPnP builds
Jouni Malinen [Tue, 31 May 2011 17:11:25 +0000 (20:11 +0300)] 
Fix a compiler warning on WPS-AP-without-UPnP builds

13 years agorandom: Add support for maintaining internal entropy store over restarts
Jouni Malinen [Tue, 31 May 2011 17:07:11 +0000 (20:07 +0300)] 
random: Add support for maintaining internal entropy store over restarts

This can be used to avoid rejection of first two 4-way handshakes every
time hostapd (or wpa_supplicant in AP/IBSS mode) is restarted. A new
command line parameter, -e, can now be used to specify an entropy file
that will be used to maintain the needed state.

13 years agoRemove compiler warning for non-P2P builds
Jouni Malinen [Fri, 27 May 2011 16:06:05 +0000 (19:06 +0300)] 
Remove compiler warning for non-P2P builds

13 years agonl80211: Re-order functions to group AP/hostapd specific code
Jouni Malinen [Fri, 27 May 2011 16:02:04 +0000 (19:02 +0300)] 
nl80211: Re-order functions to group AP/hostapd specific code

Get rid of separate ifdef/endif blocks for AP specific and hostapd
specific code, i.e., only have one main block of code for each case.

13 years agonl80211: Enable more AP callbacks for non-hostapd AP mode
Jouni Malinen [Fri, 27 May 2011 15:54:36 +0000 (18:54 +0300)] 
nl80211: Enable more AP callbacks for non-hostapd AP mode

Some of these are required for proper functionality (like
get_seqnum); others may not be needed yet, but including them
allows some extra ifdef/endif blocks to be removed.

13 years agonl80211: Implement set_rate_sets for non-hostapd AP case
Eliad Peller [Fri, 27 May 2011 15:41:46 +0000 (18:41 +0300)] 
nl80211: Implement set_rate_sets for non-hostapd AP case

.set_rate_sets is not defined for non-hostapd, which prevents
configuring basic_rates when working as P2P GO.

Signed-off-by: Eliad Peller <eliad@wizery.com>
13 years agoatheros: Fix auth_alg configuration for static WEP
Ken Zhu [Fri, 20 May 2011 15:27:53 +0000 (18:27 +0300)] 
atheros: Fix auth_alg configuration for static WEP

When IEEE 802.1X is not enabled, driver_atheros.c needs to know how
to set authentication algorithms for static WEP.

13 years agoFix regression in RSN pre-authentication candidate list generation
Jouni Malinen [Thu, 19 May 2011 14:52:46 +0000 (17:52 +0300)] 
Fix regression in RSN pre-authentication candidate list generation

Processing of the scan results for RSN pre-authentication candidates
was moved to happen before the network was selected. This resulted in
all candidates being dropped due to no SSID having been configured.
Fix this by moving the processing to happen after the network has
been selected. Since the raw scan results are not available at that
point, use the BSS table instead of scan results to fetch the
information.

13 years agoWPS UPnP: Fix UPnP initialization for non-bridge case with some drivers
Vinay Adella [Thu, 19 May 2011 09:55:47 +0000 (12:55 +0300)] 
WPS UPnP: Fix UPnP initialization for non-bridge case with some drivers

If the driver wrapper is setting up the interface up only at commit(),
UPnP initialization fails. Fix that by moving UPnP setup to happen after
the driver commit() call.

13 years agoWPS: Add a workaround for Windows 7 capability discovery for PBC
Jouni Malinen [Tue, 17 May 2011 16:53:02 +0000 (19:53 +0300)] 
WPS: Add a workaround for Windows 7 capability discovery for PBC

Windows 7 uses incorrect way of figuring out AP's WPS capabilities by
acting as a Registrar and using M1 from the AP. The config methods
attribute in that message is supposed to indicate only the configuration
method supported by the AP in Enrollee role, i.e., to add an external
Registrar. For that case, PBC shall not be used and as such, the
PushButton config method is removed from M1 by default. If pbc_in_m1=1
is included in the configuration file, the PushButton config method is
left in M1 (if included in config_methods parameter) to allow Windows 7
to use PBC instead of PIN (e.g., from a label in the AP).

13 years agoAdd TDLS support to Android.mk
Dmitry Shmidt [Mon, 16 May 2011 19:29:43 +0000 (22:29 +0300)] 
Add TDLS support to Android.mk

13 years agoBetter messages when channel cannot be used in AP mode
Ben Greear [Mon, 16 May 2011 19:01:11 +0000 (22:01 +0300)] 
Better messages when channel cannot be used in AP mode

Log messages letting user know that the channel cannot
be used because it is flagged unusable.

Signed-off-by: Ben Greear <greearb@candelatech.com>