mech_eap.git
10 years agoInterworking: Add ctrl_iface events on cred block modifications
Jouni Malinen [Fri, 4 Apr 2014 16:10:47 +0000 (19:10 +0300)]
Interworking: Add ctrl_iface events on cred block modifications

Following events are now sent to ctrl_iface monitors to indicate if
credential blocks have been added, modified, or removed:

CRED-ADDED <id>
CRED-MODIFIED <id> <field>
CRED-REMOVE <id>

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agotests: Run make clean for hwsim_test before rebuilding it
Amit Khatri [Tue, 1 Apr 2014 04:59:47 +0000 (04:59 +0000)]
tests: Run make clean for hwsim_test before rebuilding it

This makes sure that the build.sh script ends up rebuilding hwsim_test.

Signed-off-by: Amit Khatri <amit.khatri@samsung.com>
10 years agowpa_supplicant: Allow disabling LDPC
Pawel Kulakowski [Tue, 1 Apr 2014 05:16:00 +0000 (07:16 +0200)]
wpa_supplicant: Allow disabling LDPC

Allows user to disable LDPC coding.
This possibility is useful for testing purpose.

Signed-off-by: Pawel Kulakowski <pawel.kulakowski@tieto.com>
10 years agoInterworking: Read IMSI if not read at supplicant start
Jean Trivelly [Fri, 28 Mar 2014 16:30:32 +0000 (17:30 +0100)]
Interworking: Read IMSI if not read at supplicant start

It is required to read IMSI from SIM if it has not already been done
when comparing HS 2.0 AP 3GPP information with the local credentials.

Signed-off-by: Jean Trivelly <jean.trivelly@intel.com>
10 years agoInterworking: Init scard when a credential requires SIM access
Jean Trivelly [Fri, 28 Mar 2014 13:41:36 +0000 (14:41 +0100)]
Interworking: Init scard when a credential requires SIM access

When an ANQP fetch is triggered and ANQP_3GPP_CELLULAR_NETWORK info is
required, initialize scard to be ready when comparing ANQP and
credentials.

Signed-off-by: Jean Trivelly <jean.trivelly@intel.com>
10 years agoInterworking: Fix incorrect compile PCSC flag
Jean Trivelly [Wed, 26 Mar 2014 15:54:35 +0000 (16:54 +0100)]
Interworking: Fix incorrect compile PCSC flag

CONFIG_PCSC is used instead of PCSC_FUNCS.

Signed-off-by: Jean Trivelly <jean.trivelly@intel.com>
10 years agoedit: Increase buffer size to 4096 bytes
Jouni Malinen [Mon, 31 Mar 2014 09:29:22 +0000 (12:29 +0300)]
edit: Increase buffer size to 4096 bytes

wpa_supplicant and wpa_cli had already moved to allowing up to 4096 byte
buffer size to be used for control interface commands. This was limited
by the line edit buffer in interactive mode. Increase that limit to
match the other buffers to avoid artificially truncating long commands.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agoOSU server: Add example scripts for Hotspot 2.0 PKI
Jouni Malinen [Fri, 25 Oct 2013 14:54:25 +0000 (17:54 +0300)]
OSU server: Add example scripts for Hotspot 2.0 PKI

These can be used to generate certificates for developer testing of the
OSU protocol.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agoHS 2.0R2: Add example OSU SPP server implementation
Jouni Malinen [Thu, 28 Mar 2013 08:27:27 +0000 (10:27 +0200)]
HS 2.0R2: Add example OSU SPP server implementation

This is meant mainly for testing purposes and as a reference
implementation showing how OSU SPP server could be implemented. This is
not suitable for any real production use in its current form.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agoXML: Remove forgotten, unused definition of debug_print_func
Jouni Malinen [Mon, 31 Mar 2014 09:05:56 +0000 (12:05 +0300)]
XML: Remove forgotten, unused definition of debug_print_func

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agotests: Prevent grpform_pbc_overlap_group_iface failures
Jouni Malinen [Sun, 30 Mar 2014 17:55:56 +0000 (20:55 +0300)]
tests: Prevent grpform_pbc_overlap_group_iface failures

