Commit graph

1656 commits

Author SHA1 Message Date
Jithu Jance ef35f5a0fd P2P: Add driver op for requesting GO/AP channel switch
Signed-hostap: Jithu Jance <jithu@broadcom.com>
2012-06-10 20:54:31 +03:00
Jithu Jance b9cfc09a81 P2P: Add preference setting for concurrent use cases
Add an additional parameter to prioritize either sta or p2p connection
to resolve conflicts arising during single channel concurrency.

Signed-hostap: Jithu Jance <jithu@broadcom.com>
2012-06-10 20:53:09 +03:00
Jouni Malinen a0227929dc P2P: Do not use reassociation after getting disassociated
This avoids issues with some APs rejecting a reassociation if the
station is not currently associated as reported by Yossi Wortzel.
The change is based on a patch from Arik Nemtsov.

Signed-hostap: Jouni Malinen <j@w1.fi>
2012-06-10 19:51:36 +03:00
Jouni Malinen 73ccd08378 P2P: Fix group formation timeout on GO during WPS step
Commit 361cdf3400 changed the way the
group formation timeout is used on P2P client. However, it resulted in
clearing the timeout on the GO when the GO started beaconing. This is
not correct since the timeout is supposed to be maintained until at
least the completion of the WPS provisioning step. Fix this regression
by clearing the timeout here only in the case we are not GO in group
formation phase.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2012-06-08 18:22:03 +03:00
Jouni Malinen 476dea24ff WPS: Cancel WPS operation also in DISCONNECTED state
It is possible for wpa_state to be WPA_DISCONNECTED when a new scan is
scheduled to be started in the future. If wpas_wps_cancel() gets called
(e.g., through control interface wps_cancel or a P2P group removal)
while in that state, the WPS operation (scan request and special network
block) were not removed. Fix this by clearing the WPS operations both in
WPA_SCANNING and WPA_DISCONNECTED states.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
intended-for: hostap-1
2012-06-06 22:07:11 +03:00
Jouni Malinen 5b37633364 P2P: Fix scan_res_handler setting for p2p_scan
The previous version set scan_res_handler unconditionally and then
cleared it if scan request failed. This can result in incorrect clearing
of the handler to NULL for a previously started scan that has not yet
completed. This can make p2p_find command fail to use the
start-after-scan-completion mechanism in some cases. Fix this by setting
scan_res_handler properly after having verified that the driver command
for starting the scan was successful.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
intended-for: hostap-1
2012-06-06 17:07:46 +03:00
Sunil Dutt Undekari 84286a227b P2P: Improve p2p_prov_disc-auto robustness
Perform addition additional scan runs on the operating channel of the GO
(if known from previous scan results) and fall back to initiate the PD
for GO Negotiation if these additional scans do not detect the peer as
GO.

Signed-hostap: Sunil Dutt Undekari <duttus@codeaurora.org>
2012-06-06 15:46:05 +03:00
Nirav Shah ad85320234 P2P: Fix P2P Group Formation timeout registration (use parent iface)
Commit 361cdf3400 extended the use of
group formation timeout for the way handshake, but the registration was
done on the group_interface while the cancellation was done on the
parent interface. Fix the registration to set the eloop timeout on
parent to address potential issues when using a separate group
interface.

Signed-hostap: Nirav Shah <nirav.j2.shah@intel.com>
2012-06-04 21:58:34 +03:00
Paul Stewart a6b71f726a bss: Don't remove a BSS that is in use
When looking for a BSS to eject due to too many entries, never
pick one that is in use.  Otherwise, we run the risk of having
pointers to freed data.

Signed-hostap: Paul Stewart <pstew@chromium.org>
2012-06-04 21:52:08 +03:00
Paul Stewart dd7fec1f29 wpa_supplicant: Report EAP connection progress to DBus
Send an "EAP" signal via the new DBus interface under various
conditions during EAP authentication:

  - During method selection (ACK and NAK)
  - During certificate verification
  - While sending and receiving TLS alert messages
  - EAP success and failure messages

