]> git.ipfire.org Git - thirdparty/hostap.git/log
thirdparty/hostap.git
12 years agoAndroid: Add a top level Android.mk
Jouni Malinen [Sat, 18 May 2013 08:55:32 +0000 (11:55 +0300)] 
Android: Add a top level Android.mk

This allows the hostap.git repository version to be build as part of the
full Android platform build.

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

12 years agoAbstract and Android sockets for global ctrl_iface
Jouni Malinen [Sat, 18 May 2013 08:42:09 +0000 (11:42 +0300)] 
Abstract and Android sockets for global ctrl_iface

The wpa_supplicant global control interface parameter can now be used to
explicitly specify an abstract UNIX domain socket (Linux specific
extension) with "@abstract:" prefix and an Android control socket with
"@android:" prefix.

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

12 years agowpa_cli: Allow global interface to be used in interactive mode
Jouni Malinen [Sat, 18 May 2013 08:40:23 +0000 (11:40 +0300)] 
wpa_cli: Allow global interface to be used in interactive mode

This is mostly a corner case at this point, but if wpa_cli was started
with global control interface connection (-g) and interactive mode,
per-interface control interface was tried to be opened with the
previously opened global ctrl_iface connection gettign leaked.

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

12 years agowpa_supplicant: Add -G argument to specify global ctrl group
Jouni Malinen [Sat, 18 May 2013 08:00:05 +0000 (11:00 +0300)] 
wpa_supplicant: Add -G argument to specify global ctrl group

The optional -G<group> command line argument can be used to specify the
group that can access the global control interface.

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

12 years agoAllow global ctrl_iface to be used for per-interface commands
Jouni Malinen [Sat, 18 May 2013 07:19:38 +0000 (10:19 +0300)] 
Allow global ctrl_iface to be used for per-interface commands

"IFNAME=<ifname> " prefix can now be used on the wpa_supplicant global
control interface to direct a command to a specific interface instead of
having to use an interface specific control interface for this. This
allows a single socket to be used for controlling multiple virtual
interfaces.

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

12 years agoFT RRB: Fix a memory leak on error path
Jouni Malinen [Sat, 18 May 2013 06:49:26 +0000 (09:49 +0300)] 
FT RRB: Fix a memory leak on error path

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

12 years agoP2P: Use preferred channel list during GO creation
Suryadevara Sudheer [Fri, 17 May 2013 08:27:02 +0000 (11:27 +0300)] 
P2P: Use preferred channel list during GO creation

This extends support for p2p_pref_Chan configuration parameter for
autonomous GO creation.

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

12 years agoP2P: Re-select channel in invitation case with peer info
Suryadevara Sudheer [Fri, 17 May 2013 08:18:02 +0000 (11:18 +0300)] 
P2P: Re-select channel in invitation case with peer info

Allow invitation exchange to update operating channel selection after
peer channel list has been received similarly to how GO negotiation was
handled.

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

12 years agoP2P: Fix p2p_pref_chan setting from configuration file
Yufeng Wang [Fri, 17 May 2013 08:03:52 +0000 (11:03 +0300)] 
P2P: Fix p2p_pref_chan setting from configuration file

Commit 21d996f775a2131bb0c73d6e18ca9b382f017057 added p2p_pref_chan as a
configuration file parameter, but included only the case of dynamically
setting this at runtime through the control interface SET command.
Complete this functionality by taking this value into use directly from
the configuration file, too.

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

12 years agodbus: Terminate cleanly on messagebus shutdown
Daniel Gnoutcheff [Thu, 16 May 2013 17:47:28 +0000 (20:47 +0300)] 
dbus: Terminate cleanly on messagebus shutdown

By default, dbus_connection_dispatch() will call _exit() if the bus
connection has been closed. This caused wpa_supplicant to terminate
without properly cleaning up after itself.

To ensure that we terminate cleanly when the messagebus terminates,
override the exit_on_disconnect behavior and install a filter to handle
libdbus's "Disconnected" signal.

[Bug 474]

Signed-hostap: Daniel Gnoutcheff <daniel@gnoutcheff.name>

12 years agoWNM: Enable CONFIG_WNM in Android.mk
Vinayak Kamath [Thu, 16 May 2013 14:51:18 +0000 (17:51 +0300)] 
WNM: Enable CONFIG_WNM in Android.mk

Signed-hostap: Vinayak Kamath <vkamat@codeaurora.org>

12 years agoWNM: Add sending of BSS Transition Management Query
Vinayak Kamath [Thu, 16 May 2013 14:50:31 +0000 (17:50 +0300)] 
WNM: Add sending of BSS Transition Management Query

The new control interface command can be used to send a
BSS Transition Management Query frame to the current AP.

Signed-hostap: Vinayak Kamath <vkamat@codeaurora.org>

