Andrei Otcheretianski [Thu, 14 Nov 2013 10:28:32 +0000 (12:28 +0200)]
Add chan_switch to ctrl interface of wpa_supplicant and hostapd
Add chan_switch to the control interface of wpa_supplicant and hostapd,
and also to wpa_cli and hostapd_cli.
Signed-hostap: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Andrei Otcheretianski [Thu, 14 Nov 2013 10:28:31 +0000 (12:28 +0200)]
Add AP channel switch mechanism
Build CSA settings and call the driver to perform the switch. Construct
Beacon, Probe Response, and (Re)Association Response frames both for CSA
period and for the new channel. These frames are built based on the
current configuration. Add CSA IE in Beacon and Probe Response frames.
Signed-hostap: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Andrei Otcheretianski [Thu, 14 Nov 2013 10:28:31 +0000 (12:28 +0200)]
Move AP parameter filling into a helper function
Signed-hostap: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Andrei Otcheretianski [Thu, 14 Nov 2013 10:28:30 +0000 (12:28 +0200)]
nl80211: Add channel switch implementation
Implement nl80211 switch_channel() operation.
Publish flags indicating kernel support for channel switch.
Signed-hostap: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Andrei Otcheretianski [Thu, 14 Nov 2013 10:28:29 +0000 (12:28 +0200)]
wpa_supplicant: Update channel switch driver interface
Add csa_settings struct which holds parameters for CSA. Change driver
interface for switch_channel(), so that it will receive this struct and
not only the new frequency as it was before. This allows wpa_supplicant
to provide all the required parameters (beacons, proberesp, assocresp,
CSA IE) which are required by cfg80211 implementation.
Signed-hostap: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Jouni Malinen [Sun, 17 Nov 2013 13:51:28 +0000 (15:51 +0200)]
eloop: Remove eloop_none.c
This was supposed to be a minimal sample of eloop wrapper, but it is
unclear whether this is of that much use and the file has not been kept
up-to-date. Remove this file to reduce maintenance effort. The other
eloop*.c files can be used as a starting point if something new is
needed.
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 17 Nov 2013 10:30:44 +0000 (12:30 +0200)]
Sync with wireless-testing.git include/uapi/linux/nl80211.h
Signed-hostap: Jouni Malinen <j@w1.fi>
Dmitry Shmidt [Mon, 11 Nov 2013 20:52:59 +0000 (12:52 -0800)]
Android: Add state message sent after 'status' command
This triggers re-transmission of CTRL-EVENT-STATE-CHANGE and
CTRL-EVENT-CONNECTED events on STATUS command for Android framework
specific processing.
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Dmitry Shmidt [Mon, 11 Nov 2013 20:25:17 +0000 (12:25 -0800)]
Android: Add SSID in supplicant change event
In addition, change wpa_s->pending_bssid to wpa_s->bssid for the BSSID
value in the event.
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Masashi Honma [Sun, 17 Nov 2013 10:17:09 +0000 (12:17 +0200)]
SCARD: Clean up SIM/USIM selection
Commit
eb324600295a570199a5e25eb64e60781a04fb74 left an unneeded
sim_type argument to scard_init(). Remove that unnecessary argument to
clean up the implementation.
Signed-hostap: Masashi Honma <masashi.honma@gmail.com>
Paul Stewart [Mon, 11 Nov 2013 20:13:55 +0000 (12:13 -0800)]
dbus_new: Add DBus TDLS methods
Add DBus methods for TDLS operations similar to those available
for the control interface. This includes Discover, Setup, and
Teardown commands. While here, add a method to query the TDLS
link status and add a DBus method for it.
Tested with CONFIG_TDLS enabled, on a TDLS-enabled host and
peer capable of TDLS:
dbus-send --system --dest=fi.w1.wpa_supplicant1 --print-reply \
/fi/w1/wpa_supplicant1/Interfaces/0 \
fi.w1.wpa_supplicant1.Interface.TDLSStatus string:<peer-mac-address>
yields: string "peer does not exist"
dbus-send --system --dest=fi.w1.wpa_supplicant1 --print-reply \
/fi/w1/wpa_supplicant1/Interfaces/0 \
fi.w1.wpa_supplicant1.Interface.TDLSDiscover string:<peer-mac-address>
yields no error
dbus-send --system --dest=fi.w1.wpa_supplicant1 --print-reply \
/fi/w1/wpa_supplicant1/Interfaces/0 \
fi.w1.wpa_supplicant1.Interface.TDLSSetup string:<peer-mac-address>
yields no error
dbus-send --system --dest=fi.w1.wpa_supplicant1 --print-reply \
/fi/w1/wpa_supplicant1/Interfaces/0 \
fi.w1.wpa_supplicant1.Interface.TDLSStatus string:<peer-mac-address>
yields: string "connected" after TDLS completes
dbus-send --system --dest=fi.w1.wpa_supplicant1 --print-reply \
/fi/w1/wpa_supplicant1/Interfaces/0 \
fi.w1.wpa_supplicant1.Interface.TDLSTeardown string:<peer-mac-address>
yields no error
dbus-send --system --dest=fi.w1.wpa_supplicant1 --print-reply \
/fi/w1/wpa_supplicant1/Interfaces/0 \
fi.w1.wpa_supplicant1.Interface.TDLSStatus string:<peer-mac-address>
yields: string "peer not connected"
Signed-hostap: Paul Stewart <pstew@chromium.org>
Jithu Jance [Sun, 17 Nov 2013 10:23:09 +0000 (12:23 +0200)]
Request new scan only for the original interface
Request new scan only for the interface for which the original scan
request and results has come. Otherwise while sharing scan results along
with P2P interfaces, the new scan will be requested on P2P interfaces.
Signed-hostap: Jithu Jance <jithu@broadcom.com>
Jouni Malinen [Sun, 17 Nov 2013 10:52:08 +0000 (12:52 +0200)]
Remove old mechanism of skipping scan request rescheduling
Since eloop_deplete_timeout() is doing practically same in
wpa_supplicant_req_scan(), revert the old mechanism from commit
7e1488494e0150ee7fdef83355266b5633c5c1b0 to avoid unnecessary work in
this function.
Signed-hostap: Jouni Malinen <j@w1.fi>
Dmitry Shmidt [Mon, 11 Nov 2013 19:13:17 +0000 (11:13 -0800)]
Deplete scan request if new time is less than remaining
This avoids pushing out previous scheduled scan requests based on new
events.
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Johannes Berg [Mon, 11 Nov 2013 16:19:33 +0000 (17:19 +0100)]
hwsim tests: Print failed tests nicer
There's no reason to format the failed tests as a python
list, just print a (space-separated) list of test names.
Signed-hostap: Johannes Berg <johannes.berg@intel.com>
Vinay Krishna Eranna [Mon, 11 Nov 2013 08:03:54 +0000 (13:33 +0530)]
P2P: Use negotiated channel from invitation for persistent GO
During persistent group re-invocation, GO may end up using a different
channel as the operation channel compared to what was indicated in the
invitation frames. This may break the connection if the peer device ends
up scanning the GO only on the channel from the invitation frame. Fix
this by using the negotiated channel (if available) on the GO as the
operating channel instead of the channel that was provided in the
p2p_invite command to start negotiation.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Sunil Dutt [Wed, 13 Nov 2013 11:35:44 +0000 (17:05 +0530)]
TDLS: Provide external control to specify the peers for setup
There are use cases requesting the host driver to initiate the TDLS
setup with the peer only when configured by the external applications.
Thus, enable this control by tdls_external_control=1 and pass the
requisite information for the specific TDLS operation to the driver
on the request from such use cases.
This operation mode expects the driver to initiate TDLS link
automatically based on signal strength and traffic to a peer and tear
down links whenever they are not used or suitable due to signal strength
etc. The list of peers with which such operations are to be performed
are provided with the TDLS driver operations.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Abhishek Singh [Wed, 13 Nov 2013 12:00:27 +0000 (17:30 +0530)]
hostapd: Filter channel list updated events after country code change
We were not filtering the EVENT_CHANNEL_LIST_CHANGED events based on the
regulatory hint initiator. So wait for EVENT_CHANNEL_LIST_CHANGED event
after our own change was triggered even when regulatory hint initiator
was the driver. This could result in the wait for the channel list to be
updated to be terminated before the real change has occurred and as
such, old channel list remaining in use when configuring
hostapd/wpa_supplicant country parameter. Fix this by filtering the
hints according to the initiator and only regulatory hints initiated by
user will be used to stop the wait.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Sat, 9 Nov 2013 15:33:23 +0000 (17:33 +0200)]
nl80211: Do not force interface down on deinit
If wpa_supplicant or hostapd was started with the interface
already up, do not force interface down on deinit.
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sat, 9 Nov 2013 15:29:32 +0000 (17:29 +0200)]
nl80211: Do not for station mode on hostapd deinit
If hostapd was started with the interface already in AP mode, leave the
interface in AP mode on deinit instead of unconditionally forcing it to
station mode.
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sat, 9 Nov 2013 15:22:49 +0000 (17:22 +0200)]
nl80211: Remove build time condition on HOSTAPD define
It is common to build wpa_supplicant with AP mode support and it is
justifiable to clean up driver_nl80211.c by removing the conditional
build blocks based on hostapd vs. wpa_supplicant builds.
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sat, 9 Nov 2013 14:18:39 +0000 (16:18 +0200)]
nl80211: Share more code between hostapd and wpa_supplicant
This gets rid of some ifdef HOSTAPD constructs and shares more
of the initialization code between hostapd and wpa_supplicant.
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sat, 9 Nov 2013 15:02:05 +0000 (17:02 +0200)]
nl80211: Remove read-only last_freq/last_freq_ht
These variables were originally used in hostapd to clear HT channel
information when exiting. However, that functionality was lost with
commit
f019981aee20f53d29ee1079973e609517d6d7e6 when moving to a common
code for setting the channel. Taken into account that no one seems to
have missed this functionality over the last four years, it seems safe
to drop this rather than try to fix the old hostapd behavior.
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sat, 9 Nov 2013 13:40:06 +0000 (15:40 +0200)]
tests: Do not override existing .config from build.sh
This allows the build.sh script to be used to rebuild binaries based on
existing configuration in addition to the initial case of preparing
suitable build configuration.
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sat, 9 Nov 2013 13:34:29 +0000 (15:34 +0200)]
tests: Remove duplicated mkdir for LOGDIR
LOGDIR directory is created automatically if LOGDIR variable was not
set. If the variable is set, that directory is expected to exist.
Signed-hostap: Jouni Malinen <j@w1.fi>
Michal Kazior [Fri, 8 Nov 2013 07:13:14 +0000 (08:13 +0100)]
tests: Use proper admin group in start.sh
wpa_supplicant configuration files had a hardcoded GROUP=admin. The
start.sh script failed on a system without admin group (some systems
have it named adm).
Generate configuration files with appropriate GROUP in the log dir
and use them.
Signed-hostap: Michal Kazior <michal.kazior@tieto.com>
Dmitry Shmidt [Sat, 9 Nov 2013 13:30:46 +0000 (15:30 +0200)]
Android: Reset MD5OBJS value before += operation
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Jouni Malinen [Fri, 8 Nov 2013 11:05:55 +0000 (13:05 +0200)]
Android: Sync Android.mk with Makefile
This brings in commit
0648c3b8f5c38bc2206758738278e074f6f5b11b changes
to add Linux tracing option for hostapd.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Fri, 8 Nov 2013 11:00:32 +0000 (13:00 +0200)]
Android: Sync Android.mk with Makefile
This brings in commit
fd2f2d0489635d590930bc0945fbc438ba1387e2 changes
to remove optional gnutls-extra dependency.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Fri, 8 Nov 2013 10:57:19 +0000 (12:57 +0200)]
Android: Sync Android.mk with Makefile
This brings in commit
411f56705019ac5b13b4daf62f423fceb3c703e2 changes
to allow libdl to be linked in after OpenSSL.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Dmitry Shmidt [Fri, 8 Nov 2013 02:17:26 +0000 (18:17 -0800)]
Android: Set proper path to keystore include dir
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Dmitry Shmidt [Fri, 8 Nov 2013 02:06:28 +0000 (18:06 -0800)]
Android: Add CONFIG_ACS option to makefile
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Dmitry Shmidt [Fri, 8 Nov 2013 02:01:25 +0000 (18:01 -0800)]
Android: Fix CONFIG_EAP_PROXY option and move it to right place
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Dmitry Shmidt [Fri, 8 Nov 2013 01:57:52 +0000 (17:57 -0800)]
Android: Add CONFIG_IEEE80211AC option to makefile
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Dmitry Shmidt [Fri, 8 Nov 2013 01:54:48 +0000 (17:54 -0800)]
Android: Add CONFIG_EAP_UNAUTH_TLS option to makefile
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Ying Wang [Thu, 7 Nov 2013 23:09:36 +0000 (15:09 -0800)]
Android: Add liblog
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Kenny Root [Thu, 7 Nov 2013 23:06:59 +0000 (15:06 -0800)]
Android: Switch keystore to binder
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Joe Onorato [Tue, 22 May 2012 21:16:30 +0000 (14:16 -0700)]
Android: Get rid of LOCAL_MODULE_TAGS := user
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Kenny Root [Tue, 20 Mar 2012 20:05:25 +0000 (13:05 -0700)]
Android: Restore OpenSSL ENGINE support
We now use an OpenSSL ENGINE to support keystore functionality.
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Kenny Root [Wed, 26 Jun 2013 21:57:31 +0000 (14:57 -0700)]
Android: Remove obsolete keystore path
It's not possible to get a raw private key from keystore anymore, so
this would fail every time anyway. Remove it so it doesn't confuse
anyone that looks at this code.
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Kenny Root [Wed, 21 Mar 2012 00:00:47 +0000 (17:00 -0700)]
Android: Use keystore ENGINE for private key operations
The new keystore ENGINE is usable to perform private key operations when
we can't get the actual private key data. This is the case when hardware
crypto is enabled: the private key never leaves the hardware.
Subsequently, we need to be able to talk to OpenSSL ENGINEs that aren't
PKCS#11 or OpenSC. This just changes a few #define variables to allow us
to talk to our keystore engine without having one of those enabled and
without using a PIN.
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Nick Kralevich [Thu, 28 Feb 2013 21:55:41 +0000 (13:55 -0800)]
Android: Use correct header file path for capability.h
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Jouni Malinen [Thu, 7 Nov 2013 22:26:16 +0000 (00:26 +0200)]
tests: Verify GAS query while associated
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Thu, 7 Nov 2013 22:15:17 +0000 (00:15 +0200)]
tests: Verify GAS fragmentation
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Thu, 7 Nov 2013 21:54:13 +0000 (23:54 +0200)]
tests: Use only new scan results for Hotspot 2.0 test cases
It looks like old scan results (different SSID for the same BSSID) could
cause test failures.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Kyeyoon Park [Wed, 6 Nov 2013 21:20:28 +0000 (13:20 -0800)]
GAS: Replenish AP station session timer to 5 seconds
If remaining AP session timeout is less than 5 seconds
for an existing station, replenish the timeout to 5 seconds.
This allows stations to be able to recycle a dialog token
value beyond 5 seconds for GAS exchange.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Kyeyoon Park [Wed, 6 Nov 2013 08:11:35 +0000 (00:11 -0800)]
eloop: Add support for replenishing a registered timeout
eloop_replenish_timeout() finds a registered matching
<handler,eloop_data,user_data> timeout. If found, replenishes
the timeout if remaining time is less than the requested time.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Dmitry Shmidt [Thu, 7 Nov 2013 21:57:59 +0000 (23:57 +0200)]
Android: Remove obsolete WPA_UNICODE_SSID define
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Jeff Johnson [Tue, 4 Sep 2012 05:12:17 +0000 (22:12 -0700)]
hostapd: Allow hostapd_cli to work on Android
Add definitions of the Android specific directories used for control
interface sockets so that hostapd_cli can connect to the Android
hostapd.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Thu, 7 Nov 2013 14:02:23 +0000 (16:02 +0200)]
nl80211: Work around nl_socket_set_nonblocking on Android
system/core/libnl_2 does not include nl_socket_set_nonblocking(), so
need to implement that to fix the build.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Paul Stewart [Wed, 4 Sep 2013 15:59:52 +0000 (08:59 -0700)]
hostapd: Add option to send OBSS scan params
Add a parameter to send the overlapping BSS scan parameter
information element. This will require clients to perform
background scans to check for neigbors overlapping this
HT40 BSS. Since the implementation is incomplete it should
only be used for testing.
Signed-hostap: Paul Stewart <pstew@chromium.org>
Dmitry Shmidt [Mon, 11 Jun 2012 19:51:06 +0000 (12:51 -0700)]
Android: Fix compilation without BOARD_WPA_SUPPLICANT_DRIVER
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Dmitry Shmidt [Wed, 6 Nov 2013 02:08:27 +0000 (18:08 -0800)]
Prohibit PNO start during assoc process and in connect state
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Dmitry Shmidt [Wed, 6 Nov 2013 01:07:56 +0000 (17:07 -0800)]
Android: Add ANDROID_P2P define under BOARD_WLAN_DEVICE
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Dmitry Shmidt [Wed, 6 Nov 2013 00:45:35 +0000 (16:45 -0800)]
Android: Fix CFLAGS -> L_CFLAGS
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Johannes Berg [Wed, 6 Nov 2013 13:11:17 +0000 (14:11 +0100)]
hwsim tests: Make channel configuration for VM tests easier
Add a CHANNELS configuration to the script running the VM
that can be added to the vm-config file to allow running
the tests with hwsim devices supporting more than a single
channel.
Eventually, with the (hopefully) upcoming dynamic work in
mac80211_hwsim, this might go away entirely, but for now
this allows testing more code paths.
Signed-hostap: Johannes Berg <johannes.berg@intel.com>
Jouni Malinen [Sat, 7 Sep 2013 22:42:53 +0000 (15:42 -0700)]
P2P: Allow GO P2P Device Address to be used for scan result matching
This is a better way of matching P2P groups based on the unique P2P
Device Address (e.g., from P2P Group ID) and SSID pair instead of using
the not necessarily unique P2P Interface Address.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Sun, 8 Sep 2013 00:36:43 +0000 (17:36 -0700)]
P2P: Add debug print of P2P Group ID SSID
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Sun, 8 Sep 2013 15:09:38 +0000 (08:09 -0700)]
WPS NFC: Add more debug for NFC Password Token matching
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Sat, 7 Sep 2013 23:59:24 +0000 (16:59 -0700)]
WPS NFC: Add debug log entry on OOB Dev Pw attribute addition
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Wed, 6 Nov 2013 22:17:48 +0000 (00:17 +0200)]
Interworking: Use SSID from the BSS entry
There is no need to parse the IE buffer again to find the SSID of the
BSS since that information is already stored in struct wpa_bss.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Wed, 6 Nov 2013 22:09:57 +0000 (00:09 +0200)]
tests: Verify disallow_aps with Interworking
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Wed, 6 Nov 2013 22:01:48 +0000 (00:01 +0200)]
Interworking: Reject BSS based on disallow_aps
If a BSS is disallowed temporarily with disallow_aps, the network
connection is going to fail. As such, there is not much point in
allowing Interworking network selection to try to connect with such BSS.
As such, do not consider disallowed networks for automatic network
selection and reject requests to connect to them through
INTERWORKING_CONNECT.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Wed, 6 Nov 2013 21:35:19 +0000 (23:35 +0200)]
tests: Verify no-duplicate-networks with Interworking connection
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Wed, 6 Nov 2013 21:32:43 +0000 (23:32 +0200)]
Interworking: Avoid duplicated network blocks
Do not add multiple network blocks for the same network from a single
credential. INTERWORKING_CONNECT used to generate a new network block
for each instance regardless of what network blocks have already been
configured. While this allows the connection to go through, it is not
efficient to leave behind potentially large number of network blocks
with the same contents (or worse, changed contents). Address this by
removing an older network block for the same credential before adding a
new one.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Wed, 6 Nov 2013 21:20:27 +0000 (23:20 +0200)]
Interworking: Do not reconnect if already connected
If we are already connected to the selected AP with a network block
that was created based on the selected credential, do not force a
reconnection or network block update.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Wed, 6 Nov 2013 13:52:40 +0000 (15:52 +0200)]
tests: Verify BSS additional/removal during HT co-ex scan
This verifies that hostapd can add and remove a secondary BSS
during an ongoing HT co-ex scan.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Wed, 6 Nov 2013 11:51:26 +0000 (13:51 +0200)]
hostapd: Do not start secondary BSS unless interface is enabled
It is possible for additional BSSs to be added while the primary
interface is still in the process of determining channel parameters (HT
co-ex scan, ACS, DFS). Do not enable secondary interfaces in such state
immediately, but instead, wait for the pending operation on the primary
interface to complete. Once that's done, the added extra BSSs will also
be enabled in hostapd_setup_interface_complete().
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Wed, 6 Nov 2013 11:39:41 +0000 (13:39 +0200)]
hostapd: Verify hostapd_setup_bss calls
Reject multiple calls to hostapd_setup_bss() for any specific interface.
hostapd_cleanup() must have been called first before trying to restart a
BSS.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Wed, 6 Nov 2013 10:48:24 +0000 (12:48 +0200)]
hostapd: Share a single function for BSS deinit
hostapd_bss_deinit() takes care of freeing the associated stations and
calling hostapd_cleanup() to deinit per-BSS services.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Wed, 6 Nov 2013 10:44:54 +0000 (12:44 +0200)]
Remove unused hostapd_cleanup_iface_pre()
This has not been used in years and can be removed to clean up the
hostapd deinit path a bit.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Wed, 6 Nov 2013 10:42:20 +0000 (12:42 +0200)]
hostapd: Add more debug prints to deinit path
This makes it easier to follow the various interface/BSS deinit
operations.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Tue, 5 Nov 2013 23:38:17 +0000 (01:38 +0200)]
Restore hapd->interface_added tracking to core hostapd
This reverts parts of commit
390e489c0d9415caf103367136eaa534b559837c
that tried to enable removal of the first BSS. Since that operation is
now forced to remove all BSSs, these changes are not needed. The
hostapd_if_remove() operation in hostapd_free_hapd_data() is problematic
for the first BSS since it ends up freeing driver wrapper information
that is needed later when deinitializing the driver wrapper.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Tue, 5 Nov 2013 23:31:23 +0000 (01:31 +0200)]
hostapd: Deinit ctrl_iface in case of add interface failure
Since the control interface is now initialized as part of
hostapd_setup_interface(), it needs to be deinitialized on the error
path.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Tue, 5 Nov 2013 23:15:28 +0000 (01:15 +0200)]
hostapd: Fix DETACH command debug prints to avoid use of freed memory
In case a control interface socket is detached because of sendmsg()
failing for the socket, function call to detach the socket uses a
pointer to the socket information in the structure to be freed. Reorder
code to print socket info before freeing the data to avoid use of freed
memory in case debug prints are enabled.
This is similar to the earlier wpa_supplicant fix in commit
a235aca316a8a4729735fecb00f7d7775b38d993.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Tue, 5 Nov 2013 23:11:25 +0000 (01:11 +0200)]
tests: BSS removal during ongoing HT or ACS scan
These verify that hostapd is able to remove a BSS while the radio is
still in the progress of the initial channel parameter determination.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Tue, 5 Nov 2013 23:08:54 +0000 (01:08 +0200)]
tests: Adjust BSS add/remove test cases for primary BSS constraint
Since removal of the primary BSS is now going to remove all the BSSs
for a radio, these two test cases need changes to not trigger false
failures.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Tue, 5 Nov 2013 22:57:38 +0000 (00:57 +0200)]
Fix removal of a BSS that has not yet been fully initialized
If a secondary BSS is removed while it is waiting for the primary BSS to
complete channel setup (e.g., due to HT co-ex scan, ACS, or DFS), the
hostapd_data instance has not yet been initialized. Fix the BSS removal
code to take this special case into account and not try to deinitialize
the hostapd_data instance that has not yet been started.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Tue, 5 Nov 2013 22:43:10 +0000 (00:43 +0200)]
Remove all BSSs on removal of the first one
The changes in commit
5592065850a40e235020dba79e5592b949b829b8 to allow
any BSS to be removed were a bit too early since there are still number
of areas that use the first BSS as a special case. Especially the
driver_ops API is going to require quite a bit of cleanup before removal
of the first BSS without the other BSSes of the same radio can be done
safely.
For now, force all BSSs to be removed in case the first one is removed.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Tue, 5 Nov 2013 22:19:46 +0000 (00:19 +0200)]
drivers: Do not call hostapd_logger()
This call requires a struct hostapd_data pointer and that is not really
something that the driver wrappers should be using.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Tue, 5 Nov 2013 22:00:58 +0000 (00:00 +0200)]
Remove a compiler warning from -O0 build
It looks like abs() result is signed and gcc warns about this when
running a build with -O0 but not with -O2.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Tue, 5 Nov 2013 11:39:21 +0000 (13:39 +0200)]
hostapd: Do not terminate process on dynamic interface add failure
Limit the calls to eloop_terminate() to happen only for the
initialization failure from the interfaces that we specified on the
command line. This allows hostapd process to continue operating even if
a dynamically added interface fails to start up. This allows the upper
layer software to fix a configuration error and retry.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Tue, 5 Nov 2013 11:21:58 +0000 (13:21 +0200)]
tests: Handle hostapd dying more gracefully
Catch exceptions from operations that try to remove hostapd interface
and rename the log file. If these operations fail due to socket
connection issues, hostapd has likely died or gotten stuck somewhere.
Report the test case as a failure and stop test run cleanly.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Tue, 5 Nov 2013 09:07:51 +0000 (11:07 +0200)]
P2P: Add more debug prints for frequency selection
This prints out get_shared_radio_freqs() results and related information
from P2P operations to make debug logs more helpful for figuring out
issues related to multi-channel concurrency.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Ilan Peer [Sun, 3 Nov 2013 13:29:13 +0000 (15:29 +0200)]
P2P: Fix bug in GO frequency selection
When trying to choose a frequency that can be used for GO instantiation,
properly check if there are free channels that can be used.
Signed-hostap: Ilan Peer <ilan.peer@intel.com>
Ilan Peer [Sun, 3 Nov 2013 13:30:27 +0000 (15:30 +0200)]
wpa_supplicant: Fix bug in get_shared_radio_freqs
The idx variable was mistakenly set to 0 at the beginning of the
interface iteration. This could result in the operating channel of the
interface calling the function from being removed from the returned
frequency array if other interfaces were operating.
Signed-hostap: Ilan Peer <ilan.peer@intel.com>
Andrei Otcheretianski [Sun, 3 Nov 2013 13:24:13 +0000 (15:24 +0200)]
wpa_supplicant: Fix updating GO beacons on WFD subelements change
When WFD Subelements are set, the IE in the Beacon frames of already
existing groups are not updated. This patch fixes this issue by setting
beacon_update to be 1 on WFD IE update.
Signed-hostap: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Adriana Reus [Sun, 3 Nov 2013 13:21:30 +0000 (15:21 +0200)]
EAPOL: Fix static analyzer warnings for pac_opaque_encr_key
The allocation was not verified to complete successfully and the
allocated memory was not freed on error paths.
Signed-hostap: Adriana Reus <adriana.reus@intel.com>
Haim Dreyfuss [Sun, 3 Nov 2013 13:19:59 +0000 (15:19 +0200)]
bgscan: Add global bgscan configuration
This option can be used to globally configure bgscan parameters
for all the network blocks.
Note that this configuration will not override a network block
specific bgscan settings, but will only be used in case that
the network block does not have a valid bgscan configuration.
Signed-hostap: Haim Dreyfuss <haim.dreyfuss@intel.com>
Johannes Berg [Mon, 4 Nov 2013 09:00:36 +0000 (10:00 +0100)]
hwsim tests: Check kernel messages for warnings/bugs
When a test passes but the kernel printed warnings, consider
the test to have failed.
Signed-hostap: Johannes Berg <johannes.berg@intel.com>
Naresh Jayaram [Fri, 1 Nov 2013 18:48:03 +0000 (20:48 +0200)]
eap_proxy: Re-read IMSI from proxy in Interworking functionality
Try to read the IMSI values through the eap_proxy layer for Interworking
functionality again if the value was not available at startup.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Mon, 4 Nov 2013 11:22:55 +0000 (13:22 +0200)]
tests: HS 2.0 excluded SSID
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Mon, 4 Nov 2013 11:11:31 +0000 (13:11 +0200)]
tests: HS 2.0 required roaming consortium
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Mon, 4 Nov 2013 11:09:46 +0000 (13:09 +0200)]
tests: Use dictionary as add_cred_values() parameter
This makes it more convenient to use this function for cases that modify
credential parameters.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Mon, 4 Nov 2013 10:17:32 +0000 (12:17 +0200)]
tests: Do not require hlr_auc_gw for HS 2.0 username/password
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Mon, 4 Nov 2013 09:51:56 +0000 (11:51 +0200)]
Allow AP mode configuration with VHT enabled on 2.4 GHz
hostapd_set_freq_param() rejected the 20 MHz channel case with
vht_enabled due to the existing validation step including only 5 GHz (to
be more exact, only >= 5000 MHz). While the behavior may not be fully
defined for 2.4 GHz, we can enable this based on driver capability
advertisement to fix automatic VHT selection for P2P use cases.
mac80211_hwsim advertises VHT for 2.4 GHz band and that resulted in
failures when trying to start GO on that band with vht=1 parameter.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Sun, 3 Nov 2013 19:57:39 +0000 (21:57 +0200)]
tests: Add preliminary version of DFS test cases
These are still disabled by default since they require mac80211_hwsim
changes that are not yet in the upstream kernel and because the test
cases do not fully work yet. Anyway, they are quite convenient for
development use, so good to have them available in the main repository.
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 3 Nov 2013 19:50:48 +0000 (21:50 +0200)]
DFS: Do not use cf1 to override freq for 20 MHz channels
NL80211_ATTR_CENTER_FREQ1 is defined to be used for anything but 20 MHz
bandwidth, so it could be unset for 20 MHz channels. Do not use it to
override center frequency from NL80211_ATTR_WIPHY_FREQ (if available)
for 20 MHz channels to avoid clearing frequency.
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 3 Nov 2013 19:16:33 +0000 (21:16 +0200)]
Document AP mode startup functions
This provides some more details on how interfaces and BSSes are
initialized during hostapd startup.
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 3 Nov 2013 19:00:49 +0000 (21:00 +0200)]
tests: Add a test case for HT40 co-ex scan
Signed-hostap: Jouni Malinen <j@w1.fi>