]> git.ipfire.org Git - thirdparty/hostap.git/log
thirdparty/hostap.git
14 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

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

14 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

14 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

14 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.

14 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

14 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

14 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.

14 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.

14 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().

14 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.

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

14 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>
14 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>
14 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

14 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>
14 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>
14 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

14 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>
14 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>
14 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.

14 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>
14 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().

14 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.

14 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>
14 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>
14 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.

14 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>
14 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.

14 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>
14 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>
14 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>
14 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.

14 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.

14 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

14 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.

14 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>
14 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>
14 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>
14 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>
14 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.

14 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>
14 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>
14 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>
14 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>
14 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>
14 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>
14 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.

14 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]

14 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

14 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.

14 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.

14 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.

14 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

14 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.

14 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.

14 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.

14 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.

14 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

14 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

14 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

14 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>
14 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>
14 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>
14 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>
14 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>
14 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>
14 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>
14 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

14 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.

14 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

14 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.

14 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.

14 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>
14 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.

14 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.

14 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.

14 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).

14 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

14 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>
14 years agoInclude nl80211 driver wrapper in default configuration for hostapd
Jouni Malinen [Mon, 16 May 2011 18:07:47 +0000 (21:07 +0300)] 
Include nl80211 driver wrapper in default configuration for hostapd

14 years agoP2P: Include operating class 124 (channels 149,153,157,161)
Jouni Malinen [Mon, 16 May 2011 18:07:05 +0000 (21:07 +0300)] 
P2P: Include operating class 124 (channels 149,153,157,161)

When using the p2p_oper_reg_class configuration option instead of
p2p_group_add freq parameter, the operating class 124 was not
processed correctly. Include that class in the list of 5 GHz classes
for the p2p_oper_reg_class to resolve this.

14 years agoWPS: Remove obsolete note about lack for WPS ER support
Jouni Malinen [Mon, 16 May 2011 18:06:08 +0000 (21:06 +0300)] 
WPS: Remove obsolete note about lack for WPS ER support

14 years agoUpdate BSS table entry if roaming event indicates frequency change
Jouni Malinen [Mon, 16 May 2011 16:19:30 +0000 (19:19 +0300)] 
Update BSS table entry if roaming event indicates frequency change

This is needed to make sure the frequency in the BSS table entry
remains up-to-date if the AP changes its operating frequency.

14 years agonl80211: Filter out duplicated BSS table entries from scan results
Jouni Malinen [Mon, 16 May 2011 16:18:42 +0000 (19:18 +0300)] 
nl80211: Filter out duplicated BSS table entries from scan results

cfg80211 maintains separate BSS table entries for APs if the same
BSSID,SSID pair is seen on multiple channels. wpa_supplicant does
not use frequency as a separate key in the BSS table, so filter out
duplicated entries. Prefer associated BSS entry in such a case in
order to get the correct frequency into the BSS table.

14 years agonl80211: Fetch assoc_freq from scan table for connect event
Jouni Malinen [Mon, 16 May 2011 15:35:42 +0000 (18:35 +0300)] 
nl80211: Fetch assoc_freq from scan table for connect event

When kernel-based SME is used, use the scan table to find a BSS entry
for the associated AP when processing connected event.

14 years agoEnable CONFIG_DRIVER_NL80211=y in the default configuration
Jouni Malinen [Thu, 21 Apr 2011 17:41:01 +0000 (20:41 +0300)] 
Enable CONFIG_DRIVER_NL80211=y in the default configuration

nl80211 should be preferred over WEXT with any recent Linux kernel
version.

14 years agoAdd workaround for race condition with AssocResp TX status
Jouni Malinen [Fri, 15 Apr 2011 16:26:28 +0000 (19:26 +0300)] 
Add workaround for race condition with AssocResp TX status

It may take some time for the TX status to be delivered for a
(Re)Association Response frame and if any Data frames are received
during that time, they may end up getting dropped as Class 3 frames in
not-associated state. This results in a Disassociation frame being sent
to the station and it assuming that the association has been lost.

Work around the issue by remembering that the (Re)Association Request
has already been accepted and skip the Deauth/Disassoc sending because
of the possible Class 3 frames before the TX status callback is
received.

14 years agoAdd 'signal_poll' command interface
Dmitry Shmidt [Fri, 15 Apr 2011 15:52:01 +0000 (18:52 +0300)] 
Add 'signal_poll' command interface

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
14 years agoPrevent explicit scan command during scan or association
Dmitry Shmidt [Fri, 15 Apr 2011 15:40:29 +0000 (18:40 +0300)] 
Prevent explicit scan command during scan or association

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
14 years agohostapd: Fix interfaces.iface initialization
Guy Eilam [Fri, 15 Apr 2011 15:13:04 +0000 (18:13 +0300)] 
hostapd: Fix interfaces.iface initialization

Set all the interfaces.iface pointers to NULL after the allocation of
that memory block for cases those pointers are accessed during each of
the interfaces initialization process (hostapd_interface_init()). One
example for such case is during WPS initialization when the code tries
to fetch the uuid from each of the interfaces.

Signed-off-by: Guy Eilam <guy@wizery.com>
14 years agoUpdate driver country info on 'SET country <value>'
Jouni Malinen [Fri, 15 Apr 2011 14:00:01 +0000 (17:00 +0300)] 
Update driver country info on 'SET country <value>'

14 years agobsd: Add support for setting HT values in IFM_MMASK
Yi Zhu [Thu, 14 Apr 2011 19:22:24 +0000 (22:22 +0300)] 
bsd: Add support for setting HT values in IFM_MMASK

14 years agoAdd sanity checks for fseek and ftell return values
Jouni Malinen [Thu, 14 Apr 2011 17:22:21 +0000 (20:22 +0300)] 
Add sanity checks for fseek and ftell return values

In theory, these calls could fail, but it is not really likely to
happen in practice in the use case here. Anyway, check that they do
not return an error before accepting the length of the file.

14 years agoIBSS RSN: peer->addr is an array so it cannot be NULL
Jouni Malinen [Thu, 14 Apr 2011 17:18:12 +0000 (20:18 +0300)] 
IBSS RSN: peer->addr is an array so it cannot be NULL

14 years agoWPS: Fix off-by-one check in vendor extension parsing
Jouni Malinen [Thu, 14 Apr 2011 17:02:31 +0000 (20:02 +0300)] 
WPS: Fix off-by-one check in vendor extension parsing

14 years agodriver_test: Check set_ssid len before trying to hexdump the SSID
Jouni Malinen [Thu, 14 Apr 2011 16:52:26 +0000 (19:52 +0300)] 
driver_test: Check set_ssid len before trying to hexdump the SSID

14 years agoTDLS: Verify that scan results for BSS are available before using them
Jouni Malinen [Thu, 14 Apr 2011 16:50:26 +0000 (19:50 +0300)] 
TDLS: Verify that scan results for BSS are available before using them

14 years agoWPS: Use strict validation of (Re)AssocReq only if IEs are known
Jouni Malinen [Wed, 13 Apr 2011 23:58:35 +0000 (02:58 +0300)] 
WPS: Use strict validation of (Re)AssocReq only if IEs are known

14 years agoWPS: Use strict validation of (Re)AssocResp only if IEs are known
Jouni Malinen [Wed, 13 Apr 2011 23:55:38 +0000 (02:55 +0300)] 
WPS: Use strict validation of (Re)AssocResp only if IEs are known