12 years agoWNM: Add neighbor report processing for BSS Transition Management
Vinayak Kamath [Thu, 16 May 2013 14:48:59 +0000 (17:48 +0300)] 
WNM: Add neighbor report processing for BSS Transition Management

Process the neighbor report received in BSS Management Request frames.

Signed-hostap: Vinayak Kamath <vkamat@codeaurora.org>

12 years agoWPS: Clear connection failure counts on WPS success
Jouni Malinen [Wed, 15 May 2013 14:33:50 +0000 (17:33 +0300)] 
WPS: Clear connection failure counts on WPS success

The WPS provisioning case does not result in successful connection by
design and as such, this can result in networks getting temporarily
disabled. Avoid this by clearing the failure counts on WPS success.

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

12 years agoWPS NFC: Connect using learnt credential after NFC Tag read
Jouni Malinen [Wed, 15 May 2013 13:46:45 +0000 (16:46 +0300)] 
WPS NFC: Connect using learnt credential after NFC Tag read

Instead of just adding the new network, prefer the network learnt from a
configuration token during the first connection attempt. This makes the
WPS NFC case behave similarly to the in-band provisioning cases if there
are more preferred networks in the scan results.

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

12 years agoedit: Fix libreadline history clearing with WPA_TRACE
Jouni Malinen [Tue, 14 May 2013 13:46:38 +0000 (16:46 +0300)] 
edit: Fix libreadline history clearing with WPA_TRACE

The HIST_ENTRY and its variables are allocated within libreadline, so
they won't have the WPA_TRACE special header and cannot be freed with
os_free(). Use free() to avoid issues during wpa_cli termination if any
of the new commands added to the history are to be removed (e.g.,
set_network could include a password).

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

12 years agonl80211: Fix foreign address filtering for MLME frame events
Jouni Malinen [Mon, 13 May 2013 08:53:21 +0000 (11:53 +0300)] 
nl80211: Fix foreign address filtering for MLME frame events

Commit 97279d8d1ad40bd7d884af8e2fc26dff0163331a started filtering MLME
frame events based on Address 1 (destination) field. This works fine for
frames sent to us, but it did filter out some corner cases where we
actually want to process an event based on a frame sent by us. The main
such case is deauthentication or disassociation triggered by something
external to wpa_supplicant in the system. Fix this by accepting events
for frames where either Address 1 or 2 (transmitter) matches the
interface address.

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

12 years agowpadebug: Add broadcast intent receiver for Wi-Fi events
Jouni Malinen [Sun, 12 May 2013 18:06:59 +0000 (21:06 +0300)] 
wpadebug: Add broadcast intent receiver for Wi-Fi events

This makes it easier to debug Android framework actions with all the
related broadcast intents being logged.

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

12 years agoMark interface disconnected on removal request
Jouni Malinen [Sun, 12 May 2013 16:16:35 +0000 (19:16 +0300)] 
Mark interface disconnected on removal request

This cleans up debug log by not trying to process the disconnection
event as a failure that could result in blacklist addition and auto
connect attempt. These are pointless operations since the interface is
going to removed immediately after this.

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

12 years agoDo not try auto connect mechanism in disconnected state
Jouni Malinen [Sun, 12 May 2013 16:15:33 +0000 (19:15 +0300)] 
Do not try auto connect mechanism in disconnected state

This cleans up debug log by not requesting the auto connect on
dissassociation event if we are already in disconnected state and would
not try to connect anyway.

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

12 years agoDo not add BSS to blacklist on local disconnection request
Jouni Malinen [Sun, 12 May 2013 16:12:29 +0000 (19:12 +0300)] 
Do not add BSS to blacklist on local disconnection request

There is no point in marking a BSS temporarily blacklisted based on a
connection failure or disconnection case if that happens as a result of
a local request to disconnect. The blacklist entry could result on
unexpected BSS getting selected on the next connection attempt. In
addition, the code to try to find another BSS within the ESS could
result in scanning a single channel on the next attempt. Fix these
issues by handling the connection failure events only if we are not in
disconnected state (i.e., would try to reconnect after this
automatically).

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

12 years agowpadebug: Add a simple WebView activity
Jouni Malinen [Sat, 11 May 2013 18:01:46 +0000 (21:01 +0300)] 
wpadebug: Add a simple WebView activity

This provides a simple web browser that can be started and stopped from
other apps or native applications.

This activity can be started with the following command:
am start -a android.action.MAIN -c android.intent.category.LAUNCHER \
    -n w1.fi.wpadebug/.WpaWebViewActivity -e w1.fi.wpadebug.URL <URL>

If <URL> is set to FINISH the activity is finished.

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

12 years agotests: Allow hwsim_test and wlantest_cli to be used from PATH
Jouni Malinen [Sat, 11 May 2013 08:34:49 +0000 (11:34 +0300)] 
tests: Allow hwsim_test and wlantest_cli to be used from PATH

