]> git.ipfire.org Git - thirdparty/hostap.git/log
thirdparty/hostap.git
10 years agoAllow passive scan to be requested with SCAN passive=1
Jouni Malinen [Thu, 26 Dec 2013 14:52:55 +0000 (16:52 +0200)] 
Allow passive scan to be requested with SCAN passive=1

This allows external programs to request wpa_supplicant to execute
a passive scan (i.e., do not send any Probe Request frames).

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

10 years agonl80211: Add scanned frequencies/SSIDs into debug log
Jouni Malinen [Thu, 26 Dec 2013 14:39:39 +0000 (16:39 +0200)] 
nl80211: Add scanned frequencies/SSIDs into debug log

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

10 years agoRemove unused last_scan_full
Jouni Malinen [Thu, 26 Dec 2013 14:38:05 +0000 (16:38 +0200)] 
Remove unused last_scan_full

This parameter was not really used for anything else apart from a debug
message in the same function that set it. In addition, cfg80211 returns
the set of scanned frequencies even for the full scan, so the code that
was setting this conditionally on frequency list not being there was not
really ever entered either.

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

10 years agotests: Include additional ANQP elements for testing coverage
Jouni Malinen [Thu, 26 Dec 2013 13:55:46 +0000 (15:55 +0200)] 
tests: Include additional ANQP elements for testing coverage

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

10 years agotests: Verify Interworking network selection with other EAP types
Jouni Malinen [Thu, 26 Dec 2013 12:08:42 +0000 (14:08 +0200)] 
tests: Verify Interworking network selection with other EAP types

This adds number of test cases to go through various possible EAP
configurations for Interworking network selection.

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

10 years agoInterworking: Allow EAP-FAST to be used
Jouni Malinen [Thu, 26 Dec 2013 11:48:35 +0000 (13:48 +0200)] 
Interworking: Allow EAP-FAST to be used

This behaves like PEAP as far as Interworking network selection is
concerned.

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

10 years agotests: Verify NAI Realm list with multiple realms in one entry
Jouni Malinen [Thu, 26 Dec 2013 11:44:27 +0000 (13:44 +0200)] 
tests: Verify NAI Realm list with multiple realms in one entry

In addition, use TTLS/PAP to increase testing coverage.

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

10 years agotests: Verify Interworking network selection based on roaming consortium
Jouni Malinen [Thu, 26 Dec 2013 11:18:46 +0000 (13:18 +0200)] 
tests: Verify Interworking network selection based on roaming consortium

In addition, use PEAP as the EAP method to increase testing coverage.

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

10 years agotests: Interworking network select with simulated SIM/USIM
Jouni Malinen [Thu, 26 Dec 2013 11:11:02 +0000 (13:11 +0200)] 
tests: Interworking network select with simulated SIM/USIM

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

10 years agotests: Verify behavior on malformed GAS responses
Jouni Malinen [Thu, 26 Dec 2013 10:19:57 +0000 (12:19 +0200)] 
tests: Verify behavior on malformed GAS responses

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

10 years agotests: Verify failure status code processing in GAS/ANQP
Jouni Malinen [Thu, 26 Dec 2013 09:54:12 +0000 (11:54 +0200)] 
tests: Verify failure status code processing in GAS/ANQP

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

10 years agotests: Clean up GAS/ANQP message processing
Jouni Malinen [Thu, 26 Dec 2013 09:44:28 +0000 (11:44 +0200)] 
tests: Clean up GAS/ANQP message processing

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

10 years agotests: Use helper functions for GAS test cases
Jouni Malinen [Thu, 26 Dec 2013 08:59:58 +0000 (10:59 +0200)] 
tests: Use helper functions for GAS test cases

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

10 years agotests: Verify behavior on incorrect GAS response type
Jouni Malinen [Thu, 26 Dec 2013 08:52:11 +0000 (10:52 +0200)] 
tests: Verify behavior on incorrect GAS response type

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

10 years agotests: Add a GAS query timeout test case
Jouni Malinen [Thu, 26 Dec 2013 06:40:03 +0000 (08:40 +0200)] 
tests: Add a GAS query timeout test case

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

