Commit graph

2276 commits

Author SHA1 Message Date
Jeffin Mammen 50396e29da WPS: Add PBC mode activated/disabled events
This makes it easier to track PBC state on the registrar.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2013-08-23 16:52:48 +03:00
Jouni Malinen 961750c1e8 WPS: Share a common function for error strings
This makes it easier to maintain the list of WPS_EI_* error values and
matching strings.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2013-08-23 16:32:34 +03:00
Jouni Malinen 85a6cdb571 Revert "P2P: Reject p2p_find while P2P connection is in progress"
This reverts commit ce970851af.

It turned out that this breaks lots of use cases where p2p_find is
issued while already in p2p_listen state. As such, we cannot reject
p2p_find this easily without checking for more specific cases.

Signed-hostap: Jouni Malinen <j@w1.fi>
2013-08-01 17:03:06 +03:00
Deepthi Gowri ce970851af P2P: Reject p2p_find while P2P connection is in progress
Though p2p_find is not expected during ongoing P2P connection, it is
possible that any third party application issues a p2p_find resulting in
connection failure. Address this by rejecting any p2p_find command while
connection is in progress.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2013-08-01 15:39:47 +03:00
Wei-Jen Lin a2ea8d64d1 P2P: Fix invalid remain-on-channel duration for frame TX
cfg80211 does not allow the zero duration of remain-on-channel. Instead,
use 20 ms as default waiting time when remain-on-channel is used to
schedule offchannel transmission that does not expect a response.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2013-07-31 23:22:04 +03:00
Sean Lin cbf41ca796 P2P: Do not delay retries on failure during group formation
4-way handshake may fail under extremely noisy environment and if this
happens during P2P group formation, the 10 second extra delay added in
wpas_auth_failed() can result in running over the 15 second timeout.

Avoid this by skipping the delay mechanism in wpas_auth_failed() for the
P2P group formation case. The P2P formation timeout will take care of
stopping the attempts if the failure condition does not get resolved.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2013-07-31 23:09:34 +03:00
Ilan Peer 0d08efa447 P2P: Use the number of concurrent channels in P2P flows
Change the P2P flows to use the number of concurrent channels
supported by the device and the number of currently used channels
for the P2P flows.

Signed-hostap: Ilan Peer <ilan.peer@intel.com>
Signed-hostap: David Spinadel <david.spinadel@intel.com>
2013-07-21 20:48:09 +03:00
Jouni Malinen a21816a933 Use wpa_drv_shared_freq() if get_radio_name() is not supported
Some driver interfaces may not support the get_radio_name() design and
get_shared_radio_freqs() needs to be aware of such possibility when
determining shared radio frequencies.

Signed-hostap: Jouni Malinen <j@w1.fi>
2013-07-21 20:48:09 +03:00
Ilan Peer 53c5dfc2c4 Change share_vif_oper_freq() to handle multiple freqs
There are devices that can operate several channels concurrently.
Change shared_vif_oper_freq() to get_shared_radio_freqs() that can
return an array of frequencies currently used by all the virtual
interfaces that share the same radio.

In addition, move it to wpa_supplicant.c, so it can be used by other
modules.

Signed-hostap: Ilan Peer <ilan.peer@intel.com>
Signed-hostap: David Spinadel <david.spinadel@intel.com>
2013-07-21 20:03:53 +03:00
Ilan Peer 4752147d88 nl80211: Report the number of concurrent support channels
Previously, drivers only reported if they support multiple concurrent
channels, but did not report the maximum number of supported channels.
Add this reporting to the driver capabilities and add the implementation
to driver_nl80211.

Signed-hostap: Ilan Peer <ilan.peer@intel.com>
Signed-hostap: David Spinadel <david.spinadel@intel.com>
2013-07-21 19:49:47 +03:00
Jouni Malinen d7df0fa727 Clean up wpa_supplicant_event() with deauth/disassoc helper functions
wpa_supplicant_event() has grown overly large, so it is useful to split
it into smaller pieces.

Signed-hostap: Jouni Malinen <j@w1.fi>
2013-07-21 16:40:40 +03:00
Jouni Malinen fd9f170098 Remove unnecessary nested ifdef CONFIG_AP
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-07-21 16:01:29 +03:00
Antonio Quartulli 13adc57b39 IBSS RSN: Add peer restart detection
To better support the IBSS/RSN mechanism, wpa_supplicant has to be able
to detect a possible peer reboot and in this case it should start a new
EAPOL handshake.