This makes it easier to support some test environments where the
repository is shared between hosts.

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

12 years agowpadebug: Add forgotten installation step to documentation
Jouni Malinen [Sat, 11 May 2013 08:32:03 +0000 (11:32 +0300)] 
wpadebug: Add forgotten installation step to documentation

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

12 years agotests: Use /var/run/hostapd-global to avoid socket file in work dir
Jouni Malinen [Fri, 10 May 2013 14:09:55 +0000 (17:09 +0300)] 
tests: Use /var/run/hostapd-global to avoid socket file in work dir

This makes some cases more convenient with read-only file systems.

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

12 years agoDefer scan if connection is in progress on any of the shared interfaces
Deepthi Gowri [Fri, 10 May 2013 13:10:50 +0000 (16:10 +0300)] 
Defer scan if connection is in progress on any of the shared interfaces

Scanning can delay concurrent operations considerably, so it is better
to avoid that while trying to connect on any of the virtual interfaces
that share the same radio.

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

12 years agotls_openssl: Store TLS context per-connection
Paul Stewart [Thu, 9 May 2013 21:22:08 +0000 (00:22 +0300)] 
tls_openssl: Store TLS context per-connection

Store context for each tls_init() caller, so events are generated for
the correct wpa_s instance. The tls_global variable is retained for
older OpenSSL implementations that may not have app-data for SSL_CTX.

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

12 years agoRename hostapd_parse_rates() to a more generic int list parser
Simon Wunderlich [Thu, 9 May 2013 17:21:41 +0000 (20:21 +0300)] 
Rename hostapd_parse_rates() to a more generic int list parser

This can be used with other integer lists than just rates.

Signed-hostap: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>

12 years agoDFS: Add ieee80211h hostapd configuration parameter
Simon Wunderlich [Thu, 9 May 2013 17:14:53 +0000 (20:14 +0300)] 
DFS: Add ieee80211h hostapd configuration parameter

This patch is based on the original work by Boris Presman and
Victor Goldenshtein. Channel Switch Announcement support has been
removed and event handling as well as channel set handling was
changed, among various other changes.

Cc: Boris Presman <boris.presman@ti.com>
Cc: Victor Goldenshtein <victorg@ti.com>
Signed-hostap: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>

12 years agonl80211: Add driver_ops for stopping AP beaconing
Simon Wunderlich [Thu, 9 May 2013 17:06:33 +0000 (20:06 +0300)] 
nl80211: Add driver_ops for stopping AP beaconing

This can be used to stop AP mode beaconing temporarily, e.g., in
response to a radar detected event.

This patch is based on the original work by Boris Presman and
Victor Goldenshtein. Channel Switch Announcement support has been
removed and event handling as well as channel set handling was
changed, among various other changes.

Cc: Boris Presman <boris.presman@ti.com>
Cc: Victor Goldenshtein <victorg@ti.com>
Signed-hostap: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>

12 years agonl80211: Add driver_ops for starting radar detection
Simon Wunderlich [Thu, 9 May 2013 17:05:01 +0000 (20:05 +0300)] 
nl80211: Add driver_ops for starting radar detection

This patch is based on the original work by Boris Presman and
Victor Goldenshtein. Channel Switch Announcement support has been
removed and event handling as well as channel set handling was
changed, among various other changes.

Cc: Boris Presman <boris.presman@ti.com>
Cc: Victor Goldenshtein <victorg@ti.com>
Signed-hostap: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>

12 years agonl80211: Add channel flags for DFS state information
Simon Wunderlich [Thu, 9 May 2013 17:02:57 +0000 (20:02 +0300)] 
nl80211: Add channel flags for DFS state information

This patch is based on the original work by Boris Presman and
Victor Goldenshtein. Channel Switch Announcement support has been
removed and event handling as well as channel set handling was
changed, among various other changes.

Cc: Boris Presman <boris.presman@ti.com>
Cc: Victor Goldenshtein <victorg@ti.com>
Signed-hostap: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>

12 years agonl80211: Add driver capability flag for radar detection
Simon Wunderlich [Thu, 9 May 2013 16:58:55 +0000 (19:58 +0300)] 
nl80211: Add driver capability flag for radar detection

This patch is based on the original work by Boris Presman and
Victor Goldenshtein. Channel Switch Announcement support has been
removed and event handling as well as channel set handling was
changed, among various other changes.

Cc: Boris Presman <boris.presman@ti.com>
Cc: Victor Goldenshtein <victorg@ti.com>
Signed-hostap: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>

12 years agonl80211: Add driver events for radar detection
Simon Wunderlich [Thu, 9 May 2013 16:54:18 +0000 (19:54 +0300)] 
nl80211: Add driver events for radar detection