10 years agoAdd GAS-QUERY-START and GAS-QUERY-DONE event messages
Jouni Malinen [Thu, 26 Dec 2013 06:38:42 +0000 (08:38 +0200)] 
Add GAS-QUERY-START and GAS-QUERY-DONE event messages

External programs can use these new control interface events to better
track progress of GAS operations.

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

10 years agohostapd: Allow external management frame processing or testing
Jouni Malinen [Thu, 26 Dec 2013 06:35:22 +0000 (08:35 +0200)] 
hostapd: Allow external management frame processing or testing

This enables more convenient protocol testing of station side
functionality in various error cases and unexpected sequences without
having to implement each test scenario within hostapd.
ext_mgmt_frame_handle parameter can be set to 1 to move all management
frame processing into an external program through control interface
events (MGMT-RX and MGMT-TX-STATUS) and command (MGMT_TX).

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

10 years agotests: Add a GAS comeback delay test case
Jouni Malinen [Thu, 26 Dec 2013 05:50:00 +0000 (07:50 +0200)] 
tests: Add a GAS comeback delay test case

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

10 years agotests: Verify Wi-Fi Display operations
Jouni Malinen [Wed, 25 Dec 2013 21:33:06 +0000 (23:33 +0200)] 
tests: Verify Wi-Fi Display operations

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

10 years agotests: Increase test coverage on BSS command
Jouni Malinen [Wed, 25 Dec 2013 19:03:47 +0000 (21:03 +0200)] 
tests: Increase test coverage on BSS command

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

10 years agotests: Verify sharing and unsharing of ANQP results
Jouni Malinen [Wed, 25 Dec 2013 18:49:02 +0000 (20:49 +0200)] 
tests: Verify sharing and unsharing of ANQP results

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

10 years agotests: Use shorter Interworking element for larger coverage
Jouni Malinen [Wed, 25 Dec 2013 18:29:04 +0000 (20:29 +0200)] 
tests: Use shorter Interworking element for larger coverage

Since the venue information in the Interworking element is optional,
include both the cases of it included and not included in the test
cases.

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

10 years agotests: Use a single channel scan to avoid unnecessary full scans
Jouni Malinen [Wed, 25 Dec 2013 18:17:32 +0000 (20:17 +0200)] 
tests: Use a single channel scan to avoid unnecessary full scans

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

10 years agoAllow channel list to be specified for SCAN command
Jouni Malinen [Wed, 25 Dec 2013 18:04:52 +0000 (20:04 +0200)] 
Allow channel list to be specified for SCAN command

The new freq=<frequency ranges> parameter to the SCAN command can be
used to request a scan to be performed on the specified set of channels
instead of on all channels. For example, "wpa_cli scan
freq=2400-2500,5180" would scan channels 1-14 and 36. Only the channels
that the driver indicates as enabled and that are within the specified
ranges are included in the request.

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

10 years agoMove int_array helpfer functions to utils/common.c
Jouni Malinen [Wed, 25 Dec 2013 18:02:57 +0000 (20:02 +0200)] 
Move int_array helpfer functions to utils/common.c

These can be useful outside scan.c, so make them available.

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

10 years agotests: Verify Interworking Probe Request filtering
Jouni Malinen [Wed, 25 Dec 2013 16:55:08 +0000 (18:55 +0200)] 
tests: Verify Interworking Probe Request filtering

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

10 years agowlantest: Add a BSS probe_response counter
Jouni Malinen [Wed, 25 Dec 2013 16:37:33 +0000 (18:37 +0200)] 
wlantest: Add a BSS probe_response counter

This can be used to verify whether an AP replies to a Probe Request
frame.

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

10 years agotests: Allow gcov to be used when running test cases within vm
Jouni Malinen [Wed, 25 Dec 2013 15:14:31 +0000 (17:14 +0200)] 
tests: Allow gcov to be used when running test cases within vm

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

10 years agoAdd make lcov-html to generate code coverage report
Jouni Malinen [Wed, 25 Dec 2013 11:44:38 +0000 (13:44 +0200)] 
Add make lcov-html to generate code coverage report

In addition, update build rules to compile object files in the same
directory as the source code file if CONFIG_CODE_COVERAGE=y is set to
make lcov find the source code files.

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