Do not report missing PBC overlap detection as an issue in this test
case since the sequence can miss the overlap due to per-SSID scan used
during group formation. In addition, increase AP beaconing frequency to
make it more likely for a Beacon frame to be seen during the optimized
scan.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: Make grpform_pbc_overlap* more likely to clear state
Jouni Malinen [Sun, 30 Mar 2014 15:21:58 +0000 (18:21 +0300)]
tests: Make grpform_pbc_overlap* more likely to clear state

The PBC overlap state could remain for the next test case and result in
unexpected failure reports.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: hostapd configuration parameters
Jouni Malinen [Sun, 30 Mar 2014 09:42:16 +0000 (12:42 +0300)]
tests: hostapd configuration parameters

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agoMake hs20_wan_metrics parser error print more helpful
Jouni Malinen [Sun, 30 Mar 2014 14:24:39 +0000 (17:24 +0300)]
Make hs20_wan_metrics parser error print more helpful

pos == NULL in almost all of the error cases here, so print the full
parameter value instead of the current position.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agoFix validation of anqp_3gpp_cell_net configuration parameter
Jouni Malinen [Sun, 30 Mar 2014 14:19:20 +0000 (17:19 +0300)]
Fix validation of anqp_3gpp_cell_net configuration parameter

The "< '0' && > '9'" part would not match any character.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: Update hlr_auc_gw Milenage file
Jouni Malinen [Sun, 30 Mar 2014 13:25:27 +0000 (16:25 +0300)]
tests: Update hlr_auc_gw Milenage file

This increases hlr_auc_gw.c test coverage and allows the SQN updated to
be checked if desired.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agoRemove duplicated vht_capab parser entry
Jouni Malinen [Sun, 30 Mar 2014 08:35:31 +0000 (11:35 +0300)]
Remove duplicated vht_capab parser entry

[VHT160-80PLUS80] was parsed twice with the second copy not really doing
anything useful.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: hostapd MAC ACL file entry removal
Jouni Malinen [Sun, 30 Mar 2014 08:01:10 +0000 (11:01 +0300)]
tests: hostapd MAC ACL file entry removal

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: VLAN using vlan_file mapping
Jouni Malinen [Sun, 30 Mar 2014 07:59:16 +0000 (10:59 +0300)]
tests: VLAN using vlan_file mapping

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: STA disconnection due to MAC ACL file change
Jouni Malinen [Sun, 30 Mar 2014 07:49:44 +0000 (10:49 +0300)]
tests: STA disconnection due to MAC ACL file change

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agoNotify STA of disconnection based on ACL change
Jouni Malinen [Sun, 30 Mar 2014 07:48:32 +0000 (10:48 +0300)]
Notify STA of disconnection based on ACL change

ap_sta_deauthenticate() does not necessarily send a Deauthentication
frame to the STA. Use ap_sta_disconnect() to drop the association so
that the notification frame goes out.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: hostapd control interface error cases
Jouni Malinen [Sun, 30 Mar 2014 07:29:41 +0000 (10:29 +0300)]
tests: hostapd control interface error cases

Invalid parameters to HS20_WNM_NOTIF, HS20_DEAUTH_REQ,
DISASSOC_IMMINENT, and ESS_DISASSOC.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: EAP-SIM server using GSM triplets
Jouni Malinen [Sun, 30 Mar 2014 07:12:20 +0000 (10:12 +0300)]
tests: EAP-SIM server using GSM triplets

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: RADIUS MAC ACL
Jouni Malinen [Sat, 29 Mar 2014 17:32:45 +0000 (19:32 +0200)]
tests: RADIUS MAC ACL

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agoRADIUS server: Add support for MAC ACL
Jouni Malinen [Sat, 29 Mar 2014 17:31:56 +0000 (19:31 +0200)]
RADIUS server: Add support for MAC ACL

