Commit graph

1609 commits

Author SHA1 Message Date
Jouni Malinen d00821e913 Try to reconnect to the same BSS on recoverable disconnection
If the AP disconnects us with a reason code that indicates that it has
dropped the association, but could allow us to connect again, try to
reconnect to the same BSS without going through the full scan. This can
save quite a bit of time in some common use cases, e.g., when inactivity
timeout is used on the AP (and especially, when waking up from suspend
which has likely triggered some timeout on the AP).

Signed-hostap: Jouni Malinen <j@w1.fi>
2011-12-04 21:57:14 +02:00
Jouni Malinen ed57c5907e SME: Fix processing of Authentication request failure
The wpa_state needs to be dropped back to DISCONNECTED to allow scan
results to trigger a new authentication attempt. In addition, we can use
wpas_connection_failed() instead of requesting a scan after a fixed time
to make this error case more consistent with other similar error paths
in sme.c.

Signed-hostap: Jouni Malinen <j@w1.fi>
2011-12-04 21:04:24 +02:00
Jouni Malinen bfba8deb8b Update internal MAC address on EVENT_INTERFACE_ENABLED events
This allows the MAC address of the interface to be changed when the
interface is set down even if the interface does not get completed
removed and re-added.

Signed-hostap: Jouni Malinen <j@w1.fi>
2011-12-03 13:20:40 +02:00
Johan Hedlund f98eb880eb Update RSN supplicant MAC address on driver reinitialization
I have a test case where I remove and insert another network adapter
between two connections to AP. The interface get the same interface name
but switches macadresses between the connections. When running WPA2 I
got a failure in EAPOL negotiation and found out that the reason for
this was that the supplicant did not update the MAC address in the
correct place.
2011-12-03 13:02:57 +02:00
Szymon Bigos 9337e876ab Fix generated WPS PIN values to use zero-padding
The dynamically generated PINs are supposed to have 8 digits, but
some PIN generatation cases were not zero-padding these properly.
2011-12-02 23:04:39 +02:00
Jouni Malinen 47662f4017 Add example WPS AP mode UI for wpa_supplicant
This script shows some minimal WPS user interface requirements for
mobile AP support with wpa_supplicant.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2011-12-01 22:14:07 +02:00
Jouni Malinen 0bc134683e wpa_supplicant AP: Allows passphrase to be fetched
"wpa_cli status wps" can now be used to fetch the WPA2-Personal
passphrase from AP mode operation with wpa_supplicant to make it
easier to meet WPS requirements for legacy STA support.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2011-12-01 22:12:03 +02:00
Jouni Malinen c0f83f3104 WPS: Disable WPS(v2) in WPA/TKIP-only configuration
When using wpa_supplicant AP mode, WPS support is enabled by default for
WPA/WPA2-Personal. Change this to enforce the WPS2 rules on not allowing
WPS to be used with WPA/TKIP-only configuration (i.e., at minimum, mixed
mode with WPA/TKIP and WPA2/CCMP has to be used for WPS to be enabled).

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2011-12-01 21:46:19 +02:00
Jouni Malinen 56d24b4ee0 Call wpas_connection_failed() only if actually trying to connect
A disconnection event from the driver may end up getting delivered at a
time when wpa_supplicant is not even trying to connect (e.g., during a
scan that was already started after WPS provisioning step). In such a
case, there is not much point calling wpas_connection_failed() and
skipping this avoids confusing attempts of re-starting scanning while
the previous scan is still in progress.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2011-12-01 18:22:56 +02:00
Jouni Malinen f7da5a9ef4 Make reconnect-on-disassoc debug prints somewhat more helpful
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2011-12-01 18:22:10 +02:00
Jouni Malinen a9e02d593d P2P: Clear show_group_started on GO start
The show_group_started variable could be left to 1 based on an earlier
failed attempt to start P2P client operation. This can result in
unexpected P2P-GROUP-STARTED event when a GO is started without group
formation (e.g., re-invoke a persistent group or start an autonomous
GO). Avoid this by explicitly clearing show_group_start when setting up
the GO.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2011-12-01 10:49:26 +02:00
Arik Nemtsov 79b8c60f81 Set ht_capab from based on driver capabilities when in P2P GO mode
Set the HT capabilities of a P2P GO according to the wiphy supported
ones. Mask-in a white-list of HT capabilities that won't cause problems
for non-supporting stations.

Signed-hostap: Arik Nemtsov <arik@wizery.com>
2011-11-29 23:45:07 +02:00
Jouni Malinen ea5bae4731 Increase min sched_scan interval from 2 to 10 seconds
Trying to run sched_scan round every two seconds by defaults sounds way
too frequent since dualband cards are unlikely to be able to complete
the full scan cycle in two seconds. For now, set the hardcoded value to
10 seconds to make this somewhat more reasonable.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2011-11-29 20:05:58 +02:00
Dmitry Shmidt d70b945d4d Fix pno_start() to initialize SSID list properly
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-11-29 12:56:32 +02:00
Jouni Malinen 0b7a25c00f Use normal scan before sched_scan if that can speed up connection
When normal scan can speed up operations, use that for the first three
scan runs before starting the sched_scan to allow user space sleep more.
We do this only if the normal scan has functionality that is suitable
for this or if the sched_scan does not have better support for multiple
SSIDs.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2011-11-28 18:36:36 +02:00
Jouni Malinen 76a5249e52 Add broadcast SSID for sched_scan for scan_ssid=0 networks
Previously, only networks with scan_ssid=1 were included in sched_scan.
This needs to behave similarly to the normal scan where broadcast SSID
is used to find networks that are not scanned for with a specific SSID.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2011-11-28 18:12:38 +02:00
Jouni Malinen 5edddf4175 Use common code for disabled network case in sched_scan
There is no need to implement two copies of the iteration code here.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2011-11-28 18:09:37 +02:00
Jouni Malinen 86b47aaf36 Drop sched_scan filter if not enough match sets supported
Instead of including only a single SSID in the sched_scan request if
the driver does not support match sets, just drop the SSID filter and
configure more SSIDs up to the sched_scan limit.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2011-11-28 17:52:36 +02:00
Jouni Malinen a8cb5a8897 Make sched_scan debug clearer on timeout use
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2011-11-28 17:52:02 +02:00
Jouni Malinen 6ad9c91100 Stop sched_scan on DISCONNECT command
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2011-11-28 16:35:30 +02:00
Jouni Malinen b5c6831201 Add preferred network offload (PNO) functionality
"SET pno <1/0>" ctrl_iface command can now be used to start/stop PNO
with sched_scan driver commands. This will request offloading of
scanning to find any of the enabled networks in the configuration.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2011-11-28 16:32:44 +02:00
Jouni Malinen 7c6a266ced Fix sched_scan filter_ssids setting for no filters case
The filter_ssids pointer needs to be set to NULL if no SSID filters
are set to avoid filtering out all scan results.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2011-11-28 15:19:41 +02:00
Jouni Malinen dbfdb3927c Interworking: Verify that BSS information includes SSID
Better make sure that the SSID is available before dereferencing
the pointer to the SSID element.

Signed-hostap: Jouni Malinen <j@w1.fi>
2011-11-27 23:00:37 +02:00
Jouni Malinen 48f24f93a5 wpa_passphrase: Include SHA256 objects to fix some build combinations
Signed-hostap: Jouni Malinen <j@w1.fi>
2011-11-27 22:17:41 +02:00
Jouni Malinen ca84eed7ad TLS: Add build configuration for TLS v1.2 support
This allows the internal TLS implementation to be built for TLS v1.2
support. In addition to the build option, this changes the TLS PRF
based on the negotiated version number. Though, this commit does not
yet complete support for TLS v1.2.

Signed-hostap: Jouni Malinen <j@w1.fi>
2011-11-27 21:45:07 +02:00
Jouni Malinen 8307489840 Add implementation of TLS v1.2 PRF (P_SHA256)
Signed-hostap: Jouni Malinen <j@w1.fi>
2011-11-27 21:10:06 +02:00
Dmitry Shmidt e670738ae0 wpa_cli: Add action script call on P2P-GO-NEG-FAILURE events
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-11-25 23:56:18 +02:00
Dmitry Shmidt 8a5e75f60f P2P: Send STA connected/disconnected events to parent ctrl_iface
Send the connection events from P2P group to both the group interface
and parent interface ctrl_ifaces to make it easier for external monitor
programs to see these events without having to listen to all group
interfaces when virtual group interfaces are used.

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-11-25 23:56:13 +02:00
Jouni Malinen fcd1684787 Fix sched_scan filter setting for max_match_sets == 0
The previous implementation was trying to add the first SSID
to a zero-length array. Avoid this with an explicit validation
of the array length.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2011-11-25 18:12:04 +02:00
Jouni Malinen 0bf927a03e Use wpa_key_mgmt_*() helpers
This cleans up the source code and makes it less likely that new AKM
addition misses some needed changes in the future.

Signed-hostap: Jouni Malinen <j@w1.fi>
2011-11-24 22:47:46 +02:00
Jouni Malinen 8e8280bd5e Do not save an invalid network block in wpa_supplicant.conf
wpa_supplicant is going to reject a configuration file that uses
WPA/WPA2-Personal (the default key_mgmt), but does not define
passphrase/PSK. Refuse to save such a configuration to avoid getting
stuck with a configuration that wpa_supplicant will reject.

Signed-hostap: Jouni Malinen <j@w1.fi>
2011-11-24 22:47:32 +02:00
Jouni Malinen a769b094d7 Do not write all zeros device_type
This is the default value if device_type is not set, so do not
write it to the wpa_supplicant configuration file when saving
updated configuration.