To perform such reboot detection wpa_supplicant has to perform an Open
Authentication by sending an Authentication frame and then replying to
it. IF an Authentication frame is received when the key have already
been exchanged, wpa_supplicant understands that the peer has rebooted
and can reset its state machine.

Whenever a new peer is added to the IBSS wpa_supplicant will start the
Open Authentication and only after having accomplished it will start the
key exchange. If the driver does not support Authentication frame
exchange initiated from user space, this step is skipped to maintain
previous behavior (just go through EAPOL-Key frame processing).

The Open Authentication was partly supported by the Linux kernel but now
wpa_supplicant can register for Authentication frames, handle it in
userspace and so avoid any possible race condition.

Signed-hostap: Nicolas Cavallari <cavallar@lri.fr>
Signed-hostap: Antonio Quartulli <antonio@open-mesh.com>
2013-07-21 15:56:53 +03:00
Jouni Malinen ec384c566a IBSS RSN: Fix disconnect() with internal SME
Commit 1aef400bf0 implemented IBSS RSN
disconnect() call using sta_deauth() in a way that resulted in NULL
pointer dereference in driver_nl80211.c if SME was in user space. Fix
this by passing the own MAC address in the sta_deauth call.

Signed-hostap: Jouni Malinen <j@w1.fi>
2013-07-21 15:21:38 +03:00
Arend van Spriel 4ed8d954dd TDLS: Tear down TDLS using wpas_drv_tlds_oper() if not external
When the device indicates to take care of TDLS operations the TDLS
setup is done calling wpas_drv_tdls_oper(). This patch does a similar
thing for the teardown. This fixes failure of teardown:

"TDLS: Could not find peer <mac> for link Teardown"

Signed-hostap: Arend van Spriel <arend@broadcom.com>
2013-07-20 17:52:32 +03:00
Chengyi Zhao 831770bffe Cancel delayed scheduled scan when wpa_supplicant cleans up
Because a delayed scheduled scan will access the members of struct
wpa_supplicant which is freed and this can result in a crash,
wpa_supplicant needs to cancel delayed scheduled scan during cleanups.

Signed-hostap: Chengyi Zhao <chengyix.zhao@gmail.com>
2013-07-20 17:47:02 +03:00
Michal Kazior c8ebeda406 wpa_supplicant: Add support for VHT BSS membership selector
This allows wpa_supplicant to associate to an AP that has VHT BSS
membership selector set to indicate VHT support is required for the BSS.

Without the patch it was impossible to connect to, e.g., hostapd-based
AP that has require_vht=1. wpa_supplicant was complaining with:
  hardware does not support required rate 63.0 Mbps

Signed-hostap: Michal Kazior <michal.kazior@tieto.com>
2013-07-20 17:28:42 +03:00
Jouni Malinen 1075b29571 P2P: Report group formation failure on error to start GO mode
There is no need to wait for the 15 second group formation timeout
before indicating P2P group formation failure if GO mode cannot be
started successfully for some reason.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2013-07-11 17:04:46 +03:00
Jouni Malinen b62b29ea87 Do not block on ctrl_iface monitor events
It looks like some of the global control interface cases ended up
blocking in sendmsg() when trying to send an event. Since this can block
all wpa_supplicant processing for multiple seconds, this is very
undesirable. Avoid this by requesting sendmsg() to return an error
rather than waiting for the message to be sent.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2013-07-11 17:04:29 +03:00
Jouni Malinen 0b9d3b22c8 Interworking: Relax 3GPP info PLMN matching for MNC
3GPP TS 24.232 Annex A.3 allows network operator to advertise only two
digits of MNC even if MNC has three digits. Allow such matches in
network selection. In addition, allow three digit matches of MNC even if
MNC length was assumed to be two to avoid missing networks if MNC length
cannot be determined reliably. Remove the '-' separator from simulated
SIM/USIM cases to allow the new matching rules to work.

Fix the PLMN List information element parsing loop to use the length of
the PLMN List instead of the length of the full 3GPP Cellular Info to
avoid unexpected matches should a new element ever be added by 3GPP.

Finally, add more debug prints from PLMN matching to make the logs
easier to understand.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2013-07-08 16:53:05 +03:00
Junli Zhao c7a67a7719 WPS: Disconnect when removing existing WPS network block
wpas_clear_wps() was just clearing the current wpa_s->current_ssid
pointer when removing a WPS network block which with the device was
associated. This could leave the association up even though the network
block had already been removed. Prevent this by explicitly disconnecting
from the network instead of such clearing current_ssid.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2013-07-08 12:09:18 +03:00
Jouni Malinen 7e7610d788 EAP-EKE: Add peer implementation
This adds a new password-based EAP method defined in RFC 6124.