"user" MACACL "password" style lines in the eap_user file can now be
used to configured user entries for RADIUS-based MAC ACL.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: Unknown Action frame category
Jouni Malinen [Sat, 29 Mar 2014 15:07:22 +0000 (17:07 +0200)]
tests: Unknown Action frame category

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: max_num_sta limit
Jouni Malinen [Sat, 29 Mar 2014 15:00:02 +0000 (17:00 +0200)]
tests: max_num_sta limit

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: max_listen_interval rejecting association
Jouni Malinen [Sat, 29 Mar 2014 14:56:14 +0000 (16:56 +0200)]
tests: max_listen_interval rejecting association

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: OSEN network and invalid association without OSEN IE
Jouni Malinen [Sat, 29 Mar 2014 14:51:44 +0000 (16:51 +0200)]
tests: OSEN network and invalid association without OSEN IE

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: Connection during large packet loss
Jouni Malinen [Sat, 29 Mar 2014 14:48:00 +0000 (16:48 +0200)]
tests: Connection during large packet loss

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: SAE anti-clogging with non-SAE STA associated as well
Jouni Malinen [Sat, 29 Mar 2014 14:39:22 +0000 (16:39 +0200)]
tests: SAE anti-clogging with non-SAE STA associated as well

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: OLBC state clearing on timeout
Jouni Malinen [Sat, 29 Mar 2014 14:35:54 +0000 (16:35 +0200)]
tests: OLBC state clearing on timeout

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: HT OLBC detection on 5 GHz
Jouni Malinen [Sat, 29 Mar 2014 14:28:00 +0000 (16:28 +0200)]
tests: HT OLBC detection on 5 GHz

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: Chargeable-User-Idnetity in Accounting-Request
Jouni Malinen [Sat, 29 Mar 2014 14:16:24 +0000 (16:16 +0200)]
tests: Chargeable-User-Idnetity in Accounting-Request

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: Add initial cfg80211 test
Jouni Malinen [Mon, 24 Mar 2014 16:29:46 +0000 (18:29 +0200)]
tests: Add initial cfg80211 test

This adds some helper definitions and functions to allow cfg80211 to be
tested with raw nl80211 messages built in the test scripts. The first
test case shows a case where station disassociates instead of
deauthenticates (which is the wpa_supplicant behavior).

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: Require HT/VHT as BSS membership selector in Supp Rates
Jouni Malinen [Sat, 29 Mar 2014 08:39:32 +0000 (10:39 +0200)]
tests: Require HT/VHT as BSS membership selector in Supp Rates

These are similar to the previous cases, but with supported rate set
limited to allow the BSS membership selector to fit into that element
instead of Ext Supp Rates.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: hostapd configuration file error cases
Jouni Malinen [Sat, 29 Mar 2014 08:36:25 +0000 (10:36 +0200)]
tests: hostapd configuration file error cases

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: PSK file error cases
Jouni Malinen [Sat, 29 Mar 2014 07:51:54 +0000 (09:51 +0200)]
tests: PSK file error cases

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agoClean up debug print for PSK file search
Jouni Malinen [Sat, 29 Mar 2014 07:50:51 +0000 (09:50 +0200)]
Clean up debug print for PSK file search

p2p_dev_addr was not NULL, so the all zeros case was printed as well.
Clean this up by printing p2p_dev_addr in debug prints only if it is a
real P2P Device Address.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: ACS for 40 MHz channels, on 5 GHz, and for VHT
Jouni Malinen [Sat, 29 Mar 2014 07:24:22 +0000 (09:24 +0200)]
tests: ACS for 40 MHz channels, on 5 GHz, and for VHT

The 5 GHz cases are not yet complete due to missing mac80211_hwsim
functionality. The current test cases allow the ACS operation to fail
for those cases.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agoDFS: Print CAC info in ctrl_iface STATUS command
Janusz Dziedzic [Wed, 5 Mar 2014 08:23:42 +0000 (09:23 +0100)]
DFS: Print CAC info in ctrl_iface STATUS command