Signed-hostap: Jouni Malinen <j@w1.fi>
2011-11-24 22:22:16 +02:00
Dmitry Shmidt 6ce937b8cf Add 'get country' command
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-11-24 21:33:24 +02:00
David Spinadel 9a6ade33d4 wpa_cli: Correct return value of wpa_cli_cmd_p2p_peers
Signed-off-by: David Spinadel <david.spinadel@intel.com>
2011-11-24 21:19:52 +02:00
Dmitry Shmidt 20b2161d5b Android: Move WPA_BUILD check in Android.mk
This is part of commit e61a2d6db6113da5fad91660764afdb0596dbc46 from
Android wpa_supplicant_8.git.

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-11-23 17:58:44 +02:00
Jeff Brown 4482f1fbc4 Android: Remove the simulator target from all makefiles
This is commit bbda627478b0e9a312fea4662cd7cd8d6bdf82bf from
Android wpa_supplicant_8.git.
2011-11-23 17:56:41 +02:00
Kel Modderman ef992bbd3b wpa_gui-qt4: Improve scan results signal display
Display signal strength in dBm with visual indicator in the form of a
bar for scan results displayed by wpa_gui-qt4. Any signal > -35dBm is
treated as full signal bar, signals between range of -95<->-35dBm are
displayed linearly. Convert WEXT signal level value to scale that
nl80211 typically reports in dBm. The condition which differentiates
8-bit WEXT dBm and regular dBm is probably fragile, but there is
currently no way to know what the driver is going to report for signal
strength.

Signed-off-by: Kel Modderman <kel@otaku42.de>
2011-11-19 20:10:37 +02:00
Jouni Malinen 9dbf53fe35 P2P: Send Listen state Probe Response frames without retries
Use the no-ACK send_mlme request to transmit Probe Response frames
in P2P Listen state. This reduces number of unnecessary transmissions
if the peer device has already moved away from the channel. It will most
likely go through Search state multiple times anyway, so even if the
response were to be lost, a new retry will happen at higher layer.

Signed-hostap: Jouni Malinen <j@w1.fi>
2011-11-19 19:15:10 +02:00
Helmut Schaa 8cfa3527e1 Allow MLME frames to be sent without expecting an ACK (no retries)
In some situations it might be benefical to send a unicast frame without
the need for getting it ACKed (probe responses for example). In order to
achieve this add a new noack parameter to the drivers send_mlme callback
that can be used to advise the driver to not wait for an ACK for this
frame.

Signed-hostap: Helmut Schaa <helmut.schaa@googlemail.com>
2011-11-19 19:02:05 +02:00
Jouni Malinen 3f56f3a496 Do not try to add wildcard SSID into active sched_scan
Even though scan_ssid should not really be set for wildcard SSID,
better verify that here explicitly insead of assuming that the
SSID is set.

Signed-hostap: Jouni Malinen <j@w1.fi>
2011-11-19 17:01:53 +02:00
Johannes Berg dd840f793c AP: Add explicit EAPOL TX status event
The new event can be used when EAPOL TX status can't be reported as a
complete 802.11 frame but is instead reported as just the EAPOL data as
originally passed to hapd_send_eapol().

Signed-hostap: Johannes Berg <johannes.berg@intel.com>
2011-11-19 13:00:30 +02:00
Alan T. DeKok 8205c82a48 wpa_supplicant: Make objects depend on the .config file
The source code compiles into different objects depending on
the contents of .config. Therefore, the objects should depend
on .config.

Previously, only the executables depended on .config. This meant
that they were re-linked when .config changed. But that relink
process used the old (and now wrong) objects.
2011-11-19 11:46:39 +02:00
Johannes Berg 6cad95db72 P2P: Simplify code in wpas_p2p_connect()
There's some duplicated code there that can be simplified
with just a single new variable.

Signed-hostap: Johannes Berg <johannes.berg@intel.com>
2011-11-18 23:32:03 +02:00
Eyal Shapira 1966e3d1b7 sched scan: Fix passive scanning
Scan wasn't initiated in case the config contained only networks without
scan_ssid. In such a case we want scan to be initiated without any SSIDs
to actively scan but include all the SSIDs in the filter list. Also
added some debug logs to easily see which SSIDs were included in which
list.

Cc: Luciano Coelho <coelho@ti.com>
Signed-off-by: Eyal Shapira <eyal@wizery.com>
2011-11-18 23:05:57 +02:00
Jouni Malinen 19df9b0761 Mark local functions static
These functions are not used outside the file in which they are defined.

Signed-hostap: Jouni Malinen <j@w1.fi>
2011-11-18 21:53:36 +02:00
Jouni Malinen 0c7addc32c Include wpa_supplicant_i.h to verify function prototype match
Signed-hostap: Jouni Malinen <j@w1.fi>
2011-11-18 21:41:37 +02:00
Jouni Malinen 2bb747e232 P2P: Cancel previous operation before starting new p2p_listen
Some drivers do not handle concurrent remain-on-channel operation
requests, so run p2p_stop_find() prior to starting p2p_listen. This
addresses some issues with P2P_LISTEN command being issues again
while already in Listen state.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2011-11-17 16:21:11 +02:00
Vasanthakumar Thiagarajan 0399f2e4e5 wpa_supplicant: Set configured auth_algs for AP mode
In AP mode, authentication algorithm is reset in
hostapd_config_defaults_bss() and never set to the configured one. This
would pass the default auth_algs (OPEN|SHARED) to driver regardless of
what the wpa_supplicant configuration is requesting.

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
2011-11-16 16:30:36 +02:00
Jouni Malinen 39185dfa54 P2P: Wait until ongoing scan completes before starting P2P find
The P2P_FIND command was failing if it was issued at the moment when
a scan operation was in progress. Avoid returning failure in this
case by scheduling the P2P find to start once the ongoing scan is
completed.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2011-11-15 21:28:35 +02:00
Jouni Malinen 7cb03b0eaf Android: Update libnl use to match with Android ICS
The libnl_2 library uses static linking and different path for
header files in the Android ICS release.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2011-11-15 18:37:10 +02:00
Jouni Malinen c84443307b Android: Fix D-Bus P2P interface location in Android.mk
This was supposed to be in the new D-Bus interface block, not in
the old one.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2011-11-15 18:35:58 +02:00
Jouni Malinen adc33680e3 Do not add P2P IE into Beacon/Probe Response if P2P is disabled
P2P IE was incorrectly added in wpa_supplicant AP mode even if P2P
function was not actually enabled.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2011-11-14 16:26:45 +02:00
Jouni Malinen 04ed4e984e AP: Only enable WPS for open and WPA/WPA2-Personal configuration
When wpa_supplicant AP mode is used, WPS was enabled by default
regardless of security mode. This is not desired for WEP, so change
the AP configuration to enable WPS only for open and WPA/WPA2-Personal
networks.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2011-11-14 16:16:29 +02:00
Jouni Malinen a17539ebcd Remove unnecessary include file inclusion
Signed-hostap: Jouni Malinen <j@w1.fi>
2011-11-13 22:13:04 +02:00
Jouni Malinen c660b0c257 dbus: Remove unused default string for bridge_ifname
wpa_s->bridge_ifname is an array and cannot be NULL.

Signed-hostap: Jouni Malinen <j@w1.fi>
2011-11-13 20:54:44 +02:00
Jouni Malinen 9482426ede Add REAUTHENTICATE ctrl_iface command
This can be used to trigger EAPOL reauthentication which can be useful
for testing purposes.

Signed-hostap: Jouni Malinen <j@w1.fi>
2011-11-13 19:47:51 +02:00
Ben Greear 6c3771d7d5 Print human readable driver event names
This makes it easier to understand the event related logs.

Signed-hostap: Ben Greear <greearb@candelatech.com>
2011-11-13 19:01:38 +02:00
Jouni Malinen aea855d752 Move wpa_scan_results_free() into shared C file
Replace the inline helper function with a new C file that can be used
for common driver API related function.

Signed-hostap: Jouni Malinen <j@w1.fi>
2011-11-13 18:56:26 +02:00
Fu Yingang a4cef16279 Correct a spelling mistake
The word "targer" in the comments for pending_bssid of
wpa_supplicant data structure should be "target".
2011-11-13 18:35:15 +02:00
Jouni Malinen b6c8df695c Remove station functionality from hostap and madwifi driver wrappers
This has been obsoleted by the more generic Linux WEXT (driver_wext.c)
support. The hostap and madwifi driver wrappers can now be used only
with hostapd. The old station interface remains available in releases up
to 1.x.

Signed-hostap: Jouni Malinen <j@w1.fi>
2011-11-13 11:14:44 +02:00
Jouni Malinen 3962b65858 Remove unmaintained driver wrappers
The driver wrappers broadcom, iphone, osx, and ralink have not been
maintained for a while and it does not look like they will be in the
future either. As such, remove them from the development branch. The
previous versions will be included in older releases up to 1.x.

Signed-hostap: Jouni Malinen <j@w1.fi>
2011-11-13 10:57:46 +02:00
Jouni Malinen 39e7d718f6 ndis: Work around lack of C99 designated initializers in MSVC
Use a driver_ndis.c specific initialization function to fill in the
wpa_driver_ops information to make it easier to modify struct
wpa_driver_ops in the future. Being able to build driver_ndis.c
with MSVC was the only reason for having to maintain the same order
of function pointers in struct wpa_driver_ops and for having to
update driver_ndis.c for all changes in that structure.