This patch is based on the original work by Boris Presman and
Victor Goldenshtein. Channel Switch Announcement support has been
removed and event handling as well as channel set handling was
changed, among various other changes.

Cc: Boris Presman <boris.presman@ti.com>
Cc: Victor Goldenshtein <victorg@ti.com>
Signed-hostap: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>

12 years agoeloop: Allow to run event loop multiple times in a row
Simon Wunderlich [Thu, 9 May 2013 13:42:14 +0000 (16:42 +0300)] 
eloop: Allow to run event loop multiple times in a row

DFS implementation requires to run an eventloop while monitoring
the Channel Availability Check (CAC). After that, the "real" event
loop is started, and should not fail doing so.

Signed-hostap: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>

12 years agowpa_supplicant: Allow vifs to scan only current channel
Ben Greear [Thu, 9 May 2013 09:43:40 +0000 (12:43 +0300)] 
wpa_supplicant: Allow vifs to scan only current channel

If a VIF is already associated, then only scan on the associated
frequency if user requests such. This is a big help when using
lots of virtual stations.

Signed-hostap: Ben Greear <greearb@candelatech.com>
Signed-off-by: Ben Greear <greearb@candelatech.com>
12 years agosystemd: Fix systemd interface alias
Arend van Spriel [Thu, 9 May 2013 08:25:48 +0000 (11:25 +0300)] 
systemd: Fix systemd interface alias

In the systemd interface templated the alias entry was specified
with wlan0 hard coded. Changing it to %i in this patch. [Bug 477]

Reported-by: zg <ml@mail.tsaitgaist.info>
Signed-hostap: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
12 years agoTry to set WPA-None key after IBSS-joined event
Jouni Malinen [Tue, 7 May 2013 15:14:56 +0000 (18:14 +0300)] 
Try to set WPA-None key after IBSS-joined event

cfg80211 rejects the set_key operations before the IBSS network has been
fully formed, so add one more attempt to set the key for WPA-None at
IBSS joined driver event.

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

12 years agoUse cached driver capabilities instead of new fetch for each operation
Jouni Malinen [Tue, 7 May 2013 14:36:40 +0000 (17:36 +0300)] 
Use cached driver capabilities instead of new fetch for each operation

There is no need to repeat the driver capability fetch for each
operation since we already cache driver flags in wpa_s->drv_flags.

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

12 years agoTDLS: Do not overwrite the reason code in the Tear Down Request
Sunil Dutt [Tue, 7 May 2013 13:27:31 +0000 (16:27 +0300)] 
TDLS: Do not overwrite the reason code in the Tear Down Request

The reason code for the teardown request is overwritten for open
mode. This commit removes the code that does so by reverting parts
of commit 0cb12963b69abf493e456c8b2ed2b0be30ce11e7.

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

12 years agoAdd a configration parameter for sched_scan interval
Sheng Fang [Tue, 7 May 2013 09:41:14 +0000 (12:41 +0300)] 
Add a configration parameter for sched_scan interval

The new sched_scan_interval parameter can be used to set the default
sched_scan interval, e.g., for power saving purposes.

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

12 years agoSynchronize with wireless-testing.git include/uapi/linux/nl80211.h
Jouni Malinen [Mon, 6 May 2013 12:59:49 +0000 (15:59 +0300)] 
Synchronize with wireless-testing.git include/uapi/linux/nl80211.h

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

12 years agoTDLS: Move AID=1 workaround into driver_nl80211.c
Jouni Malinen [Mon, 6 May 2013 12:57:03 +0000 (15:57 +0300)] 
TDLS: Move AID=1 workaround into driver_nl80211.c

The use of AID=1 for the nl80211 dummy STA case is specific to the
driver (cfg80211), so better move this into the driver wrapper instead
of generic TDLS implementation.

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

12 years agoTDLS: Pass peer's AID information to kernel
Sunil Dutt [Mon, 6 May 2013 12:47:44 +0000 (15:47 +0300)] 
TDLS: Pass peer's AID information to kernel

The information of the peer's AID is required for the driver to
construct partial AID in VHT PPDU's. Pass this information to the driver
during add/set station operations (well, as soon as the information is
available, i.e., with set station operation currently).

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

12 years agowpadebug: Add more common control interface commands to the list
Jouni Malinen [Sun, 5 May 2013 18:11:36 +0000 (21:11 +0300)] 
wpadebug: Add more common control interface commands to the list

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

12 years agowpadebug: Add credential manager
Jouni Malinen [Sun, 5 May 2013 16:38:51 +0000 (19:38 +0300)] 
wpadebug: Add credential manager

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

12 years agowpadebug: Add exception handling for missing resources
Jouni Malinen [Sun, 5 May 2013 15:28:25 +0000 (18:28 +0300)] 
wpadebug: Add exception handling for missing resources

These errors should not really happen, but apparently they can if the
build dependencies get messed up somehow.

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