Print CAC time and CAC left time in control interface STATUS command.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
10 years agotests: Verify PBC overlap detection during P2P group formation
Jouni Malinen [Fri, 28 Mar 2014 17:25:33 +0000 (19:25 +0200)]
tests: Verify PBC overlap detection during P2P group formation

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agoP2P: Fix segfault when PBC overlap is detected
Avraham Stern [Thu, 27 Mar 2014 06:58:30 +0000 (08:58 +0200)]
P2P: Fix segfault when PBC overlap is detected

If a separate P2P group interface is used, PBC overlap during group
formation causes the group interface to be removed, which ends up with
the interface context becoming invalid. Fix this by scheduling a timeout
to process the PBC overlap and interface removal instead of removing the
interface directly before the connection operation has returned.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
10 years agoAdd writing of network block ocsp parameter
Jouni Malinen [Fri, 28 Mar 2014 14:56:41 +0000 (16:56 +0200)]
Add writing of network block ocsp parameter

This was forgotten from the per-network ocsp parameter addition. The new
parameter needs to be stored to the configuration file similarly to the
other EAP parameters.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agonl80211: Set all BSS interfaces down when tearing down AP in MBSS mode
Maxime Bizon [Thu, 20 Mar 2014 18:23:43 +0000 (19:23 +0100)]
nl80211: Set all BSS interfaces down when tearing down AP in MBSS mode

If the interface was not added by hostapd, it could have been left up
when disabling the AP.

Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
10 years agowpa_supplicant: Remove pending sme-connect radio work
Ilan Peer [Thu, 27 Mar 2014 06:58:33 +0000 (08:58 +0200)]
wpa_supplicant: Remove pending sme-connect radio work

If a new connection is attempted while there is a pending sme-connection
radio work, cancel the pending radio work and continue with the new
connection attempt. This is preferable over rejecting the new work and
continuing with the pending one, as it is possible that the previous
work is no longer valid.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
10 years agowpa_supplicant: Override HT A-MPDU size if VHT A-MPDU was overridden
Eliad Peller [Thu, 27 Mar 2014 06:58:32 +0000 (08:58 +0200)]
wpa_supplicant: Override HT A-MPDU size if VHT A-MPDU was overridden

According to the standard, if the max A-MPDU VHT cap is <= 3, we
have to adjust the max A-MPDU HT cap to the same value. Otherwise
it should be set to 3.

Take care of it when the max VHT A-MPDU value is overridden.

Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
10 years agohostapd: Add vendor command support
Avraham Stern [Thu, 27 Mar 2014 06:58:31 +0000 (08:58 +0200)]
hostapd: Add vendor command support

Add support of vendor command to hostapd ctrl_iface.
Vendor command's format:
VENDOR <vendor id> <sub command id> [<hex formatted data>]

The 3rd argument will be converted to binary data and then passed as
argument to the sub command.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
10 years agoP2P: Do not initiate scan on P2P Device when enabled
Ilan Peer [Thu, 27 Mar 2014 06:58:29 +0000 (08:58 +0200)]
P2P: Do not initiate scan on P2P Device when enabled

Do not start a scan on a P2P Device interface when processing an
interface enabled event.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
10 years agoFix issue with incorrect secondary_channel in HT40/HT80
Pawel Kulakowski [Wed, 26 Mar 2014 12:18:29 +0000 (13:18 +0100)]
Fix issue with incorrect secondary_channel in HT40/HT80

When primary and secondary channel were switched and config was
reloaded, secondary channel was incorrectly overwritten.

Proceed as for other settings that should not be changed and don't
allow to overwrite.

Signed-off-by: Pawel Kulakowski <pawel.kulakowski@tieto.com>
10 years agoPass TDLS peer capability information in tdls_mgmt
Sunil Dutt [Wed, 26 Mar 2014 16:04:50 +0000 (21:34 +0530)]
Pass TDLS peer capability information in tdls_mgmt