Signed-hostap: Jouni Malinen <j@w1.fi>
2013-07-07 20:30:10 +03:00
Tomasz Bursztyka 06aeff5f8f dbus: Register the AutoScan method call at the right place
Signed-hostap: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2013-07-01 19:11:34 +03:00
Jouni Malinen 78f79fe5fc P2P: Do not add ctrl interface for P2P_DEVICE (p2p-dev-*)
Adding a new wpa_supplicant control interface for the dedicated
P2P_DEVICE would be quite confusing for programs that manage P2P
operations. Remove this control interface and require the global control
interface to be used since it will provide consistent interface for both
the new dedicated P2P_DEVICE (non-netdev) and old style P2P management
through a netdev.

Signed-hostap: Jouni Malinen <j@w1.fi>
2013-07-01 00:36:33 +03:00
Jouni Malinen 1c42b42f6c P2P: Fix TDLS and l2_packet init without P2P Device interface
Commit c68f6200a7 made these calls
conditional on !p2p_mgmt, but forced p2p_mgmt=1 for cases where the
driver does not use the dedicated P2P Device. Fix this by making the
!p2p_mgmt condition apply only if the driver does indicate use of a
dedicated P2P Device.

Signed-hostap: Jouni Malinen <j@w1.fi>
2013-06-30 20:02:25 +03:00
Jouni Malinen 9e6a321815 Fix non-P2P build after the P2P_DEVICE changes
Commit c68f6200a7 added a call to a
function that exists only for P2P builds. Fix that with #ifdef
CONFIG_P2P.

Signed-hostap: Jouni Malinen <j@w1.fi>
2013-06-30 13:19:59 +03:00
Arend van Spriel 2e5ba4b6d1 P2P: Derive group interface name bit more sensibly
The interface name for the P2P group interface is derived from the
P2P management interface. When the P2P management interface is a
P2P Device interface, i.e., p2p-dev-wlanX, the name for the group
interface is abbreviated to p2p-X (X being group index). When the
P2P management interface starts with p2p-dev- use its postfix
instead. So P2P management interface p2p-dev-wlan3 results in group
interface name p2p-wlan3-0.

Signed-hostap: Arend van Spriel <arend@broadcom.com>
2013-06-30 10:50:14 +03:00
Arend van Spriel c68f6200a7 P2P: Create P2P Device interface if supported
If the capability flag of the driver indicates a dedicated P2P Device is
supported, a P2P Device interface is created.

Create the P2P Device in main interface creation loop when the added
interface flags support and P2P supplicant is not yet initialized
avoiding recursion of add_interface.

Do not register l2_packet for P2P Device interface (both for EAPOL and
for TDLS).

Signed-hostap: Arend van Spriel <arend@broadcom.com>
2013-06-30 10:50:14 +03:00
Arend van Spriel bb4028f165 P2P: Ignore p2p_no_group_iface when driver advertizes P2P_DEVICE support
Setting p2p_no_group_iface means 'use P2P management interface as P2P
connection interface' because it attempts to change the interface type.
The P2P_DEVICE is a dedicated interface and can not be changed. As such
ignore the configuration option.

Signed-hostap: Arend van Spriel <arend@broadcom.com>
2013-06-30 10:50:13 +03:00
Jouni Malinen 080585c01a Add support for OCSP stapling to validate server certificate
When using OpenSSL with TLS-based EAP methods, wpa_supplicant can now be
configured to use OCSP stapling (TLS certificate status request) with
ocsp=1 network block parameter. ocsp=2 can be used to require valid OCSP
response before connection is allowed to continue.

hostapd as EAP server can be configured to return cached OCSP response
using the new ocsp_stapling_response parameter and an external mechanism
for updating the response data (e.g., "openssl ocsp ..." command).

This allows wpa_supplicant to verify that the server certificate has not
been revoked as part of the EAP-TLS/PEAP/TTLS/FAST handshake before
actual data connection has been established (i.e., when a CRL could not
be fetched even if a distribution point were specified).

Signed-hostap: Jouni Malinen <j@w1.fi>
2013-06-30 01:01:15 +03:00
Arend van Spriel 72950ed240 P2P: Remove a call to wpas_p2p_deinit_global()
In wpa_supplicant_deinit(), the function wpas_p2p_deinit_global()
was called. Remove it as it will be called from wpas_deinit_iface()
upon removal of the P2P management interface.