Signed-hostap: Jouni Malinen <j@w1.fi>
2011-11-03 18:45:21 +02:00
Jouni Malinen 4877e1fcf9 wpa_cli: Fix compiler warnings on unused functions
Some of the parameter completion functions are only used if
CONFIG_P2P=y.

Signed-hostap: Jouni Malinen <j@w1.fi>
2011-11-03 18:02:28 +02:00
Jouni Malinen 67a5206482 Remove obsoleted Qt3-based wpa_gui
This code has not been maintained for years and there is no plan on
doing so either in the future. The Qt4-based wpa_gui-qt4 version can be
used as a replacement for this older wpa_gui version.

Signed-hostap: Jouni Malinen <j@w1.fi>
2011-11-03 17:48:31 +02:00
Jouni Malinen 2cc5ebdd33 dbus: Fix some build combination without new D-Bus interface
Include common/defs.h to get full enum definitions to avoid compiler
errors without CONFIG_CTRL_IFACE_DBUS_NEW.

Signed-hostap: Jouni Malinen <j@w1.fi>
2011-11-02 10:48:26 +02:00
Jouni Malinen 406edc84cb Fix Android library configuration with OpenSSL build
Commit bf9d5518d5 did not split
LOCAL_SHARED_LIBRARIES properly and ended up removing the needed
libraries.

Signed-hostap: Jouni Malinen <j@w1.fi>
2011-11-01 10:39:49 +02:00
Jouni Malinen 1bbff09ec5 Process RSN pre-authentication candidates when skipping roam
wpa_supplicant_rsn_preauth_scan_results() needs to be called to
update RSN pre-authentication candidates. This cannot be done before
the wpa_supplicant_connect() call on the first association, but when
trying to figure out whether to roam, it is fine to do so for the
case when roaming is skipped.

Signed-hostap: Jouni Malinen <j@w1.fi>
2011-10-30 22:37:12 +02:00
Jouni Malinen aa820e02cc Clean up debug dump for scan results sorting
There is not much need for showing the interim qsort steps, so just show
the ordered results.

Signed-hostap: Jouni Malinen <j@w1.fi>
2011-10-30 21:08:34 +02:00
Gary Morain 577db0aedd Prefer 5 GHz networks over 2.4 GHz networks
In scan.c, merge a channel's noise value into the scan results. When
comparing scan results, compute the signal-to-noise ratio and use it
when available. Prefer a 5 GHz network if its SNR is really big (> 30)
or if its SNR is relatively close to the other network's.
2011-10-30 21:08:21 +02:00
Jouni Malinen 01a1749156 Fix TKIP countermeasures stopping in deinit paths
The eloop timeout to stop TKIP countermeasures has to be canceled
on deinit path to avoid leaving bogus timeouts behind.

Signed-hostap: Jouni Malinen <j@w1.fi>
2011-10-30 12:53:20 +02:00
Dan Williams e9c3c1afed Implement control request replies for the D-Bus interface
Add a D-Bus mechanism for clients to respond to the NetworkRequest
signal.

Signed-off-by: Dan Williams <dcbw@redhat.com>
2011-10-30 12:04:24 +02:00
Dan Williams 7de5688d68 Make control response processing available to other control interfaces
The D-Bus interface wants to use it too, so it makes sense
to have it generic.

Signed-off-by: Dan Williams <dcbw@redhat.com>
2011-10-30 12:04:24 +02:00
Dan Williams 81c57e221d Add wpa_supplicant_ctrl_req_from_string()
Converts from a string to a control request enum when input
from a control interface is received. Will be used by a
subsequent patch.

Signed-off-by: Dan Williams <dcbw@redhat.com>
2011-10-30 12:04:24 +02:00
Dan Williams a9022616ae dbus: Implement EAP SM control request signals
Add a D-Bus signal for EAP SM requests. This signal is emitted on the
Interface object so that clients only have to listen to one object for
requests rather than to all network objects. This signal is analogous
to the socket control interface's CTRL-REQ- request.

Signed-off-by: Dan Williams <dcbw@redhat.com>
2011-10-30 12:04:24 +02:00
Dan Williams 9ef1aaae24 Use an enum for EAP SM requests
Control requests will be extended for non-EAP uses later, so it makes
sense to have them be generic. Furthermore, having them defined as an
enum is easier for processing internally, and more generic for control
interfaces that may not use field names. The public ctrl_req_type /
field_name conversion function will be used later by the D-Bus control
interface too.

Signed-off-by: Dan Williams <dcbw@redhat.com>
2011-10-30 12:04:24 +02:00
Jouni Malinen a6d94e1b56 Skip rate set matching if BSS frequency is not known
At least with driver_test.c, the BSS table may not include frequency
information. In such a case, we need to skip rate set matching during
BSS selection to avoid rejecting valid AP.

Signed-hostap: Jouni Malinen <j@w1.fi>
2011-10-30 11:46:13 +02:00
Jouni Malinen d1dd48e3c9 P2P: Indicate scan during group formation as P2P probe
The interface may not yet have been set to P2P client mode immediately
after GO Negotiation when doing the scan before association request.
Consequently, the scan request in this state has to specify that the
specific P2P probe mode is used to disable IEEE 802.11b rates.

Signed-hostap: Jouni Malinen <j@w1.fi>
2011-10-29 23:02:47 +03:00
Jouni Malinen 97bcd562eb Remove disable_11b_rates() driver_ops
This function was used unconditionally if wpa_supplicant build
includes CONFIG_P2P=y. Adding a separate driver_ops for such use
is not really useful since the driver wrappers can do the same
internally. Remove this driver_ops and move matching functionality
into driver_nl80211.c which was the only driver wrapper using
this driver_ops callback.

Signed-hostap: Jouni Malinen <j@w1.fi>
2011-10-29 22:25:28 +03:00
Jouni Malinen b106173a82 Add no_cck parameter for send_action() driver_ops
This can be used to apply the no-CCK rule conditionally depending on
which frame is being sent. The no-CCK rule applies only for P2P
management frames while SA Query and FT use cases do not have similar
restrictions.

Signed-hostap: Jouni Malinen <j@w1.fi>
2011-10-29 21:49:46 +03:00
Daniel Drake 4483f23e15 dbus: Raise PropertiesChanged on org.freedesktop.DBus.Properties
wpa_supplicant dbus objects are currently difficult to use with
GDBusProxy. This is because they do not follow the dbus standard in
emitting the PropertiesChanged signal on the standard D-Bus properties
interface, so GDBusProxy stores stale property values.

Fix this by raising PropertiesChanged on the standard interface.
For backwards compatibility, the existing custom PropertiesChanged
signals are not removed; I anticipate them being removed in a future
major release.

See
http://lists.freedesktop.org/archives/dbus/2011-August/014593.html
for more info.

Signed-off-by: Daniel Drake <dsd@laptop.org>
2011-10-29 19:26:33 +03:00
Jouni Malinen 767885423b wpa_cli: Argument completion for p2p_group_remove
Track active P2P groups and complete p2p_group_remove argument.
2011-10-28 23:59:13 +03:00
Jouni Malinen a624f20bcd wpa_cli: Add completion functions for P2P peers and BSSes
Keep a local list of found P2P peers and BSS entries and use those
to complete arguments for p2p_peer, p2p_connect, and bss commands.
2011-10-28 23:50:37 +03:00
Jithu Jance b49d6ccb74 P2P: Fix frequency in the P2P_EVENT_GROUP_STARTED event
P2P Client did not show correct frequency in the control interface
event P2P_EVENT_GROUP_STARTED. Fix that by using the frequency from
the BSS table or association event.
2011-10-28 22:26:30 +03:00
Jithu Jance 3074d8f12d P2P: Notify device expiry via P2P-DEVICE-LOST event
This patch will notify applications listening over control socket about
the device expiry [from p2p peer list].
2011-10-28 22:13:18 +03:00
Jouni Malinen 8271f14a4d Automatically include WPS and AP support if P2P is enabled
CONFIG_WPS=y and CONFIG_AP=y are required if CONFIG_P2P=y so
we may as well enable them automatically in that case.
2011-10-28 21:17:08 +03:00
Jithu Jance 2d4f15d683 P2P: Stop any on-going "p2p_find" on creating an Autonomous GO
This patch stops any on-going "p2p_find" on creating an Autonomous GO.
This is already taken care in case of invoking a persistent GO. GO as
such will be advertising via the beacons for other devices to discover.
So normally the GO doesn't need to do a p2p_find until and unless it
wants to invite a P2P Client. In case of Invite scenario, logically it
is better to do a explicit discover [via user intervention] after the GO
is created. This patch will help to reduce battery wastage [due to
p2p_find operations] in scenarios where user creates a GO and doesn't
initiate a connection.
2011-10-26 01:28:51 +03:00
Jithu Jance 5cbd88d921 P2P: Fix wpa_supplicant crash on P2P WPS PBC overlap case
Once PBC overlap detected when using dynamic group interfaces, the wpa_s
corresponding to P2P group interface is freed. This patch avoids
accessing the wpa_s data structure after it is freed. This fixes a
possible crash in P2P client role in such a case.
2011-10-24 23:37:39 +03:00
Jouni Malinen acc247b260 P2P: Advertise Persistent Reconnect group capability
The persistent_reconnect configuration parameter was used to decide
whether to accept invitation to re-establish a persistent group.
However, this was not being advertised in the Group Capability bitmap.
Add the Persistent Reconnect bit based on this configuration to GO
Negotiation frames and Beacon/Probe Response frames from the GO.
2011-10-24 17:29:37 +03:00
Arik Nemtsov 2d565a61f2 TDLS: Support mgmt-frame Tx for ctrl-iface operations
Use capability information to decide whether to perform a given TDLS
operation internally or through mgmt-frame Tx.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Cc: Kalyan C Gaddam <chakkal@iit.edu>
2011-10-23 22:20:43 +03:00
Arik Nemtsov 45b722f150 TDLS: Add peer as a STA during link setup
Before commencing setup, add a new STA entry to the driver representing
the peer. Later during setup, update the STA entry using information
received from the peer.