10 years agotests: Add test cases for various ciphers
Jouni Malinen [Wed, 25 Dec 2013 09:17:32 +0000 (11:17 +0200)] 
tests: Add test cases for various ciphers

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

10 years agonl80211: Fetch cipher capabilities from the driver
Jouni Malinen [Wed, 25 Dec 2013 09:07:58 +0000 (11:07 +0200)] 
nl80211: Fetch cipher capabilities from the driver

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

10 years agoClean up cipher capability prints
Jouni Malinen [Wed, 25 Dec 2013 08:44:06 +0000 (10:44 +0200)] 
Clean up cipher capability prints

Use an array of ciphers and a loop instead of copy-pasted copies of the
same printing functionality for each cipher.

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

10 years agoConvert wpa_hexdump functions to use void pointer instead of u8 *
Jouni Malinen [Tue, 24 Dec 2013 21:12:37 +0000 (23:12 +0200)] 
Convert wpa_hexdump functions to use void pointer instead of u8 *

This removes need for ugly typecasts for some debug prints.

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

10 years agoRemove obsolete license notifications
Jouni Malinen [Tue, 24 Dec 2013 20:59:52 +0000 (22:59 +0200)] 
Remove obsolete license notifications

These files have been distributed only under the BSD license option
since February 2012. Clarify the license statements in the files to
match that to avoid confusion.

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

10 years agoAndroid: Remove old WEXT extensions
Jouni Malinen [Tue, 24 Dec 2013 20:52:18 +0000 (22:52 +0200)] 
Android: Remove old WEXT extensions

Android has moved to nl80211, so no need to maintain these old WEXT
extensions in wpa_supplicant.

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

10 years agoVerify that beacon setup succeeds before proceeding
Jouni Malinen [Tue, 24 Dec 2013 20:46:20 +0000 (22:46 +0200)] 
Verify that beacon setup succeeds before proceeding

There is no point in starting the AP operations unless
the driver can be successfully configured to beacon.

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

10 years agoVerify group key configuration for WPA group
Jouni Malinen [Tue, 24 Dec 2013 20:38:16 +0000 (22:38 +0200)] 
Verify group key configuration for WPA group

If configuration of the group key to the driver fails, move the WPA
group into failed state and indication group setup error to avoid cases
where AP could look like it is working even through the keys are not set
correctly.

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

10 years agoAdd definitions for new cipher suites from IEEE Std 802.11ac-2013
Jouni Malinen [Tue, 24 Dec 2013 20:21:04 +0000 (22:21 +0200)] 
Add definitions for new cipher suites from IEEE Std 802.11ac-2013

This adds initial parts for supporting the new GCMP-256, CCMP-256,
BIP-GMAC-128, BIP-GMAC-256, and BIP-CMAC-256 cipher suites.

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

10 years agoVHT: Use status code 104 to indicate VHT required
Jouni Malinen [Tue, 24 Dec 2013 19:19:45 +0000 (21:19 +0200)] 
VHT: Use status code 104 to indicate VHT required

IEEE Std 802.11ac-2013 defines a status code for this, so use that
instead of the unspecified reason.

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

10 years agotests: Verify QoS Mapping results in Data frames
Jouni Malinen [Tue, 24 Dec 2013 18:21:58 +0000 (20:21 +0200)] 
tests: Verify QoS Mapping results in Data frames

This verifies that IP packets with various DSCP values are mapped to the
correct TID both with default mapping and with custom QoS mappings.

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

10 years agowlantest: Add per-TID RX/TX counters
Jouni Malinen [Tue, 24 Dec 2013 18:21:27 +0000 (20:21 +0200)] 
wlantest: Add per-TID RX/TX counters

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

10 years agohwsim_test: Allow TOS/DSCP field to be set from command line
Jouni Malinen [Tue, 24 Dec 2013 12:31:52 +0000 (14:31 +0200)] 
hwsim_test: Allow TOS/DSCP field to be set from command line

This makes it easier to test how Data frames are mapped to different
ACs.

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