Signed-hostap: Arend van Spriel <arend@broadcom.com>
2013-06-25 13:56:28 +03:00
Chengyi Zhao 8a901d750b D-Bus: Emit signal when a station is authorized or deauthorized
Add "StaAuthorized" and "StaDeauthorized" D-Bus interface in AP mode.
After enabling the AP mode of wpa_supplicant, the other process need to
get the MAC address and authorization status of every station, so
wpa_supplicant emits signal when the station is authorized or
deauthorized.

Signed-hostap: Chengyi Zhao <chengyix.zhao@gmail.com>
2013-06-22 12:09:09 +03:00
Andrei Otcheretianski 9578329874 Add AVG_RSSI report in signal_poll
Add AVG_RSSI report to the signal_poll command if it is reported by
the kernel.

Signed-hostap: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Signed-hostap: Ilan Peer <ilan.peer@intel.com>
2013-06-22 12:01:05 +03:00
Andrei Otcheretianski 2cc8d8f4e8 Add bandwidth and center freq info to signal_poll
Signed-hostap: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Signed-hostap: Ilan Peer <ilan.peer@intel.com>
2013-06-22 12:00:46 +03:00
Alexander Bondar 1e0e943e19 Remove 802.11b rates only in case of P2P group operation
11b rates removal have had impact on SoftAP functionality in
wpa_supplicant. This patch verifies that only in case of P2P group
operation 11b rates will be eliminated. Refer also to commit
4c2c302893.

Signed-hostap: Alexander Bondar <alexander.bondar@intel.com>
Signed-hostap: Ilan Peer <ilan.peer@intel.com>
2013-06-22 11:28:33 +03:00
Jouni Malinen ec7b97ab00 Interworking: Add support for using eap_proxy offload
Fetch IMSI through eap_proxy for Interworking network selection if
needed.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2013-06-19 18:42:17 +03:00
Jouni Malinen aa20e1a1fb Remove CONFIG_NO_WPA2 build parameter
There is not much use for enabling WPA without WPA2 nowadays since most
networks have been upgraded to WPA2. Furthermore, the code size savings
from disabling just WPA2 are pretty small, so there is not much
justification for maintaining this build option. Remove it to get rid of
undesired complexity.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2013-06-07 20:13:25 +03:00
Jouni Malinen 5d5c4ee5e0 Remove compiler warnings with CONFIG_NO_SCAN_PROCESSING
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2013-06-07 20:04:56 +03:00
Jouni Malinen 9aaa6955a8 Remove compiler warnings if TDLS is enabled without WPA2
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2013-06-07 20:04:12 +03:00
Bharat Bhushan 1aef400bf0 IBSS RSN: Implement disconnect() callback using sta_deauth()
This allows driver wrappers to implement disconnection of IBSS peers in
cases operations, e.g., GTK update, fail.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2013-06-07 13:07:17 +03:00
Wei-Jen Lin 4abc0424ef P2P: Automatic channel selection at re-invocation of persistent GO
If the driver wrapper supports best operation channel indication, the
p2p_group_add command can now use special values (freq=2 and freq=5) to
indicate that the re-invoked persistent GO is to be started on the
specified band.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2013-06-05 02:06:29 +03:00
Jouni Malinen e78aaca0da Stop TKIP countermeasures on FLUSH command
This is needed to get wpa_supplicant into clean state during testing if
a test case triggers countermeasures.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2013-05-24 16:02:58 +03:00
Jouni Malinen 376204934d wpa_cli: Support tab completion with ifname= prefix
Enable tab completion for the cases where ifname= prefix is used in
interactive mode by skipping over that prefix before running through the
per-command completion routines. The ifname= prefix itself is also
covered by adding the possible interface names to the command list.

Signed-hostap: Jouni Malinen <j@w1.fi>
2013-05-23 20:35:02 +03:00
Jouni Malinen 13b11ba702 wpa_cli: Allow IFNAME= prefix to be used
Strip out the IFNAME=<ifname> prefix from commands before parsing them
through the normal processing and then add the prefix back to the
beginning of the actual control interface command to make per-interface
commands work through the global control interface without having to use
the 'raw' command.