12 years agoHS 2.0: Include HS 2.0 Indication element only for HS 2.0 association
Jouni Malinen [Sun, 5 May 2013 13:29:21 +0000 (16:29 +0300)] 
HS 2.0: Include HS 2.0 Indication element only for HS 2.0 association

The Hotspot 2.0 specification seems to mandate this element to be
included in all (Re)Association Request frames if the station is Hotspot
2.0 capable. However, that results in conflicts with other requirements
like no TKIP use when this element is present. The design is really
supposed to include the indication element only for Hotspot 2.0
associations regardless of what the current specification implies.
Remove the HS 2.0 Indication element from (Re)Association Request frame
whenever the connection is not for Hotspot 2.0 purposes.

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

12 years agoedit: Fix history processing on running old command
Jouni Malinen [Sun, 5 May 2013 10:09:55 +0000 (13:09 +0300)] 
edit: Fix history processing on running old command

currbuf_valid needs to be cleared when an old command from history is
processed to avoid leaving a bogus entry that makes history_prev() skip
the last entry in history.

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

12 years agowpa_cli: Fetch the current BSSID list when starting interactive mode
Jouni Malinen [Sun, 5 May 2013 09:38:55 +0000 (12:38 +0300)] 
wpa_cli: Fetch the current BSSID list when starting interactive mode

This makes tab completion work better in cases where wpa_cli is started
after wpa_supplicant has already discovered BSSes.

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

12 years agowpa_cli: Add BSSID tab completion for set bssid_filter
Jouni Malinen [Sun, 5 May 2013 09:20:35 +0000 (12:20 +0300)] 
wpa_cli: Add BSSID tab completion for set bssid_filter

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

12 years agowpa_cli: Replace set command help with completion routine
Jouni Malinen [Sun, 5 May 2013 09:12:31 +0000 (12:12 +0300)] 
wpa_cli: Replace set command help with completion routine

The old help text did not include most of the parameters and as such,
was not really helpful. Replace it with tab completion function that
includes more or less all available parameters.

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

12 years agowpa_cli: Allow space in the set command value
Jouni Malinen [Sun, 5 May 2013 08:53:20 +0000 (11:53 +0300)] 
wpa_cli: Allow space in the set command value

Previously, interactive mode could not be used to enter space-separated
lists with the set command. This removes that restriction and allows
such commands to be encoded properly.

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

12 years agowpa_supplicant: Allow global scan frequencies configuration
Ben Greear [Sun, 5 May 2013 08:46:54 +0000 (11:46 +0300)] 
wpa_supplicant: Allow global scan frequencies configuration

This allows one to limit the channels that wpa_supplicant will
scan. This is a useful addition to the freq_list configurable
in the network {} section.

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

12 years agowpadebug: Add generic control interface command mechanism
Jouni Malinen [Sat, 4 May 2013 23:46:41 +0000 (02:46 +0300)] 
wpadebug: Add generic control interface command mechanism

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

12 years agowpadebug: Add generic shell command mechanism
Jouni Malinen [Sat, 4 May 2013 22:46:07 +0000 (01:46 +0300)] 
wpadebug: Add generic shell command mechanism

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

12 years agowpadebug: Report WSC NFC tag read to wpa_supplicant
Jouni Malinen [Sat, 4 May 2013 18:09:34 +0000 (21:09 +0300)] 
wpadebug: Report WSC NFC tag read to wpa_supplicant

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

12 years agowpadebug: Move NFC intent activity into a separate class
Jouni Malinen [Sat, 4 May 2013 17:29:47 +0000 (20:29 +0300)] 
wpadebug: Move NFC intent activity into a separate class

This simplifies both activities by making the DisplayMessageActity
simple text message displaying operation and the NFC activity as
something that is started only through NFC intent triggers.

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

12 years agoSynchronize build config comments for wpa_supplicant
Jouni Malinen [Sat, 4 May 2013 17:16:55 +0000 (20:16 +0300)] 
Synchronize build config comments for wpa_supplicant

This updates number of comments in android.config to match the latest
version in defconfig and adds some of the entries that were previously
present only in android.config into defconfig.

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

12 years agoAndroid: Enable WPS ER and NFC support in the build
Jouni Malinen [Sat, 4 May 2013 17:12:44 +0000 (20:12 +0300)] 
Android: Enable WPS ER and NFC support in the build

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

12 years agoWPS: Do not use void* in arithmetic
Jouni Malinen [Sat, 4 May 2013 17:11:16 +0000 (20:11 +0300)] 
WPS: Do not use void* in arithmetic

This is a C compiler extension and not needed, so replace with standard
compliant way of calculating the pointer.

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

12 years agoRevert "nl80211: Add nla_put_u32() wrapper for Android"
Jouni Malinen [Sat, 4 May 2013 16:06:08 +0000 (19:06 +0300)] 
Revert "nl80211: Add nla_put_u32() wrapper for Android"