This provides DBus callers a number of new tools:

  - The ability to probe an AP for available EAP methods
    (given an identity).
  - The ability to identify why the remote certificate was
    not verified.
  - The ability to identify why the remote peer refused
    a TLS connection.

Signed-hostap: Paul Stewart <pstew@chromium.org>
2012-06-04 21:10:01 +03:00
Etay Luz fdfb1c8bcf wpa_supplicant: Support dtim_period configuration for AP mode
Signed-off-by: Etay Luz <eluz@qca.qualcomm.com>
2012-06-04 17:52:37 +03:00
Jouni Malinen f5d4dd5ad4 WNM: Send empty IPv4 packet as keep-alive for now
Use an empty IPv4 packet as the keep-alive packet for WNM BSS max idle
period mechanism. This is not really the best possible frame to use for
this, but for now, it can do until a more suitable frame is figured out
for this (e.g., special LLC header to indicate link test purposes).

Signed-hostap: Jouni Malinen <j@w1.fi>
2012-05-28 14:36:23 -07:00
Jouni Malinen 597c7a8dd8 WNM: Fix build without CONFIG_SME=y
Commit b6668734ab missed #ifdef CONFIG_SME
protection around wpa_s->sme access.

Signed-hostap: Jouni Malinen <j@w1.fi>
2012-05-27 18:17:41 -07:00
Jouni Malinen b6668734ab WNM: Add advertisement of BSS max idle period
If WNM is enabled for the build (CONFIG_WNM=y), add BSS max idle period
information to the (Re)Association Response frame from the AP and parse
this information on the station. For SME-in-wpa_supplicant case, add a
timer to handle periodic transmission of the keep-alive frame. The
actual request for the driver to transmit a frame is not yet
implemented.

Signed-hostap: Jouni Malinen <j@w1.fi>
2012-05-27 17:35:00 -07:00
Jouni Malinen b80eb89d8e P2P: Improve handling of p2p_connect-auto fallback
Commit aa9bb7644b improved robustness
of p2p_connect-auto mechanism by using older scan results to help in
determination whether the peer was operating a GO. Improve this by
accepting new GO information from scan-for-WPS-provisioning results
even if the GO is not yet ready for WPS.

In addition, fix an issue where Provision Discovery exchange timeout
could have left offchannel TX operation in progress when the fallback
was used.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2012-05-14 22:55:43 -04:00
Dmitry Shmidt dfb42efb34 wpa_supplicant: Make Android makefiles available under the BSD license
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2012-05-14 20:34:24 -04:00
Jouni Malinen 3bc462cb88 P2P: Add option for Provision Discovery before GO Negotiation
This is a workaround for interoperability issues with some deployed P2P
implementations that require a Provision Discovery exchange to be used
before GO Negotiation. The new provdisc parameter for the p2p_connect
command can be used to request this behavior without having to run a
separate p2p_prov_disc command.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2012-05-11 16:25:47 +03:00
Jouni Malinen 1cbe86e2d6 Add debug prints of scan result IEs
Excessive debug level can now be used to dump the IEs received in scan
results from both Beacon and Probe Response frames. This makes it easier
to debug issues where the driver (or well, more likely cfg80211) does
not update the IEs based on Beacon frames if even a single Probe
Response frame has been received.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2012-05-11 15:30:05 +03:00
Jouni Malinen f15854d1e1 Fix BSSID enforcement with driver-based BSS selection
Previously, wpa_supplicant did not specify BSSID to any connection
request if the driver indicated that it will take care of BSS selection.
This is fine for most use cases, but can result to issues if the network
block has an explicit bssid parameter to select which BSS is to be used.
Fix this by setting BSSID and channel when the network block includes the
bssid parameter even if the driver indicates support for BSS selection.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
intended-for: hostap-1
2012-05-11 15:27:46 +03:00
Jouni Malinen 2c1e557507 WPS: Fix BSSID filter handling
If WPS commands are used with a specific BSSID instead of wildcard,
the BSSID that was supposed to be used only for the provisioning step
may end up getting copied to the network block that gets provisioned
based on the WPS credentials. Fix this by clearing ssid->bssid_set
when creating the network block by replacing the block used for WPS
provisioning.