10 years agohwsim_test: Use a valid IPv4 header in the test frame
Jouni Malinen [Tue, 24 Dec 2013 12:18:14 +0000 (14:18 +0200)] 
hwsim_test: Use a valid IPv4 header in the test frame

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

10 years agohwsim_test: Use unsigned bit variables
Jouni Malinen [Tue, 24 Dec 2013 11:42:26 +0000 (13:42 +0200)] 
hwsim_test: Use unsigned bit variables

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

10 years agowpa_supplicant: Fix crash when terminating all interfaces
Moshe Benji [Sun, 15 Dec 2013 08:50:07 +0000 (10:50 +0200)] 
wpa_supplicant: Fix crash when terminating all interfaces

In wpa_supplicant_terminate_proc(), while iterating and
terminating interfaces, after an interface is terminated,
we can no longer access its memory as it is no longer valid
and causes a crash.

Fix this by saving the pointer to the next interface before freeing
the current one to avoid accessing an invalid memory location.

Signed-hostap: Moshe Benji <moshe.benji@intel.com>

10 years agoAdd secondary channel IE for CSA
Andrei Otcheretianski [Sun, 15 Dec 2013 08:47:42 +0000 (10:47 +0200)] 
Add secondary channel IE for CSA

If secondary channel is provided for CSA, advertise it in the Secondary
Channel Offset element in Beacon and Probe Response frames.

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

10 years agoStore entire CS freq_params and not only freq
Andrei Otcheretianski [Sun, 15 Dec 2013 08:47:41 +0000 (10:47 +0200)] 
Store entire CS freq_params and not only freq

When CSA flow starts, store the entire struct hostapd_freq_params and
not only CS frequency as it was before. The additional freq_params are
required to advertise CS supplementary IEs such as secondary channel,
wide bandwidth CS, etc.

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

10 years agoInclude driver.h in hostapd.h
Andrei Otcheretianski [Sun, 15 Dec 2013 08:47:40 +0000 (10:47 +0200)] 
Include driver.h in hostapd.h

This allows use of structs (and not only pointers) defined in drivers.h.
Remove also some not needed forward declarations and redundant includes.

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

10 years agowpa_supplicant: Use monotonic time for last_scan check
Johannes Berg [Mon, 16 Dec 2013 20:08:44 +0000 (21:08 +0100)] 
wpa_supplicant: Use monotonic time for last_scan check

This just serves to check if there was a scan within
the last 5 seconds, hence it should use monotonic time.
While at it, also use os_reltime_expired().

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

10 years agoWPS: Use monotonic time for AP connection attempt
Johannes Berg [Mon, 16 Dec 2013 20:08:43 +0000 (21:08 +0100)] 
WPS: Use monotonic time for AP connection attempt

This is only used for a debug message, but that message prints
the time since the last attempt, so it should use monotonic
time instead of wall clock.

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

10 years agowpa_supplicant: Use relative time for TKIP Michael MIC failures
Johannes Berg [Mon, 16 Dec 2013 20:08:42 +0000 (21:08 +0100)] 
wpa_supplicant: Use relative time for TKIP Michael MIC failures

The MMIC failure code should use monotonic time to check
whether 60 seconds have elapsed or not. For type-safety,
use struct os_reltime for the timestamp variable, and
also convert to using os_reltime_expired().

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

10 years agowpa_supplicant: Use monotonic time for temp-disabled networks
Johannes Berg [Mon, 16 Dec 2013 20:08:41 +0000 (21:08 +0100)] 
wpa_supplicant: Use monotonic time for temp-disabled networks

Temporarily disabled networks are disabled for a certain
duration, so the code should use monotonic time.

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

10 years agoP2P: Use monotonic time for GO client waiting
Johannes Berg [Mon, 16 Dec 2013 20:08:40 +0000 (21:08 +0100)] 
P2P: Use monotonic time for GO client waiting

GO activation can fail if the first client doesn't connect
within a certain time, but this should not be dependent on
wall time -- use monotonic time instead.

While at it, use os_reltime_expired().

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

10 years agoIBSS RSN: Use monotonic time for reinit detection
Johannes Berg [Mon, 16 Dec 2013 20:08:39 +0000 (21:08 +0100)] 
IBSS RSN: Use monotonic time for reinit detection

