Arik Nemtsov [Thu, 24 Apr 2014 05:45:38 +0000 (08:45 +0300)]
TDLS: Fully tear down existing link before setup
Disabling the link only clears the local state. The remote peer will
still think we are connected and disallow the setup.
Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Arik Nemtsov [Thu, 24 Apr 2014 05:45:37 +0000 (08:45 +0300)]
TDLS: Disable links during AP deauth in external flow
When de-authenticating from the AP, disable each TDLS link after
sending the teardown packet. Postpone the reset of the peer state
data until after the link disable request.
Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Jouni Malinen [Tue, 29 Apr 2014 15:09:17 +0000 (18:09 +0300)]
TDLS: Make wpa_tdls_send_teardown() static
This function was not used anywhere outside tdls.c.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Ilan Peer [Thu, 24 Apr 2014 05:45:33 +0000 (08:45 +0300)]
nl80211: Take ownership of dynamically added interfaces
Indicate to cfg80211 that interfaces created by the wpa_supplicant
or hostapd are owned by them, and that in case that the socket that
created them closes, these interfaces should be removed.
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Eduardo Abinader [Sat, 26 Apr 2014 00:46:03 +0000 (20:46 -0400)]
nl80211: Cancel rfkill timeout on deinit
Got segfault, when freeing drv and there exists registered timeout for
blocked rfkill. This patch adds cancel timeout to avoid this.
Signed-off-by: Eduardo Abinader <eduardo.abinader@openbossa.org>
Jouni Malinen [Tue, 29 Apr 2014 14:24:00 +0000 (17:24 +0300)]
tests: Add more cred parameters into config file test
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Sreenath Sharma [Mon, 28 Apr 2014 11:57:47 +0000 (17:27 +0530)]
HS 2.0 R2: Fix writing of domain_suffix_match cred parameter
This was supposed to end with a newline character so that parameters are
aligned in configuration file.
Signed-off-by: Sreenath Sharma <sreenats@broadcom.com>
Pradeep Reddy POTTETI [Mon, 28 Apr 2014 14:56:17 +0000 (20:26 +0530)]
TDLS: Pass peer's capability info to the driver in open mode
Commit
96ecea5eb14cc1362cb01b914ac4163324294a28 did not consider
to pass the VHT/HT/WMM capabilities of the peer for BSS with
open mode.
Address this issue by passing the capabilities irrespective of
the security mode.
Signed-off-by: Pradeep Reddy POTTETI <c_ppotte@qti.qualcomm.com>
Jouni Malinen [Tue, 29 Apr 2014 11:46:09 +0000 (14:46 +0300)]
tests: Verify global control interface before starting each test
This allows control interface issues to be caught in a bit more readable
way in the debug logs. In addition, dump pending monitor socket
information more frequently and within each test case in the log files
to make the output clearer and less likely to go over the socket buffer
limit.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Sat, 26 Apr 2014 19:05:34 +0000 (22:05 +0300)]
tests: ROAM error cases
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sat, 26 Apr 2014 19:01:55 +0000 (22:01 +0300)]
tests: BSS command parameters
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sat, 26 Apr 2014 18:44:23 +0000 (21:44 +0300)]
tests: GET_CAPABILITY special cases
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sat, 26 Apr 2014 18:39:13 +0000 (21:39 +0300)]
tests: SET_CRED/GET_CRED error cases
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sat, 26 Apr 2014 18:35:07 +0000 (21:35 +0300)]
tests: Additional REMOVE_CRED coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sat, 26 Apr 2014 18:29:19 +0000 (21:29 +0300)]
tests: Large number of creds and LIST_CREDS truncation
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sat, 26 Apr 2014 18:23:44 +0000 (21:23 +0300)]
tests: SET/GET_NETWORK failure cases
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sat, 26 Apr 2014 18:16:36 +0000 (21:16 +0300)]
tests: SELECT/ENABLE/DISABLE/REMOVE_NETWORK failure cases
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sat, 26 Apr 2014 18:10:56 +0000 (21:10 +0300)]
tests: SELECT_NETWORK any
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sat, 26 Apr 2014 14:46:32 +0000 (17:46 +0300)]
tests: WPS PIN provisioning with configured WPS v1.0 AP
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sat, 26 Apr 2014 14:25:26 +0000 (17:25 +0300)]
tests: Make ap_wps_init_2ap_pin/pbc more robust
It is possible for the scan to miss a Probe Response frame especially
under heavy load, so try again to avoid reporting invalid failures.
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sat, 26 Apr 2014 14:18:37 +0000 (17:18 +0300)]
tests: Verify network information in SCAN_RESULTS
This checks WPA/RSN IE parsing result and WEP information in
SCAN_RESULTS.
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sat, 26 Apr 2014 14:09:48 +0000 (17:09 +0300)]
tests: Invalid MAC address with BLACKLIST
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sat, 26 Apr 2014 14:05:57 +0000 (17:05 +0300)]
tests: id_str in network configuration
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sat, 26 Apr 2014 13:53:44 +0000 (16:53 +0300)]
tests: WPS command error cases
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sat, 26 Apr 2014 13:01:52 +0000 (16:01 +0300)]
tests: Make INTERWORKING_SELECT tests more robust
It is possible for a scan to fail to see Probe Response or Beacon frame
under heavy load (e.g., during a parallel-vm.sh test run) since the
dwell time on a chanenl is quite short. Make the test cases using
INTERWORKING_SELECT more robust by trying again if the first attempt
does not find a matching BSS.
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sat, 26 Apr 2014 09:09:28 +0000 (12:09 +0300)]
Check rx_mgmt::frame more consistently against NULL
If a driver wrapper misbehaves and does not indicate a frame body in the
event, core hostapd code should handle this consistently since that case
was already checked for in one location.
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sat, 26 Apr 2014 08:51:19 +0000 (11:51 +0300)]
Make sta NULL-check easier for static analyzers
sta == NULL check is already done above based on category !=
WLAN_ACTION_PUBLIC, but that seems to be too complex for some static
analyzers, so avoid invalid reports by explicitly checking for this
again in the WLAN_ACTION_FT case.
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sat, 26 Apr 2014 08:43:25 +0000 (11:43 +0300)]
Make dl_list_first() and dl_list_last() uses easier for static analyzers
The previous check for dl_list_len() or having an entry from the list is
sufficient, but some static analyzers cannot figure out that
dl_list_first() and dl_list_last() will return non-NULL in this type of
cases. Avoid invalid reports by explicitly checking for NULL.
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sat, 26 Apr 2014 08:26:42 +0000 (11:26 +0300)]
WPS HTTP: Remove unused assignment
bbp is not used in the code path that skips trailers.
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sat, 26 Apr 2014 08:24:24 +0000 (11:24 +0300)]
Remove duplicated variable zeroing
It's enough to do this once as part of the for loop.
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sat, 26 Apr 2014 08:20:37 +0000 (11:20 +0300)]
Make PMKID check easier for static analyzers
Checking sm->pmksa is sufficient here, but that seems to be too
difficult for static analyzers to follow, so avoid false reports by
explicitly checking pmkid as well.
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sat, 26 Apr 2014 08:09:29 +0000 (11:09 +0300)]
Remove floating constant suffix 'd' from test coee
clang scan-build does not seem to like the 'd' suffix on floating
constants and ends up reporting analyzer failures. Since this suffix
does not seem to be needed, get rid of it to clear such warnings.
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Fri, 25 Apr 2014 20:43:00 +0000 (23:43 +0300)]
ACS: Clean up ifdef CONFIG_ACS to avoid unreachable code
The conf->channel assignment was unreachable if CONFIG_ACS was not
defined, so move that to be under #else.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Fri, 25 Apr 2014 20:19:47 +0000 (23:19 +0300)]
Make last_scan_res update easier for static analyzers
The check based on last_scan_res_used is sufficient for making sure that
last_scan_res is allocated. However, it is a bit too complex for static
analyzers to notice, so add an explicit check to avoid bogus reports.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Fri, 25 Apr 2014 20:09:56 +0000 (23:09 +0300)]
P2P: Verify operating channel validity for NFC connection handover
p2p_freq_to_channel() could return an error if the GO or P2P Client
operating channel is not valid. Check for this before generating the NFC
handover message.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Fri, 25 Apr 2014 19:45:12 +0000 (22:45 +0300)]
tests: Make ap_wps_er_add_enrollee check a bit more robust
It is possible for the final step of the test case to fail under load
(e.g., when using parallel-vm.sh with large number of VMs), so run
through additional scan iterations if the WPS-AUTH flag does not get
removed immediately.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Tue, 15 Apr 2014 14:42:40 +0000 (17:42 +0300)]
tests: HT 20/40 co-ex functionality during BSS lifetime
Verify that AP acts on 40 MHz intolerant STA association/disassociation
and on 20/40 co-ex report indicating 40 MHz intolerant AP showed up and
removed.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Fri, 25 Apr 2014 09:02:25 +0000 (12:02 +0300)]
nl80211: Remove unnecessary wpa_driver_nl80211_set_freq() wrapper
This is not of any real use anymore with nl80211_set_channel() taking
care of channel setting operation.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Peng Xu [Mon, 14 Apr 2014 17:51:32 +0000 (20:51 +0300)]
nl80211: Add support for changing AP mode channel bandwidth
Configure driver with the new channel parameters (mainly, HT 20/40 MHz
bandwidth changes) as part of set_ap().
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Tue, 29 Apr 2014 08:10:22 +0000 (11:10 +0300)]
Sync with mac80211-next.git nl80211.h
Signed-off-by: Jouni Malinen <j@w1.fi>
Peng Xu [Wed, 16 Apr 2014 15:45:53 +0000 (18:45 +0300)]
Retry initial 20/40 MHz co-ex scan if the driver is busy
This makes the initial OBSS scans in AP mode before starting 40 MHz BSS
more robust. In addition, HT20 can be used as a backup option if none of
the scans succeed.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Peng Xu [Mon, 14 Apr 2014 18:21:40 +0000 (21:21 +0300)]
Add AP mode support for HT 20/40 co-ex Action frame
If a 2.4 GHz band AP receives a 20/40 Coexistence management frame from
a connected station with 20/40 BSS Intolerant Channel Report element
containing the channel list in which any legacy AP are detected or AP
with 40 MHz intolerant bit set in HT Cap IE is detected in the affected
range of the BSS, the BSS will be moved from 40 to 20 MHz channel width.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Peng Xu [Mon, 14 Apr 2014 17:40:56 +0000 (20:40 +0300)]
hostapd: Extend support for HT 20/40 coexistence feature
Extend the minimal HT 20/40 co-ex support to include dynamic changes
during the lifetime of the BSS. If any STA connects to a 2.4 GHz AP with
40 MHz intolerant bit set then the AP will switch to 20 MHz operating
mode.
If for a period of time specified by OBSS delay factor and OBSS scan
interval AP does not have any information about 40 MHz intolerant STAs,
the BSS is switched from HT20 to HT40 mode.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Peng Xu [Mon, 14 Apr 2014 18:05:26 +0000 (21:05 +0300)]
Make channel parameters available in set_ap() driver operation
This provides information to allow the driver to be configured for
updated channel parameters, e.g., when dynamically changing HT20/HT40
bandwidth.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Mon, 28 Apr 2014 12:31:25 +0000 (15:31 +0300)]
wpaspy: Handle DETACH response more robustly
There could be pending unsolicited event messages on the monitor socket
when the DETACH command is issued. As such, the response may be
something else then OK even if the actual detach operation succeeded.
Try to avoid this be dropping pending messages before issuing the detach
command. As an additional workaround, check the response against FAIL
instead of requiring OK so that the self.attached does not get left to
True incorrectly even if an additional event message were to be
received.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Sat, 26 Apr 2014 13:42:45 +0000 (16:42 +0300)]
Indicate disconnection event on interface disabled
It is possible for the disconnection event from the driver to not get
delivered when interface is disabled. To maintain consistent ctrl_iface
event behavior, indicate CTRL-EVENT-DISCONNECTED in such a case if we
were in connected state.
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sat, 26 Apr 2014 08:39:48 +0000 (11:39 +0300)]
Fix wpa_config_read() with existing config block
If two config files are merged together, the ssid and cred blocks may
not have been processed correctly since the tail pointers were not
updated to the last entry from the first configuration file.
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Fri, 25 Apr 2014 20:14:24 +0000 (23:14 +0300)]
WPS: Print setsockopt() failure in debug log
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Fri, 18 Apr 2014 16:07:35 +0000 (19:07 +0300)]
trace: Replace demangle.h with internal defines
It looks like the demangle.h from binutils-dev is not installed that
commonly anymore. Since we need only two defines from that file, replace
the header file with those defines to make it easier to build with
WPA_TRACE_BFD=y.
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Mon, 14 Apr 2014 10:39:18 +0000 (13:39 +0300)]
nl80211: Fix some coding style issues
Some trailing whitespace and spaces for indentation were present in the
driver wrapper and header files.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Fri, 25 Apr 2014 08:41:36 +0000 (11:41 +0300)]
Make qca-vendor.h independent of other header files
Move the definitions that depended in common.h into a separate header
file so that qca-vendor.h can be copied and used as-is in other
projects.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Amar Singhal [Thu, 17 Apr 2014 16:54:30 +0000 (09:54 -0700)]
nl80211: Allocate QCA vendor subcmd for extended statistics
This allocates a QCA vendor subcmd for extended statistics
functionality and also an attribute for delivering the payload
for extended statistics.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Thu, 24 Apr 2014 09:10:17 +0000 (12:10 +0300)]
tests: Fix a typo on a wpas_config_file error path
In addition, print the config files in error case to the debug log.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Ilan Peer [Thu, 24 Apr 2014 05:45:40 +0000 (08:45 +0300)]
wpa_supplicant: Call frequency conflict handling during auth
Previously, the frequency conflict was handled only during the
association flow. However, some drivers, e.g., mac80211 based
drivers, will fail an authentication request in case that there
are no available channels for use (as they might be used by
other interfaces), and thus the frequency conflict resolution
is never called.
Fix this by calling frequency conflict resolution during
authentication (SME-in-wpa_supplicant) as well.
In addition, get the shared radio frequency from the wpa_s context in
both the SME-in-driver and SME-in-wpa_supplicant cases and not from the
driver.
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Luciano Coelho [Thu, 24 Apr 2014 05:45:36 +0000 (08:45 +0300)]
scan: Reset normal scan counter when a connection succeeds
The normal scan counter is used to trigger a few normal scans before a
scheduled scan is issued. The reason for doing this is that we get
results faster and some drivers support more SSIDs per normal scan
than during sched scan. After 2 normal scans, we start using
sched_scan. But the problem is that when a connection succeeds, we do
not reset this counter, so we will keep using sched scans.
To fix this, now we reset the counter when we switch to WPA_COMPLETED
state.
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Ilan Peer [Thu, 24 Apr 2014 05:45:34 +0000 (08:45 +0300)]
radiotap: Fix compilation for systems without le16toh/le32toh
These functions are not standard and do not exist in all systems, e.g.,
variants of Android. Instead use the macros defined in common.h.
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Greg Hackmann [Tue, 15 Apr 2014 00:06:02 +0000 (17:06 -0700)]
Android: Disable unused parameter warnings
This avoids large number of undesired compiler warnings since Android
build system is added -Wextra.
Signed-off-by: Greg Hackmann <ghackmann@google.com>
Maxime Bizon [Wed, 23 Apr 2014 21:23:37 +0000 (23:23 +0200)]
Interworking: Don't filter probe requests when interworking is disabled
With hidden SSID (ignore_broadcast_ssid), an IOS device trying to
connect to the AP will send a probe request with ANT == 2. If
interworking support is just compiled (not enabled), we will drop the
probe request since default ANT is 0.
Check that interworking is enabled before filtering based on ANT or
HESSID to match the behavior of code without CONFIG_INTERWORKING.
Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
Naresh Jayaram [Fri, 28 Mar 2014 15:01:44 +0000 (17:01 +0200)]
Add SIM identifier to the network profile and cred block
This allows the specific SIM to be identified for authentication
purposes in multi-SIM devices. This SIM number represents the index of
the SIM slot. This SIM number shall be used for the authentication using
the respective SIM for the Wi-Fi connection to the corresponding
network.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Marek Puzyniak [Wed, 16 Apr 2014 10:22:14 +0000 (12:22 +0200)]
AP: Fix checking if DFS is required
Sometimes function hostapd_is_dfs_required() returns -1 which indicates
that it was not possible to check if DFS was required. This happens for
channels from the 2.4 GHz band where DFS checking should not happen.
This can be fixed by returning DFS-not-required for mode different from
IEEE80211A and when DFS support is not available (ieee80211h not set).
Signed-off-by: Marek Puzyniak <marek.puzyniak@tieto.com>
Jouni Malinen [Tue, 15 Apr 2014 14:22:47 +0000 (17:22 +0300)]
Allow HT 40 MHz intolerant flag to be set for association
This extends HT overrides to allow HT 40 MHz intolerant flag to be set
with ht40_intolerant=1.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Tue, 15 Apr 2014 14:22:05 +0000 (17:22 +0300)]
nl80211: Debug print HT/VHT capability override information
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Tue, 15 Apr 2014 21:27:27 +0000 (00:27 +0300)]
tests: wpa_supplicant configuration file reading/writing
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Tue, 15 Apr 2014 22:40:44 +0000 (01:40 +0300)]
Fix writing of provisioning_sp cred parameter
This was supposed to be within quotation marks in the configuration
file.
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Tue, 15 Apr 2014 22:27:10 +0000 (01:27 +0300)]
Reduce the amount of time PTK/TPTK/GTK is kept in memory
Some of the buffers used to keep a copy of PTK/TPTK/GTK in the
supplicant implementation maintained a copy of the keys longer than
necessary. Clear these buffers to zero when the key is not needed
anymore to minimize the amount of time key material is kept in memory.
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Tue, 15 Apr 2014 20:50:49 +0000 (23:50 +0300)]
tests: More converage for INTERFACE_ADD
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Tue, 15 Apr 2014 20:43:36 +0000 (23:43 +0300)]
tests: Wi-Fi Display through the global interface
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Tue, 15 Apr 2014 10:22:48 +0000 (13:22 +0300)]
Fix P2P redirection of global ctrl_iface SET command
The previous version prevented all use of wpas_global_ctrl_iface_set().
That's not desirable since there may be more global parameters added in
the future. Instead, try to use the global version first and redirect to
P2P interface only if the global version returns an error.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Tue, 15 Apr 2014 10:15:09 +0000 (13:15 +0300)]
Remove SAVE_CONFIG redirect from global control interface
The P2P redirection for SAVE_CONFIG issued on the global control
interface was preventing wpas_global_ctrl_iface_save_config() from being
reached. The global version of SAVE_CONFIG was supposed to try to save
configuration files for all interface rather than just the P2P
management interface, so fix this by removing the unneeded and undesired
redirection.
Modify the global SAVE_CONFIG handler to return FAIL if no configuration
files were saved. This makes the behavior match with the per-interface
SAVE_CONFIG.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Tue, 15 Apr 2014 10:02:25 +0000 (13:02 +0300)]
eap_proxy: Use unique Makefile names for Android and non-Android
Rename the eap_proxy_*.mk file to eap_proxy_*.mak for non-Android builds
so that the same eap_proxy implementation can be more easily included in
the same directory for both cases.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Mon, 14 Apr 2014 22:06:39 +0000 (01:06 +0300)]
tests: P2P group formation using parameters from persistent group
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Mon, 14 Apr 2014 21:53:30 +0000 (00:53 +0300)]
tests: Fix progressive p2p_find to actually use progressive part
It turned out that the initial test case found the GO based on the
initial full scan instead of the progressive search part. Fix this by
started the GO only after the initial full scan.
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Mon, 14 Apr 2014 21:23:55 +0000 (00:23 +0300)]
tests: P2P group interface ifdown
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Mon, 14 Apr 2014 21:20:17 +0000 (00:20 +0300)]
P2P: Fix interface remove to terminate all P2P groups
Previously, it was possible to remove the main interface and leave
behind dynamic P2P group interfaces. This would eventually result in
references freed memory, so it is not really suitable behavior. Instesd,
remove all the dynamic P2P group interfaces that were created through an
interface that is now removed.
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Mon, 14 Apr 2014 21:06:12 +0000 (00:06 +0300)]
tests: wpa_supplicant global control interface and SUSPEND/RESUME
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Mon, 14 Apr 2014 20:04:55 +0000 (23:04 +0300)]
l2_packet: Fix l2_packet_none (hostapd default)
The sample code here ended up trying to register an eloop socket with fd
== -1. This was not really ever supposed to be used, but it is now also
hitting an assert in eloop. Skip the unnecessary
eloop_register_read_sock() to avoid this.
This was causing issues for hostapd since CONFIG_L2_PACKET is not set by
default. If CONFIG_RSN_PREAUTH=y was not used for CONFIG_L2_PACKET was
not set in .config explicitly, the defaul use of l2_packet_none.c ended
up hitting the newly added assert() in eloop.
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 13 Apr 2014 21:53:27 +0000 (00:53 +0300)]
tests: Work around invalid ap_wps_ie_fragmentation failures
This can fail if Probe Response frame is missed and Beacon frame was
used to fill in the BSS entry. This can happen, e.g., during heavy load
every now and then and is not really an error, so try to workaround by
runnign another scan.
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 13 Apr 2014 21:45:25 +0000 (00:45 +0300)]
tests: Try to work around bogus errors in wpas_ctrl_country
It seems like it is possible for a CTRL-EVENT-REGDOM-CHANGE event from a
previous test case to "leak" through to the execution of this test case.
That can result in the validation steps here failing, so wait a bit and clear the pending events before starting the test.
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 13 Apr 2014 21:38:37 +0000 (00:38 +0300)]
tests: Work around mac80211_hwsim survey limitations
ap_multi_bss_acs test case was failing if it was executed immediately
after a test case that used 5 GHz band since the current mac80211_hwsim
channel survey implementation is very limited and reports only a single
channel. For this test case, that channel has to be from the 2.4 GHz
band.
Signed-off-by: Jouni Malinen <j@w1.fi>
Johannes Berg [Wed, 9 Apr 2014 09:53:16 +0000 (11:53 +0200)]
wlantest: Tag and ignore generated packets
Rather than ignoring packets with a minimal 8-byte radiotap
header, which may occur elsewhere, tag generated (decrypted)
packets with an empty vendor namespace tag and ignore those.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Wed, 9 Apr 2014 09:50:54 +0000 (11:50 +0200)]
radiotap: Update radiotap parser to library version
Update the radiotap parser to the latest version of the
http://git.sipsolutions.net/radiotap.git/ library to get
parsing for vendor namespaces.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
quiche@chromium.org [Wed, 9 Apr 2014 22:10:29 +0000 (15:10 -0700)]
Propagate scan failures over D-Bus
If we receive a scan request via D-Bus and wpa_supplicant_scan_trigger
fails, return the failure to the caller over D-Bus.
Signed-hostap: mukesh agrawal <quiche@chromium.org>
Jouni Malinen [Sun, 13 Apr 2014 16:25:00 +0000 (19:25 +0300)]
tests: NFC_GET_HANDOVER_REQ/SEL
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 13 Apr 2014 15:46:05 +0000 (18:46 +0300)]
tests: WPS_NFC_TAG_READ error cases
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 13 Apr 2014 15:33:55 +0000 (18:33 +0300)]
tests: P2P NFC static handover with forced channel
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 13 Apr 2014 13:33:18 +0000 (16:33 +0300)]
tests: wpa_supplicant country code SET/GET
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 13 Apr 2014 13:32:38 +0000 (16:32 +0300)]
Add a wpa_supplicant ctrl_iface event for regdom changes
CTRL-EVENT-REGDOM-CHANGE event provides an external notification of
regulatory domain (and any driver channel list) changes.
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 13 Apr 2014 08:47:03 +0000 (11:47 +0300)]
WPS: Split eapol_cb reconnect to a separate code path
Use eloop timeout to run the reconnect command after eapol_cb has
returned. This reduces stack use and can simplify the driver
command/event sequence by allowing the disconnection events from the
provisioning step to be processed before starting the actual data
connection.
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 13 Apr 2014 08:46:26 +0000 (11:46 +0300)]
tests: P2P GO issuing multiple credentials
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 13 Apr 2014 08:44:57 +0000 (11:44 +0300)]
WPS: Close p2p_group and temporary parameters to all network blocks
If a P2P GO issues multiple credentials for some reason, clone the
p2p_group and temporary parameters to all those based on the initial
network block that gets used for the first credential.
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 13 Apr 2014 08:39:49 +0000 (11:39 +0300)]
nl80211: Mask out deauth even after own deauth request
This was already done for the disconnect event, but
SME-in-wpa_supplicant case needs to do same with the deauth event to
avoid getting extra events during WPS disconnect-and-reconnect sequence.
This can speed up WPS processing by removing unnecessary failures or
retries due to the extra event being processed during the next
association attempt.
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sat, 12 Apr 2014 20:37:14 +0000 (23:37 +0300)]
tests: P2P NFC Tag with group interface
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sat, 12 Apr 2014 20:34:49 +0000 (23:34 +0300)]
tests: NFC tag enable/disable for P2P
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sat, 12 Apr 2014 20:25:36 +0000 (23:25 +0300)]
tests: HT capability overrides
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sat, 12 Apr 2014 20:25:11 +0000 (23:25 +0300)]
Add forgotten ampdu_factor into wpa_supplicant.conf
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sat, 12 Apr 2014 20:11:02 +0000 (23:11 +0300)]
tests: IBSS with fixed BSSID
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sat, 12 Apr 2014 20:01:58 +0000 (23:01 +0300)]
tests: HS 2.0 connection using connect API
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sat, 12 Apr 2014 19:52:41 +0000 (22:52 +0300)]
tests: Opportunistic key caching with the connect API
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sat, 12 Apr 2014 19:47:49 +0000 (22:47 +0300)]
tests: Wildcard SSID with PSK/passphrase
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sat, 12 Apr 2014 19:46:54 +0000 (22:46 +0300)]
Re-enable use of wildcard SSID with passphrase
This used to work, but it looks like the disabled-PSK-network check
ended up rejecting confiurations that configured a wildcard SSID with a
passphrase (instead of PSK).
Signed-off-by: Jouni Malinen <j@w1.fi>