This issue could show up with the provisioned network not getting
selected properly with APs that have multiple radios. Depending on
the driver, this could result in only a single one of the available
BSSes being available or the connection failing completely.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
intended-for: hostap-1
2012-05-11 13:29:43 +03:00
Jouni Malinen ec4a5d32b1 Add ChangeLog entries from v1.0 release
Signed-hostap: Jouni Malinen <j@w1.fi>
2012-05-10 22:12:07 +03:00
Jouni Malinen 349493bd0c Validate WEP key lengths based on driver capabilities
The nl80211 driver interface does not allow 128-bit WEP to be used
without a vendor specific cipher suite and no such suite is defined for
this purpose. Do not accept WEP key length 16 for nl80211 driver
interface forn ow. wext-interface can still try to use these for
backwards compatibility.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2012-05-10 14:34:46 +03:00
Ben Greear 157cdad59f wpa_supplicant: Fix overlapping memcpy on WPS interface addition
I think this should fix the following valgrind complaint:

==1972== Source and destination overlap in memcpy(0x5181708, 0x5181708, 16)
==1972==    at 0x4A073BA: memcpy (mc_replace_strmem.c:602)
==1972==    by 0x45872B: wpas_wps_set_uuid (wps_supplicant.c:1116)
==1972==    by 0x4599EC: wpas_wps_update_config (wps_supplicant.c:1747)
==1972==    by 0x4C8DB0: wpa_supplicant_update_config (wpa_supplicant.c:3090)
==1972==    by 0x4C3E5E: wpa_supplicant_reload_configuration (wpa_supplicant.c:746)
==1972==    by 0x4B8B37: wpa_supplicant_ctrl_iface_process (ctrl_iface.c:4082)
==1972==    by 0x4BA39C: wpa_supplicant_ctrl_iface_receive (ctrl_iface_unix.c:168)
==1972==    by 0x4114D4: eloop_sock_table_dispatch_table (eloop.c:335)
==1972==    by 0x411541: eloop_sock_table_dispatch (eloop.c:352)
==1972==    by 0x41200D: eloop_run (eloop.c:766)
==1972==    by 0x4C8B43: wpa_supplicant_run (wpa_supplicant.c:3010)
==1972==    by 0x4D44AD: main (main.c:286)

Signed-hostap: Ben Greear <greearb@candelatech.com>
intended-for: hostap-1
2012-05-10 10:57:59 +03:00
Jouni Malinen ab28911dbf P2P: Deinitialize global P2P context on P2P mgmt interface removal
The P2P implementation assumes that the first wpa_s interface instance
is used to manage P2P operations and the P2P module maintains a pointer
to this interface in msg_ctx. This can result in issues (e.g., use of
freed memory) when the management interface is removed. Fix this by
deinitializing global P2P data if the interface that created it is
removed. This will disable P2P until the next interface is added.

Signed-hostap: Jouni Malinen <j@w1.fi>
intended-for: hostap-1
2012-05-10 10:49:22 +03:00
Jouni Malinen 2249d7149e HS 2.0: Add Hotspot 2.0 ANQP elements to Interworking queries
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2012-05-08 23:30:55 +03:00
Jouni Malinen 64855b9682 HS 2.0: Indicate Hotspot 2.0 in BSS table and status
If the AP indicates support for Hotspot 2.0, show this in the
ctrl_iface commands for BSS table and status.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2012-05-08 23:30:23 +03:00
Jouni Malinen cb4183249f HS 2.0: Add HS 2.0 Indication element into (Re)Association Request
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2012-05-08 23:30:04 +03:00
Jay Katabathuni c923b8a537 HS 2.0: Add Hotspot 2.0 indication into Probe Request
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2012-05-08 23:29:58 +03:00
Jay Katabathuni a8918e86b6 HS 2.0: Add Hotspot 2.0 station ctrl_iface
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2012-05-08 23:29:52 +03:00
Jay Katabathuni 66aadbd7bf HS 2.0: Add runtime configuration of Hotspot 2.0 station
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2012-05-08 23:29:45 +03:00
Jay Katabathuni 25471fe3b9 HS 2.0: Add Hotspot 2.0 ANQP routines
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2012-05-08 23:29:40 +03:00
Jouni Malinen 8d2f05462c Remove scripts and notes related to the Windows binary package
There are no plans to continue making the Windows binary package for
wpa_supplicant for 1.x or newer releases, so remove the scripts and
notes that are related to this.