Extend sta_add() callback for adding/modifying a TDLS peer entry and
connect it to the TDLS state machine. Implement this callback for the
nl80211 driver and send peer information to kernel.

Mark TDLS peer entries with a new flag and translate it to a
corresponding nl80211 flag in the nl80211 driver.

In addition, correct TDLS related documentation in the wpa_driver_ops
structure.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Cc: Kalyan C Gaddam <chakkal@iit.edu>
2011-10-23 22:19:35 +03:00
Arik Nemtsov 8f15f711c5 TDLS: Implement low-ack event for lost TDLS peers
Disable the direct connection when a TDLS peer stops responding
to packets, as indicated by the "LOW ACK" event coming from a driver.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Cc: Kalyan C Gaddam <chakkal@iit.edu>
2011-10-23 22:19:08 +03:00
Arik Nemtsov 7de27409a2 TDLS: Support sending a teardown frame from usermode
When a driver does not implement the TDLS_TEARDOWN operation internally,
send an explicit TDLS link teardown frame to the driver.

Change all teardown calls to use these calling semantics.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Cc: Kalyan C Gaddam <chakkal@iit.edu>
2011-10-23 22:18:49 +03:00
Arik Nemtsov 35287637cc TDLS/nl80211: Support receiving TDLS discovery response frames
Register for the TDLS discovery response public action frame in nl80211.
Print out a debug message when a Discovery Resp frame is received and
validated.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Cc: Kalyan C Gaddam <chakkal@iit.edu>
2011-10-23 22:18:35 +03:00
Arik Nemtsov c58ab8f249 TDLS: Get TDLS related capabilities from driver
Put glue code in place to propagate TDLS related driver capabilities to
the TDLS state machine.

If the driver doesn't support capabilities, assume TDLS is supported
internally.

When TDLS is explicitly not supported, disable all user facing TDLS
operations.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Cc: Kalyan C Gaddam <chakkal@iit.edu>
2011-10-23 22:15:15 +03:00
Arik Nemtsov ba3936d990 TDLS: Support setting CONFIG_TDLS_TESTING in .config
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Cc: Kalyan C Gaddam <chakkal@iit.edu>
2011-10-23 22:14:31 +03:00
Jouni Malinen edc3a7c414 Remove unused driver_ops client MLME functions
These driver_ops functions set_channel, set_ssid, set_bssid,
mlme_add_sta, and mlme_remove_sta were used with the user space
MLME implementation in wpa_supplicant. That was only for testing
purposes and was removed, but these driver_ops were forgotten.
Remove them now to remove confusing driver_ops definitions.
2011-10-23 20:07:57 +03:00
Christian Lamparter e1e8cae3c7 wpa_supplicant: Check rate sets before joining BSS
IEEE Std 802.11-2007 7.3.2.2 demands that in order to join a BSS all
required basic rates have to be supported by the hardware.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
2011-10-23 17:21:50 +03:00
Christian Lamparter 6bf731e8ce wpa_supplicant: Unify hardware feature data
The hardware feature data is required in several different places
throughout the code. Previously, the data was acquired and freed on
demand, but with this patch wpa_supplicant will keep a single copy
around at runtime for everyone to use.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
2011-10-23 17:21:50 +03:00
Jouni Malinen 7756114f6a Postpone global_init() call until first driver instance is initialized
This avoids allocating global driver state for driver wrappers that
are built in but not used. This can save some resources and avoids
failures with driver_nl80211.c that is now initializing netlink
connections for nl80211 in global_init().
2011-10-23 13:20:52 +03:00
Grant Erickson 80267c9cec dbus: Removed unused local variable
Signed-off-by: Grant Erickson <marathon96@gmail.com>
2011-10-23 12:36:04 +03:00
Jouni Malinen b832d34c48 Comment out scard initialization code if PCSC_FUNCS is not set 2011-10-23 12:24:36 +03:00
Jouni Malinen 17fbb751e1 Remove user space client MLME
This code was used only with driver_test.c to allow MLME operations
in hostapd to be tested without having to use a real radio. There
are no plans on extending this to any other use than testing and
mac80211_hwsim has now obsoled the need for this type of testing.
As such, we can drop this code from wpa_supplicant to clean up the
implementation of unnecessary complexity.
2011-10-22 22:45:38 +03:00
Andrii Bordunov 745e8aba69 Add CONFIG_WPS_REG_DISABLE_OPEN to defconfig 2011-10-22 22:24:34 +03:00
Andrii Bordunov 2c4f80d519 WPS: Use ifdef blocks consistently for CONFIG_WPS_REG_DISABLE_OPEN
The registrar variable is used only if this macro is defined, so no
need to set it otherwise.
2011-10-22 22:21:53 +03:00
Andrii Bordunov d5695081c2 wpa_priv: Link in trace.o to fix CONFIG_WPA_TRACE build 2011-10-22 22:18:54 +03:00
Jouni Malinen 8d2639127f wpa_priv: Link in ieee802_11_common.o if driver_nl80211 is used 2011-10-22 22:17:41 +03:00
Andrii Bordunov f7fcfc347c wpa_priv: Update function arguments to fix compilation 2011-10-22 22:11:40 +03:00
Jouni Malinen 9e0e6902a2 Share a single wpa_scan_results_free() implementation
There is not really a very good location for this anywhere, but the
function is small enough to live as an inline function for now.
2011-10-22 22:09:40 +03:00
Dmitry Shmidt 48f8e03622 Prevent ap_scan change during association
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-10-21 19:00:18 +03:00
Dmitry Shmidt 8f5b9aa19a Set ANDROID_LOG_NAME depending on application
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-10-21 18:59:42 +03:00
Dmitry Shmidt 9aa10e2b27 Add blacklist command
This command allows an external program manage the BSS blacklist
and display its current contents.

Note: The blacklist is considered to be internal mechanism within
wpa_supplicant and changing it can have unexpected results.

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-10-21 18:59:16 +03:00
Jouni Malinen 11540c0b21 Interworking: Allow ANT to be configured for Probe Request frames
Access Network Type can now be configured (default: 15 = wildcard) to
limit which APs reply to the scan.
2011-10-21 12:44:29 +03:00
Johannes Berg 9b90955ec7 AP: Pass only bssid/addr/wds to EVENT_RX_FROM_UNKNOWN 2011-10-20 21:51:32 +03:00
Jouni Malinen 8c0d3b4fc6 Fix segfault on error path if driver initialization fails
wpa_s->wpa is NULL in this case and we better not call WPA state
machine functions.
2011-10-20 21:10:22 +03:00
Johannes Berg bcf24348ed AP: Do station poll in driver wrapper
This offloads the station polling to driver wrappers, which may offload
it again to the driver. The hostap driver wrapper uses "real" data
frames while nl80211 uses null data frames.

Also add a specific event to indicate that a poll was successful for
future use with the nl80211 driver.
2011-10-20 21:03:08 +03:00
Jouni Malinen 7a25f29d89 Interworking: Use unsigned integer for bitfield
Signed integer with one-bit value does not make much sense, so clean
this up by using an unsigned integer instead.
2011-10-20 20:49:21 +03:00
Dmitry Shmidt 0597a5b59d Add log_level command
This can be used to display the current debugging level and to change
the log level during run time.

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-10-18 22:53:46 +03:00
Jouni Malinen 67e838fd0c Android: Sync Android.mk with recent Makefile changes 2011-10-18 17:15:36 +03:00
Jouni Malinen 3c11382b6c Remove set_intra_bss() driver_ops
This has been replaced by the isolate parameter available through
set_ap() calls.
2011-10-17 23:04:27 +03:00
Jouni Malinen 062390efd4 Start deprecating various AP mode driver_ops
The preferred way of configuring AP mode will be to use set_ap() instead
of number of separate operations hostapd has collected over the years.
2011-10-17 18:35:25 +03:00
Mahesh Palivela d4370eac2e Move SA Query mechanism into a file that can be shared more easily
This is the first step in allowing SA Query mechanism in hostapd to be
used with drivers that implement authentication and association MLME/SME
(i.e., do not use ieee802_11.c).
2011-10-17 17:33:17 +03:00
Jouni Malinen 2a4b98a912 Interworking: Document network selection parameters 2011-10-16 23:55:34 +03:00
Jouni Malinen 3b840b6748 Interworking: Support for using EAP-SIM credentials in network selection
New configuration parameters home_imsi and home_milenage can be used
to configure SIM/USIM simulator parameters for network selection based
on SIM/USIM credentials.

home_imsi=(MCC | MNC | '-' | rest of IMSI)
home_milenage=(Ki):(OPc):(SQN)