This reverts commit df2f9ec6b2578def21fc26c88e661b5d28f0fbbf.

The current AOSP snapshot for JB includes nla_put_u32(), so this is not
needed anymore and is also causing linking issues due to duplicated
definition.

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

12 years agowpadebug: Add WSC request through Android beam
Jouni Malinen [Sat, 4 May 2013 15:50:48 +0000 (18:50 +0300)] 
wpadebug: Add WSC request through Android beam

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

12 years agoHS 2.0: Move Probe Request Indication IE addition to proper place
Jouni Malinen [Sat, 4 May 2013 08:57:56 +0000 (11:57 +0300)] 
HS 2.0: Move Probe Request Indication IE addition to proper place

This needs to be in wpa_supplicant_extra_ies() to get consistent
behavior for both scan and sched_scan cases.

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

12 years agoWPA: Print pairwise EAPOL-Key flag as a bool
Johannes Berg [Sat, 4 May 2013 08:48:57 +0000 (11:48 +0300)] 
WPA: Print pairwise EAPOL-Key flag as a bool

Since "pairwise" is defined as an integer, the current assignment leads
to it having the value 0 or 8, which is a bit strange in debug output:

WPA: Send EAPOL(version=2 secure=1 mic=1 ack=1 install=1 pairwise=8
kde_len=46 keyidx=2 encr=1)

Use !!(...) to normalize it to 0 or 1.

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

12 years agohostapd: Add Key MIC in group EAPOL-Key frames corruption test option
Johannes Berg [Sat, 4 May 2013 08:45:03 +0000 (11:45 +0300)] 
hostapd: Add Key MIC in group EAPOL-Key frames corruption test option

For some testing it can be useful to force the Key MIC in group
EAPOL-Key frames to be corrupt. Add an option to allow setting a
probability for corrupting the Key MIC and use it in the WPA code,
increasing the first byte of the MIC by one to corrupt it if desired.

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

12 years agowlantest: Fix the injection of protected broadcast frames
Chaitanya T K [Sat, 4 May 2013 08:36:28 +0000 (11:36 +0300)] 
wlantest: Fix the injection of protected broadcast frames

Injecting protected broadcast frames fails because of the unnecessary
null check for sta. In case of broadcast frames sta can be null, so
remove the check.

Reported-by: Janardhan R <janardhanr@posedge.com>
Signed-hostap: Chaitanya T K <chaitanyatk@posedge.com>

12 years agonl80211: Fix max_remain_on_chan capability reading
Ilan Peer [Sat, 4 May 2013 08:28:54 +0000 (11:28 +0300)] 
nl80211: Fix max_remain_on_chan capability reading

In case that NL80211_PROTOCOL_FEATURE_SPLIT_WIPHY_DUMP is supported,
wiphy_info_handler() is called several times, where
NL80211_ATTR_MAX_REMAIN_ON_CHANNEL_DURATION is present only in one
of these calls. Thus capa->max_remain_on_chan is overridden in
all other calls.

Fix it so the default value is set only after all the wiphy info was
received.

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

12 years agoP2P: Clone beacon_int when initializing new group interface
Ilan Peer [Sat, 4 May 2013 08:25:29 +0000 (11:25 +0300)] 
P2P: Clone beacon_int when initializing new group interface

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

12 years agowpadebug: Add a Wi-Fi debugging app for Android
Jouni Malinen [Thu, 2 May 2013 21:52:32 +0000 (00:52 +0300)] 
wpadebug: Add a Wi-Fi debugging app for Android

This tool can be used to debug Wi-Fi functionality on Android both
through the Android framework and through direct access to
wpa_supplicant.

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

12 years agoWPS: Remove duplicate networks after WPS
Vinayak Kamath [Tue, 30 Apr 2013 10:35:50 +0000 (13:35 +0300)] 
WPS: Remove duplicate networks after WPS

Each attempt to connect to the same network using WPS would result
in the duplicate configuration getting added. Avoid such redundant
additions by comparing the network configuration with an already
existing one and remove the older network if the new credential
provisioned through WPS is identical.

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

12 years agowpa_supplicant: Default to nl80211 instead of wext
Jouni Malinen [Mon, 29 Apr 2013 13:55:44 +0000 (16:55 +0300)] 
wpa_supplicant: Default to nl80211 instead of wext

nl80211 has obsoleted WEXT as the preferred kernel interface for
controlling wireless drivers. Update wpa_supplicant driver interface
list order so that nl80211 gets used first if both nl80211 and wext
interfaces are included in the build. In addition, update README to
reflect the fact that WEXT is obsolete.

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

12 years agohostapd: Add more messages for error paths
Jouni Malinen [Mon, 29 Apr 2013 10:52:34 +0000 (13:52 +0300)] 
hostapd: Add more messages for error paths

