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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Johannes Berg [Thu, 5 Dec 2013 22:22:10 +0000 (23:22 +0100)]
tests: VM test script: Copy gcov data if present
If there's code coverage analysis data, copy it out of the VM
to be able to analyse it later. Also add a description to the
README file about how to use it.
Signed-hostap: Johannes Berg <johannes.berg@intel.com>
Naresh Jayaram [Tue, 3 Dec 2013 06:37:24 +0000 (12:07 +0530)]
eap_proxy: Extend Android.mk to support additional libraries
Allow addition static and shared libraries to be specified from the
eap_proxy_*.mk file for Android build. In addition use $(LOCAL_PATH) as
a prefix for that Android makefile part.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Sun, 24 Nov 2013 18:55:15 +0000 (20:55 +0200)]
tests: Remove special start.sh option for concurrent P2P tests
These were not really used in practice and better quality test cases for
concurrent P2P operations are now available in tests_p2p_concurrency.py
using the standard test framework design. Remove the special concurrent
option for start.sh and the run-all.sh concurrent and
concurrent-valgrind operations to clean up scripts.
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 24 Nov 2013 18:50:11 +0000 (20:50 +0200)]
tests: Add test cases for concurrent P2P operations
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 24 Nov 2013 18:06:00 +0000 (20:06 +0200)]
Use wpa_radio data for get_shared_radio_freqs()
This replaces the now unnecessary iteration of get_radio_name() calls.
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 24 Nov 2013 18:03:40 +0000 (20:03 +0200)]
Use wpa_radio data for wpas_wpa_is_in_progress()
This replaces the now unnecessary iteration of get_radio_name() calls.
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 24 Nov 2013 18:01:07 +0000 (20:01 +0200)]
Use wpa_radio data for wpas_p2p_search_delay()
This replaces the now unnecessary iteration of get_radio_name() calls.
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 24 Nov 2013 17:59:28 +0000 (19:59 +0200)]
Use wpa_radio data for channel list updates
This replaces the now unnecessary iteration of get_radio_name() calls.
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 24 Nov 2013 17:57:43 +0000 (19:57 +0200)]
Use wpa_radio data for scan result updates
This replaces the now unnecessary iteration of get_radio_name() calls.
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 24 Nov 2013 17:53:19 +0000 (19:53 +0200)]
Add shared per-radio structure for wpa_supplicant
struct wpa_radio is used as a shared data structure between all struct
wpa_supplicant instances that share the same physical radio.
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 24 Nov 2013 17:36:29 +0000 (19:36 +0200)]
Move wpa_supplicant driver initialization into a helper function
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 24 Nov 2013 17:16:12 +0000 (19:16 +0200)]
Add CONFIG_CODE_COVERAGE=y option for gcov
This can be used to measure code coverage from test scripts.
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 24 Nov 2013 16:26:05 +0000 (18:26 +0200)]
EAP server: Handle EAP method initialization failures more cleanly
Allow another EAP method to be tried if one of the enabled methods
fails. If all the remaining methods fail, reject connection by adding a
new METHOD_REQUEST -> FAILURE transition. Previously, this case resulted
in the state machine trying to send a message when none was available
and then waiting for a following event until timeout.
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 24 Nov 2013 16:08:45 +0000 (18:08 +0200)]
EAP server: Initialize TLS context based on private_key
It is possible for the authentication server to be configured with a
PKCS #12 file that includes a private key, a server certificate, and a
CA certificate. This combination could result in server_cert and ca_cert
parameters not being present and that should still result in TLS context
getting initialized.
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 24 Nov 2013 16:01:12 +0000 (18:01 +0200)]
Reject TLS-based EAP server method if TLS context not initialized
It was possible to configure hostapd in a way that could try to
initialize a TLS-based EAP method even when TLS library context was not
initialized (e.g., due to not configuring server or CA certificate).
Such a case could potentially result in NULL pointer dereference in the
TLS library, so check for this condition and reject EAP method
initialization.
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 24 Nov 2013 13:32:52 +0000 (15:32 +0200)]
tests: Verify P2P operations with a separate group interface
This extends P2P test coverage to include the case of separate group
interface use with autonomous GO and group formation through GO
negotiation.
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 24 Nov 2013 10:41:32 +0000 (12:41 +0200)]
nl80211: Fix regression in P2P group interface removal
Commit
390e489c0d9415caf103367136eaa534b559837c extended hostapd BSS
interface removal capabilities. However, it ended up causing a
regression in wpa_supplicant P2P group interface handling. That P2P
group interface is removed through another driver_nl80211.c BSS context
and as such, the bss->added_if is not set. Fix this by verifying whether
the request is for another ifindex and if so, removing the interface
even if added_if is not marked.
Signed-hostap: Jouni Malinen <j@w1.fi>
Ilan Peer [Mon, 2 Sep 2013 12:40:59 +0000 (15:40 +0300)]
P2P: Handle INTERFACE_DISABLED event on a P2P GO interface
An INTERFACE_DISABLED event received on an interface that is
currently operating a P2P GO means that the group session ended.
In such a case, if the interface was dynamically added remove it, and
if not, remove all the network blocks that are temporary, assuming
that if needed a new session will be started by an external entity.
The use case was triggering rfkill (both SW and HW). This case popped up
as part of a testing cycle, where after a toggle in the rfkill state,
the result was that the interface was not deleted, but on the other hand
the wpa_supplicant did not configure the kernel to re-start the AP
functionality again.
Signed-hostap: Ilan Peer <ilan.peer@intel.com>
Mohammed Shafi Shajakhan [Thu, 16 May 2013 14:44:31 +0000 (20:14 +0530)]
AP: Fix inactivity STA timer trigger for driver offload case
Some non-mac80211 drivers, such as ath6kl, support STA inactivity timer
in firmware and may not provide connected stations' idle time to the
userspace. If the driver indicates support for offloaded operation, do
not start the inactivity timer in the hostapd.
Signed-hostap: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Loic Poulain [Fri, 31 May 2013 10:15:56 +0000 (12:15 +0200)]
Restore scan_req if sta scan is rescheduled in the scan results event
On scan results event if a concurrent P2P scan was triggered previously,
scan results processing is canceled, p2p_find executed, and a new sta
scan is triggered (pending scan). However, this new sta scan does not
restore the scan_req value of the previous scan (whose scan result has
been canceled).
If we are currently connected to an AP and use ap_scan=2, the new
triggered scan will cause an associtation-without-scan in
wpa_supplicant_scan:
(ap_scan == 2 & scan_req != MANUAL_SCAN_REQ)
=> wpa_supplicant_assoc_try()
causing an association error and a disconnection.
This patch fixes this issue by restoring the previous scan_req value.
Signed-off-by: Loic Poulain <loicx.poulain@intel.com>
Michael Schaller [Sat, 23 Nov 2013 08:38:07 +0000 (10:38 +0200)]
D-Bus: Add support to set pkcs11_{engine,module}_path
Add SetPKCS11EngineAndModulePath D-Bus method. Add PKCS11EnginePath
and PKCS11ModulePath D-Bus property getters.
Signed-hostap: Michael Schaller <misch@google.com>
Janusz Dziedzic [Fri, 22 Nov 2013 20:21:25 +0000 (21:21 +0100)]
Clear beacon_data before usage
struct beacon_data contains a lot of pointers. Make sure it gets cleared
to zero if hostapd_build_beacon_data() gets called from a path that does
not clear the structure first.
Signed-hostap: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Dmitry Shmidt [Fri, 22 Nov 2013 20:39:07 +0000 (12:39 -0800)]
Android: Revert static field back to send_and_recv_msgs()
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Dmitry Shmidt [Fri, 22 Nov 2013 18:37:07 +0000 (10:37 -0800)]
Android: wpa_supplicant: Use Ver 0.8.X as default
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Dmitry Shmidt [Thu, 12 Sep 2013 19:39:30 +0000 (12:39 -0700)]
Android: P2P: Remember country locale
This updates P2P modules based on the Android specific
DRIVER COUNTRY command.
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Jouni Malinen [Thu, 7 Nov 2013 14:16:15 +0000 (16:16 +0200)]
Android: Add driver_cmd for arbitrary driver commands
This is a mechanism used in Android to extend driver interface in vendor
specific ways. This is included only for the purpose of Android
compatibility. Proper interface commands should be used for any new
functionality.
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Thu, 7 Nov 2013 14:18:44 +0000 (16:18 +0200)]
Android: Add P2P/WPS wrappers for private lib
Android uses a vendor specific library for implementing couple of driver
interface functions. Add the wrapper code to allow that mechanism to be
used.
Signed-hostap: Jouni Malinen <j@w1.fi>
Dmitry Shmidt [Thu, 5 Sep 2013 21:52:18 +0000 (14:52 -0700)]
Android: Clean entire socket directory
Despite interface (and group) related sockets are not used
for control, they are created and may be left.
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Marek Kwaczynski [Thu, 21 Nov 2013 12:45:32 +0000 (13:45 +0100)]
hostapd: Set proper VHT capabilities
Set VHT capabilities defined in config file instead only supported
by the driver.
Signed-hostap: Marek Kwaczynski <marek.kwaczynski@tieto.com>
Marek Kwaczynski [Thu, 21 Nov 2013 12:33:09 +0000 (13:33 +0100)]
hostapd: Fix set beacon in multiple BSSID scenario
Check if the BSS interface has started before setting beacon.
Lack of this condition can cause segmantation fault.
Signed-hostap: Marek Kwaczynski <marek.kwaczynski@tieto.com>
Sunil Dutt [Thu, 21 Nov 2013 15:37:50 +0000 (21:07 +0530)]
TDLS: Do not reenable TDLS link on retransmitted setup frame
A reenable of the TDLS link while the host driver is already processing
the same (due to the retransmitted M2/M3 frames) might result in a
failed TDLS setup handshake due to some host driver's implementation.
Thus, issue enable link only when the peer's TDLS status signifies no
prior link (tpk_success=0).
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Fri, 22 Nov 2013 11:48:02 +0000 (13:48 +0200)]
VHT: Fix memory leak in STA entry
Commit
de3cdf354a30256ece16866ff5a283b66e1471ae adding copying of the
STA's VHT capabilities into the STA entry on the AP. This was done in
allocated memory, but that new memory allocation was not freed anywhere.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Thu, 21 Nov 2013 09:39:12 +0000 (11:39 +0200)]
tests: Verify that re-invoked P2P group is identified as persistent
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Johannes Berg [Wed, 20 Nov 2013 10:01:09 +0000 (11:01 +0100)]
Use monotonic clock for relative time for eloop if available
Relative time shouldn't be calculated based on gettimeofday
because that clock can jump (e.g., when the time is adjusted
by the system administrator.)
On systems where that is available, use CLOCK_BOOTTIME (on
fairly recent Linux systems, this clock takes into account
the time spend suspended) or CLOCK_MONOTONIC (on Linux and
some POSIX systems, this clock is just freely running with
no adjustments.)
Reported-by: Holger Schurig <holgerschurig@gmail.com>
Signed-hostap: Johannes Berg <johannes.berg@intel.com>
Jouni Malinen [Wed, 20 Nov 2013 21:12:03 +0000 (23:12 +0200)]
Fix and work around some MinGW compilation issues
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Wed, 20 Nov 2013 20:52:11 +0000 (22:52 +0200)]
Fix compiler warning for OpenSSL without HAVE_OCSP
Commit
080585c01a1e0ffc42577dd10d475f3ab01d0280 added ssl_ctx outside
ifdef HAVE_OCSP block that was the only user for this.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Michal Kazior [Tue, 19 Nov 2013 10:08:47 +0000 (11:08 +0100)]
hostapd: Fix interface enabling/disabling and DFS
The 'started' state was tracked incorrectly. It also broke DFS
as it was using hostapd_enable/disable_iface() functions.
Signed-hostap: Michal Kazior <michal.kazior@tieto.com>
Jithu Jance [Wed, 20 Nov 2013 13:50:56 +0000 (19:20 +0530)]
STA: Cancel sched_scan while initiating wps_reassoc
Scan initiated from wps_nfc command context was ketp on
getting rescheduled due to an on-going scheduled scan. So
cancel sched_scan before issuing a reassociation scan.
Signed-hostap: Jithu Jance <jithu@broadcom.com>
Jouni Malinen [Wed, 20 Nov 2013 18:49:48 +0000 (20:49 +0200)]
Add Wi-Fi Direct to the build configuration example
In addition, include Wi-Fi Direct support for Android builds by
default.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Paul Stewart [Mon, 18 Nov 2013 22:31:25 +0000 (14:31 -0800)]
dbus_new: Add documentation for D-Bus TDLS methods
Signed-hostap: Paul Stewart <pstew@chromium.org>
Johannes Berg [Mon, 18 Nov 2013 15:38:06 +0000 (16:38 +0100)]
hwsim tests: Check kernel messages for lockdep complaints
Lockdep complaints are never good, so check for them in the
kernel messages, not just for warnings and bugs.
Signed-hostap: Johannes Berg <johannes.berg@intel.com>
Rashmi Ramanna [Tue, 12 Nov 2013 14:17:35 +0000 (19:47 +0530)]
P2P: Short scan wait to speed up the group re-invocation
The shorter 250 ms wait for the next scan request can be used also for
the case of persistent group re-invocation instead of just formation of
a new group. This speeds up the process and makes this more robust
especially in cases where the GO is using MCC.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Wed, 20 Nov 2013 10:08:09 +0000 (12:08 +0200)]
Fix QoS Map Configure frame use
The QoS Map Set element was passed in full to the driver instead of just
the payload of the element. This resulted in the updated QoS Map being
rejected. Validate the element id/len and send only the payload to the
driver.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Tue, 19 Nov 2013 11:04:21 +0000 (13:04 +0200)]
P2P: Prefer U-NII-3 over U-NII-1 during channel selection
Some devices disable use of U-NII-1 (channels 36-48) for P2P due to it
being indoor use only in number of locations. If U-NII-3 (channels
149-161) is available, try to pick a channel from that range first
during random channel selection to reduce likelihood of interoperability
issues.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Tue, 19 Nov 2013 10:39:29 +0000 (12:39 +0200)]
P2P: Fix channel preference use for MCC p2p_connect
Only force_freq was used in the wpas_p2p_set_own_freq_preference() call
which allowed the P2P module channel re-selection to ignore the
preference for using a channel we are already using. Fix this by setting
either force_freq or pref_freq as the preference based on which one is
set. This allows p2p_ignore_shared_freq parameter to be used whether to
prefer the shared frequency in this case.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Tue, 19 Nov 2013 10:29:25 +0000 (12:29 +0200)]
P2P: Optimize default case for own freq preference setting
There is no need to use wpas_p2p_num_unused_channels() here in the
default configuration of p2p_ignore_sahred_freq=0, so re-order the
conditions to skip that operation. This is a bit more efficient and the
debug log is also a bit cleaner in the default case.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Tue, 19 Nov 2013 10:26:16 +0000 (12:26 +0200)]
P2P: Fix p2p_ignore_shared_freq=1 when inviting a peer
p2p_ignore_shared_freq=1 was supposed to allow a MCC-capable device to
ignore a preference for using the same channel on multiple interfaces.
However, it was not used when inviting a peer to re-invoke a persistent
group. This case needs special handling since the peer's channel list is
not available to perform channel reselection and the operating channel
indicated in the Invitation Request frames ends up getting used as the
operating channel if the transmitted of that frames becomes the GO.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Tue, 19 Nov 2013 10:15:45 +0000 (12:15 +0200)]
P2P: Fix p2p_ignore_shared_freq=1 during invitation processing
p2p_ignore_shared_freq=1 was supposed to allow a MCC-capable device to
ignore a preference for using the same channel on multiple interfaces.
However, it was not used during processing of an Invitation Request. Fix
that case to use channel preference instead of channel forcing if free
channels are available. This allows p2p_ignore_shared_freq=1 case to
ignore the preference.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>