Avraham Stern [Thu, 7 Apr 2016 10:32:00 +0000 (13:32 +0300)]
tests: persistent_group_profile_add to support P2P Device interface
Modify the persistent_group_profile_add test to support configurations
that use a dedicated P2P Device interface by sending the ADD_NETWORK and
SET_NETWORK commands on the global control interface and specifying the
P2P Device interface name.
Signed-off-by: Avraham Stern <avraham.stern@intel.com>
Avraham Stern [Thu, 7 Apr 2016 10:31:59 +0000 (13:31 +0300)]
tests: Store P2P Device ifname in class WpaSupplicant
Add an attribute to class WpaSupplicant with the name of the
P2P Device interface. If a separate interface is not used for
P2P Device, this attribute will hold the name of the only used
interface (with functions also as the P2P Device management
interface).
This attribute will be used to direct P2P related commands to the
P2P Device interface, which is needed for configurations that use
a separate interface for the P2P Device.
Signed-off-by: Avraham Stern <avraham.stern@intel.com>
Avraham Stern [Thu, 7 Apr 2016 10:31:58 +0000 (13:31 +0300)]
tests: Modify p2p_msg_long_ssid to support P2P Device interface
Waiting for the P2P-DEVICE-FOUND event should be done on the global
control interface to support configurations that use a dedicated P2P
Device interface.
Signed-off-by: Avraham Stern <avraham.stern@intel.com>
Avraham Stern [Thu, 7 Apr 2016 10:31:57 +0000 (13:31 +0300)]
tests: Modify autogo_scan to support P2P Device interface
Support configurations that use a dedicated P2P Device interface by
sending the P2P_CONNECT command on the global control interface.
In addition, when a dedicated P2P Device interface is used, there is no
need to manually respond to the Provision Discovery Request since the
request is processed by the P2P Device interface and this interface was
not set for external RX management frames handling.
Signed-off-by: Avraham Stern <avraham.stern@intel.com>
Ilan Peer [Thu, 7 Apr 2016 10:31:56 +0000 (13:31 +0300)]
tests: Fix error message in test_p2ps_connect_p2ps_method_4()
This fixes commit
2f0f69a9ec93e063822628578bceb947cf083918 ('tests: Use
p2ps_provision() and p2ps_connect_pd() in p2ps_connect_p2ps_method()').
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Ilan Peer [Thu, 7 Apr 2016 10:31:55 +0000 (13:31 +0300)]
tests: Add couple of roam failure tests
1. Fail roaming to an AP which exceeded its number of allowed stations.
2. Fail roaming due to passphrase mismatch.
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Jouni Malinen [Sun, 24 Apr 2016 17:06:33 +0000 (20:06 +0300)]
tests: Remove unused eap_connect import
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 24 Apr 2016 09:28:18 +0000 (12:28 +0300)]
tests: Convert Host() class to use list of arguments instead of string
It is better to use a list of command line arguments for the local
execution case and convert that to a space-separated string for the
remote case.
Signed-off-by: Jouni Malinen <j@w1.fi>
Janusz Dziedzic [Thu, 7 Apr 2016 05:38:10 +0000 (07:38 +0200)]
tests: Print traceback if test fails
This is useful in case we hit a problem in test code.
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Janusz Dziedzic [Thu, 7 Apr 2016 05:38:07 +0000 (07:38 +0200)]
tests: Use hapd from hostapd.add_bss()
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Janusz Dziedzic [Thu, 7 Apr 2016 05:38:07 +0000 (07:38 +0200)]
tests: Use hapd from hostapd.add_ap()
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Janusz Dziedzic [Thu, 7 Apr 2016 05:38:07 +0000 (07:38 +0200)]
tests: Use hapd from hostapd.add_ap() in start_ap_er()
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Janusz Dziedzic [Thu, 7 Apr 2016 05:38:07 +0000 (07:38 +0200)]
tests: Use hapd from hostapd.add_ap() in TDLS
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Janusz Dziedzic [Thu, 7 Apr 2016 05:38:07 +0000 (07:38 +0200)]
tests: Pass apdev to HostapdGlobal() in ap_add_with_driver
This is needed for running the test with a remote host.
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Janusz Dziedzic [Thu, 7 Apr 2016 05:38:07 +0000 (07:38 +0200)]
tests: Use hapd from hostapd.add_ap() in eap_connect()
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Janusz Dziedzic [Thu, 7 Apr 2016 05:38:06 +0000 (07:38 +0200)]
tests: Use hapd from hostapd.add_iface()
Since add_iface() now returns the correct hapd, just use it.
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Janusz Dziedzic [Thu, 7 Apr 2016 05:38:05 +0000 (07:38 +0200)]
tests: Pass apdev to HostapdGlobal()
This can be used to work with remote hosts.
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Janusz Dziedzic [Thu, 7 Apr 2016 05:38:05 +0000 (07:38 +0200)]
tests: Replace HostapdGlobal() + remove() with hostapd.remove_bss()
This can be used to work with remote hosts.
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Janusz Dziedzic [Thu, 7 Apr 2016 05:38:05 +0000 (07:38 +0200)]
tests: Use hostapd.add_ap() instead of HostapdGlobal() (DFS)
This makes the DFS test cases that use start_dfs_ap() more usable for
testing with remote hosts.
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Janusz Dziedzic [Thu, 7 Apr 2016 05:38:05 +0000 (07:38 +0200)]
tests: Use hostapd.remove_bss() instead of HostapdGlobal() (WPS)
This makes ap_wps_twice more usable for testing with remote hosts.
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Janusz Dziedzic [Thu, 7 Apr 2016 05:38:05 +0000 (07:38 +0200)]
tests: Use hostapd.add_ap() instead of HostapdGlobal() (PSK)
This makes ap_cli_order more usable for testing with remote hosts.
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Janusz Dziedzic [Thu, 7 Apr 2016 05:38:05 +0000 (07:38 +0200)]
tests: Remove HostapdGlobal() use from invalid_ap()
Pass apdev to instead of HostapdGlobal() to invalid_ap() to make the
dynamic AP test cases more useful for testing with remove hosts.
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Janusz Dziedzic [Thu, 7 Apr 2016 05:38:05 +0000 (07:38 +0200)]
tests: Remove direct HostapdGlobal() use
Use hostapd.add_ap() and hostapd.remove_bss() to avoid direct
HostapdGlobal() use in some of the dynamic AP test cases to make them
more usable for testing with remote hosts.
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Janusz Dziedzic [Thu, 7 Apr 2016 05:38:04 +0000 (07:38 +0200)]
tests: Return hapd when add_bss() and add_iface() are used
Return hapd from add_bss() and add_iface() while we can next use it.
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Janusz Dziedzic [Thu, 7 Apr 2016 05:38:03 +0000 (07:38 +0200)]
tests: Pass apdev param to HostapdGlobal()
Pass apdev param to HostapdGlobal() to support operating with a remote
test host.
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Janusz Dziedzic [Thu, 7 Apr 2016 05:38:02 +0000 (07:38 +0200)]
tests: Pass apdev to hostapd.add_bss()
Pass apdev param to hostapd.add_bss(). Kill hardcoded phy param and get
phy base on apdev. These are needed to support operation with a remote
test host.
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Janusz Dziedzic [Thu, 7 Apr 2016 05:38:01 +0000 (07:38 +0200)]
tests: Pass apdev to hostapd.add_iface()
Pass apdev param to hostapd.add_iface() to support operation with a
remote test host.
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Janusz Dziedzic [Thu, 7 Apr 2016 05:38:00 +0000 (07:38 +0200)]
tests: Pass apdev to hostapd.terminate()
Pass apdev dictionary to hostapd.terminate() to support operation with a
remote test host.
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Janusz Dziedzic [Thu, 7 Apr 2016 05:37:59 +0000 (07:37 +0200)]
tests: Pass apdev to remove_bss()
We need this for remote host support. From apdev we can get
apdev['hostname'] and apdev['port'].
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Kanchanapally, Vidyullatha [Thu, 21 Apr 2016 11:29:56 +0000 (16:59 +0530)]
WNM: Fetch scan results before checking transition candidates
On receiving a WNM BSS Transition Management Request frame with a
candidate list, fetch the latest scan results from the kernel to see if
there are any recent scan results for the candidates and initiate a
connection if found. This helps to avoid triggering a new scan in cases
where a scan initiated by something else (e.g., an internal beacon
measurement report functionality in a driver) has processed Beacon or
Probe Response frames without wpa_supplicant having received a
notification of such an update yet.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Wed, 20 Apr 2016 10:22:32 +0000 (13:22 +0300)]
tests: hostapd assocresp_elements
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Wed, 20 Apr 2016 10:19:08 +0000 (13:19 +0300)]
Use a shared helper function for parsing hostapd.conf IEs
wpabuf_parse_bin() can be used to take care of parsing a hexstring to a
wpabuf and a shared helper function can take care of clearing the
previous value when empty string is used.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Bala Krishna Bhamidipati [Wed, 20 Apr 2016 04:04:17 +0000 (09:34 +0530)]
Add assocresp_elements parameter for hostapd
This new parameter allows hostapd to add Vendor Specific elements into
(Re)Association Response frames similarly to the way vendor_elements
parameter can be used for Beacon and Probe Response frames.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Tue, 19 Apr 2016 22:20:00 +0000 (01:20 +0300)]
OpenSSL: Support OpenSSL 1.1.0 DH opacity
The OpenSSL 1.1.0 Beta 2 release made DH opaque and that broke
compilation of crypto_openssl.c. Fix this by using the new accessor
functions when building against OpenSSL 1.1.0 or newer.
Signed-off-by: Jouni Malinen <j@w1.fi>
Günther Kelleter [Mon, 18 Apr 2016 15:16:13 +0000 (17:16 +0200)]
FT: Fix RRB for FT over-the-air case
Commit
66d464067d626cc64c5a543a8f91fe58727f4e5e ('FT: Register RRB
l2_packet only if FT-over-DS is enabled') disabled RRB l2_packet socket
if ft_over_ds is disabled, but this socket is required for FT
over-the-air, too (FT key distribution). Enable the socket regardless of
ft_over_ds setting if FT is enabled.
Signed-off-by: Günther Kelleter <guenther.kelleter@devolo.de>
Marcin Niestroj [Mon, 11 Apr 2016 12:55:35 +0000 (14:55 +0200)]
systemd: Update service files according to D-Bus interface version
systemd service files were supplied with old D-Bus bus name. After
service activation systemd was waiting for appearance of specified bus
name to consider it started successfully. However, if wpa_supplicant was
compiled only with the new D-Bus interface name, systemd didn't notice
configured (old) D-Bus bus name appearance. In the end, service was
considered malfunctioning and it was deactivated.
Update systemd service BusName property according to supported D-Bus
interface version.
Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
Sunil Dutt [Tue, 22 Mar 2016 16:43:16 +0000 (22:13 +0530)]
Assign QCA vendor command/attributes for set/get wifi configuration
This adds QCA_NL80211_VENDOR_SUBCMD_SET_WIFI_CONFIGURATION and
QCA_NL80211_VENDOR_SUBCMD_GET_WIFI_CONFIGURATION and the attributes used
with these commands.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Mon, 18 Apr 2016 21:43:01 +0000 (00:43 +0300)]
tests: P2P_GROUP_MEMBER
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Purushottam Kushwaha [Wed, 13 Apr 2016 05:30:08 +0000 (11:00 +0530)]
P2P: Add P2P_GROUP_MEMBER command to fetch client interface address
This allows local GO to fetch the P2P Interface Address of a P2P Client
in the group based on the P2P Device Address for the client. This
command should be sent only on a group interface (the same peer may be
in multiple concurrent groups).
Usage:
P2P_GROUP_MEMBER <P2P Device Address>
Output:
<P2P Interface Address>
Signed-off-by: Purushottam Kushwaha <pkushwah@qti.qualcomm.com>
Lior David [Sun, 10 Apr 2016 14:10:22 +0000 (17:10 +0300)]
P2P: Trigger event when invitation is accepted
Trigger an event when wpa_supplicant accepts an invitation to re-invoke
a persistent group. Previously wpa_supplicant entered group formation
without triggering any specific events and it could confuse clients,
especially when operating with a driver that does not support
concurrency between P2P and infrastructure connection.
Signed-off-by: Lior David <qca_liord@qca.qualcomm.com>
Jouni Malinen [Sun, 17 Apr 2016 15:43:30 +0000 (18:43 +0300)]
nl80211: Get rid of unused assignment warning
The os_snprintf() call here cannot really fail in practice, but since
its result was stored into the local variable and not checked, static
analyzers could warn about the unused assignment. Clean this up by
checking the return value.
Signed-off-by: Jouni Malinen <j@w1.fi>
Roy Marples [Mon, 11 Apr 2016 08:56:20 +0000 (09:56 +0100)]
bsd: Set level correctly for non FreeBSD systems
Only FreeBSD treats rssi as dBm, other BSD have no special meaning to
rssi.
Signed-off-by: Roy Marples <roy@marples.name>
David Spinadel [Wed, 6 Apr 2016 16:42:19 +0000 (19:42 +0300)]
tests: Add RRM tests
1. Add tests for hostapd neighbor database and neighbor report and
request. Remove the partial neighbor report request test from
test_wpas_ctrl.py since they are now covered more completely in
test_rrm.py.
2. Add LCI request test.
3. Add FTM range request signaling test. This covers only the control
interface commands and measurement request/response exchange for now.
Full end-to-end functionality requires support of station reporting
RRM capability.
Signed-off-by: David Spinadel <david.spinadel@intel.com>
Ilan Peer [Wed, 6 Apr 2016 16:42:18 +0000 (19:42 +0300)]
RRM: Modify the processing of a received neighbor report
Parse a received neighbor report and report for each neighbor report the
data received for it:
RRM-NEIGHBOR-REP-RECEIVED bssid=<BSSID> info=0x<hex> op_class=<class> chan=<chan> [lci=hex] [civic=hex]
Note that this modifies the previous format that originally reported
only the length of the received frame.
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Beni Lev [Wed, 6 Apr 2016 16:42:17 +0000 (19:42 +0300)]
SME: Add support for global RRM flag
Add RRM to SME authentication/association if the global RRM flag is set.
Signed-off-by: Beni Lev <beni.lev@intel.com>
Beni Lev [Wed, 6 Apr 2016 16:42:16 +0000 (19:42 +0300)]
nl80211: Add support for global RRM flag
Set the global RRM flag if global RRM is supported by the device. Also,
allow RRM in (Re)Association Request frame if the global RRM flag is
set.
Signed-off-by: Beni Lev <beni.lev@intel.com>
Beni Lev [Wed, 6 Apr 2016 16:42:15 +0000 (19:42 +0300)]
driver: Add global RRM support flag
This flag indicates that RRM can be used in (Re)Association Request
frames, without supporting quiet period.
Signed-off-by: Beni Lev <beni.lev@intel.com>
David Spinadel [Wed, 6 Apr 2016 16:42:14 +0000 (19:42 +0300)]
nl80211: Register to receive Radio Measurement Request frames
Register to receive Radio Measurement Request frames since LCI request
is supported by wpa_supplicant.
Signed-off-by: David Spinadel <david.spinadel@intel.com>
David Spinadel [Wed, 6 Apr 2016 16:42:13 +0000 (19:42 +0300)]
wpa_supplicant: Handle LCI request
Handle radio measurement request that contains LCI request. Send
measurement report based on a configurable LCI report element. The LCI
report element is configured over the control interface with
SET lci <hexdump of the element>
and cleared with
SET lci ""
Signed-off-by: David Spinadel <david.spinadel@intel.com>
David Spinadel [Wed, 6 Apr 2016 16:42:12 +0000 (19:42 +0300)]
hostapd: Add FTM range request
Add FTM range request via RRM. The AP sends Radio measurement request
with FTM range request as a request for the receiving STA to send FTM
requests to the given list of APs. The neighbor report part of the
request is taken from the neighbor database.
The control interface command is:
REQ_RANGE <dst addr> <rand_int> <min_ap> <responder> [<responder>..]
dst addr: MAC address of an associated STA
rand_int: Randomization Interval (0..65535) in TUs
min_ap: Minimum AP Count (1..15); minimum number of requested FTM ranges
between the associated STA and the listed APs
responder: List of BSSIDs for neighboring APs for which a measurement
is requested
Signed-off-by: David Spinadel <david.spinadel@intel.com>
David Spinadel [Wed, 6 Apr 2016 16:42:11 +0000 (19:42 +0300)]
hostapd: Add LCI request
Add a hostapd control interface command REQ_LCI to request LCI from an
associated station using radio measurement.
Signed-off-by: David Spinadel <david.spinadel@intel.com>
David Spinadel [Wed, 6 Apr 2016 16:42:10 +0000 (19:42 +0300)]
hostapd: Save RM enabled capability of station
Save RM enabled capability element of an associating station if radio
measurement is supported in its capability field.
Signed-off-by: David Spinadel <david.spinadel@intel.com>
David Spinadel [Wed, 6 Apr 2016 16:42:09 +0000 (19:42 +0300)]
hostapd: Handle Neighbor Report Request frame
Process Neighbor Report Request frame and send Neighbor Report Response
frame based on the configured neighbor report data.
Signed-off-by: David Spinadel <david.spinadel@intel.com>
David Spinadel [Wed, 6 Apr 2016 16:42:08 +0000 (19:42 +0300)]
hostapd: Add own neighbor report data to neighbor database
Add own neighbor report data to neighbor database based on local LCI and
location civic data.
Signed-off-by: David Spinadel <david.spinadel@intel.com>
David Spinadel [Wed, 6 Apr 2016 16:42:07 +0000 (19:42 +0300)]
hostapd: Add a database of neighboring APs
Add a configurable neighbor database that includes the content of
Nighbor Report element, LCI and Location Civic subelements and SSID.
All parameters for a neighbor must be updated at once; Neighbor Report
element and SSID are mandatory, LCI and civic are optional. The age of
LCI is set to the time of neighbor update.
The control interface API is:
SET_NEIGHBOR <BSSID> <ssid=SSID> <nr=data> [lci=<data>] [civic=<data>]
To delete a neighbor use:
REMOVE_NEIGHBOR <BSSID> <SSID>
Signed-off-by: David Spinadel <david.spinadel@intel.com>
David Spinadel [Wed, 6 Apr 2016 16:42:06 +0000 (19:42 +0300)]
tests: Replace radio_measurements with rrm_neighbor_report
This moves neighbor report testing to use the new hostapd.conf
parameter.
Signed-off-by: David Spinadel <david.spinadel@intel.com>
David Spinadel [Wed, 6 Apr 2016 16:42:06 +0000 (19:42 +0300)]
hostapd: Extend the configuration of RRM capabilities
Extend the radio_measurements parameter to save all the supported
RRM capabilities as it's used in RM enabled capabilities element.
Make this parameter not directly configurable via config file (though,
keep the radio_measurements parameter for some time for backwards
compatibility). Instead, add a configuration option to enable neighbor
report via radio measurements. Other features can be added later as
well.
Signed-off-by: David Spinadel <david.spinadel@intel.com>
David Spinadel [Wed, 6 Apr 2016 16:42:05 +0000 (19:42 +0300)]
tests: Update NEIGHBOR_REP_REQUEST format
Use quotation marks to match the new SSID encoding format in the
NEIGHBOR_REP_REQUEST command. In this specific test case, the exact SSID
value did not make any difference for behavior. The previous version
ended up getting decoded as a hexstring after the NEIGHBOR_REP_REQUEST
format change. The new version goes back to the ASCII string version of
"abcdef".
Signed-off-by: David Spinadel <david.spinadel@intel.com>
Jouni Malinen [Sat, 16 Apr 2016 14:42:44 +0000 (17:42 +0300)]
Fix spelling of "neighbor" in a function name
The missing letter 'h' made it more difficult to find this function.
Signed-off-by: Jouni Malinen <j@w1.fi>
David Spinadel [Wed, 6 Apr 2016 16:42:05 +0000 (19:42 +0300)]
wpa_supplicant: Add LCI and civic request to Neighbor Report Request
Add an option to request LCI and Location Civic Measurement in Neighbor
Report Request frame, as described in IEEE P802.11-REVmc/D5.0, 9.6.7.6.
Note: This changes the encoding format of the NEIGHBOR_REP_REQUEST
ssid=<val> parameter. This used to be parsed as raw SSID data which is
problematic for accepting additional parameters. The new encoding allows
either a string within double-quotation marks or a hexdump of the raw
SSID.
Thew new format:
NEIGHBOR_REP_REQUEST [ssid=<SSID>] [lci] [civic]
Signed-off-by: David Spinadel <david.spinadel@intel.com>
David Spinadel [Wed, 6 Apr 2016 16:42:04 +0000 (19:42 +0300)]
utils: Add ssid_parse() function
Add a function that parses SSID in text or hex format. In case of the
text format, the SSID is enclosed in double quotes. In case of the hex
format, the SSID must include only hex digits and not be enclosed in
double quotes. The input string may include other arguments after the
SSID.
Signed-off-by: David Spinadel <david.spinadel@intel.com>
David Spinadel [Wed, 6 Apr 2016 16:42:03 +0000 (19:42 +0300)]
Add measurement and neighbor report definitions
Add measurement report definitions from Table 9-81 in IEEE
P802.11-REVmc/D5.0 "Measurement type definition for measurement
requests".
Add measurement report definitions from IEEE Std 802.11-2012 Table 8-71
"Location subject definition".
Add neighbor report bandwidth subelement definition from IEEE
P802.11-REVmc/D5.0 MC Table 9-150 - "Optional subelement IDs
neighbor report"
Add neighbor report channel width definition from IEEE
P802.11-REVmc/D5.0, Table 9-152 - "HT/VHT Operation Information
subfields".
Add definitions for neighbor report BSSID info from IEEE
P802.11-REVmc/D5.0, 9.4.2.37 Neighbor Report element.
Signed-off-by: David Spinadel <david.spinadel@intel.com>
David Spinadel [Wed, 6 Apr 2016 16:42:02 +0000 (19:42 +0300)]
utils: Rename hostapd_parse_bin to wpabuf_parse_bin and move it
Make the function available as part of the wpabuf API.
Use this renamed function where possible.
Signed-off-by: David Spinadel <david.spinadel@intel.com>
David Spinadel [Wed, 6 Apr 2016 16:42:01 +0000 (19:42 +0300)]
hostapd: Set LCI and Location Civic information in configuration
Enable configuration of LCI and location civic information in
hostapd.conf.
Signed-off-by: David Spinadel <david.spinadel@intel.com>
Jouni Malinen [Fri, 8 Apr 2016 16:38:52 +0000 (19:38 +0300)]
tests: AP with open mode and STA poll
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Fri, 8 Apr 2016 16:37:08 +0000 (19:37 +0300)]
Add POLL_STA command to check connectivity in AP mode
The hostapd "POLL_STA <addr>" control interface command can be used to
check whether an associated station ACKs a QoS Data frame. The received
ACK for such a frame is reported as an event message ("AP-STA-POLL-OK
<addr>").
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Fri, 8 Apr 2016 16:20:07 +0000 (19:20 +0300)]
tests: hostapd disconnecting STA without transmitting Deauth/Disassoc
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Fri, 8 Apr 2016 16:18:33 +0000 (19:18 +0300)]
Allow AP to disconnect STA without sending Deauth/Disassoc frame
The optional tx=0 parameter can be added to the hostapd
DEAUTHENTICATE/DISASSOCIATE command to request disconnection without
transmitting the Deauthentication/Disassociation frame to the STA.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Fri, 8 Apr 2016 15:39:41 +0000 (18:39 +0300)]
tests: AP with open mode and STA statistics
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Fri, 8 Apr 2016 15:38:50 +0000 (18:38 +0300)]
Add inactive_msec into STA output
This allows external programs to fetch the driver inactivity value for a
specific STA ("STA <addr>" hostapd control interface command).
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Fri, 8 Apr 2016 14:28:24 +0000 (17:28 +0300)]
tests: VENDOR_ELEM 14 to add an IE into Probe Request frame
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Fri, 8 Apr 2016 14:28:23 +0000 (17:28 +0300)]
Extend VENDOR_ELEM parameters to cover non-P2P Probe Request frame
The new VENDOR_ELEM value 14 can now be used to add a vendor element
into Probe Request frames used by non-P2P active scans.
For example:
VENDOR_ELEM_ADD 14
dd05001122330a
and to clear that:
VENDOR_ELEM_REMOVE 14 *
Signed-off-by: Jouni Malinen <j@w1.fi>
Ilan Peer [Wed, 6 Apr 2016 14:14:43 +0000 (17:14 +0300)]
tests: Modify test_hs20_filter
Modify the test cases to tests the Hotspot 2.0 filtering functionality
in wpa_supplicant, instead of testing only the kernel interface.
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Ilan Peer [Wed, 6 Apr 2016 14:14:42 +0000 (17:14 +0300)]
nl80211: Implement configure_data_frame_filters() callback
Implement configure_data_frame_filters() callback by using
the net-sysfs interfaces (if these are available).
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Matti Gottlieb [Wed, 6 Apr 2016 14:14:41 +0000 (17:14 +0300)]
HS 2.0: Add support for configuring frame filters
When a station starts an association to a Hotspot 2.0 network, request
the driver to do the following, based on the BSS capabilities:
1. Enable gratuitous ARP filtering
2. Enable unsolicited Neighbor Advertisement filtering
3. Enable unicast IP packet encrypted with GTK filtering if
DGAF disabled bit is zero
Clear the filter configuration when the station interface is
disassociated.
Signed-off-by: Matti Gottlieb <matti.gottlieb@intel.com>
Matti Gottlieb [Wed, 6 Apr 2016 14:14:40 +0000 (17:14 +0300)]
driver: Add a packet filtering function declaration
Add a new function declaration that will allow wpa_supplicant to request
the driver to configure data frame filters for specific cases.
Add definitions that will allow frame filtering for stations as
required by Hotspot 2.0:
1. Gratuitous ARP
2. Unsolicited NA
3. Unicast IP packets encrypted with GTK
Signed-off-by: Matti Gottlieb <matti.gottlieb@intel.com>
Ayala Beker [Thu, 7 Apr 2016 10:31:01 +0000 (13:31 +0300)]
AP: Pass station P2P PS capabilities info during station add/set
If a legacy client with no P2P PS support is trying to connect to
a P2P GO, the driver should know that, and change its PS behavior
accordingly.
Add a parameter to hostapd_sta_add_params() indicating if P2P PS is
supported by the station and pass this parameter to kernel with nl80211
driver when the station is added/set.
Signed-off-by: Ayala Beker <ayala.beker@intel.com>
Jouni Malinen [Fri, 8 Apr 2016 10:01:49 +0000 (13:01 +0300)]
Sync with mac80211-next.git include/uapi/linux/nl80211.h
This brings in nl80211 definitions as of 2016-04-06.
Signed-off-by: Jouni Malinen <j@w1.fi>
Lior David [Mon, 4 Apr 2016 16:19:25 +0000 (19:19 +0300)]
wpa_supplicant: "don't care" value for pbss in ssid structure
Add a new value 2 to the pbss parameter of wpa_ssid structure, which
means "don't care". This value is used in infrastructure mode to request
connection to either AP or PCP, whichever is available in the scan
results. The value is also used in regular WPS (not P2P group formation)
to make WPS work with devices running as either AP or PCP.
Signed-off-by: Lior David <qca_liord@qca.qualcomm.com>
Jouni Malinen [Fri, 8 Apr 2016 08:41:08 +0000 (11:41 +0300)]
tests: RADIUS failure when adding MPPE keys
This is a regression test case for a radius_msg_add_mppe_keys() memory
leak on an error path.
Signed-off-by: Jouni Malinen <j@w1.fi>
Ayala Beker [Thu, 7 Apr 2016 10:31:00 +0000 (13:31 +0300)]
RADIUS: Fix a possible memory leak on an error path
Fix a possible memory leak in radius_msg_add_mppe_keys() if
os_get_random() fails.
Signed-off-by: Ayala Beker <ayala.beker@intel.com>
Jouni Malinen [Fri, 8 Apr 2016 08:28:45 +0000 (11:28 +0300)]
tests: WPA2 with invalid PSK from RADIUS
This is a regression test case for a memory leak on a
decode_tunnel_passwords() error path.
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Fri, 8 Apr 2016 08:28:19 +0000 (11:28 +0300)]
tests: Fix pyrad exception name in RADIUS test cases
Signed-off-by: Jouni Malinen <j@w1.fi>
Ayala Beker [Thu, 7 Apr 2016 10:30:59 +0000 (13:30 +0300)]
RADIUS: Fix possible memory leak when parsing per-STA passphrase
Fix a possible memory leak in decode_tunnel_passwords() if an invalid
passphrase is received from the RADIUS server.
Signed-off-by: Ayala Beker <ayala.beker@intel.com>
Jouni Malinen [Thu, 7 Apr 2016 18:10:10 +0000 (21:10 +0300)]
tests: Add P2P invitation coverage during p2p_find
The new persistent_group_peer_dropped3 test case is similar to
persistent_group_peer_dropped with the difference being in the
responding device (the one from which the persistent group information
is dropped) is not issued a separate P2P_LISTEN command and instead, a
single P2P_FIND is used through the exchange to verify that this
operation does not get stopped unexpectedly. This is a regression test
case to verify that P2P_PENDING_INVITATION_RESPONSE case ends up calling
p2p_check_after_scan_tx_continuation() in non-success case. It should be
noted that this is dependent on timing: Action frame TX request needs to
occur during the P2P_FIND Search phase (scan). As such, not every
execution of this test case will hit the previous issue sequence, but
that should be hit every now and then.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Thu, 7 Apr 2016 18:05:28 +0000 (21:05 +0300)]
P2P: Continue p2p_find after sending non-success Invitation Response
This was previously handled for the case where the non-success
Invitation Response frame was sent out during the Listen phase. However,
in the case the Action frame TX ended up getting scheduled when the
Search phase scan had already started (e.g., due to the driver reporting
Invitation Request RX late enough for the Listen-to-Search transition
having already started), the postponed Action frame TX status processing
did not cover the specific case of non-success Invitation Response. This
could result in the p2p_find operation getting stopped (stuck in SEARCH
state) unexpectedly.
Fix this by calling p2p_check_after_scan_tx_continuation() from
Invitation Response TX callback handler if the invitation was rejected.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Thu, 7 Apr 2016 08:45:01 +0000 (11:45 +0300)]
Mark wpa_supplicant_{start,stop}_sched_scan() static
With the only callers in wpas_{start,stop}_pno() moved into scan.c,
there is no need to call these helper functions from outside scan.c
anymore.
Signed-off-by: Jouni Malinen <j@w1.fi>
Hu Wang [Wed, 6 Apr 2016 08:14:34 +0000 (11:14 +0300)]
Fix race condition with PNO stop followed immediately by PNO start
Commit
dd271857a5b501cd88143efe8ca0f0dce4519a91 ('Skip normal scan when
PNO is already in progress') fixed issues with normal scans getting
rejected by the driver when PNO scan is already running. The part about
skipping such a scan request is fine, but the part about clearing
wpa_s->pno back to 0 in EVENT_SCHED_SCAN_STOPPED handler is problematic.
If PNO is stopped ("SET pno 0") and then restarted ("SET pno 1")
immediately, it is possible for the EVENT_SCHED_SCAN_STOPPED event from
the stopping part to be received only after the new PNO instance has
been started. This would have resulted in clearing wpa_s->pno and the
driver and wpa_supplicant getting out of sync. This would then prevent
PNO from being stopped with "SET pno 0" (that fails if wpa_s->pno == 0).
Fix this race condition by reverting the wpa_s->pno = 0 addition from
the EVENT_SCHED_SCAN_STOPPED handler.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Manikandan Mohan [Thu, 17 Mar 2016 18:50:23 +0000 (20:50 +0200)]
Add QCA nl80211 vendor commands for TSF and WISA Feature
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Tue, 5 Apr 2016 15:36:28 +0000 (18:36 +0300)]
RSN: Set EAPOL-Key Request Secure bit to 1 if PTK is set
The Secure bit in the Key Information field of EAPOL-Key frames is
supposed to be set to 1 when there is a security association. This was
done for other frames, but not for the EAPOL-Key Request frame where
supplicant is requesting a new PTK to be derived (either due to Michael
MIC failure report Error=1 or for other reasons with Error=0). In
practice, EAPOL-Key Request frame is only sent when there is a PTK in
place, so all such frames should have Secure=1.
Signed-off-by: Jouni Malinen <j@w1.fi>
Janusz Dziedzic [Wed, 30 Mar 2016 08:55:56 +0000 (10:55 +0200)]
tests: Pass full apdev to add_ap() function (7)
Pass the full apdev to the add_ap() function instead of just ifname.
This allows us to handle also remote hosts while we can check
apdev['hostname'], apdev['port'].
This step (7) converts the cases where a local variable is used to store
apdev[#]['ifname'] before passing it as the argument to hostapd.add_ap().
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Janusz Dziedzic [Wed, 30 Mar 2016 08:55:56 +0000 (10:55 +0200)]
tests: Pass full apdev to add_ap() function (6)
Pass the full apdev to the add_ap() function instead of just ifname.
This allows us to handle also remote hosts while we can check
apdev['hostname'], apdev['port'].
This step (6) converts the cases where apdevs[#]['ifname'] was used as
the argument to hostapd.add_ap().
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Janusz Dziedzic [Wed, 30 Mar 2016 08:55:56 +0000 (10:55 +0200)]
tests: Pass full apdev to add_ap() function (5)
Pass the full apdev to the add_ap() function instead of just ifname.
This allows us to handle also remote hosts while we can check
apdev['hostname'], apdev['port'].
This step (5) converts the cases that use the start_ap_wpa2_psk() helper
function.
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Janusz Dziedzic [Wed, 30 Mar 2016 08:55:56 +0000 (10:55 +0200)]
tests: Pass full apdev to add_ap() function (4)
Pass the full apdev to the add_ap() function instead of just ifname.
This allows us to handle also remote hosts while we can check
apdev['hostname'], apdev['port'].
This step (4) converts the cases that call hostapd.add_ap() from a
helper function that got apdev[i] as an argument.
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Janusz Dziedzic [Wed, 30 Mar 2016 08:55:56 +0000 (10:55 +0200)]
tests: Pass full apdev to add_ap() function (3)
Pass the full apdev to the add_ap() function instead of just ifname.
This allows us to handle also remote hosts while we can check
apdev['hostname'], apdev['port'].
This step (3) converts the cases that use the start_ap() helper
function.
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Janusz Dziedzic [Wed, 30 Mar 2016 08:55:56 +0000 (10:55 +0200)]
tests: Pass full apdev to add_ap() function (2)
Pass the full apdev to the add_ap() function instead of just ifname.
This allows us to handle also remote hosts while we can check
apdev['hostname'], apdev['port'].
This step (2) converts the cases that use the add_ssdp_ap() helper
function.
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Janusz Dziedzic [Wed, 30 Mar 2016 08:55:56 +0000 (10:55 +0200)]
tests: Pass full apdev to add_ap() function (1)
Pass the full apdev to the add_ap() function instead of just ifname.
This allows us to handle also remote hosts while we can check
apdev['hostname'], apdev['port'].
This step (1) converts the cases where apdev[#]['ifname'] was used as
the argument to hostapd.add_ap().
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Janusz Dziedzic [Wed, 30 Mar 2016 08:55:56 +0000 (10:55 +0200)]
tests: Allow full apdev to be passed to add_ap() function
This allows the full apdev dict to be passed to the add_ap() function
instead of just ifname. This allows us to handle also remote hosts while
we can check apdev['hostname'], apdev['port']. The old style ifname
argument is still accepted to avoid having to convert all callers in a
single commit.
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Dmitry Shmidt [Mon, 28 Mar 2016 17:58:53 +0000 (10:58 -0700)]
Android: Fix max number of sched scan SSIDs based on driver capability
This adds use of the driver capability (instead of hardcoded
WPAS_MAX_SCAN_SSIDS) in wpas_start_pno() similarly to what was already
done in wpa_supplicant_req_sched_scan().
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Roshan Pius [Wed, 17 Feb 2016 00:40:06 +0000 (16:40 -0800)]
binder: Implement interface add/remove methods
This commit implements the methods defined in Supplicant service:
1. CreateInterface
2. RemoveInterface
3. GetInterface
The binder service returns the corresponding iface binder object
references which can be used by clients to control a specific
interface.
Signed-off-by: Roshan Pius <rpius@google.com>