While framing the TDLS Setup Confirmation frame, the driver needs to
know if the TDLS peer is VHT/HT/WMM capable and thus shall construct the
VHT/HT operation / WMM parameter elements accordingly. Supplicant
determines if the TDLS peer is VHT/HT/WMM capable based on the presence
of the respective IEs in the received TDLS Setup Response frame.

The host driver should not need to parse the received TDLS Response
frame and thus, should be able to rely on the supplicant to indicate
the capability of the peer through additional flags while transmitting
the TDLS Setup Confirmation frame through tdls_mgmt operations.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agoSync with wireless-testing.git include/uapi/linux/nl80211.h
Jouni Malinen [Thu, 27 Mar 2014 12:50:39 +0000 (14:50 +0200)]
Sync with wireless-testing.git include/uapi/linux/nl80211.h

This brings in nl80211 definitions as of 2014-03-25.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agonl80211: Fix EAPOL frames not being delivered
Maxime Bizon [Thu, 20 Mar 2014 18:29:44 +0000 (19:29 +0100)]
nl80211: Fix EAPOL frames not being delivered

When hostapd choose to reuse an existing interface, it does not add it
to the set of interfaces from which we accept EAPOL packets.

Make sure we always add it to that set.

Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
10 years agonl80211: Set interface address even if using old interface
Jouni Malinen [Tue, 25 Mar 2014 23:17:29 +0000 (01:17 +0200)]
nl80211: Set interface address even if using old interface

If an existing interface is allowed to be used, its address better be
updated to match the requested one.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agonl80211: Print if_indices list in debug log
Jouni Malinen [Tue, 25 Mar 2014 22:42:24 +0000 (00:42 +0200)]
nl80211: Print if_indices list in debug log

This makes it easier to debug dynamic interface addition/removal.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agoeloop: Add assert() on negative fd when using select() code path
Maxime Bizon [Thu, 20 Mar 2014 18:25:18 +0000 (19:25 +0100)]
eloop: Add assert() on negative fd when using select() code path

Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
10 years agoAdd a note on using 'iw list' to determine multi-BSS support
Jouni Malinen [Tue, 25 Mar 2014 21:58:22 +0000 (23:58 +0200)]
Add a note on using 'iw list' to determine multi-BSS support

This adds a pointer to hostapd.conf to using 'iw list' with the current
nl80211 drivers to determine supported interface combinations.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: GAS/ANQP query for both IEEE 802.11 and Hotspot 2.0 elements
Jouni Malinen [Tue, 25 Mar 2014 16:08:52 +0000 (18:08 +0200)]
tests: GAS/ANQP query for both IEEE 802.11 and Hotspot 2.0 elements

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agoHS 2.0: Extend ANQP_GET to accept Hotspot 2.0 subtypes
Dmitry Shmidt [Tue, 25 Mar 2014 00:36:13 +0000 (17:36 -0700)]
HS 2.0: Extend ANQP_GET to accept Hotspot 2.0 subtypes

This allows a single ANQP query to be used to fetch both IEEE 802.11
defined ANQP elements and Hotspot 2.0 vendor specific elements.

ANQP_GET <addr> <info id>[,<info id>]...
[,hs20:<subtype>][...,hs20:<subtype>]

For example:
ANQP_GET 00:11:22:33:44:55:66 258,268,hs20:3,hs20:4

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
10 years agonl80211: Indicate HS 2.0 OSEN AKM in connect/associate command
Jouni Malinen [Tue, 25 Mar 2014 15:57:54 +0000 (17:57 +0200)]
nl80211: Indicate HS 2.0 OSEN AKM in connect/associate command

This allows drivers that build the WPA/RSN IEs internally to use similar
design for building the OSEN IE.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agotests: HS 2.0 OSEN using nl80211 connect command
Jouni Malinen [Tue, 25 Mar 2014 15:56:55 +0000 (17:56 +0200)]
tests: HS 2.0 OSEN using nl80211 connect command

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agotests: Remove CONFIG_WPS2=y from example configuration files
Jouni Malinen [Tue, 25 Mar 2014 15:42:17 +0000 (17:42 +0200)]
tests: Remove CONFIG_WPS2=y from example configuration files