For example:
home_imsi=310026-000000000
home_milenage=90dca4eda45b53cf0f12d7c9c3bc6a89:cb9cccc4b9258e6dca4760379fb82581:000000000123
2011-10-16 23:55:34 +03:00
Jouni Malinen 67e1b98463 Interworking: Support username/password based network selection
Add support for network selection for username/password credentials with
EAP-TTLS and EAP-PEAP. The new global configuration parameters
home_username, home_password, and home_ca_cert can be used to specify
credentials for network selection.
2011-10-16 23:55:34 +03:00
Jouni Malinen 73c41a8fab Interworking: Parse NAI Realms and match against home realm 2011-10-16 23:55:34 +03:00
Jouni Malinen b02fe7ff32 Interworking: Add commands for network selection
This adds the basic mechanism for running through network selection:
scan, ANQP fetch, network selection, and connection. Actual rules for
network selection and the creation of the network block are still
missing, but will be added in separate commits.
2011-10-16 23:55:34 +03:00
Jouni Malinen afc064fe7a Interworking: Add ANQP query requests
Add mechanism for using GAS/ANQP to query Interworking related
information from APs. The received information is stored in the BSS
table and can be viewed with ctrl_iface BSS command.

New ctrl_iface command ANQP_GET can be used to fetch ANQP elements from
a specific AP. Additional commands FETCH_ANQP and STOP_FETCH_ANQP can be
used to initiate and stop an iteration through all APs in the BSS table
that indicate support Interworking to fetch ANQP elements from them.
2011-10-16 23:55:34 +03:00
Jouni Malinen 40eac89023 wpa_cli: Make second argument to set command optional
This can be used to indicate zero length value.
2011-10-16 23:55:34 +03:00
Jouni Malinen 71269b3708 WNM: Add BSS Transition Management Request for ESS Disassoc Imminent
"hostapd_cli ess_disassoc (STA addr) (URL)" can now be used to send
an ESS Dissassociation Imminent notification to the STA. This event
is shown in wpa_supplicant ctrl_iface monitors (e.g., wpa_cli):
"WNM: ESS Disassociation Imminent - session_info_url=http://example.com/session/"
2011-10-16 23:55:34 +03:00
Jouni Malinen 92cbcf9128 Add Extended Capability element to AssocReq for Interworking
If Interworking is enabled, add Extended Capability element to
(Re)Association Request frames to indicate support for Interworking.
2011-10-16 23:55:34 +03:00
Jouni Malinen 46ee0427b1 IEEE 802.11u: Allow Interworking and HESSID to be configured
The new wpa_supplicant.conf file global parameters interworking and
hessid can be used to configure wpa_supplicant to include
Interworking element in Probe Request frames.
2011-10-16 23:55:34 +03:00
Jouni Malinen cc81110d55 Fix location of P2P indication flag in BSS ctrl_iface output 2011-10-16 18:25:35 +03:00
Gurumoorthi Gnanasambandhan 783fcb7d03 Allow drivers to indicate WPS push button in station mode
EVENT_WPS_BUTTON_PUSHED wpa_supplicant_event can now be used in
station mode driver_*.c to indicate that a push button has been
pushed. This will activate WPS PBC mode.
2011-10-16 18:05:55 +03:00
Jouni Malinen 298716b495 Convert signed bit field to unsigned one
It's cleaner to use unsigned bit field with one bit values.
2011-10-16 13:21:54 +03:00
Jouni Malinen b02897e70b dbus: Fix potential memory leak with unexpected p2p_find calls
Should the RequestedDeviceTypes entry show up multiple times, the
previously allocated buffer would have been leaked.
2011-10-16 13:19:33 +03:00
Jouni Malinen 86c6626c5b Remove unnecessary wpa_s == NULL validation
wpa_s cannot be NULL here (it is already dereferenced above and
all the callers pass a valid pointer anyway).
2011-10-16 13:16:21 +03:00
Luciano Coelho 6a90053cdf Add delayed scheduled scan request
When initializing, the scheduled scan code was being called before
everything is ready. With normal scans, the first scan round is
delayed, so the initialization is finished by the time it really
starts.

Add a function that can be used to request a delayed scheduled scan.
The scan will only start after the specified time has elapsed. Call
this function instead of starting the scheduled scan directly during
driver initialization.

Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-10-15 18:53:14 +03:00
Luciano Coelho b59e6f267b Add filter support to scheduled scans
Pass SSIDs to be matched in scheduled scan results. Only the SSIDs
that are included in the match lists will be reported by the driver,
so the filtering can be offloaded to the hardware and the power
consumption can be reduced.

Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-10-15 18:53:14 +03:00
Luciano Coelho a4cba8f1e2 Use sched_scan in driver init
This patch uses sched_scan, if available, when the driver is
initialized. It also adds a couple of cancel operations where
appropriate.

Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-10-15 18:53:13 +03:00
Luciano Coelho cbdf3507e9 Add scheduled scan driver operations
In new Linux kernel versions (>=3.0), nl80211 adds scheduled scan
capability. In order to use this feature to its full extent, we need
to support it in the wpa_supplicant core, so that it can also be used
by other drivers.

This commit adds initial scheduled scan support operations and events.

Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-10-15 18:53:13 +03:00
Luciano Coelho 5f738a21a6 Reorganize P2P and WPS scan code
Move some code to separate functions to reorganize the P2P and WPS
handling during scans. This makes the code a bit cleaner and is
needed for the scheduled scan implementation to avoid duplicated code.

Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-10-15 18:53:13 +03:00
Janusz Dziedzic a7fd39bb5d P2P: Cleanup AP callbacks when removing the group
Clear the P2P GO callback parameters when removing the group to avoid
using these for non-P2P AP mode.

This is a fix for the bug I found in the following scenario:

A) p2p_group_add
A) p2p_group_remove wlan0
A) add_n
A) set_n 0 ssid "testap"
A) set_n 0 key_mgmt NONE
A) set_n 0 mode 2
A) set_n 0 frequency 2412
A) enable_n 0

B) try connect to testap

Authentication request will be always rejected because of
HOSTAPD_ACL_REJECT and not cleaned callbacks when group removed.
2011-10-12 21:06:39 +03:00
Mohamed Abbas 0098ce6d29 dbus: Export max scan ssids supported by driver
This is needed for network managers that want to know how
many SSIDs they can scan at the same time.
2011-10-02 13:27:09 +03:00
Jithu Jance 2a6f78fbbe Do not re-associate on SELECT_NETWORK to current network
Signed-off-by: Jithu Jance <jithu@broadcom.com>
2011-10-02 13:12:43 +03:00
Zhi Chen 7d232e23e2 Allow wildcard SSID to be used with WPA-PSK if bssid is set
This allows the AP to be selected based on the BSSID when WPA-PSK
is used with a passphrase. The PSK will be derived from the passphrase
after the SSID has been learned from scan results.
2011-09-30 22:05:44 +03:00
Jouni Malinen 24f6497c34 GAS: Use off-channel operations for requests
This separates off-channel Action frame TX/RX from P2P into a generic
implementation that can now be used both for P2P and GAS needs.
2011-09-29 22:19:51 +03:00
Jouni Malinen 04ea7b7947 GAS: Add a generic GAS query module
This implements GAS request mechanism that is aimed at being used to
replace use case specific GAS/ANQP implementations in the future.
Compared to the earlier implementation in P2P SD, this implementation
includes support for multiple concurrent requests and more thorough
validation of frames against the pending query data.

GAS header processing, including comeback and reassembly, are handled
within gas_query.c and the users of this module will only need to
provide the Query Request and process the (possibly reassembled)
Query Response.
2011-09-29 22:19:15 +03:00
Jouni Malinen 0c840c33f7 Move GAS/ANQP build routines to a separate file from P2P
GAS/ANQP is a generic protocol and in no way specific to P2P, so move
routines used to build GAS/ANQP frames to a separate file that can be
shared for other uses than just P2P service discovery.
2011-09-29 22:18:46 +03:00
Jouni Malinen 206e1f422f P2P: Provide mechanism for figuring out p2p_scan_ie() buffer need
The new function, p2p_scan_ie_buf_len(), can be used to figure out
how large a buffer needs to be allocated for p2p_scan_ie() use. This
makes it easier to add new data into the buffer without forcing all
callers to be updated to use a larger buffer.
2011-09-29 22:18:23 +03:00
Jouni Malinen 303f60d39b P2P: Do not request station mode scans during P2P operations
The P2P search mechanism depends on the same scan functionality that
is used for station mode scans. If these operations are being used
at the same time, scan result processing is not handled properly.
Avoid unexpected behavior by delaying station mode scan requests
if a P2P operation is in progress.

Among other things, this allows the station mode connection attempt
to be continued after a P2P find or group formation has been completed
if the interface is available (i.e., when the P2P group uses a
separate virtual interface).
2011-09-29 16:53:55 +03:00
Jouni Malinen 0c96fd6d03 P2P: Do not leave P2P scan handler registered if scan fails
If the initial attempt to start a scan for p2p_find fails, an error
is reported. However, the P2P scan handler and search state was
left behind. That can result in unexpected behavior when the next
non-P2P scan results are indicated. Avoid this by clearing the
P2P search state on failure.
2011-09-29 16:52:23 +03:00
Jouni Malinen 0096c42740 Do not enable bgscan when driver takes care of BSS selection
There is no need to request periodic bgscans when the driver claims
to have capability for roaming within ESS. Ignoring the bgscan
configuration allows the same configuration file to be used both
with drivers the handle roaming and with drivers that don't.
2011-09-26 15:17:01 +03:00
Jouni Malinen 22628eca34 Support driver-based BSS selection in ap_scan=1 mode
If the driver indicates that it supports BSS selection (including
roaming within an ESS) with WPA_DRIVER_FLAGS_BSS_SELECTION, modify
ap_scan=1 mode to behave like ap_scan=2 mode for BSS selection.

