mech_eap.git
7 years agomesh: Use WPA_DRIVER_MESH_CONF_FLAG_* as modification flag
Masashi Honma [Fri, 5 Aug 2016 08:35:30 +0000 (17:35 +0900)]
mesh: Use WPA_DRIVER_MESH_CONF_FLAG_* as modification flag

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
7 years agomesh: Do NL80211_MESHCONF_* setting in single function
Masashi Honma [Fri, 5 Aug 2016 08:35:29 +0000 (17:35 +0900)]
mesh: Do NL80211_MESHCONF_* setting in single function

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
7 years agomesh: Move max_peer_links parameter to appropriate struct
Masashi Honma [Fri, 5 Aug 2016 08:35:28 +0000 (17:35 +0900)]
mesh: Move max_peer_links parameter to appropriate struct

Accoding to the comment of struct wpa_driver_mesh_bss_params, the
max_peer_links parameter should be under that struct.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
7 years agotests: IAPP and multiple BSSes
Jouni Malinen [Thu, 18 Aug 2016 17:06:09 +0000 (20:06 +0300)]
tests: IAPP and multiple BSSes

This verifies IAPP socket registration from multiple hostapd interfaces.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoIAPP: Set SO_REUSEADDR on listening socket
Petko Bordjukov [Mon, 8 Aug 2016 15:46:28 +0000 (18:46 +0300)]
IAPP: Set SO_REUSEADDR on listening socket

Make it possible for several instances of hostapd to listen on the same
network interface.

Signed-off-by: Petko Bordjukov <bordjukov@gmail.com>
7 years agoAdd init fragment for hostapd on Android
Christopher Wiley [Wed, 17 Aug 2016 17:21:01 +0000 (17:21 +0000)]
Add init fragment for hostapd on Android

This fragment defines how the Android init system should start hostapd
as a standalone service. Previously, hostapd was fork/exec'd from
Android's netd. This left hostapd with some dangling file descriptors
and a process parent minimally interested in acting as init for child
processes.

Signed-off-by: Christopher Wiley <wiley@google.com>
7 years agomesh: Simplify HT40 check code
Masashi Honma [Thu, 18 Aug 2016 01:06:44 +0000 (10:06 +0900)]
mesh: Simplify HT40 check code

The ht40 variable can only have values -1 or 1 here, so need to try to
address ht40 == 0 case.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
7 years agomesh: Set correct secondary channel offset if HT40 is disabled
Masashi Honma [Thu, 18 Aug 2016 01:06:43 +0000 (10:06 +0900)]
mesh: Set correct secondary channel offset if HT40 is disabled

Previously, secondary channel offset could be non zero even though
disable_ht40=1. This patch fixes it.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
7 years agotests: hostapd and MIB ctrl_iface command with open network
Jouni Malinen [Thu, 18 Aug 2016 07:42:56 +0000 (10:42 +0300)]
tests: hostapd and MIB ctrl_iface command with open network

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoap: Use is_multicast_ether_addr() more
Johannes Berg [Tue, 16 Aug 2016 13:06:59 +0000 (15:06 +0200)]
ap: Use is_multicast_ether_addr() more

Various checks should use is_multicast_ether_addr() instead
of hardcoding the equivalent, change it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
7 years agonl80211: Remove duplicated check in nl80211_setup_ap()
Eduardo Abinader [Tue, 16 Aug 2016 15:43:04 +0000 (17:43 +0200)]
nl80211: Remove duplicated check in nl80211_setup_ap()

Just removing a duplicated condition.

Signed-off-by: Eduardo Abinader <eduardoabinader@gmail.com>
7 years agotests: IEEE 802.1X + WEP reauthentication
Jouni Malinen [Tue, 16 Aug 2016 19:40:03 +0000 (22:40 +0300)]
tests: IEEE 802.1X + WEP reauthentication

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agonl80211: Fix control port protocol no-encrypt setting
Johannes Berg [Wed, 17 Aug 2016 09:40:25 +0000 (11:40 +0200)]
nl80211: Fix control port protocol no-encrypt setting

Previously, driver_nl80211 sets NL80211_ATTR_CONTROL_PORT_NO_ENCRYPT in
AP mode, to get EAPOL frames out unencrypted when using IEEE 802.1X/WEP.
However, due to the way nl80211/cfg80211 is implemented, this attribute
is ignored by the kernel if NL80211_ATTR_CONTROL_PORT_ETHERTYPE isn't
specified as well. Fix this by including
NL80211_ATTR_CONTROL_PORT_ETHERTYPE set to ETH_P_PAE. This can be done
unconditionally, since the kernel will allow ETH_P_PAE to be set even
when the driver didn't advertise support for arbitrary ethertypes.