The reinit detection skips reinit when the time since the own
authentication frame TX is less than half a second, so it shouldn't
be affected by wall time and use monotonic time instead.

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

10 years agoWPS_UPNP: Use monotonic time for event debouncing
Johannes Berg [Mon, 16 Dec 2013 20:08:38 +0000 (21:08 +0100)] 
WPS_UPNP: Use monotonic time for event debouncing

The event debouncing isn't very accurate (since it doesn't
take sub-second resolution into account), but it should use
monotonic time anyway since it doesn't care about the wall
clock.

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

10 years agowps_registrar: Use monotonic time for PBC workaround
Johannes Berg [Mon, 16 Dec 2013 20:08:37 +0000 (21:08 +0100)] 
wps_registrar: Use monotonic time for PBC workaround

The PBC ignore-start workaround just needs to check whether
the time is within 5 seconds, so should use monotonic time.

While at it, add a few more ifdefs to clearly separate the
code and variables needed.

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

10 years agowps_registrar: Use monotonic time for PBC session timeout
Johannes Berg [Mon, 16 Dec 2013 20:08:36 +0000 (21:08 +0100)] 
wps_registrar: Use monotonic time for PBC session timeout

PBC sessions are just time-stamped when activated, and
eventually time out, so should use monotonic time.

While at it, make the code use os_reltime_expired().

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

10 years agowps_registrar: Use monotonic time for PIN timeout
Johannes Berg [Mon, 16 Dec 2013 20:08:35 +0000 (21:08 +0100)] 
wps_registrar: Use monotonic time for PIN timeout

If the PIN expires, then a timeout is given, so that monotonic
time should be used.

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

10 years agorsn_supp: Use monotonic time for PMKSA cache expiry
Johannes Berg [Mon, 16 Dec 2013 20:08:34 +0000 (21:08 +0100)] 
rsn_supp: Use monotonic time for PMKSA cache expiry

Since this is just for relative timeouts, it should use
monotonic time.

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

10 years agowpa_supplicant: Use monotonic time for EAPOL RX workaround
Johannes Berg [Mon, 16 Dec 2013 20:08:33 +0000 (21:08 +0100)] 
wpa_supplicant: Use monotonic time for EAPOL RX workaround

The EAPOL RX workaround checks that the events are less than 100 ms
apart, so only uses relative times and should use monotonic time.

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

10 years agobgscan: Use monotonic time
Johannes Berg [Mon, 16 Dec 2013 20:08:32 +0000 (21:08 +0100)] 
bgscan: Use monotonic time

The bgscan simple and learn algorithms should run regardless
of wall clock time jumps, so make them use monotonic time.

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

10 years agorsn_supp: Do not track expiration time
Johannes Berg [Mon, 16 Dec 2013 20:08:31 +0000 (21:08 +0100)] 
rsn_supp: Do not track expiration time

The eloop already tracks the expiration/lifetime, and the expiration
isn't really used, so remove it. It should otherwise have used monotonic
time, but since it's not actually used, we can remove it instead.

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

10 years agoRADIUS server: Use monotonic time
Johannes Berg [Mon, 16 Dec 2013 20:08:30 +0000 (21:08 +0100)] 
RADIUS server: Use monotonic time

The RADIUS server needs to calculate uptime, which is relative
and thus should use monotonic time.

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

10 years agoRADIUS client: Use monotonic time
Johannes Berg [Mon, 16 Dec 2013 20:08:29 +0000 (21:08 +0100)] 
RADIUS client: Use monotonic time

Since the RADIUS client cares about relative time (retry timeout)
only, it should use monotonic time.

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

10 years agowpa_supplicant: Use monotonic time for RX/BSS times
Johannes Berg [Mon, 16 Dec 2013 20:08:28 +0000 (21:08 +0100)] 
wpa_supplicant: Use monotonic time for RX/BSS times

The BSS table, scan timeout, and related functionality should use
monotonic time since they care about relative values (age) only.
Unfortunately, these are all connected, so the patch can't be split
further. Another problem with this is that it changes the driver wrapper
API. Though, it seems only the test driver is using this.

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