The initial scan is still done to avoid the need for strict
configuration of or security parameters (e.g., to figure out whether
TKIP or CCMP is being used as the group cipher). However, when
requesting the driver to connect, the bssid and freq parameters are
not provided to leave the driver in control of selecting which BSS
to use and to allow the driver to decide when to roam.
2011-09-26 14:57:23 +03:00
Jouni Malinen fd2f2d0489 Remove EAP-TTLSv1 and TLS/IA
These protocols seem to be abandoned: latest IETF drafts have expired
years ago and it does not seem likely that EAP-TTLSv1 would be
deployed. The implementation in hostapd/wpa_supplicant was not complete
and not fully tested. In addition, the TLS/IA functionality was only
available when GnuTLS was used. Since GnuTLS removed this functionality
in 3.0.0, there is no available TLS/IA implementation in the latest
version of any supported TLS library.

Remove the EAP-TTLSv1 and TLS/IA implementation to clean up unwanted
complexity from hostapd and wpa_supplicant. In addition, this removes
any potential use of the GnuTLS extra library.
2011-09-25 21:28:32 +03:00
Jouni Malinen 5c47af9a7a TLS: Add support for TLS v1.1 (RFC 4346) with internal TLS
This is disabled by defautl and can be enabled with CONFIG_TLSV11=y
build configuration parameter.
2011-09-25 17:24:46 +03:00
Reinette Chatre 97a8cbb88d D-Bus/P2P: Treat PIN as string
wpa_supplicant returns the PIN in reply to the connect method. Treating
this value as an integer runs the risk of not returning the correct
value if the first digit(s) happens to be a zero(es). To return the
correct PIN it needs to be returned as a string.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Angie Chinchilla <angie.v.chinchilla@intel.com>
2011-09-22 01:17:09 +03:00
Janusz Dziedzic a57db49c32 wpa_supplicant: AP mode, set drv_flags
In AP/P2P_GO mode we should have correct hostapd drv_flags.
2011-09-22 01:05:01 +03:00
Reinette Chatre 1755b61679 D-Bus/P2P: Support all discovery types
The default discovery type is to search for devices only on social
channels. Expand this to also support an initial full scan followed by the
scan of social channels as well as the progressive scan that scans through
all the channels in the Search state rounds. This does not change the
default of scanning only social channels although there is currently a
discrepancy wrt the default used by wpa_cli, which is the full scan first.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Angie Chinchilla <angie.v.chinchilla@intel.com>
2011-09-22 01:01:20 +03:00
Reinette Chatre af9d709019 D-Bus: Fix memory leak when using array of array of bytes
When parsing a dict entry which is an array of an array of bytes the entry
representing the dict entry has DBUS_TYPE_ARRAY as its type and
WPAS_DBUS_TYPE_ARRAY as its array_type. The function freeing this parsed
data incorrectly tested the entry type for WPAS_DBUS_TYPE_ARRAY while doing
no testing of this value for array_type. This results in a memory leak
whenever a D-Bus message with this type of data is parsed.

Messages affected are:
fi.w1.wpa_supplicant1.Interface.P2PDevice
	using RequestedDeviceTypes with Find method
	using SecondaryDeviceTypes or VendorExtension with P2PDeviceProperties

fi.w1.wpa_supplicant1.Group
	using WPSVendorExtensions with Properties property

All of the above messages are parsed with the same function,
wpa_dbus_dict_get_entry, so the assignment of the entry's type and
array_type is consistent. The parsed data is also consistently freed with
the same function, wpa_dbus_dict_entry_clear, so we can use the same checks
to free the data correctly.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Angie Chinchilla <angie.v.chinchilla@intel.com>
2011-09-22 01:01:20 +03:00
Johannes Berg 3a26a2c9df P2P: Fix action done handling for driver-based off-channel TX
The action done handling needs to abort an off-channel period since one
might have been used for example for GO negotiation and after action
done the code assumes it can start a new off-channel period.

This fixes a bug I introduced when adding support for
in-kernel off-channel transmissions.

Reported-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2011-09-22 00:57:27 +03:00
Pavel Roskin ffbf1eaa26 Fix typos found by codespell
Signed-off-by: Pavel Roskin <proski@gnu.org>
2011-09-22 00:43:59 +03:00
Jouni Malinen 1b414f59fc eapol_test: Add option for writing server certificate chain to a file
eapol_test command line argument -o<file> can now be used to request
the received server certificate chain to be written to the specified
file. The certificates will be written in PEM format. [Bug 391]
2011-09-17 22:42:54 +03:00
Jouni Malinen 7c444f3c12 Fix proactive_key_caching configuration to WPA code
The proactive_key_caching parameter was missed in mapping the
config_ssid data into the WPA state machine configuration. This
prevented addition of PMKSA cache entries based on PMKSA caching
candidate events.
2011-09-16 18:44:06 +03:00
Jouni Malinen 6bcb1c2ba5 wpa_supplicant AP: Set static WEP keys if configured
This is needed to configure static WEP keys to the driver through the
hostapd configuration structures.
2011-09-15 15:04:46 +03:00
Jouni Malinen 697cd03fc2 AP: Set pairwise/group cipher for non-WPA modes
This is needed to avoid confusing configuration in some nl80211
drivers that the new AP mode configuration alternatives for
setting security policy.
2011-09-15 15:02:59 +03:00
Rajkumar Manoharan 47185fc788 P2P: Remove CCK supported rates when running P2P scan
This allows drivers to disable CCK rates from Probe Request frames.
For nl80211, this is currently applying only to the supported rates
element(s), but this mechanism could be extended to address TX rate
control masking, too, to lessen need for global rate disabling.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
2011-09-10 22:40:30 +03:00
Edward Lu cf546f1a03 Make sure wpa_proto gets cleared for WPS and non-WPA connections
This is needed to fix the wpa_proto association parameter for drivers
that select AP based on security parameters internally.
2011-09-08 17:51:08 +03:00
Jouni Malinen 07fecd3915 P2P: Remove Label config method
The P2P specification (3.1.4.3) disallows use of the Label configuration
method between two P2P devices. This was previously enforced at upper
level, but the obsolete code can be removed from wpa_supplicant. This
adds a bit more strict enforcement of the policy, but should not result
in practical differences since no known P2P implementation uses Label
config method.
2011-09-08 16:40:03 +03:00
Jouni Malinen d8a790b922 Flush PMKSA cache entries and invalidate EAP state on network changes
If a network configuration block is removed or modified, flush
all PMKSA cache entries that were created using that network
configuration. Similarly, invalidate EAP state (fast re-auth).

The special case for OKC on wpa_supplicant reconfiguration
(network_ctx pointer change) is now addressed as part of the
PMKSA cache flushing, so it does not need a separate mechanism
for clearing the network_ctx values in the PMKSA cache.
2011-09-07 17:46:00 +03:00
Jouni Malinen f3857c2e6a Call wpas_notify_network_removed() on REMOVE_NETWORK
This was done for the case where all networks are being removed,
but the case where a single network is removed was forgotten.
2011-09-07 17:44:00 +03:00
Jouni Malinen 5e67037b3a Fix SIM/USIM simulator build to include AES encryption function 2011-09-07 16:17:08 +03:00
Jouni Malinen 98aa7ca5d8 WPS: Add 'wpa_cli wps_pin get' for generating random PINs
This can be used, e.g., in a UI to generate a PIN without
starting WPS (or P2P) operation.
2011-09-02 21:29:06 +03:00
Jouni Malinen 64fa840a97 nl80211: Fix WPA_VERSIONS attribute for Connect command
The previous code was trying to figure out which WPA version is
used based on the extra IEs requested for Association Request. That
did not work properly in cases where non-WPA networks are used with
some extra IEs. Fix this by using more robust mechanism for passing
the WPA versions from core wpa_supplicant to the driver_ops
associate().
2011-09-02 20:40:23 +03:00
Jouni Malinen bf9d5518d5 Android: Include libcrypto and libssl only if CONFIG_TLS=openssl 2011-09-02 16:51:00 +03:00
Jouni Malinen f4a0a82ca6 Reduce debug verbosity on global ctrl_iface PING command
This matches with the earlier change that did the same for the
per-interface ctrl_iface commands.
2011-09-01 18:16:37 +03:00
Bharat Chakravarty a9355fac5f WPS: Set Probe Request config methods based on configuration
Instead of hardcoding the Config Methods attribute value in Probe
Request frames, set this based on the configured parameter
config_methods to allow correct set of methods to be advertised.
2011-09-01 15:24:45 +03:00
Bharat Chakravarty 6fb6d842bb WPS: Set RF bands based on driver capabilities
Instead of hardcoding support for both 2.4 GHz and 5 GHz bands,
use driver capabilities to figure out which bands are supported.
2011-08-31 17:53:55 +03:00
Jouni Malinen 19c3b56685 Replace set_beacon() driver op with set_ap()
This change is a first step in better supporting different driver
architectures for AP mode operations with nl80211. This commit in
itself does not add new functionality, but it makes it easier to add
new AP mode parameters to address needs of drivers that have more of
the MLME/SME in firmware or kernel.
2011-08-10 13:22:37 +03:00
Dan Williams e9ae405907 dbus: Do not segfault if P2P is disabled
Various pieces of the P2P code assume that P2P is enabled, so make
the D-Bus code not call the P2P stuff if P2P is disabled. Also
ensures that if P2P is disabled a suitable error is returned to
the D-Bus caller.