This build parameter is not used anymore.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agoWPS: Enable WSC 2.0 support unconditionally
Jouni Malinen [Tue, 25 Mar 2014 15:40:50 +0000 (17:40 +0200)]
WPS: Enable WSC 2.0 support unconditionally

There is not much point in building devices with WPS 1.0 only supported
nowadays. As such, there is not sufficient justification for maintaining
extra complexity for the CONFIG_WPS2 build option either. Remove this by
enabling WSC 2.0 support unconditionally.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agoP2P: Set a timeout for a persistent reinvoke on a P2P Client
Sunil Dutt Undekari [Tue, 11 Mar 2014 09:54:17 +0000 (15:24 +0530)]
P2P: Set a timeout for a persistent reinvoke on a P2P Client

Use P2P group formation timeout to wait for the 4-way handshake to
complete on a persistent reinvocation on a P2P Client.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agoP2P: Optimize scan for GO during persistent group invocation
Rashmi Ramanna [Fri, 21 Mar 2014 12:56:02 +0000 (18:26 +0530)]
P2P: Optimize scan for GO during persistent group invocation

Scan for GO on the negotiated operating channel for few iterations
before searching on all the supported channels during persistent group
reinvocation. In addition, use the already known SSID of the group in
the scans. These optimizations reduce group formation time.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agotests: P2P persistent group re-invocation with empty BSS table
Jouni Malinen [Tue, 25 Mar 2014 11:43:56 +0000 (13:43 +0200)]
tests: P2P persistent group re-invocation with empty BSS table

This verifies P2P Client scanning behavior during group re-invocation in
a case where old scan results are not available to allow the scan to be
skipped completely.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agotests: Optimize scanning in wpa_supplicant-as-AP test case
Jouni Malinen [Tue, 25 Mar 2014 13:08:07 +0000 (15:08 +0200)]
tests: Optimize scanning in wpa_supplicant-as-AP test case

Wait for the AP to be ready before initiating the scan to avoid
unnecessary five second extra wait. In addition, disconnect the station
to avoid possibility of starting a new scan at the end of the test case.
These remove unnecessary wait time from the test cases.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agoACS: Fix number of error path issues
Jouni Malinen [Mon, 24 Mar 2014 20:38:35 +0000 (22:38 +0200)]
ACS: Fix number of error path issues

Especially when multiple BSSes are used with ACS, number of the error
paths were not cleaning up driver initialization properly. This could
result in using freed memory and crashing the process if ACS failed.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agotests: Add scripts to allow parallel execution of tests in VMs
Jouni Malinen [Sun, 23 Mar 2014 23:35:58 +0000 (01:35 +0200)]
tests: Add scripts to allow parallel execution of tests in VMs

"parallel-vm.sh <number of VMs> [arguments..]" can now be used to run
multiple VMs in parallel to speed up full test cycle significantly. In
addition, the "--split srv/total" argument used in this design would
also make it possible to split this to multiple servers to speed up
testing.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: Extend OBSS scan coverage
Jouni Malinen [Sun, 23 Mar 2014 21:57:38 +0000 (23:57 +0200)]
tests: Extend OBSS scan coverage

Include another BSS in the scan results and run a test with a 40 MHz
intolerant neighboring BSS.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agoSME: Add more debug prints for OBSS scans and 20/40 MHz co-ex report
Jouni Malinen [Sun, 23 Mar 2014 21:56:50 +0000 (23:56 +0200)]
SME: Add more debug prints for OBSS scans and 20/40 MHz co-ex report

This makes it easier to debug wpa_supplicant behavior when reporting
20/40 MHz co-ex information based on OBSS scans.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agoSME: Fix OBSS scan result processing for 20/40 MHz co-ex report
Jouni Malinen [Sun, 23 Mar 2014 21:54:50 +0000 (23:54 +0200)]
SME: Fix OBSS scan result processing for 20/40 MHz co-ex report