Additionally, the params->pairwise_ciphers appear to not be set at
this point, so relax the check and allow them to be zero.

In client mode, this whole thing was missing, so add it. Again, the
pairwise suite can be WPA_CIPHER_NONE, so allow that case as well.

This fixed IEEE 802.1X/WEP EAP reauthentication and rekeying to use
unencrypted EAPOL frames which is the de facto way of implementing this
in wireless networks.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
7 years agotests: Fix ap_wps_er_http_proto max concurrent requests case
Jouni Malinen [Wed, 17 Aug 2016 09:24:59 +0000 (12:24 +0300)]
tests: Fix ap_wps_er_http_proto max concurrent requests case

Commit 2d6a526ac3885605f34df4037fc79ad330565b23 ('tests: Make
ap_wps_er_http_proto more robust') tried to work around the timeouts
here, but that was not really the best approach since the one second
timeout that was used here for connect() ended up being very close to
the limit even before the kernel change. The longer connect() time is
caused by a sequence where the listen() backlog ignores the connection
instead of accept() followed by close() within the wpa_supplicant ER
HTTP connection handling. The time to retransmit the SYN changed a bit
in the kernel from 1.0 sec to about 1.03 sec. This was enough to push
that over the one second timeout.

Fix this by using a sufficiently long timeout (10 sec) to allow SYN
retransmission to occur to recover from the listen() backlog case.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agotests: More coverage for IBSS RSN OOM
Jouni Malinen [Sat, 13 Aug 2016 18:48:04 +0000 (21:48 +0300)]
tests: More coverage for IBSS RSN OOM

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agoIBSS: Fix a memory leak on RSN error path
Jouni Malinen [Sat, 13 Aug 2016 18:29:53 +0000 (21:29 +0300)]
IBSS: Fix a memory leak on RSN error path

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agoMove disconnect command handling to a common place
Roshan Pius [Wed, 10 Aug 2016 16:35:34 +0000 (09:35 -0700)]
Move disconnect command handling to a common place

Move out the disconnect command handling from |ctrl_iface.c| to
|wpa_supplicant.c| so that it can be reused across the different
control interfaces (socket, dbus & binder).

Signed-off-by: Roshan Pius <rpius@google.com>
7 years agoOpenSSL: Fix OpenSSL 1.1.0 compatibility functions
David Benjamin [Wed, 10 Aug 2016 17:28:45 +0000 (13:28 -0400)]
OpenSSL: Fix OpenSSL 1.1.0 compatibility functions

To be consistent with OpenSSL 1.1.0, the free functions should
internally check for NULL. EVP_MD_CTX_free also was missing an
EVP_MD_CTX_cleanup, so this leaked a little.

OpenSSL 1.1.0 also has given get_rfc3526_prime_1536 a better namespace
with get_rfc3526_prime_1536 as a compatibility-only name. Use that
instead in 1.1.0.

Signed-off-by: David Benjamin <davidben@google.com>
7 years agotests: IBSS RSN group rekeying
Jouni Malinen [Sat, 13 Aug 2016 13:22:44 +0000 (16:22 +0300)]
tests: IBSS RSN group rekeying

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agoAdd group_rekey parameter for IBSS
Jouni Malinen [Sat, 13 Aug 2016 13:22:53 +0000 (16:22 +0300)]
Add group_rekey parameter for IBSS

The new network profile parameter group_rekey can now be used to specify
the group rekeying internal in seconds for IBSS.

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agohostapd: Fix parsing the das_client option
Felix Fietkau [Tue, 26 Jul 2016 11:29:37 +0000 (13:29 +0200)]
hostapd: Fix parsing the das_client option

The musl implementation of inet_aton() returns an error if there are any
characters left after the IP address. When parsing the das_client, split
the string at the whitespace separator to be able to parse the address
successfully.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agonl80211: Do not switch interface to station mode when using mesh
Felix Fietkau [Tue, 26 Jul 2016 11:29:36 +0000 (13:29 +0200)]
nl80211: Do not switch interface to station mode when using mesh

This fixes issues with adding mesh interfaces to a bridge.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agoDo not include NAS-Port attribute with AID 0
Nick Lowe [Mon, 8 Aug 2016 13:19:57 +0000 (14:19 +0100)]
Do not include NAS-Port attribute with AID 0

Do not include a NAS-Port attribute in Access-Request and
Accounting-Request packets where the Association ID (AID) is 0, i.e.,
not yet assigned or known.

Signed-off-by: Nick Lowe <nick.lowe@lugatech.com>
7 years agoatheros: Accept Public Action frames sent to Wildcard BSSID
Manish Shukla [Thu, 11 Aug 2016 13:08:30 +0000 (16:08 +0300)]
atheros: Accept Public Action frames sent to Wildcard BSSID

Previously, the check for mgmt->bssid matching own address (= BSSID)
ended up rejecting the case where Public Action frames are using
Wildcard BSSID in the Address 3 field. This could result in GAS queries
being dropped. Fix this by allowing both the own address (= AP BSSID)
and Wildcard BSSID in Action frame Address 3 field.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoFix EAP state machine reset with offloaded roaming and authorization
Jouni Malinen [Wed, 10 Aug 2016 20:51:21 +0000 (23:51 +0300)]
Fix EAP state machine reset with offloaded roaming and authorization

If the driver indicates a roamed event with already completed
authorization, altAccept = TRUE could have resulted in the EAP state
machine ending up in the FAILURE state from the INITIALIZE state. This
is not correct behavior and similar cases were already addressed for FT
and WPA-PSK. Fix the offloaded roamed+authorized (EAP/PMKSA caching)
case by doing similar changes to EAPOL/EAP state variable updates during
association event handling.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agotests: Make ap_wps_er_http_proto more robust
Jouni Malinen [Thu, 11 Aug 2016 12:58:13 +0000 (15:58 +0300)]
tests: Make ap_wps_er_http_proto more robust

It looks like connect() for a TCP socket can time out at least with a
recent kernel. Handle that case more gracefully by ignoring that socket
while allowing the test to continue.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agotests: Make FST config tests more robust and easier to debug
Jouni Malinen [Wed, 10 Aug 2016 14:55:20 +0000 (17:55 +0300)]
tests: Make FST config tests more robust and easier to debug

It looks like it is possible for the separate started wpa_supplicant
process to remain running after a test case like fst_sta_config_default.
This would result in failures to run any following test case that uses
the wlan5 interface. Try to kill the process more thoroughly by waiting
for the PID file to show up and write more details into the logs to make
it easier to debug issues in this area.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoQCA vendor command to get hardware capabilities
Yingying Tang [Wed, 10 Aug 2016 13:49:46 +0000 (16:49 +0300)]
QCA vendor command to get hardware capabilities

This commit introduces a new vendor sub command
QCA_NL80211_VENDOR_SUBCMD_GET_HW_CAPABILITY and the associated
attributes to get Wi-Fi hardware capabilities.

Signed-off-by: Yingying Tang <yintang@qti.qualcomm.com>
7 years agoDefine an attribute QCA_WLAN_VENDOR_ATTR_CONFIG_QPOWER
Sunil Dutt [Tue, 9 Aug 2016 04:58:35 +0000 (10:28 +0530)]
Define an attribute QCA_WLAN_VENDOR_ATTR_CONFIG_QPOWER

This can be used to enable/disable QPOWER.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoAdd a require_message_authenticator configuration option
Nick Lowe [Tue, 26 Jul 2016 18:17:09 +0000 (19:17 +0100)]
Add a require_message_authenticator configuration option

This can be used to mandate the presence of the Message-Authenticator
attribute on CoA/Disconnect-Request packets.

Signed-off-by: Nick Lowe <nick.lowe@lugatech.com>
7 years agoroboswitch: Add support for BCM63xx
Jouke Witteveen [Thu, 28 Jul 2016 17:24:26 +0000 (19:24 +0200)]
roboswitch: Add support for BCM63xx

These devices do not properly identify themselves.

Signed-off-by: Jouke Witteveen <j.witteveen@gmail.com>
7 years agoutils: os_unix: Use access() for checking file existence
Rahul Bedarkar [Wed, 27 Jul 2016 16:47:53 +0000 (22:17 +0530)]
utils: os_unix: Use access() for checking file existence

Trying to open file for checking file existence seems to be too much.
Instead use access system call which is meant for the same.

Signed-off-by: Rahul Bedarkar <rahulbedarkar89@gmail.com>
7 years agomka: Fix use after free
Sabrina Dubroca [Tue, 19 Jul 2016 09:56:58 +0000 (11:56 +0200)]
mka: Fix use after free

We must cancel the timer when we delete an MKA instance.

Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
7 years agomka: Add check for body length when decoding peers
Sabrina Dubroca [Tue, 19 Jul 2016 09:56:57 +0000 (11:56 +0200)]
mka: Add check for body length when decoding peers

The standard says that the body length must be a multiple of 16B.

Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
7 years agomka: Avoid reading past the end of mka_body_handler
Sabrina Dubroca [Tue, 19 Jul 2016 09:56:56 +0000 (11:56 +0200)]
mka: Avoid reading past the end of mka_body_handler

body_type, used to index in mka_body_handler, can be any u8 value, but
we have only ARRAY_SIZE(mka_body_handler) elements.

Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
7 years agomka: Return u8 from get_mka_param_body_type()
Jouni Malinen [Sun, 7 Aug 2016 08:40:55 +0000 (11:40 +0300)]
mka: Return u8 from get_mka_param_body_type()

This uses a more accurate variable type for body_type and makes it
cleaner to compare this to other unsigned values.

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agomka: Add error handling around ieee802_1x_kay_move_live_peer()
Sabrina Dubroca [Tue, 19 Jul 2016 09:56:55 +0000 (11:56 +0200)]
mka: Add error handling around ieee802_1x_kay_move_live_peer()

ieee802_1x_kay_move_live_peer() can fail. In that case, we should not
proceed.

Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
7 years agomka: Avoid inconsistent state in ieee802_1x_kay_move_live_peer()
Sabrina Dubroca [Tue, 19 Jul 2016 09:56:54 +0000 (11:56 +0200)]
mka: Avoid inconsistent state in ieee802_1x_kay_move_live_peer()

If the memory allocation in ieee802_1x_kay_init_receive_sc() fails, we
end up in an inconsistent state where the peer is moved to the live
peers list and its sci is setup, but we don't have an rxsc.

Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
7 years agomka: Fix length when encoding SAK-use
Sabrina Dubroca [Tue, 19 Jul 2016 09:56:53 +0000 (11:56 +0200)]
mka: Fix length when encoding SAK-use

The room we actually use is length. This could also mess up the
receiver, since it will advance by the actual length (as indicated by
the parameter body's length), which could differ from the offset at
which we stored the next item.

Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
7 years agomka: Fix memory leak in ieee802_1x_kay_create_live_peer() error path
Sabrina Dubroca [Tue, 19 Jul 2016 09:56:52 +0000 (11:56 +0200)]
mka: Fix memory leak in ieee802_1x_kay_create_live_peer() error path

Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
7 years agomka: Fix multiple key server election bugs
Sabrina Dubroca [Tue, 19 Jul 2016 09:56:51 +0000 (11:56 +0200)]
mka: Fix multiple key server election bugs

1. The comparison between SCI's of two servers with identical priority
   is broken, and would always return TRUE. Just use os_memcmp(), which
   provides the ordering we need.

2. If no peer can be key server but this instance can, then become the
   key server.

3. The ordering of blocks between peer as key server and ourself as key
   server overwrites settings. Simple reordering fixes this.

4. Default to being the key server, so that we advertise our ability in
   the MKPDUs we send. That's the only way peers can know we can be key
   server. Cleared automatically as soon as we find a better peer.

Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
7 years agobinder: Clang format the source code
Roshan Pius [Thu, 7 Jul 2016 16:48:58 +0000 (09:48 -0700)]
binder: Clang format the source code

Add a ".clang-format" file which is pretty close to the rest of
wpa_supplicant code base and reformat the binder codebase.

Signed-off-by: Roshan Pius <rpius@google.com>
7 years agobinder: Expose an aidl interface module
Roshan Pius [Thu, 7 Jul 2016 16:48:00 +0000 (09:48 -0700)]
binder: Expose an aidl interface module

Restructure the binder related makefile sections to expose a separate
|libwpa_binder_interface| which can be imported by clients/tests.

While there,
Change the name of the binder service to the name used in the selinux
permissions.

Signed-off-by: Roshan Pius <rpius@google.com>
7 years agoLink to, and adjust types for, the PCSC framework included with OSX
Arran Cudbard-Bell [Sat, 2 Jul 2016 19:57:39 +0000 (15:57 -0400)]
Link to, and adjust types for, the PCSC framework included with OSX

Signed-off-by: Arran Cudbard-Bell <a.cudbardb@freeradius.org>
7 years agoap: Use is_broadcast_ether_addr()
Johannes Berg [Fri, 5 Aug 2016 11:31:54 +0000 (13:31 +0200)]
ap: Use is_broadcast_ether_addr()

There's no need to have a separate variable and open-code a more
complicated version of this, just use is_broadcast_ether_addr().

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
7 years agocli: Share a common tokenize_cmd() implementation
Jouni Malinen [Sat, 6 Aug 2016 09:46:39 +0000 (12:46 +0300)]
cli: Share a common tokenize_cmd() implementation

wpa_cli and hostapd_cli had identical copies of this function.

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agowpa_cli: Replace str_match() with common str_starts()
Jouni Malinen [Sat, 6 Aug 2016 09:44:51 +0000 (12:44 +0300)]
wpa_cli: Replace str_match() with common str_starts()

str_match() was identical in behavior to str_starts().

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agocli: Share a common write_cmd() implementation
Jouni Malinen [Sat, 6 Aug 2016 09:41:56 +0000 (12:41 +0300)]
cli: Share a common write_cmd() implementation

wpa_cli and hostapd_cli had identical copies of this function.

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agocli: Share a common get_cmd_arg_num() implementation
Jouni Malinen [Sat, 6 Aug 2016 09:39:56 +0000 (12:39 +0300)]
cli: Share a common get_cmd_arg_num() implementation

wpa_cli and hostapd_cli had identical copies of this function.

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agoShare a single str_starts() implementation
Jouni Malinen [Sat, 6 Aug 2016 09:38:21 +0000 (12:38 +0300)]
Share a single str_starts() implementation

No need to define this as a static function in multiple files.

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agoUse a common license string for hostapd_cli and wpa_cli
Mikael Kanstrup [Thu, 7 Jul 2016 12:04:38 +0000 (14:04 +0200)]
Use a common license string for hostapd_cli and wpa_cli

Move the license strings for hostapd_cli and wpa_cli to common.

Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
7 years agohostapd_cli: Completion for interface command
Mikael Kanstrup [Thu, 7 Jul 2016 12:04:37 +0000 (14:04 +0200)]
hostapd_cli: Completion for interface command

Implement command completion for interface command

Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
7 years agohostapd_cli: Completion for disassociate and deauthenticate
Mikael Kanstrup [Thu, 7 Jul 2016 12:04:36 +0000 (14:04 +0200)]
hostapd_cli: Completion for disassociate and deauthenticate

Command completion routine for disassociate and deauthenticate
commands implemented. Tracks AP-STA-CONNECTED/AP-STA-DISCONNECTED
events for easy station MAC address lookup.

Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
7 years agohostapd_cli: Implement event handler
Mikael Kanstrup [Thu, 7 Jul 2016 12:04:35 +0000 (14:04 +0200)]
hostapd_cli: Implement event handler

Add an empty event handler in preparation for additional command
completion routines that will need to dynamically build parameters
based on events received.

Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
7 years agoMove parts of wpa_cli to a new common file
Mikael Kanstrup [Thu, 7 Jul 2016 12:04:34 +0000 (14:04 +0200)]
Move parts of wpa_cli to a new common file

In preparation for adding further command completion support
to hostapd_cli move some cli related utility functions out of
wpa_cli into a new common cli file.

Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
7 years agohostapd_cli: Add completion for help command
Mikael Kanstrup [Thu, 7 Jul 2016 12:04:33 +0000 (14:04 +0200)]
hostapd_cli: Add completion for help command

Implement command completion support for help command.

Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
7 years agohostapd_cli: Replace static usage string with print_help() function
Mikael Kanstrup [Thu, 7 Jul 2016 12:04:32 +0000 (14:04 +0200)]
hostapd_cli: Replace static usage string with print_help() function

Replace the static commands usage string with a print_help() function
that reads commands and help text from the array of defined cli
commands.

Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
7 years agohostapd_cli: Add command completion support
Mikael Kanstrup [Thu, 7 Jul 2016 12:04:31 +0000 (14:04 +0200)]
hostapd_cli: Add command completion support

Add command completion support for hostapd_cli. Only completion
for available commands and basic building blocks in preparation for
per command parameter completion.

Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
7 years agowpa_cli: Implement completion routine for get_capability
Mikael Kanstrup [Thu, 7 Jul 2016 12:04:30 +0000 (14:04 +0200)]
wpa_cli: Implement completion routine for get_capability

Add command completion routine for get_capability command.

Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
7 years agoDefine an attribute QCA_WLAN_VENDOR_ATTR_CONFIG_IFINDEX
Sunil Dutt [Thu, 4 Aug 2016 16:52:21 +0000 (22:22 +0530)]
Define an attribute QCA_WLAN_VENDOR_ATTR_CONFIG_IFINDEX

This can be used to set the configuration parameters per netdev (instead
of wiphy).

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoDefine vendor command to support IE based access control
Sunil Dutt [Thu, 4 Aug 2016 10:01:31 +0000 (15:31 +0530)]
Define vendor command to support IE based access control

This commit defines QCA vendor subcommand and attributes for IE based
access control, i.e., the specific configured IE (full IE) is matched
with the frames originated by the Wi-Fi STA / AP to accept or deny the
connection. A specific IE can either be a whitelist or blacklist.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoQCA vendor command to configure GPIO pins
Vikram Kandukuri [Mon, 1 Aug 2016 17:17:35 +0000 (22:47 +0530)]
QCA vendor command to configure GPIO pins

This commit introduces a new vendor sub command
QCA_NL80211_VENDOR_SUBCMD_GPIO_CONFIG_COMMAND and associated
attributes to configure GPIO pins.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoAssign QCA vendor attributes for generic commands
Vikram Kandukuri [Mon, 1 Aug 2016 17:00:39 +0000 (22:30 +0530)]
Assign QCA vendor attributes for generic commands

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoP2P: Fix D-Bus persistent parameter in group started event
Jouni Malinen [Tue, 2 Aug 2016 20:47:38 +0000 (23:47 +0300)]
P2P: Fix D-Bus persistent parameter in group started event

wpas_p2p_persistent_group() returns non-zero for persistent groups. This
value happens to be 2 instead of 1 due to the
P2P_GROUP_CAPAB_PERSISTENT_GROUP value. This ended up with D-Bus code
trying to encode 2 as a DBUS_TYPE_BOOLEAN value which results in an
assert from the library. Fix this by modifying
wpas_p2p_persistent_group() to return 0 or 1 instead of 0 or an
arbitrary non-zero.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoSet default scan IEs to the driver (QCA vendor extension)
vamsi krishna [Tue, 19 Jul 2016 07:11:15 +0000 (12:41 +0530)]
Set default scan IEs to the driver (QCA vendor extension)

This makes wpa_supplicant set default scan IEs to the driver (if the
vendor command is supported). The driver can use these IEs in the scan
requests initiated by the driver itself. Also the driver can merge these
IEs into further scan requests that it receives, in case if the scan
request doesn't carry any of the IEs sent in this command.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoFix a typo in QCA vendor attribution documentation
Jouni Malinen [Tue, 2 Aug 2016 18:11:25 +0000 (21:11 +0300)]
Fix a typo in QCA vendor attribution documentation

The previously used subcommand names in the comment did not match the
ones defined above.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoDefine QCA vendor config attribute to set default scan IEs to the driver
vamsi krishna [Tue, 2 Aug 2016 16:45:56 +0000 (22:15 +0530)]
Define QCA vendor config attribute to set default scan IEs to the driver

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agotests: HT/VHT values in STATUS
Jouni Malinen [Tue, 2 Aug 2016 14:43:38 +0000 (17:43 +0300)]
tests: HT/VHT values in STATUS

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agotests: WEP with HT/VHT
Jouni Malinen [Tue, 2 Aug 2016 14:42:47 +0000 (17:42 +0300)]
tests: WEP with HT/VHT

Verify that HT/VHT gets disabled in WEP configuration.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoShow disabled HT/VHT properly in AP mode STATUS command
Jouni Malinen [Tue, 2 Aug 2016 14:41:01 +0000 (17:41 +0300)]
Show disabled HT/VHT properly in AP mode STATUS command

Previously, HT/VHT state was shown in STATUS based on the configuration
parameter instead of the runtime operational parameters. This could
result in claiming HT/VHT to be enabled even when it was forced to be
disabled due to an incompatible configuration. Clear HT/VHT information
in the STATUS output if HT/VHT has been disabled.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoAP: Disable VHT in WEP configuration
Wu Gao [Tue, 2 Aug 2016 14:31:48 +0000 (17:31 +0300)]
AP: Disable VHT in WEP configuration

This was already done for HT, but VHT has the same constraint on not
allowing WEP.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agodoc: Correct spelling mistake
Rahul Bedarkar [Mon, 25 Jul 2016 18:23:01 +0000 (23:53 +0530)]
doc: Correct spelling mistake

s/availibility/availability

Signed-off-by: Rahul Bedarkar <rahulbedarkar89@gmail.com>
7 years agonl80211: Fix segfault when params->freq is NULL for AP mode start
Chaitanya T K [Thu, 14 Jul 2016 16:50:40 +0000 (22:20 +0530)]
nl80211: Fix segfault when params->freq is NULL for AP mode start

If params->freq is NULL here, it leads to a segfault. Do not initialize
bss->bandwidth if params->freq is NULL.

Signed-off-by: Chaitanya T K <Chaitanya.Mgit@gmail.com>
7 years agomesh: Remove HT IEs if HT is disabled
Masashi Honma [Thu, 21 Jul 2016 23:52:55 +0000 (08:52 +0900)]
mesh: Remove HT IEs if HT is disabled

Previously, HT capability IE and HT information IE were included in
Beacon and Mesh Peering Open/Confirm frames even if HT is disabled with
disable_ht=1. This patch removes these.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
7 years agomesh: Make DTIM period configurable
Masashi Honma [Fri, 8 Jul 2016 05:42:48 +0000 (14:42 +0900)]
mesh: Make DTIM period configurable

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
7 years agomesh: Stop joining to different frequency network
Masashi Honma [Fri, 8 Jul 2016 02:39:13 +0000 (11:39 +0900)]
mesh: Stop joining to different frequency network

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
7 years agomesh: Join an existing MBSS instead of creating a new one
Masashi Honma [Fri, 8 Jul 2016 02:39:12 +0000 (11:39 +0900)]
mesh: Join an existing MBSS instead of creating a new one

If scan results show a matching existing MBSS, join it instead of
creating a new MBSS.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
7 years agogitignore static library files
Mikael Kanstrup [Thu, 7 Jul 2016 12:09:07 +0000 (14:09 +0200)]
gitignore static library files

Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
7 years agoP2Ps: Clear existing value when peer stops sending adv_service_instance
Nishant Chaprana [Tue, 5 Jul 2016 09:41:45 +0000 (15:11 +0530)]
P2Ps: Clear existing value when peer stops sending adv_service_instance

If a peer stops sending adv_service_instance, we should clear the
existing dev->info.p2ps_instance.

This commit fixes the following scenario:

When peer device stops sending adv_service_instance, wpa_supplicant did
not remove old dev->info.p2ps_instance from device's property. This
variable should be updated as per peer behavior and should be cleared
when peer stops sending this information.

Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
7 years agotests: DRIVER_FLAGS command
Jouni Malinen [Sat, 23 Jul 2016 17:51:55 +0000 (20:51 +0300)]
tests: DRIVER_FLAGS command

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agoMake driver flags available through control interface
Erik Ljungberg [Mon, 4 Jul 2016 09:25:39 +0000 (11:25 +0200)]
Make driver flags available through control interface

This shows the current set of driver flags in wpa_cli and hostapd_cli.

Signed-off-by: Erik Ljungberg <erik.ljungberg@sonymobile.com>
7 years agoP2P: Cleanup by removing unnecessary os_free() call from p2p_deinit()
MAYANK HAARIT [Mon, 4 Jul 2016 05:12:39 +0000 (05:12 +0000)]
P2P: Cleanup by removing unnecessary os_free() call from p2p_deinit()

Remove the unnecessary os_free() call from p2p_deinit() since
p2p_flush() called just above this takes care of freeing
p2p->after_scan_tx and the second call here ends up being no-op
os_free(NULL) in practice.

Signed-off-by: Mayank Haarit <mayank.h@samsung.com>
7 years agomesh: Report mesh peer AID to kernel
Masashi Honma [Fri, 1 Jul 2016 01:22:39 +0000 (10:22 +0900)]
mesh: Report mesh peer AID to kernel

Previously, mesh power management functionality works only with kernel
MPM. Because user space MPM did not report mesh peer AID to kernel,
the kernel could not identify the bit in TIM element. So this patch
reports mesh peer AID to kernel.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
7 years agoSync with mac80211-next.git include/uapi/linux/nl80211.h
Jouni Malinen [Sat, 23 Jul 2016 17:25:28 +0000 (20:25 +0300)]
Sync with mac80211-next.git include/uapi/linux/nl80211.h

This brings in nl80211 definitions as of 2016-07-01.

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agoAssign QCA vendor attribute for setting TX fail count threshold
Sunil Dutt [Fri, 22 Jul 2016 15:22:29 +0000 (20:52 +0530)]
Assign QCA vendor attribute for setting TX fail count threshold

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoAssign QCA vendor attributes for set retry configuration
zhangq [Thu, 30 Jun 2016 02:59:21 +0000 (10:59 +0800)]
Assign QCA vendor attributes for set retry configuration

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoQCA vendor command to configure conditional switch channel for AP
Chandrasekaran, Manishekar [Mon, 18 Jul 2016 12:29:43 +0000 (17:59 +0530)]
QCA vendor command to configure conditional switch channel for AP

This commit introduces a new vendor sub command
QCA_NL80211_VENDOR_SUBCMD_SAP_CONDITIONAL_CHAN_SWITCH and associated
attributes which aim to configure selected frequencies on which the AP
can conditionally switch onto for preferred operation.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agoMBO: Remove unused assignment
Jouni Malinen [Mon, 18 Jul 2016 20:41:19 +0000 (23:41 +0300)]
MBO: Remove unused assignment

The local found variable is not used in this case. Commit
653d227e9f40cad1114c1c96654061446fd8b131 ('MBO: Improve supported
operating class generation') introduced this variable and unnecessarily
set it here. Remove the write-only assignment to silence static
analyzers.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
7 years agotests: WPA2-PSK AP with station using SA Query local failures
Jouni Malinen [Sun, 17 Jul 2016 21:58:27 +0000 (00:58 +0300)]
tests: WPA2-PSK AP with station using SA Query local failures

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agoSME: Fix SA Query local failure handling
Jouni Malinen [Sun, 17 Jul 2016 21:57:34 +0000 (00:57 +0300)]
SME: Fix SA Query local failure handling

If no new sme_sa_query_timer() callback is scheculed,
sme_stop_sa_query() needs to be called to allow new SA Query operations
to be started after the failure.

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agoClear wpa_s->sme.last_unprot_disconnect.sec on FLUSH command
Jouni Malinen [Sun, 17 Jul 2016 21:56:53 +0000 (00:56 +0300)]
Clear wpa_s->sme.last_unprot_disconnect.sec on FLUSH command

This is needed for hwsim test cases to allow multiple STA-initiated SA
Query operations in short amount of time.

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: Overlapping BSS scan request (HT40+)
Jouni Malinen [Sun, 17 Jul 2016 21:14:34 +0000 (00:14 +0300)]
tests: Overlapping BSS scan request (HT40+)

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: FT OOM in SME
Jouni Malinen [Sun, 17 Jul 2016 21:14:14 +0000 (00:14 +0300)]
tests: FT OOM in SME

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: AP with open mode and driver operations failing
Jouni Malinen [Sun, 17 Jul 2016 20:49:44 +0000 (23:49 +0300)]
tests: AP with open mode and driver operations failing

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: SAE and invalid anti-clogging token request
Jouni Malinen [Sun, 17 Jul 2016 14:53:25 +0000 (17:53 +0300)]
tests: SAE and invalid anti-clogging token request

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: IEEE 802.1X connection using dynamic WEP104 when WPA enabled
Jouni Malinen [Sun, 17 Jul 2016 08:29:42 +0000 (11:29 +0300)]
tests: IEEE 802.1X connection using dynamic WEP104 when WPA enabled

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: IEEE 802.1X connection with LEAP included in configuration
Jouni Malinen [Sun, 17 Jul 2016 08:22:04 +0000 (11:22 +0300)]
tests: IEEE 802.1X connection with LEAP included in configuration

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: More SAE OOM coverage
Jouni Malinen [Sun, 17 Jul 2016 08:15:59 +0000 (11:15 +0300)]
tests: More SAE OOM coverage

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: Hotspot 2.0 OSU provider and OOM
Jouni Malinen [Fri, 15 Jul 2016 10:26:11 +0000 (13:26 +0300)]
tests: Hotspot 2.0 OSU provider and OOM

Signed-off-by: Jouni Malinen <j@w1.fi>
7 years agotests: Hotspot 2.0 OSU provider and invalid directory
Jouni Malinen [Fri, 15 Jul 2016 10:21:41 +0000 (13:21 +0300)]
tests: Hotspot 2.0 OSU provider and invalid directory

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