Make hostapd more verbose if something goes wrong in interface
initialization.

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

12 years agohostapd: Reject configuration file without interface parameter
Jouni Malinen [Mon, 29 Apr 2013 10:50:02 +0000 (13:50 +0300)] 
hostapd: Reject configuration file without interface parameter

Previously, this was initialized partially, but the interface was
not really started. That could result in eloop_run() returning
immediately and hostapd process getting stopped without any clear
indication of a failure. [Bug 479]

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

12 years agoClear extra_blacklist_count on FLUSH command
Jouni Malinen [Sun, 28 Apr 2013 19:35:15 +0000 (22:35 +0300)] 
Clear extra_blacklist_count on FLUSH command

This is needed to avoid old blacklist failure counts from being valid
after state flush.

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

12 years agotests: Test WPS ER UPnP functionality to add Enrollees
Jouni Malinen [Sun, 28 Apr 2013 19:00:58 +0000 (22:00 +0300)] 
tests: Test WPS ER UPnP functionality to add Enrollees

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

12 years agoWPS ER: Allow UPnP interface to be forced
Jouni Malinen [Sun, 28 Apr 2013 18:56:24 +0000 (21:56 +0300)] 
WPS ER: Allow UPnP interface to be forced

"WPS_ER_START ifname=<interace>" can now be used to force a specific
interface to be used for UPnP operations. This is especially useful for
automated test cases where the lo interface can now be used easily to
perform ER operations.

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

12 years agoUse status code 17 (unable to handle new STA) on max-STA limitation
Ben Greear [Sun, 28 Apr 2013 13:45:55 +0000 (16:45 +0300)] 
Use status code 17 (unable to handle new STA) on max-STA limitation

This is more useful information than the previously used value 1
(unspecified failure).

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

12 years agoAdd dup_binstr() to help common binary string tasks
Jouni Malinen [Sat, 27 Apr 2013 20:44:59 +0000 (23:44 +0300)] 
Add dup_binstr() to help common binary string tasks

There are quite a few places in the current implementation where a nul
terminated string is generated from binary data. Add a helper function
to simplify the code a bit.

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

12 years agoUse os_zalloc() instead of os_malloc() + os_memset()
Jouni Malinen [Sat, 27 Apr 2013 20:05:52 +0000 (23:05 +0300)] 
Use os_zalloc() instead of os_malloc() + os_memset()

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

12 years agoFT RRB: Validate os_malloc() return value before using it
Jouni Malinen [Sat, 27 Apr 2013 20:05:15 +0000 (23:05 +0300)] 
FT RRB: Validate os_malloc() return value before using it

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

12 years agoMake vlan_file optional if dynamic_vlan is used
Michael Braun [Sat, 27 Apr 2013 19:53:34 +0000 (22:53 +0300)] 
Make vlan_file optional if dynamic_vlan is used

My APs generate their configuration on their own using a different
number of (vlan-enabled) bss. Currently, all my vlan_file files consist
of a single line: the wildcard line. Configuration file generation would
be easier, if the hostapd configuration file would not depend on those
simple vlan_file files.

This patch removes the need for those one-line files by using the
<device>.<vlan> naming scheme if no vlan_file is given (or that file is
empty). This should not break any existing setup, as using dynamic_vlan
with no vlan configured does not make sense anyway.

Signed-hostap: Michael Braun <michael-dev@fami-braun.de>

12 years agoAdd bitfield routines
Jouni Malinen [Sat, 16 Mar 2013 16:12:39 +0000 (18:12 +0200)] 
Add bitfield routines

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

12 years agoNFC: Add no waiting and no multiple operations options for scripts
Jouni Malinen [Thu, 11 Apr 2013 15:18:39 +0000 (08:18 -0700)] 
NFC: Add no waiting and no multiple operations options for scripts

The nfcpy script used to be run in a way that left them running for
multiple operations. This is not desired for some use cases, so provide
options to request only a single operation to be performed.

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

12 years agotests: Add a test case for AP auto configuration on config token build
Jouni Malinen [Thu, 4 Apr 2013 14:50:25 +0000 (17:50 +0300)] 
tests: Add a test case for AP auto configuration on config token build

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

12 years agoWPS: Fix AP auto configuration on config token generation
Jouni Malinen [Thu, 4 Apr 2013 14:49:53 +0000 (17:49 +0300)] 
WPS: Fix AP auto configuration on config token generation

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

12 years agoNFC: Increase wpa_cli command buffer size
Jouni Malinen [Fri, 15 Feb 2013 15:07:28 +0000 (17:07 +0200)] 
NFC: Increase wpa_cli command buffer size

NFC connection handover messages may be longer than 100 octets, so
increase wpa_cli buffer size to allow longer messages to be reported.

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