Signed-hostap: Jouni Malinen <j@w1.fi>
2012-05-08 20:49:33 +03:00
Jouni Malinen 6f251b6bb5 P2P: Store SSID of the group in p2p_group data
This can be used with P2P management operations that need to verify
whether the local device is operating a specific group based on
P2P Group ID attribute from a peer.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2012-05-08 17:38:57 +03:00
Jouni Malinen aa9bb7644b P2P: Allow older scan results to improve p2p_connect-auto robustness
Previusly the peer was assumed to not be operating a GO if the BSS entry
for it was not updated in the single scan run started by
p2p_connect-auto. This is not very robust since a scan may miss the peer
if either a Probe Request or Probe Response frame is lost. Improve
robustness by assuming the peer is still operating the GO and starting
the join operation. If the GO is not found during PD-for-join or the
single-channel scans during the join, fall back to GO Negotiation.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2012-05-08 17:38:57 +03:00
Jouni Malinen fea7c3a055 Ignore network blocks that have invalid WEP key length
Do not try to associate with a network that has an invalid or incomplete
configuration because the association or at least data connection would
fail anyway. This commits adds a common function for checking whether a
network block is disabled to make it easier to check network blocks
without having to reject them during configuration file parsing (which
would prevent wpa_supplicant from starting). The only additional check
added in this commit is to verify the WEP key length. Similar checks for
other parameters can be added in future commits.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2012-05-07 13:39:33 +03:00
Jouni Malinen d90134e748 Update copyright and license notification in D-Bus interace P2P files
This adds the copyright notice for Intel and moves to the license
notification that uses only the BSD license. The changes were
acknowledged by email ("Berg, Johannes" <johannes.berg@intel.com>,
Mon, 7 May 2012 07:33:53 +0000).

Signed-hostap: Jouni Malinen <j@w1.fi>
2012-05-07 13:07:22 +03:00
Jouni Malinen 4732ee3a87 Add more documentation for IEEE 802.11w/PMF configuration
Signed-hostap: Jouni Malinen <j@w1.fi>
2012-05-05 16:48:23 +03:00
Jouni Malinen 3d332fe75e Fix SIM/USIM determination to support EAP-AKA'
Both EAP-AKA and EAP-AKA' use USIM. Without this change, use of real
USIM card for EAP-AKA' was not allowed to proceed, i.e., only the
software simulated USIM operations were supported.

Signed-hostap: Jouni Malinen <j@w1.fi>
intended-for: hostap-1
2012-05-05 14:19:13 +03:00
Wei-Jen Lin 1298c14594 Allow pbc_in_m1 workaround to be enabled in wpa_supplicant AP mode
This workaround for Windows 7 WPS probing mechanism was previously
allowed only with hostapd, but the same interoperability issue can
happen with wpa_supplicant AP/GO mode. Allow the workaround to be
enabled in wpa_supplicant configuration for these uses.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2012-05-03 16:51:04 +03:00
Wei-Jen Lin f571b593ba P2P: Clone max_sta_num parameter for group interfaces
This is needed to allow the max_sta_num parameter set in the main
configuration file to apply to dynamically created P2P group
interfaces.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
intended-for: hostap-1
2012-05-03 16:41:15 +03:00
Jouni Malinen 6434ad09d6 Scan only 2.4 GHz band for OBSS scans
Since we are reporting 20/40 BSS coex information only for 2.4 GHz band,
there is no need to run the full scan on dualband cards.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2012-05-03 15:55:42 +03:00
Rajkumar Manoharan c3701c66a5 Add handling of OBSS scan requests and 20/40 BSS coex reports
Add support for HT STA to report 40 MHz intolerance to the associated AP.
A HT station generates a report (20/40 BSS coexistence) of channel list
if it finds a non-HT capable AP or a HT AP which prohibits 40 MHz
transmission (i.e., 40 MHz intolerant bit is set in HT capabilities IE)
from the scan results.