Signed-off-by: Dan Williams <dcbw@redhat.com>
2011-08-07 11:21:52 +03:00
Jouni Malinen 3320666494 dbus: Remove separate access variable from properties
The read, write, read-write permissions can be figured out from
getter/setter function pointers, so there is no need for maintaining
that information separately.
2011-08-07 11:16:05 +03:00
Eliad Peller d26e45a44a wpa_supplicant AP: Enable uapsd in P2P GO mode if go_apsd was set
If uapsd is explicitly enabled, set conf->bss->wmm_enabled and
conf->bss->wmm_uapsd to enable (and advertise) uapsd.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
2011-08-06 22:08:38 +03:00
Jayant Sane e261d5a9a6 DBus/P2P: Return Primary and Secondary device types as bytes
These properties are already correctly treated as bytes for the local
device, we need to do same for peers.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2011-08-06 21:34:11 +03:00
Dan Williams 6aeeb6fa21 dbus: clean up new D-Bus interface getters and setters
A number of fixes/improvements here:

1) Remove casting of getter/setter function types which allows
us to change the prototypes in the future and not have hard-to-find
runtime segfaults

2) Instead of having the getters create a fake reply message which
then gets its arguments copied into the real reply message, and is
then disposed, just pass message iters around and have them add
their arguments to the message itself

3) For setters, just pass in the message iter positioned at the
start of the argument list, instead of each setter having to skip
over the standard interface+property name

4) Convert error handling to use DBusError and return the error
back down through the call stacks to the function that will
actually send the error back to the caller, instead of having a
fake DBusMessage of type DBUS_MESSAGE_TYPE_ERROR that then
needs to have the error extracted from it.