10 years agowpa_supplicant: Use monotonic time for SA query timeout
Johannes Berg [Mon, 16 Dec 2013 20:08:27 +0000 (21:08 +0100)] 
wpa_supplicant: Use monotonic time for SA query timeout

The SA query timeout is just a regular timeout (currently
hard-coded to 1000 TU), so use monotonic time for it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agoEAP server: Remove SIM-DB pending timestamp
Johannes Berg [Mon, 16 Dec 2013 20:08:26 +0000 (21:08 +0100)] 
EAP server: Remove SIM-DB pending timestamp

This should probably have used monotonic time for entry timestamps, but
as those aren't used at all right now, so just remove them entirely.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agowpa_ctrl: Use monotonic time for request retry loop
Johannes Berg [Mon, 16 Dec 2013 20:08:25 +0000 (21:08 +0100)] 
wpa_ctrl: Use monotonic time for request retry loop

The request retry loop only retries for 5 seconds, so any time
jumps would probably not affect it much, but it should be using
monotonic time nonetheless since it only cares about duration.

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

10 years agoAP: Use monotonic time for MMIC failure/TKIP countermeasures
Johannes Berg [Mon, 16 Dec 2013 20:08:24 +0000 (21:08 +0100)] 
AP: Use monotonic time for MMIC failure/TKIP countermeasures

Wall time jumps shouldn't affect MMIC failure/TKIP countermeasures,
so use monotonic time. Change the michael_mic_failure variable to
struct os_reltime for type-safety.

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

10 years agoAP: Use monotonic time for PMKSA cache
Johannes Berg [Mon, 16 Dec 2013 20:08:23 +0000 (21:08 +0100)] 
AP: Use monotonic time for PMKSA cache

Since the PMKSA cache only uses relative time, use the monotonic time
functions instead of wall time to be correct when the clock jumps.

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

10 years agoAP: Use monotonic time for STA accounting
Johannes Berg [Mon, 16 Dec 2013 20:08:22 +0000 (21:08 +0100)] 
AP: Use monotonic time for STA accounting

For type-safety, make sta->acct_session_start a struct os_reltime
and then use monotonic time for accounting. For RADIUS reporting,
continue to use wall clock time as specified by RFC 2869, but for
the session time use monotonic time.

Interestingly, RFC 2869 doesn't specify a timezone, so the value
is somewhat arbitrary.

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

10 years agobgscan_learn: Start scanning from the first freq
Eliad Peller [Thu, 19 Dec 2013 10:03:25 +0000 (12:03 +0200)] 
bgscan_learn: Start scanning from the first freq

bgscan_learn_get_probe_freq() starts from returning the second entry in
the supp_freqs arrays. Change its logic a bit to make it start from the
first entry.

Signed-hostap: Eliad Peller <eliad@wizery.com>

10 years agobgscan_learn: Fix initial interval
Eyal Shapira [Thu, 19 Dec 2013 10:03:30 +0000 (12:03 +0200)] 
bgscan_learn: Fix initial interval

In case the initial signal level of the associated BSS was above the
given threshold, bgscan_learn module would begin using the
short_interval but never switch to the long_interval as there would be
no signal change event. Make the init code poll for the current signal
level and set scan_interval accordingly. This logic exists in
bgscan_simple but was missing in bgscan_learn.

Signed-hostap: Eyal Shapira <eyal@wizery.com>

10 years agohwsim tests: Handle regdomain requests in vm scripts
Johannes Berg [Wed, 18 Dec 2013 20:50:21 +0000 (21:50 +0100)] 
hwsim tests: Handle regdomain requests in vm scripts