Parse the OBSS scan parameter from Beacon or Probe Response frames and
schedule periodic scan to generate 20/40 coexistence channel report if
requested to do so. This patch decodes Scan Interval alone from the OBSS
Scan Parameters element and triggers scan on timeout.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2012-05-03 15:55:38 +03:00
Jouni Malinen 1f0cc27eb9 Remove unused variable if CONFIG_P2P=y is not used
Signed-hostap: Jouni Malinen <j@w1.fi>
2012-04-28 18:31:01 +03:00
Jouni Malinen d211881474 Fix D-Bus build without ctrl_iface
Commit 7de5688d68 started using
wpa_supplicant_ctrl_iface_ctrl_rsp_handle() from the D-Bus code, but
left this function in ctrl_iface.c that is included conditionally. Fix
this by moving the common function into wpa_supplicant.c so that it can
be included for builds that include only either ctrl_iface or D-Bus.

Signed-hostap: Jouni Malinen <j@w1.fi>
intended-for: hostap-1
2012-04-27 21:21:31 +03:00
Jouni Malinen 23c84252a4 P2P: Add option to force SSID/passphrase for GO Negotiation
An existing persistent group information can now be used to force GO
Negotiation to use the previously used SSID/passphrase from a persistent
group if we become a GO. This can be used as an alternative to inviting
a new P2P peer to join the group (i.e., use GO Negotiation with GO
intent 15 instead of starting an autonomous GO and using invitation),
e.g., in case a GO Negotiation Request is received from a peer while we
are not running as a GO. The persistent group to use for parameters is
indicated with persistent=<network id> parameter to p2p_connect.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2012-04-27 18:25:30 +03:00
Jouni Malinen 0918c4bf3b P2P: Add p2p_prov_disc auto mechanism
wpa_supplicant can now be requested to automatically figure out whether
the indicated peer is operating as a GO and if so, use join-a-group
style PD instead of pre-GO Negotiation PD.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2012-04-26 17:13:03 +03:00
Jouni Malinen 25a94f525c P2P: Fix PD Failure event to show peer device address
The p2p_dev_addr parameter in the P2P-PROV-DISC-FAILURE event (added in
commit f65a239ba4) was supposed to the P2P
Device Address of the peer, not the local device.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2012-04-26 17:09:02 +03:00
Jouni Malinen fcbf0b0ca9 Sync wpa_supplicant man page with README changes
The man page source was not up-to-date with removed driver wrappers,
so bring in the wpa_supplicant/README changes to make this somewhat
closer to the current state.

Signed-hostap: Jouni Malinen <j@w1.fi>
2012-04-21 19:17:14 +03:00
Jouni Malinen eab6f5e04a Remove unnecessary EVENT_RX_MGMT data validation
Make wpa_supplicant_event() more consistent by not checking
data in either location handling EVENT_RX_MGMT events. This event
is required to specify the data so this pointer cannot be NULL.

Signed-hostap: Jouni Malinen <j@w1.fi>
2012-04-21 18:57:13 +03:00
Adrien Bustany c9b72c257a P2P: Don't rely on dictionary ordering in wpas_dbus_handler_p2p_add_service
In most languages, DBus dictionaries are mapped to either sorted maps
or hash tables, so you can't control the actual ordering of the
generated a{sv}. Relying on ordering in this method is unnecessary and
makes it use from DBus much harder.

Signed-hostap: Adrien Bustany <adrien.bustany@nokia.com>
2012-04-21 18:28:10 +03:00