Signed-hostap: Jouni Malinen <j@w1.fi>
2013-05-23 20:04:17 +03:00
Jouni Malinen ae8535b6e1 WNM: Make ESS Disassoc Imminent event more convenient to use
Define a proper event prefix and include additional information to allow
ESS Dissassociation Imminent event to be used in a wpa_cli action
script.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2013-05-23 16:51:03 +03:00
Jouni Malinen 6df634faf9 WNM: Do not reject ESS Disassoc Imminent
This indication is not expected to include candidates, so do not reject
it based on that.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2013-05-23 16:50:55 +03:00
Jouni Malinen 7b53acd395 WNM: Use defines for BSS Trans Mgmt field values
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2013-05-23 16:50:39 +03:00
Jouni Malinen dad153d16b Try to use fast-associate on ENABLE_NETWORK
This makes ENABLE_NETWORK behave similarily to SELECT_NETWORK by
allowing a scan to be skipped if recent scan results are available.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2013-05-22 16:10:59 +03:00
Jouni Malinen b06800170a Fix already-associated detection with driver-based BSS selection
wpa_s->pending_bssid is all zeros during connection attempt when
driver-based BSS selection is used. Take this into account when
determining whether new scan results should trigger a connection based
on wpa_s->current_ssid, i.e., a connection attempt with the selected
network instead of selected BSS.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2013-05-22 16:10:59 +03:00
Sean Lin 72728c6fa8 P2P: Relax channel forcing for invitation processing with MCC support
When STA interface is connected and P2P interface gets invited in a
different channel from previous P2P group, the invitiation would fail
because of no common channel found. Fix this by using different logic
when device support multi channel concurrency.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2013-05-22 13:29:46 +03:00
Jouni Malinen f65f539d9a GAS: Reduce query timeout to two seconds
The five second timeout for GAS queries is excessive and can result in
long waits in cases where APs are either misconfigured or frames are
lost.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2013-05-20 11:09:34 +03:00
Jouni Malinen 7a56af545a GAS: Assign new dialog token even if previous one is free
This makes the design more robust against unexpected duplicates since
each new GAS exchange gets a different dialog token compared to the
previous one.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2013-05-20 11:09:16 +03:00
Jouni Malinen 9e1ecab1c5 GAS: Ignore replays if previous frag_id without dropping GAS session
It looks like it may be possible for an older GAS response to get retransmitted
even after the first copy has been processed. While this should not really come
up all the way to wpa_supplicant due to sequence number being same (i.e.,
duplicate detection should from the frame), some cases have been observed where
this did cause issues. Drop such a frame silently without dropping the ongoing
GAS session to allow a frame with the next frag_id to be processed after this.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2013-05-20 11:08:47 +03:00
Jouni Malinen fa7ae9501b Add test code for fetching the last configured GTK
This can be useful for some test cases, so allow wpa_supplicant to be
built with special test functionality to expose the current (last
configured) GTK. This is disabled by default and can be enabled by
adding following line into .config:
CFLAGS += -DCONFIG_TESTING_GET_GTK

The GTK can then be fetched with "wpa_cli get gtk".

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2013-05-20 11:00:56 +03:00
Jouni Malinen 576bce9c86 P2P: Direct global ctrl_iface commands automatically for P2P
The P2P management operations like P2P_FIND and P2P_CONNECT are not
really specific to any network interface. These are P2P Device level
operations that are in more global device context. Allow those to be
sent through the global control interface without IFNAME parameter.

For now, these commands are directed within wpa_supplicant to the
network interface that initialized the global P2P context. This may
change in the future if a special context is added for P2P operations.
Anyway, such changes can now be done internally within wpa_supplicant
without affecting this global control interface design from external
view point.

Signed-hostap: Jouni Malinen <j@w1.fi>
2013-05-18 19:41:08 +03:00
Jouni Malinen c4bf83a723 P2P: No duplicate AP-STA-CONNECTED/DISCONNECTED as global event
These events are sent as a special case to both the group interface and
"parent interface" (i.e., the interface that was used for managing P2P
negotiation). The latter is not really correct event, so get rid of it
with the new global control interface design where there is no need to
support legacy upper layer implementations.

Signed-hostap: Jouni Malinen <j@w1.fi>
2013-05-18 19:18:31 +03:00
Jouni Malinen 92c4465b75 P2P: Mark P2P events global (not specific to interface)
This removes the "IFNAME=<ifname> " prefix from P2P events that are
received through the global control interface since these events are not
really specific to any network interface, but the full device.

Signed-hostap: Jouni Malinen <j@w1.fi>
2013-05-18 18:59:51 +03:00
Jouni Malinen ed496f131f P2P: Clean up debug prints
Replace direct wpa_msg() calls with p2p_dbg(), p2p_info(), and p2p_err()
calls that use a new debug_print() callback to handle actual debug
printing outside the P2P module.