The 40 MHz intolerant bit needs to be checked before skipping the BSS
based on the channel already being in the lost (which could have
happened due to another BSS that does not indicate 40 MHz intolerant).
This fixed the 20/40 MHz co-ex report to indicate 20 MHz request
properly if there are both 40 MHz tolerant and intolerant BSSes on the
same channel.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agoAllow hostapd to advertise 40 MHz intolerant HT capability
Jouni Malinen [Sun, 23 Mar 2014 21:50:37 +0000 (23:50 +0200)]
Allow hostapd to advertise 40 MHz intolerant HT capability

ht_capab=[40-INTOLERANT] can now be used to advertise that the BSS is 40
MHz intolerant to prevent other 20/40 MHz co-ex compliant APs from using
40 MHz channel bandwidth.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agotests: Verify HT/VHT required rejection
Jouni Malinen [Sun, 23 Mar 2014 17:49:12 +0000 (19:49 +0200)]
tests: Verify HT/VHT required rejection

Previously, only the case of STA supporting HT/VHT was tested. Now both
cases are verified.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: Additional AP parameters
Jouni Malinen [Sun, 23 Mar 2014 17:31:35 +0000 (19:31 +0200)]
tests: Additional AP parameters

This tests basic rate, short preamble, and spectrum management
configuration.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: Negative FT RRB test cases
Jouni Malinen [Sun, 23 Mar 2014 17:23:16 +0000 (19:23 +0200)]
tests: Negative FT RRB test cases

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: FT pull PMK-R1
Jouni Malinen [Sun, 23 Mar 2014 16:31:58 +0000 (18:31 +0200)]
tests: FT pull PMK-R1

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agoFT: Add support for postponing FT response
Jouni Malinen [Sun, 23 Mar 2014 16:13:03 +0000 (18:13 +0200)]
FT: Add support for postponing FT response

If the PMK-R1 needs to be pulled for the R0KH, the previous
implementation ended up rejecting the over-the-air authentication and
over-the-DS action frame unnecessarily while waiting for the RRB
response. Improve this by postponing the Authentication/Action frame
response until the pull response is received.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: P2P broadcast SD query canceling
Jouni Malinen [Sun, 23 Mar 2014 10:11:55 +0000 (12:11 +0200)]
tests: P2P broadcast SD query canceling

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: P2P channel selection
Jouni Malinen [Sun, 23 Mar 2014 09:24:01 +0000 (11:24 +0200)]
tests: P2P channel selection

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: Allow test cases to receive additional parameters
Jouni Malinen [Sun, 23 Mar 2014 09:59:43 +0000 (11:59 +0200)]
tests: Allow test cases to receive additional parameters

The optional third argument to the test case functions can now be used
to receive additional parameters from run-tests.py. As the initial
parameter, logdir value is provided so that test cases can use it to
review the debug logs from the test run.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agoP2P: Clean up channel selection code to use helper functions
Jouni Malinen [Sun, 23 Mar 2014 09:01:59 +0000 (11:01 +0200)]
P2P: Clean up channel selection code to use helper functions

This moves some of the p2p_prepare_channel_best() functionality into
separate helper functions to make the implementation easier to read.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: WPS AP PIN unlocked on timeout
Jouni Malinen [Sat, 22 Mar 2014 21:38:39 +0000 (23:38 +0200)]
tests: WPS AP PIN unlocked on timeout

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agoWPS: Comment out unused AP WEP config write with WPS 2.0
Jouni Malinen [Sat, 22 Mar 2014 21:31:39 +0000 (23:31 +0200)]
WPS: Comment out unused AP WEP config write with WPS 2.0

The main WPS code rejects WEP parameters, so this code is not used and
can be commented out from WPS 2.0 builds. This is similar to the earlier
commit that commented out in-memory update.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agoP2P: Update op_reg_class in random social channel case
Arif Hussain [Sat, 22 Mar 2014 19:50:55 +0000 (12:50 -0700)]
P2P: Update op_reg_class in random social channel case

