Commit graph

1381 commits

Author SHA1 Message Date
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