Signed-hostap: Jouni Malinen <j@w1.fi>
2013-05-18 18:47:36 +03:00
Jouni Malinen 710ae9ac1f P2P: Move p2p_find stopped event message into p2p_supplicant.c
This removes wpa_ctrl.h dependency from src/p2p/* and makes the P2P
events more consistent, i.e., everything that is aimed for upper layer
processing from the wpa_supplicant control interfaces is generated in
p2p_supplicant.c.

Signed-hostap: Jouni Malinen <j@w1.fi>
2013-05-18 16:06:40 +03:00
Jouni Malinen 47bfe49c31 Add wpa_msg_global() for global events
This function can be used instead of wpa_msg() and wpa_msg_ctrl() to
indicate that an event is not specific to a network interface.

Signed-hostap: Jouni Malinen <j@w1.fi>
2013-05-18 14:19:24 +03:00
Jouni Malinen 214e428b42 Allow global ctrl_iface monitors
The ATTACH/DETACH mechanism to request event messages from
wpa_supplicant can now be used through the global control interface,
too. This results in events from all interfaces being delivered through
a single monitor socket. "IFNAME=<ifname> " prefix is used on events
that are specific to an interface.

Signed-hostap: Jouni Malinen <j@w1.fi>
2013-05-18 14:07:28 +03:00
Dmitry Shmidt 89c7ac570b wpa_cli: Set buffer length the same as in wpa_supplicant_ctrl_iface_process()
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2013-05-18 12:21:44 +03:00
Jouni Malinen faf9a8585d Add band option (2.4 vs. 5) for filtering scans
This can be used to implement filtering of channels for scan and based
on that, for connection, purposes.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2013-05-18 12:17:10 +03:00
Jouni Malinen b83b1b2da8 Android: Clarify keystore include directories
This updates hostapd to build using the new keystore header file
location and adds a note that the old frameworks/base/cmds/keystore can
be removed at some point in the future when old Android releases do not
need to be supported.

Signed-hostap: Jouni Malinen <j@w1.fi>
2013-05-18 12:03:35 +03:00
Jouni Malinen d2a9e2c76d Abstract and Android sockets for global ctrl_iface
The wpa_supplicant global control interface parameter can now be used to
explicitly specify an abstract UNIX domain socket (Linux specific
extension) with "@abstract:" prefix and an Android control socket with
"@android:" prefix.

Signed-hostap: Jouni Malinen <j@w1.fi>
2013-05-18 11:42:09 +03:00
Jouni Malinen 6fd5ceaf70 wpa_cli: Allow global interface to be used in interactive mode
This is mostly a corner case at this point, but if wpa_cli was started
with global control interface connection (-g) and interactive mode,
per-interface control interface was tried to be opened with the
previously opened global ctrl_iface connection gettign leaked.

Signed-hostap: Jouni Malinen <j@w1.fi>
2013-05-18 11:40:23 +03:00
Jouni Malinen 2925756575 wpa_supplicant: Add -G argument to specify global ctrl group
The optional -G<group> command line argument can be used to specify the
group that can access the global control interface.

Signed-hostap: Jouni Malinen <j@w1.fi>
2013-05-18 11:00:05 +03:00
Jouni Malinen cf3bebf28c Allow global ctrl_iface to be used for per-interface commands
"IFNAME=<ifname> " prefix can now be used on the wpa_supplicant global
control interface to direct a command to a specific interface instead of
having to use an interface specific control interface for this. This
allows a single socket to be used for controlling multiple virtual
interfaces.

Signed-hostap: Jouni Malinen <j@w1.fi>
2013-05-18 10:19:38 +03:00
Suryadevara Sudheer c6ccf12d3f P2P: Use preferred channel list during GO creation
This extends support for p2p_pref_Chan configuration parameter for
autonomous GO creation.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2013-05-17 11:27:02 +03:00
Yufeng Wang 010b5f9bfc P2P: Fix p2p_pref_chan setting from configuration file
Commit 21d996f775 added p2p_pref_chan as a
configuration file parameter, but included only the case of dynamically
setting this at runtime through the control interface SET command.
Complete this functionality by taking this value into use directly from
the configuration file, too.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2013-05-17 11:03:52 +03:00
Daniel Gnoutcheff d7692b8d1c dbus: Terminate cleanly on messagebus shutdown
By default, dbus_connection_dispatch() will call _exit() if the bus
connection has been closed. This caused wpa_supplicant to terminate
without properly cleaning up after itself.

To ensure that we terminate cleanly when the messagebus terminates,
override the exit_on_disconnect behavior and install a filter to handle
libdbus's "Disconnected" signal.

[Bug 474]

Signed-hostap: Daniel Gnoutcheff <daniel@gnoutcheff.name>
2013-05-16 20:47:28 +03:00
Vinayak Kamath e2396a684e WNM: Enable CONFIG_WNM in Android.mk
Signed-hostap: Vinayak Kamath <vkamat@codeaurora.org>
2013-05-16 17:51:18 +03:00
Vinayak Kamath 65bcd0a92d WNM: Add sending of BSS Transition Management Query
The new control interface command can be used to send a
BSS Transition Management Query frame to the current AP.

Signed-hostap: Vinayak Kamath <vkamat@codeaurora.org>
2013-05-16 17:50:31 +03:00
Vinayak Kamath e27d20bb68 WNM: Add neighbor report processing for BSS Transition Management
Process the neighbor report received in BSS Management Request frames.

Signed-hostap: Vinayak Kamath <vkamat@codeaurora.org>
2013-05-16 17:48:59 +03:00
Jouni Malinen f3e907a745 WPS: Clear connection failure counts on WPS success
The WPS provisioning case does not result in successful connection by
design and as such, this can result in networks getting temporarily
disabled. Avoid this by clearing the failure counts on WPS success.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2013-05-15 17:33:50 +03:00
Jouni Malinen 170f5663dc WPS NFC: Connect using learnt credential after NFC Tag read
Instead of just adding the new network, prefer the network learnt from a
configuration token during the first connection attempt. This makes the
WPS NFC case behave similarly to the in-band provisioning cases if there
are more preferred networks in the scan results.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2013-05-15 16:46:45 +03:00
Jouni Malinen e679f140b9 Mark interface disconnected on removal request
This cleans up debug log by not trying to process the disconnection
event as a failure that could result in blacklist addition and auto
connect attempt. These are pointless operations since the interface is
going to removed immediately after this.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2013-05-12 19:18:55 +03:00
Jouni Malinen 3636b891b7 Do not try auto connect mechanism in disconnected state
This cleans up debug log by not requesting the auto connect on
dissassociation event if we are already in disconnected state and would
not try to connect anyway.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2013-05-12 19:18:55 +03:00
Jouni Malinen 0cdb93fe9f Do not add BSS to blacklist on local disconnection request
There is no point in marking a BSS temporarily blacklisted based on a
connection failure or disconnection case if that happens as a result of
a local request to disconnect. The blacklist entry could result on
unexpected BSS getting selected on the next connection attempt. In
addition, the code to try to find another BSS within the ESS could
result in scanning a single channel on the next attempt. Fix these
issues by handling the connection failure events only if we are not in
disconnected state (i.e., would try to reconnect after this
automatically).

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2013-05-12 19:18:55 +03:00
Deepthi Gowri 36b9883d84 Defer scan if connection is in progress on any of the shared interfaces
Scanning can delay concurrent operations considerably, so it is better
to avoid that while trying to connect on any of the virtual interfaces
that share the same radio.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2013-05-10 16:10:50 +03:00
Ben Greear 6124e858fd wpa_supplicant: Allow vifs to scan only current channel
If a VIF is already associated, then only scan on the associated
frequency if user requests such. This is a big help when using
lots of virtual stations.

Signed-hostap: Ben Greear <greearb@candelatech.com>
Signed-off-by: Ben Greear <greearb@candelatech.com>
2013-05-09 12:43:40 +03:00
Arend van Spriel 893a0a558c systemd: Fix systemd interface alias
In the systemd interface templated the alias entry was specified
with wlan0 hard coded. Changing it to %i in this patch. [Bug 477]

Reported-by: zg <ml@mail.tsaitgaist.info>
Signed-hostap: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
2013-05-09 11:25:48 +03:00
Jouni Malinen 6ea1f4135b Try to set WPA-None key after IBSS-joined event
cfg80211 rejects the set_key operations before the IBSS network has been
fully formed, so add one more attempt to set the key for WPA-None at
IBSS joined driver event.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2013-05-07 18:14:56 +03:00
Jouni Malinen 66562e9c75 Use cached driver capabilities instead of new fetch for each operation
There is no need to repeat the driver capability fetch for each
operation since we already cache driver flags in wpa_s->drv_flags.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2013-05-07 17:36:40 +03:00
Sheng Fang 4aa8186806 Add a configration parameter for sched_scan interval
The new sched_scan_interval parameter can be used to set the default
sched_scan interval, e.g., for power saving purposes.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2013-05-07 12:41:14 +03:00
Jouni Malinen f11b72c3e9 TDLS: Move AID=1 workaround into driver_nl80211.c
The use of AID=1 for the nl80211 dummy STA case is specific to the
driver (cfg80211), so better move this into the driver wrapper instead
of generic TDLS implementation.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2013-05-06 15:57:03 +03:00
Sunil Dutt 785336998d TDLS: Pass peer's AID information to kernel
The information of the peer's AID is required for the driver to
construct partial AID in VHT PPDU's. Pass this information to the driver
during add/set station operations (well, as soon as the information is
available, i.e., with set station operation currently).

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2013-05-06 15:47:44 +03:00
Jouni Malinen 55a2df4389 HS 2.0: Include HS 2.0 Indication element only for HS 2.0 association
The Hotspot 2.0 specification seems to mandate this element to be
included in all (Re)Association Request frames if the station is Hotspot
2.0 capable. However, that results in conflicts with other requirements
like no TKIP use when this element is present. The design is really
supposed to include the indication element only for Hotspot 2.0
associations regardless of what the current specification implies.
Remove the HS 2.0 Indication element from (Re)Association Request frame
whenever the connection is not for Hotspot 2.0 purposes.

Signed-hostap: Jouni Malinen <j@w1.fi>
2013-05-05 16:29:21 +03:00
Jouni Malinen 9be371437e wpa_cli: Fetch the current BSSID list when starting interactive mode
This makes tab completion work better in cases where wpa_cli is started
after wpa_supplicant has already discovered BSSes.

Signed-hostap: Jouni Malinen <j@w1.fi>
2013-05-05 12:38:55 +03:00
Jouni Malinen 69aa33411e wpa_cli: Add BSSID tab completion for set bssid_filter
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-05-05 12:20:35 +03:00
Jouni Malinen 215658726f wpa_cli: Replace set command help with completion routine
The old help text did not include most of the parameters and as such,
was not really helpful. Replace it with tab completion function that
includes more or less all available parameters.

Signed-hostap: Jouni Malinen <j@w1.fi>
2013-05-05 12:18:43 +03:00
Jouni Malinen f1fb042cec wpa_cli: Allow space in the set command value
Previously, interactive mode could not be used to enter space-separated
lists with the set command. This removes that restriction and allows
such commands to be encoded properly.

Signed-hostap: Jouni Malinen <j@w1.fi>
2013-05-05 11:53:20 +03:00
Ben Greear f5ffc348dc wpa_supplicant: Allow global scan frequencies configuration
This allows one to limit the channels that wpa_supplicant will
scan. This is a useful addition to the freq_list configurable
in the network {} section.

Signed-hostap: Ben Greear <greearb@candelatech.com>
2013-05-05 11:46:54 +03:00
Jouni Malinen abfc3ad9af Synchronize build config comments for wpa_supplicant
This updates number of comments in android.config to match the latest
version in defconfig and adds some of the entries that were previously
present only in android.config into defconfig.

Signed-hostap: Jouni Malinen <j@w1.fi>
2013-05-04 20:19:50 +03:00
Jouni Malinen a01e10da68 Android: Enable WPS ER and NFC support in the build
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-05-04 20:19:47 +03:00
Jouni Malinen 0f105f9e5f HS 2.0: Move Probe Request Indication IE addition to proper place
This needs to be in wpa_supplicant_extra_ies() to get consistent
behavior for both scan and sched_scan cases.

Signed-hostap: Jouni Malinen <j@w1.fi>
2013-05-04 11:57:56 +03:00
Ilan Peer 41b1a76a96 P2P: Clone beacon_int when initializing new group interface
Signed-hostap: Ilan Peer <ilan.peer@intel.com>
2013-05-04 11:25:29 +03:00
Vinayak Kamath 741ed9fc25 WPS: Remove duplicate networks after WPS
Each attempt to connect to the same network using WPS would result
in the duplicate configuration getting added. Avoid such redundant
additions by comparing the network configuration with an already
existing one and remove the older network if the new credential
provisioned through WPS is identical.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2013-04-30 13:35:50 +03:00
Jouni Malinen b57b560034 wpa_supplicant: Default to nl80211 instead of wext
nl80211 has obsoleted WEXT as the preferred kernel interface for
controlling wireless drivers. Update wpa_supplicant driver interface
list order so that nl80211 gets used first if both nl80211 and wext
interfaces are included in the build. In addition, update README to
reflect the fact that WEXT is obsolete.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2013-04-29 16:55:44 +03:00
Jouni Malinen a8a7890d7c Clear extra_blacklist_count on FLUSH command
This is needed to avoid old blacklist failure counts from being valid
after state flush.

Signed-hostap: Jouni Malinen <j@w1.fi>
2013-04-28 22:35:15 +03:00