In order to handle regulatory domain requests, crda needs to be
installed on the host, but we also need to install a uevent helper in
the VM so that it gets executed (since we don't run udev).

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

10 years agobgscan_learn: Avoid redundant frequencies
Eliad Peller [Thu, 19 Dec 2013 10:03:24 +0000 (12:03 +0200)] 
bgscan_learn: Avoid redundant frequencies

Some hw modes (e.g., 11b and 11g) contain the same frequencies,
causing the supp_freqs array to be populated with redundant entries.

Check for the existence of the freq before adding it.

Signed-hostap: Eliad Peller <eliad@wizery.com>

10 years agobgscan: Stop bgscan only on disassociation
Eliad Peller [Thu, 19 Dec 2013 10:03:23 +0000 (12:03 +0200)] 
bgscan: Stop bgscan only on disassociation

Stopping bgscan on any state other than COMPLETED results
in bgscan reset (stop + start) on every rekeying operation.

Signed-hostap: Eliad Peller <eliad@wizery.com>

10 years agoUpdate IBSS documentation to include RSN option
Jouni Malinen [Mon, 23 Dec 2013 18:21:17 +0000 (20:21 +0200)] 
Update IBSS documentation to include RSN option

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

10 years agotests: Add QoS Map test case
Jouni Malinen [Mon, 23 Dec 2013 09:06:27 +0000 (11:06 +0200)] 
tests: Add QoS Map test case

This verifies that QoS Map configuration and update can be completed.
Actual QoS mapping for Data frames within mac80211/cfg80211 is not yet
verified.

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

10 years agoAdvertise QoS Map support based on driver capability
Jouni Malinen [Mon, 23 Dec 2013 09:05:20 +0000 (11:05 +0200)] 
Advertise QoS Map support based on driver capability

Do not assume the driver supports QoS Mapping, but instead, advertise
support for this only if CONFIG_INTERWORKING is defined and driver
indicates support for configuring QoS Map.

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

10 years agonl80211: Add support for QoS Map configuration
Kyeyoon Park [Wed, 9 Oct 2013 22:41:10 +0000 (15:41 -0700)] 
nl80211: Add support for QoS Map configuration

This allows nl80211-based drivers to configure QoS Mapping in both AP
and station modes.

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

10 years agonl80211: Sync with mac80211-next.git
Jouni Malinen [Thu, 19 Dec 2013 17:34:00 +0000 (09:34 -0800)] 
nl80211: Sync with mac80211-next.git

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

10 years agonl80211: Sync with wireless-testing.git
Jouni Malinen [Thu, 19 Dec 2013 17:24:58 +0000 (09:24 -0800)] 
nl80211: Sync with wireless-testing.git

The driver_nl80211.c changes are needed to avoid compiler warnings
with two frequency attributes pointing to the same value.

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

10 years agoTreat VER_2_1_DEVEL the same as VER_0_8_X
Ying Wang [Mon, 25 Nov 2013 18:45:06 +0000 (10:45 -0800)] 
Treat VER_2_1_DEVEL the same as VER_0_8_X

The Android.mks to include are actually the same.

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
10 years agoFix a never-ending loop with multiple radios in wpa_supplicant
Tomasz Bursztyka [Mon, 9 Dec 2013 12:47:55 +0000 (14:47 +0200)] 
Fix a never-ending loop with multiple radios in wpa_supplicant

Commit 202dec2a94695a696236ee5a2ad1be0905ccea14 introduced a never
ending loop for a case where a single wpa_supplicant process is used
with multiple radios. Fix this by advancing the iface pointer properly
to the next interface in the loop until a NULL pointer is hit.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
10 years agohostapd: Clear interface_added flag on error path
Marek Kwaczynski [Fri, 13 Dec 2013 09:32:36 +0000 (10:32 +0100)] 
hostapd: Clear interface_added flag on error path

If more BSSes are added in config file than are supported by the driver,
segmentation fault can appear. For this case, the interface_added flag
needs to be cleared if adding a new BSS fails.

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

10 years agoAndroid: Do not compile wpa_supplicant if not chosen
Dmitry Shmidt [Fri, 22 Nov 2013 23:52:10 +0000 (15:52 -0800)] 
Android: Do not compile wpa_supplicant if not chosen

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
10 years agoDFS: Use channel switch when radar is detected
Janusz Dziedzic [Mon, 25 Nov 2013 19:16:15 +0000 (20:16 +0100)] 
DFS: Use channel switch when radar is detected

Until now DFS was simply restarting the AP when radar was detected. Now
CSA is used to perform smooth switch to the new channel. Stations not
supporting CSA will behave as before.

Signed-hostap: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Signed-hostap: Michal Kazior <michal.kazior@tieto.com>

10 years agohostapd: Make hostapd_set_freq_params() public
Janusz Dziedzic [Mon, 25 Nov 2013 19:16:14 +0000 (20:16 +0100)] 
hostapd: Make hostapd_set_freq_params() public

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

10 years agoDFS: Allow skipping radar channels
Michal Kazior [Mon, 25 Nov 2013 19:16:13 +0000 (20:16 +0100)] 
DFS: Allow skipping radar channels

This is needed for AP CSA. Since CSA must happen immediately after radar
is detected there's no time to perform CAC. Thus, radar channels must be
disabled when looking for a new channel to escape to after a radar is
detected.

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

10 years agonl80211/hostapd: Extend channel switch notify handling
Janusz Dziedzic [Mon, 25 Nov 2013 19:16:12 +0000 (20:16 +0100)] 
nl80211/hostapd: Extend channel switch notify handling

Adds support for VHT by parsing bandwidth and center_freq{1,2}.

Signed-hostap: Michal Kazior <michal.kazior@tieto.com>
Signed-hostap: Janusz Dziedzic <janusz.dziedzic@tieto.com>

10 years agoAP: Use monotonic clock for SA query timeout
Johannes Berg [Mon, 25 Nov 2013 20:56:09 +0000 (21:56 +0100)] 
AP: Use monotonic clock for SA query timeout

The usual, any timeouts should be using monotonic time.

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

10 years agoUse monotonic clock for RADIUS cache timeouts
Johannes Berg [Mon, 25 Nov 2013 20:56:08 +0000 (21:56 +0100)] 
Use monotonic clock for RADIUS cache timeouts

Use monotonic clock for both cache and query timeouts.

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

10 years agoUse monotonic clock for last_sae_token_key_update
Johannes Berg [Mon, 25 Nov 2013 20:56:07 +0000 (21:56 +0100)] 
Use monotonic clock for last_sae_token_key_update

Just the usual, with a new function os_reltime_initialized()
thrown in that checks whether time has ever been retrieved
(time can't be completely zero).

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

10 years agoAP: Use monotonic time for AP list
Johannes Berg [Mon, 25 Nov 2013 20:56:06 +0000 (21:56 +0100)] 
AP: Use monotonic time for AP list

Use the new monotonic time to keep track of when an AP
entry expires.

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

10 years agoOS utils: Add os_reltime_expired()
Johannes Berg [Mon, 25 Nov 2013 20:56:05 +0000 (21:56 +0100)] 
OS utils: Add os_reltime_expired()

This helper functions checks whether a given entry has expired,
given the last active timestamp, the current time, and a timeout.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agoAP: Use monotonic time for STA connected time
Johannes Berg [Mon, 25 Nov 2013 20:56:04 +0000 (21:56 +0100)] 
AP: Use monotonic time for STA connected time

Connected time is relative, so should be using monotonic time
rather than time of day.

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

10 years agoOS utils: Provide os_reltime_age()
Johannes Berg [Mon, 25 Nov 2013 20:56:02 +0000 (21:56 +0100)] 
OS utils: Provide os_reltime_age()

This function calculates and returns the time passed since
a given timestamp.

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

10 years agoP2P: Handle frequency conflict in single channel concurrency case
Jithu Jance [Tue, 26 Nov 2013 13:10:16 +0000 (18:40 +0530)] 
P2P: Handle frequency conflict in single channel concurrency case

Based on priority, remove the connection with least priority whenever
a frequency conflict is detected.

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

10 years agoP2P: Add wfd_dev_info= field for device found event
Dmitry Shmidt [Mon, 25 Nov 2013 22:56:38 +0000 (14:56 -0800)] 
P2P: Add wfd_dev_info= field for device found event

This field allows adds enough information into the P2P-DEVICE-FOUND
events to figure out if the peer supports Wi-Fi Display.

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
10 years agobsd: Fix compilation error for NetBSD
Masashi Honma [Tue, 26 Nov 2013 02:43:37 +0000 (11:43 +0900)] 
bsd: Fix compilation error for NetBSD

Commit 5dd82c634cb5e24500ac4d1374f806fb37dd88bb causes compilation error
on NetBSD 6.1.2. Fix compilation with #ifdef blocks.

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