Commit 94b84bc7253680a2b201d5c88d36ada91a3e20b4 missed one path where
p2p->op_reg_class should have been updated. Set this to 81 during
operating channel selection from 2.4 GHz.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agohostapd: Check driver DFS offload capability for channel disablement
Amar Singhal [Sat, 22 Mar 2014 19:31:15 +0000 (21:31 +0200)]
hostapd: Check driver DFS offload capability for channel disablement

If the driver supports full offloading of DFS operations, do not disable
a channel marked for radar detection. The driver will handle the needed
operations for such channels.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agonl80211: Fetch DFS offload capability from driver
Amar Singhal [Sat, 22 Mar 2014 19:20:32 +0000 (21:20 +0200)]
nl80211: Fetch DFS offload capability from driver

This uses a QCA vendor extension to determine if the driver supports
fully offloaded DFS operations.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
10 years agotests: WPS configuration file update
Jouni Malinen [Sat, 22 Mar 2014 19:12:06 +0000 (21:12 +0200)]
tests: WPS configuration file update

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agoWPS: Comment out unused AP WEP config update with WPS 2.0
Jouni Malinen [Sat, 22 Mar 2014 17:22:10 +0000 (19:22 +0200)]
WPS: Comment out unused AP WEP config update with WPS 2.0

The main WPS code rejects WEP parameters, so this code is not used and
can be commented out from WPS 2.0 builds.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: WPS and per-station PSK with non-writeable PSK file
Jouni Malinen [Sat, 22 Mar 2014 17:19:17 +0000 (19:19 +0200)]
tests: WPS and per-station PSK with non-writeable PSK file

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: hostapd GET_CONFIG key_mgmt values
Jouni Malinen [Sat, 22 Mar 2014 16:57:44 +0000 (18:57 +0200)]
tests: hostapd GET_CONFIG key_mgmt values

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agoAdd SAE and FT-SAE key_mgmt to hostapd GET_CONFIG
Jouni Malinen [Sat, 22 Mar 2014 16:57:00 +0000 (18:57 +0200)]
Add SAE and FT-SAE key_mgmt to hostapd GET_CONFIG

These options were missing from the current key_mgmt values.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: Print BSS data on ap_wps_ie_fragmention error case
Jouni Malinen [Sat, 22 Mar 2014 16:39:17 +0000 (18:39 +0200)]
tests: Print BSS data on ap_wps_ie_fragmention error case

This makes it easier to debug what failed.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: Increase DFS coverage even without hwsim support
Jouni Malinen [Sat, 22 Mar 2014 15:14:44 +0000 (17:14 +0200)]
tests: Increase DFS coverage even without hwsim support

This allows some more of the hostapd DFS operations to be executed even
before mac80211_hwsim supports CAC.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: QoS Map ctrl_iface error cases
Jouni Malinen [Sat, 22 Mar 2014 14:56:42 +0000 (16:56 +0200)]
tests: QoS Map ctrl_iface error cases

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: WPS NFC failure cases in hostapd ctrl_iface
Jouni Malinen [Sat, 22 Mar 2014 14:46:51 +0000 (16:46 +0200)]
tests: WPS NFC failure cases in hostapd ctrl_iface

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: WPS_CHECK_PIN error cases
Jouni Malinen [Sat, 22 Mar 2014 14:37:45 +0000 (16:37 +0200)]
tests: WPS_CHECK_PIN error cases

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: WPS Enrollee PIN expiration on AP
Jouni Malinen [Sat, 22 Mar 2014 14:35:29 +0000 (16:35 +0200)]
tests: WPS Enrollee PIN expiration on AP

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agotests: Increase hostapd ctrl_iface test coverage
Jouni Malinen [Sat, 22 Mar 2014 14:25:38 +0000 (16:25 +0200)]
tests: Increase hostapd ctrl_iface test coverage

This tests various error conditions and less commonly used operations.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years agoRemove unnecessary parameter validation
Jouni Malinen [Sat, 22 Mar 2014 14:24:57 +0000 (16:24 +0200)]
Remove unnecessary parameter validation

This is dead code since this helper function is always called with
non-NULL pointer.

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