12 years agoWPS NFC: Allow Device Password ID override for selected registrar
Jouni Malinen [Tue, 2 Apr 2013 15:27:36 +0000 (18:27 +0300)] 
WPS NFC: Allow Device Password ID override for selected registrar

When a specific out-of-band Device Password is enabled, it can be useful
to be able to advertise that in the selected registrar information.

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

12 years agoWPS: Use generic MAC Address attribute builder
Jouni Malinen [Sat, 27 Apr 2013 19:13:36 +0000 (22:13 +0300)] 
WPS: Use generic MAC Address attribute builder

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

12 years agotests: Use ignore_old_scan_res with some more WPS tests
Jouni Malinen [Tue, 2 Apr 2013 15:19:32 +0000 (18:19 +0300)] 
tests: Use ignore_old_scan_res with some more WPS tests

The scan results from old test cases showing different SSID on the AP
can result in false failures, so avoid those by ignoring old scan
results from cfg80211.

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

12 years agoP2P: Clean up channel--frequency conversion functions
Jouni Malinen [Sat, 27 Apr 2013 18:03:16 +0000 (21:03 +0300)] 
P2P: Clean up channel--frequency conversion functions

All P2P use cases are required to use the global operating table and
there is no need to need to try to maintain some backwards compatibility
with country code -specific values. Clean up the implementation by
removing the unnecessary country parameter.

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

12 years agoUse a common frequency to channel conversion function
Jouni Malinen [Sat, 27 Apr 2013 18:27:15 +0000 (21:27 +0300)] 
Use a common frequency to channel conversion function

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

12 years agoFT: Reset FT flag upon STA deauthentication
Deepthi Gowri [Fri, 26 Apr 2013 14:56:24 +0000 (17:56 +0300)] 
FT: Reset FT flag upon STA deauthentication

Reset ft_completed if STA receives deauthentication
between FT reassoc success and the subsequent initial
mobility authentication and association.

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

12 years agotests: Generate a tarball of test results if a test fails
Jouni Malinen [Fri, 26 Apr 2013 10:48:48 +0000 (13:48 +0300)] 
tests: Generate a tarball of test results if a test fails

This makes it easier to collect failure data from test servers for
further analysis.

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

12 years agoP2P: Set P2P_DEV_PEER_WAITING_RESPONSE from TX status callback
Jouni Malinen [Fri, 26 Apr 2013 09:54:27 +0000 (12:54 +0300)] 
P2P: Set P2P_DEV_PEER_WAITING_RESPONSE from TX status callback

Commit fb8984fd6f4b49d9178dd87a880dd7add514b7d1 added a mechanism to
skip the Listen state when the peer is expected to be waiting for us to
initiate a new GO Negotiation. However, this flag was set when building
the GO Negotiation Response frame with status 1 regardless of whether we
managed to send that frame or peer receive it. This could result in GO
Negotiation failures in cases where the peer did not receive the
response and Listen channels of the devices were different. Fix this by
setting the flag only after TX status indicating success has been
received.

This fixes frequent failures shown for the test_grpform_pbc hwsim test
case.

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

12 years agotests: Capture hwsim0 packet dump during test run
Jouni Malinen [Fri, 26 Apr 2013 09:36:56 +0000 (12:36 +0300)] 
tests: Capture hwsim0 packet dump during test run

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

12 years agoEAP peer: Add check before calling getSessionId method
Shijie Zhang [Fri, 26 Apr 2013 09:30:01 +0000 (12:30 +0300)] 
EAP peer: Add check before calling getSessionId method

We should not call getSessionID method if it's not provided. This fixes
a regression from commit 950c5630768285e460aa336c78a18162fb3e0434 where
EAP methods that did not implement getSessionId resulted in NULL pointer
dereference when deriving the key.

Signed-off-by: Shijie Zhang <shijiez@qca.qualcomm.com>
12 years agoDisable network temporarily on repeated connection failures
Jouni Malinen [Thu, 25 Apr 2013 14:28:50 +0000 (17:28 +0300)] 
Disable network temporarily on repeated connection failures

Previously, only explicit indications of authentication failures were
used to disable a network block temporarily. Extend this to use multiple
failed connection attempts as a sign of a possible authentication or
authorization failure to reduce the frequency of connection attempts
with a network that does not seem to allow connection.

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

12 years agonl80211: Drop frame events that are for foreign address
Jouni Malinen [Tue, 23 Apr 2013 22:02:01 +0000 (01:02 +0300)] 
nl80211: Drop frame events that are for foreign address

This avoids duplicate processing of events when multiple BSSes are
configured.

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

12 years agonl80211: Reduce debug on Probe Request frames
Jouni Malinen [Tue, 23 Apr 2013 22:01:21 +0000 (01:01 +0300)] 
nl80211: Reduce debug on Probe Request frames

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