But most of all, this fixes various segfaults (like rh #725517
and #678625) which were caused by some functions deep down in the
getter callpaths wanting a source DBusMessage* when the getters were
used for two things: signals (which don't have a source DBusMessage)
and methods (which will have a source DBusMessage that's being
replied to).  This duality made the code fragile when handling
errors like invalid IEs over the air.

Signed-off-by: Dan Williams <dcbw@redhat.com>
2011-07-29 21:25:39 +03:00
Jouni Malinen 03948f423f Add CONFIG_IEEE80211N to wpa_supplicant defconfig
This is needed for AP mode functionality with some drivers.
2011-07-18 21:34:25 +03:00
Jouni Malinen ffad885837 P2P: Set p2p auth/assoc parameter based on connection type
Fix the previous code that was hardcoding the p2p parameter based
on the driver P2P capability regardless of whether the connection
was really used for P2P or not.
2011-07-17 20:52:49 +03:00
Eliad Peller 2f4f73b154 nl80211: Change vif type to P2P_CLI upon P2P authentication
Currently, wpa_driver_nl80211_authenticate() changes the interface type
to station. However, in case of P2P, we need to change the interface
type to P2P_CLI.

Add p2p field to the authentication params, and consider it for choosing
the correct interface type.

Signed-off-by: Eliad Peller <eliad@wizery.com>
2011-07-17 20:25:58 +03:00
Jouni Malinen 7b7ce8aa13 Deauthenticate on reconfiguration
This makes sure that the old connection is not maintained if the new
configuration does not allow it anymore. In addition, it is better to
use wpa_supplicant_clear_connection() instead of just clearing
wpa_s->current_ssid here to keep things in sync.
2011-07-16 16:57:11 +03:00
Jouni Malinen 018a309a94 Drop oldest unknown BSS table entries first
When the BSS table size limit has been reached, drop first the oldest
BSS entries for which there is not a matching network in the
configuration based on SSID (wildcards are ignored). This makes it
less likely to hit connection issues in environments with huge number
of visible APs.
2011-07-16 13:22:58 +03:00
Jouni Malinen 04a85e4401 P2P: Filter Probe Request frames based on DA and BSSID in Listen state
Only accept Probe Request frames that have a Wildcard BSSID and a
destination address that matches with our P2P Device Address or is the
broadcast address per P2P specification 3.1.2.1.1.
2011-07-15 20:28:46 +03:00
Johannes Berg 6cd930cb3c P2P: Fix p2p_intra_bss with nl80211
The current implementation of p2p_intra_bss doesn't work since the flag
isn't propagated into the corresponding hostapd config, so AP code will
never enable AP isolation and will in fact disable it again after it had
been enabled by the P2P code.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2011-07-15 17:13:44 +03:00
Jouni Malinen 0d0db41271 P2P: Remove unused SearchOnly parameter from D-Bus p2p_find 2011-07-15 16:59:05 +03:00
Jouni Malinen 263ef84d3a P2P: Fix memory leak in D-Bus p2p_find handler 2011-07-15 16:33:21 +03:00
Jouni Malinen e24b918202 P2P: Coding style cleanup 2011-07-15 14:41:01 +03:00
Jouni Malinen 70b9a5ca6a P2P: Fix error path not to build error message twice 2011-07-15 14:40:04 +03:00
Jouni Malinen e1739fb617 P2P: Clear entry.key to avoid use of uninitialized value on error path 2011-07-15 14:39:07 +03:00
Jouni Malinen d87e90b646 WPS: Check malloc success on workaround path
ssid->ssid could be NULL here if malloc failed, so better check that
consistently.
2011-07-15 14:21:50 +03:00
Jouni Malinen 21fe9e757e P2P: Use consistent checking of ssid != NULL 2011-07-15 14:20:31 +03:00
Jouni Malinen f94a85ee33 P2P: Coding style cleanup for D-Bus handlers 2011-07-15 14:18:29 +03:00
Jouni Malinen faa9f2cf95 P2P: Fix D-Bus error path (potential NULL pointer deref)
The paths pointer could have been NULL when going through the shared
freeing path in error case. Avoid the NULL pointer dereference by
checking whether that is the case. In addition, remove unnecessary
gotos to make the function more readable.
2011-07-15 14:03:41 +03:00
Jouni Malinen ab1dee81a2 P2P: Remove dead code from wpas_p2p_connect()
The case of joining a running group is handled before this location
and the P2P client iftype is assigned at a callback function for that
case.
2011-07-15 13:57:31 +03:00
Henry Gebhardt f0573c7989 wpa_supplicant: Edit BINDIR in dbus and systemd service files
This is useful, since in Gentoo BINDIR=/usr/sbin.
2011-07-15 12:25:02 +03:00
Henry Gebhardt 2ecaec50c8 wpa_supplicant: Add systemd support 2011-07-15 12:13:40 +03:00
Johannes Berg b14a210ce2 nl80211: Support GTK rekey offload
Add support to wpa_supplicant for device-based GTK rekeying. In order to
support that, pass the KEK, KCK, and replay counter to the driver, and
handle rekey events that update the latter.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2011-07-12 21:22:51 +03:00
Mikael Wikström ed49fbbf3a Fix non D-Bus builds by removing 'void void' in return value 2011-07-12 15:39:33 +03:00
Hong Wu 8fd0f0f323 FT: Clear SME ft_used/ft_ies when disconnecting
Previous ft_ies needs to be removed before supplicant starts a new FT
initial association and this requires the ft_used state to be cleared
here.

Signed-off-by: Hong Wu <hong.wu@dspg.com>
2011-07-05 21:17:31 +03:00
Angie Chinchilla 2db9174503 wpa_s AP mode: Enable HT20 if driver supports it
If the driver supports HT20, set the config parameter ieee80211n
to enable it. This does not enable HT40.

Signed-off-by: Angie Chinchilla <angie.v.chinchilla@intel.com>
2011-07-05 16:49:28 +03:00
Jouni Malinen ca62e114aa wpa_supplicant AP: Disable AP mode on disassoc paths
Regardless of how the AP mode is disabled, wpa_supplicant_ap_deinit()
must be called. Make sure this happens on all paths by calling the
deinit function from wpa_supplicant_mark_disassoc().
2011-07-05 16:38:30 +03:00
Jouni Malinen 4f525d8e5b Move peer certificate wpa_msg() calls to notify.c
This type of wpa_supplicant specific message construction does not need
to be at the EAP implementation, so better move it up to notify.c.
2011-07-05 12:40:37 +03:00
Michael Chang ade74830b4 Add dbus signal for information about server certification
In general, this patch attemps to extend commit
00468b4650 with dbus support.

This can be used by dbus client to implement subject match text
entry with preset value probed from server. This preset value, if
user accepts it, is remembered and passed to subject_match config
for any future authentication.

Signed-off-by: Michael Chang <mchang@novell.com>
2011-07-05 12:22:32 +03:00
Paul Stewart 572a171f4f wpa_supplicant: Respect PKG_CONFIG variable if set in the environment
This is required for cross-compilation support on certain
platforms to avoid changing the pkg-config files themselves.

Signed-off-by: David James <davidjames@chromium.org>
Signed-off-by: Paul Stewart <pstew@chromium.org>
2011-07-04 20:35:38 +03:00
Marcin Klimczewski 751bc722bd wpa_cli: Add missing parameter for P2P_GROUP_ADD command
Both freq and persistent parameters of P2P_GROUP_ADD could be passed at
one time.
2011-07-04 20:32:15 +03:00
Jayant Sane a362dc1d43 DBus/P2P: Rectified type of SecondaryDeviceTypes in device property Get
To be consistent with what it expected in corresponding Set property as
byte[][].

Signed-off-by: Jayant Sane <jayant.sane@intel.com>
2011-07-04 20:27:53 +03:00
Jayant Sane b05fe0e557 DBus/P2P: Adding decl for PersistentGroupRemoved signal
Minor - for completeness sake.

Signed-off-by: Jayant Sane <jayant.sane@intel.com>
2011-07-04 20:24:45 +03:00
Jouni Malinen 7a2b53b4ef Fix D-Bus build without CONFIG_P2P=y 2011-06-27 21:23:22 +03:00
Jouni Malinen 20a0b03deb Clear WPA and EAPOL state machine config pointer on network removal
Make sure that the WPA and EAPOL state machines do not hold a pointer
to a network configuration that is about to be freed. This can fix
potential issues with references to freed memory.
2011-06-27 19:02:24 +03:00
Jean-Michel.Bachot 8be6450cb6 P2P: Fix WpsFailed signal in P2P D-Bus
Fix a NULL pointer dereference in commit
3734552f15 in the case of PBC overlap and
timeout case.

Signed-off-by: Jean-Michel.Bachot <jean-michelx.bachot@intel.com>
Signed-off-by: Jayant Sane <jayant.sane@intel.com>
Signed-off-by: Angie Chinchilla <angie.v.chinchilla@intel.com>
2011-06-25 15:29:31 +03:00
Jayant Sane 2463ba70e2 P2P: Update listen and operating channel from P2P D-Bus
Some P2PDevice properties were not updated in p2p->cfg structure:
reg_class, channel, op_reg_class, and op_channel. Hence, update p2p->cfg
parameters through p2p core calls in wpas_p2p_update_config().

Signed-off-by: Jean-Michel.Bachot <jean-michelx.bachot@intel.com>
Signed-off-by: Jayant Sane <jayant.sane@intel.com>
2011-06-25 12:08:43 +03:00
Jayant Sane 3734552f15 P2P: Add WpsFailed signal in P2P D-Bus
Signal is triggered if an error occurs during WPS provisioning phase.

Signed-off-by: Jean-Michel.Bachot <jean-michelx.bachot@intel.com>
Signed-off-by: Jayant Sane <jayant.sane@intel.com>
2011-06-25 11:47:04 +03:00
Jayant Sane 2855070673 P2P: More complete persistent group management over D-Bus
Extend commit c2762e410f to allow
applications to manage (add/remove) persistent groups and accepted
network object paths while invoking a persistent group.
2011-06-24 11:20:19 +03:00
Jayant Sane 5d5fe8ed08 P2P: Add dissasoc_low_ack in P2P device properties
This can be used to activate the keep alive mechanism enabled in
mac80211. Allows to trigger Peer Disconnected signal if signal is lost
on a P2P peer.

Signed-off-by: Jean-Michel Bachot <jean-michelx.bachot@linux.intel.com>
Signed-off-by: Jayant Sane <jayant.sane@intel.com>
2011-06-23 21:35:20 +03:00
Jayant Sane 2a10959e7c P2P: Fix P2P device signal level type in D-Bus
Signed-off-by: Fabien Marotte <fabienx.marotte@intel.com>
Signed-off-by: Jayant Sane <jayant.sane@intel.com>
2011-06-23 21:31:22 +03:00
Jayant Sane 6402fc438b P2P: Show P2P peer signal level in D-Bus P2P device properties
Move level parameter from p2p_device to p2p_device_info in order to
expose this information and modify D-Bus P2P handler to return this new
parameter through the P2P device properties.

Signed-off-by: Fabien Marotte <fabienx.marotte@intel.com>
Signed-off-by: Jayant Sane <jayant.sane@intel.com>
2011-06-23 21:29:10 +03:00
Jayant Sane c2762e410f P2P: Update D-Bus network object semantics during group formation
Do not emit network objects during P2P group formation since such
network objects can confuse certain apps. Instead, a persistent group
object is created to allow apps to keep track of persistent groups.
Persistent group objects only represent the info needed to recreate the
group.

Also fixes a minor bug in the handling of persistent group objects
during WPS operations.

Signed-off-by: Jayant Sane <jayant.sane@intel.com>
2011-06-23 21:25:13 +03:00
Jayant Sane c988980d95 P2P: Enable P2P capability advertisement on D-Bus
Append "P2P" to capability information if supported by device.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Jayant Sane <jayant.sane@intel.com>
2011-06-23 20:51:27 +03:00
Jouni Malinen 62b98282ba Fix CONFIG_NO_WPA_PASSPHRASE=y build
Need to define CONFIG_NO_PBKDF2 even though the crypto cleanup moved
the function to a separate file since there is conditional code in
wpa_supplicant/config.c. In addition, wpa_passphrase should not be
built at all if passphrase functionality is removed.
2011-06-23 19:53:45 +03:00
Jouni Malinen 4aced422d3 Add notes for CONFIG_WPS_ER build configuration option
[Bug 407]
2011-06-23 19:30:13 +03:00
Jouni Malinen ee8ad5d849 Use nl80211 as an example instead of WEXT 2011-06-23 19:28:14 +03:00
Jouni Malinen 29fbc52251 Fix AP selection to check privacy mismatch and IBSS with WPA/RSN IE
These checks were previously skipped if the scan result included WPA
or RSN IE. However, that can result in selecting a network that does
not match local configuration in some cases.
2011-06-23 15:39:00 +03:00
Jouni Malinen 7dcdcfd68d P2P: Start GO without extra scan step
There are some corner cases, where the wpa_supplicant_req_scan() call
may end up scheduling a scan even if we are about to start a GO. Avoid
this by explicitly marking the GO network to be selected for the next
connection.
2011-06-21 11:47:03 +03:00
Jouni Malinen 692cb2266f Fix non-P2P D-Bus build 2011-06-20 09:02:41 +03:00
Jouni Malinen 634ce80246 Fix CONFIG_AP=y build without CONFIG_P2P=y 2011-06-20 08:58:32 +03:00
Jouni Malinen 83fa07226d DBus: Fix some typos on comments 2011-06-12 15:09:32 -07:00
Johannes Berg 9abafccc0d DBus: Add support for P2P primitives
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2011-06-12 15:08:19 -07:00
Johannes Berg 911e97e400 DBus: Refactor array adding, add binary arrays
Some new code we're working on will require the dbus type "aay" (an
array of arrays of bytes). To add this, refactor the array code to
reduce code duplication by given a type string to the array starting
code, and also add code to create and parse such arrays from or into an
array of struct wpabuf respectively.

Since there's no unique DBus type for this, add a "fake"
WPAS_DBUS_TYPE_BINARRAY type that is separate from the regular DBus
types for parsing.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2011-06-12 14:47:49 -07:00
Fabien Marotte 58f80e2aeb DBus: Move wpas_dbus_new_decompose_object_path()
Moved wpas_dbus_new_decompose_object_path from dbus_new_handlers.c
to dbus_new_helpers.c.

Signed-off-by: Fabien Marotte <fabienx.marotte@linux.intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2011-06-12 14:41:41 -07:00
Jean-Michel Bachot 4b6baa2f5e P2P: Add group started notification
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2011-06-12 14:35:37 -07:00
Johannes Berg dd8a7e0547 P2P: Add wpas_notify_p2p_provision_discovery()
Add a notification for P2P provision discovery status/result.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2011-06-12 14:31:56 -07:00
Jouni Malinen 38e24575c1 random: Add support for maintaining internal entropy store over restarts
This can be used to avoid rejection of first two 4-way handshakes every
time hostapd (or wpa_supplicant in AP/IBSS mode) is restarted. A new
command line parameter, -e, can now be used to specify an entropy file
that will be used to maintain the needed state.
2011-05-31 20:07:11 +03:00
Jouni Malinen ceb34f250a Remove compiler warning for non-P2P builds 2011-05-27 19:06:05 +03:00
Jouni Malinen 6d28fb9627 Fix regression in RSN pre-authentication candidate list generation
Processing of the scan results for RSN pre-authentication candidates
was moved to happen before the network was selected. This resulted in
all candidates being dropped due to no SSID having been configured.
Fix this by moving the processing to happen after the network has
been selected. Since the raw scan results are not available at that
point, use the BSS table instead of scan results to fetch the
information.
2011-05-19 17:52:46 +03:00
Dmitry Shmidt bcb90f750d Add TDLS support to Android.mk 2011-05-16 22:29:43 +03:00
Jouni Malinen 64f992652d P2P: Include operating class 124 (channels 149,153,157,161)
When using the p2p_oper_reg_class configuration option instead of
p2p_group_add freq parameter, the operating class 124 was not
processed correctly. Include that class in the list of 5 GHz classes
for the p2p_oper_reg_class to resolve this.
2011-05-16 21:07:05 +03:00
Jouni Malinen eec92ec597 WPS: Remove obsolete note about lack for WPS ER support 2011-05-16 21:06:08 +03:00
Jouni Malinen 117e812d06 Update BSS table entry if roaming event indicates frequency change
This is needed to make sure the frequency in the BSS table entry
remains up-to-date if the AP changes its operating frequency.
2011-05-16 19:19:30 +03:00
Jouni Malinen 0725cc7b7e Enable CONFIG_DRIVER_NL80211=y in the default configuration
nl80211 should be preferred over WEXT with any recent Linux kernel
version.
2011-04-21 20:41:01 +03:00
Dmitry Shmidt 60b24b0de4 Add 'signal_poll' command interface
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-04-15 18:52:01 +03:00
Dmitry Shmidt 746bba1a5e Prevent explicit scan command during scan or association
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-04-15 18:40:29 +03:00
Jouni Malinen 849b5dc78b Update driver country info on 'SET country <value>' 2011-04-15 17:00:01 +03:00
Jouni Malinen 4a26df7107 IBSS RSN: peer->addr is an array so it cannot be NULL 2011-04-14 20:18:12 +03:00
Jouni Malinen 95cb2d88e9 TDLS: Verify that scan results for BSS are available before using them 2011-04-14 19:50:26 +03:00