aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/dbus
Commit message (Collapse)AuthorAgeFilesLines
* Declare wpa_debug_* variables in src/utils/wpa_debug.hJouni Malinen2013-12-312-8/+0
| | | | | | | | | These were somewhat more hidden to avoid direct use, but there are now numerous places where these are needed and more justification to make the extern int declarations available from wpa_debug.h. In addition, this avoids some warnings from sparse. Signed-hostap: Jouni Malinen <j@w1.fi>
* Add definitions for new cipher suites from IEEE Std 802.11ac-2013Jouni Malinen2013-12-241-1/+35
| | | | | | | This adds initial parts for supporting the new GCMP-256, CCMP-256, BIP-GMAC-128, BIP-GMAC-256, and BIP-CMAC-256 cipher suites. Signed-hostap: Jouni Malinen <j@w1.fi>
* Add CONFIG_CODE_COVERAGE=y option for gcovJouni Malinen2013-11-241-1/+1
| | | | | | This can be used to measure code coverage from test scripts. Signed-hostap: Jouni Malinen <j@w1.fi>
* D-Bus: Add support to set pkcs11_{engine,module}_pathMichael Schaller2013-11-233-0/+155
| | | | | | | Add SetPKCS11EngineAndModulePath D-Bus method. Add PKCS11EnginePath and PKCS11ModulePath D-Bus property getters. Signed-hostap: Michael Schaller <misch@google.com>
* dbus_new: Add DBus TDLS methodsPaul Stewart2013-11-173-0/+204
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add DBus methods for TDLS operations similar to those available for the control interface. This includes Discover, Setup, and Teardown commands. While here, add a method to query the TDLS link status and add a DBus method for it. Tested with CONFIG_TDLS enabled, on a TDLS-enabled host and peer capable of TDLS: dbus-send --system --dest=fi.w1.wpa_supplicant1 --print-reply \ /fi/w1/wpa_supplicant1/Interfaces/0 \ fi.w1.wpa_supplicant1.Interface.TDLSStatus string:<peer-mac-address> yields: string "peer does not exist" dbus-send --system --dest=fi.w1.wpa_supplicant1 --print-reply \ /fi/w1/wpa_supplicant1/Interfaces/0 \ fi.w1.wpa_supplicant1.Interface.TDLSDiscover string:<peer-mac-address> yields no error dbus-send --system --dest=fi.w1.wpa_supplicant1 --print-reply \ /fi/w1/wpa_supplicant1/Interfaces/0 \ fi.w1.wpa_supplicant1.Interface.TDLSSetup string:<peer-mac-address> yields no error dbus-send --system --dest=fi.w1.wpa_supplicant1 --print-reply \ /fi/w1/wpa_supplicant1/Interfaces/0 \ fi.w1.wpa_supplicant1.Interface.TDLSStatus string:<peer-mac-address> yields: string "connected" after TDLS completes dbus-send --system --dest=fi.w1.wpa_supplicant1 --print-reply \ /fi/w1/wpa_supplicant1/Interfaces/0 \ fi.w1.wpa_supplicant1.Interface.TDLSTeardown string:<peer-mac-address> yields no error dbus-send --system --dest=fi.w1.wpa_supplicant1 --print-reply \ /fi/w1/wpa_supplicant1/Interfaces/0 \ fi.w1.wpa_supplicant1.Interface.TDLSStatus string:<peer-mac-address> yields: string "peer not connected" Signed-hostap: Paul Stewart <pstew@chromium.org>
* P2P: Add VHT parameter to P2P operationsEliad Peller2013-10-271-5/+5
| | | | | | | | | | | | Add the option to ask for VHT operation similarly to the way ht40 is configured - either by adding 'vht' param to the relevant p2p_* commands or by configuring p2p_go_vht=1 in the configuration file. This patch only adds the configuration option (e.g., via control interface). The actual handling of the VHT parameter (asking the driver to use VHT, etc.) will be done by the following patch. Signed-hostap: Eliad Peller <eliadx.peller@intel.com>
* Use ARRAY_SIZE() macroJouni Malinen2013-10-262-11/+11
| | | | | | | Replace the common sizeof(a)/sizeof(a[0]) constructions with a more readable version. Signed-hostap: Jouni Malinen <j@w1.fi>
* dbus: Add boolean AllowRoam option to Scan() method options dictionaryDan Williams2013-10-221-0/+27
| | | | | | | | To disallow roaming when a scan request's results are read, callers of the D-Bus Scan() method may add a new "AllowRoam" boolean key to the scan options dictionary and set that key's value to FALSE. Signed-hostap: Dan Williams <dcbw@redhat.com>
* D-Bus: Clean up debug print for P2P invitation resultJouni Malinen2013-10-201-1/+1
| | | | | | | | wpa_printf() does not need '\n' so remove the extra newline. In addition, drop the priority of this message from MSG_INFO to MSG_DEBUG since this is in no way exceptional operation. Signed-hostap: Jouni Malinen <j@w1.fi>
* P2P: Use group formation timeout on persistent group GOJouni Malinen2013-09-261-1/+1
| | | | | | | | | | | | | | | | Previously, GO considered the group to be fully re-invoked after starting beaconing on successful invitation exchange. This would leave the group running until idle timeout (which may not be enabled) or explicit removal if the client fails to connect for any reason. Since the client is expected to connect immediately after the invitation exchange that ends with status=0 (i.e., either client initiated the exchange or it responded with success), extend group formation timeout to cover that period until the first successfully completed data connection. This allows the GO to remove the group automatically if the client devices does not connect within P2P_MAX_INITIAL_CONN_WAIT_GO_REINVOKE (15) seconds. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* D-Bus: Fix per-iface object unregistration on not existing objectsJouni Malinen2013-08-311-3/+3
| | | | | | | If the private data for an object is not found, do not try to unregister that object to avoid D-Bus errors. Signed-hostap: Jouni Malinen <j@w1.fi>
* dbus: Register the AutoScan method call at the right placeTomasz Bursztyka2013-07-011-9/+9
| | | | Signed-hostap: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
* D-Bus: Emit signal when a station is authorized or deauthorizedChengyi Zhao2013-06-222-0/+98
| | | | | | | | | | Add "StaAuthorized" and "StaDeauthorized" D-Bus interface in AP mode. After enabling the AP mode of wpa_supplicant, the other process need to get the MAC address and authorization status of every station, so wpa_supplicant emits signal when the station is authorized or deauthorized. Signed-hostap: Chengyi Zhao <chengyix.zhao@gmail.com>
* dbus: Terminate cleanly on messagebus shutdownDaniel Gnoutcheff2013-05-161-1/+24
| | | | | | | | | | | | | | By default, dbus_connection_dispatch() will call _exit() if the bus connection has been closed. This caused wpa_supplicant to terminate without properly cleaning up after itself. To ensure that we terminate cleanly when the messagebus terminates, override the exit_on_disconnect behavior and install a filter to handle libdbus's "Disconnected" signal. [Bug 474] Signed-hostap: Daniel Gnoutcheff <daniel@gnoutcheff.name>
* dbus_new: Add EAP logon/logoffPaul Stewart2013-04-233-0/+50
| | | | | | | | | Add "EAPLogoff" and "EAPLogon" interface DBus commands which parallel the "logoff" and "logon" wpa_ctrl commands which terminate and restart EAP authentication. Slightly enhance the "logon" case by expiring any running "startWhile" timer. Signed-hostap: Paul Stewart <pstew@chromium.org>
* Fix build with CONFIG_NO_CONFIG_BLOBSJouni Malinen2013-03-164-0/+13
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* wpa_supplicant: Reschedule sched scan after network changeDavid Spinadel2013-03-101-0/+13
| | | | | | | Stop sched scan, if running, after any disabling or removing of a network, and request a new scan if needed. Signed-hostap: David Spinadel <david.spinadel@intel.com>
* P2P: Use peer's channel list to limit GO freq on invitationJouni Malinen2013-03-011-1/+2
| | | | | | | | | Peer device includes its list of allowed operating channels in the Invitation Response frame. When we are becoming the GO, use that list from the peer to filter out acceptable channels to avoid selecting a channel that the peer is unable to use. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* P2P: Allow P2P client to specify preferred group channelJouni Malinen2013-03-011-1/+2
| | | | | | | | | | When re-invoking a persistent group in P2P client role, the new pref=<MHz> parameter can now be used with the p2p_invite command to indicate a preferred operating frequency. Unlike the older freq=<MHz> parameter, this leaves GO an option to select another channel (from our supported channels) if the GO cannot accept the channel. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* dbus: Add missing signal description for WPS (7)Peter Wu2013-02-091-0/+3
| | | | | | | | | | | | Commit caff399250311abfea3376b38530a88bb78b957d added a property named "WPS" to the dbus interface. It did not add the new WPAS_DBUS_BSS_PROP_WPS property to the function responsible for marking changed properties though. This cause the following messages to be printed repeatedly to syslog: dbus: wpas_dbus_bss_signal_prop_changed: Unknown Property value 7 Signed-hostap: Peter Wu <lekensteyn@gmail.com>
* Remove unneeded header file inclusionJouni Malinen2012-11-251-1/+0
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* Use a shared function for requesting a new connectionJouni Malinen2012-11-251-7/+1
| | | | | | | | Both the ctrl_iface and D-Bus interface use similar functionality to request a new connection. Combine these to a single function to avoid need to maintain duplicated implementation. Signed-hostap: Jouni Malinen <j@w1.fi>
* Maintain maximum blacklist count over list clear operationsJouni Malinen2012-11-251-0/+1
| | | | | | | | | | | | wpas_connection_failed() uses the blacklist count to figure out a suitable time to wait for the next scan. This mechanism did not work properly in cases where the temporary blacklist gets cleared due to no other BSSes being available. Address this by maintaining an additional count of blacklisting values over wpa_blacklist_clear() calls. In addition, add one more step in the count to timeout mapping to go to 10 second interval if more than four failures are seen. Signed-hostap: Jouni Malinen <j@w1.fi>
* Document wpa_s->scan_reqJouni Malinen2012-11-252-2/+2
| | | | | | | Use an enum with documented values to make it easier to understand how wpa_s->scan_req is used. Signed-hostap: Jouni Malinen <j@w1.fi>
* dbus: Do not quote scan_freq and freq_listRobert Shade2012-11-111-1/+1
| | | | | | | scan_freq and freq_list are not parsed by wpa_config_parse_freqs if quoted. Signed-hostap: Robert Shade <robert.shade@gmail.com>
* new_dbus_handlers: Clear errnoPaul Stewart2012-11-111-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are a few instances where dbus handlers test the value of errno to test whether strtoul completes successfully. Since strtoul does not clear errno, and there's no strong reason to suspect that errno is already clear, it is safer to clear it right before calling strtoul. Also, any failure in strtoul (setting errno non-zero) should be considered a failure. While testing using dbus-send, I found that a malformed network path can cause a crash due to net_id being left NULL. We should test for this before calling strtoul on it. Tested with: dbus-send --system --dest=fi.w1.wpa_supplicant1 --print-reply \ /fi/w1/wpa_supplicant1/Interfaces/0 \ org.freedesktop.DBus.Properties.Get \ string:fi.w1.wpa_supplicant1.Interface string:Networks dbus-send --system --dest=fi.w1.wpa_supplicant1 --print-reply \ /fi/w1/wpa_supplicant1/Interfaces/0 \ fi.w1.wpa_supplicant1.Interface.RemoveNetwork \ objpath:/fi/w1/wpa_supplicant1/Interfaces/0/Networks/0 dbus-send --system --dest=fi.w1.wpa_supplicant1 --print-reply \ /fi/w1/wpa_supplicant1/Interfaces/0 \ fi.w1.wpa_supplicant1.Interface.RemoveNetwork \ objpath:/fi/w1/wpa_supplicant1/Interfaces/0/Networks/0 dbus-send --system --dest=fi.w1.wpa_supplicant1 --print-reply \ /fi/w1/wpa_supplicant1/Interfaces/0 \ fi.w1.wpa_supplicant1.Interface.RemoveNetwork \ objpath:/fi/w1/wpa_supplicant1/Interfaces/0 Signed-hostap: Paul Stewart <pstew@chromium.org> intended-for: hostap-1
* Use deauthentication instead of disassociation if not associatedJouni Malinen2012-11-051-1/+2
| | | | | | | | cfg80211/mac80211 may reject disassociation command if association has not yet been formed. Use deauthentication in cases where it is possible that we are associating at the moment the command is issued. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* dbus: Add getter for WPS propertiesSven Neumann2012-11-034-0/+65
| | | | | | | Add "WPS" property to the DBus interface that allows to identify the active WPS method of a BSS. Signed-hostap: Sven Neumann <s.neumann@raumfeld.com>
* WPS: Allow PIN timeout to be specified with wpa_supplicant AP/GOJouni Malinen2012-10-101-1/+1
| | | | | | | | Extend the wpa_cli wps_pin command to support specification of the PIN expiration time in seconds similarly to hostapd_cli wps_pin command when using wpa_supplicant for AP mode (including P2P GO). Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* dbus: Add global capabilities propertyDan Williams2012-09-293-0/+46
| | | | | | | | | | | | Otherwise it's difficult to determine if the supplicant was built with CONFIG_AP, CONFIG_IBSS_RSN, CONFIG_P2P, etc. CONFIG_AP and CONFIG_P2P can be inferred from the introspection data of the Interface object, but CONFIG_IBSS_RSN does not change the introspection data at all and thus it's impossible to determine whether the supplicant supports it without knowing its compile-time options. Signed-hostap: Dan Williams <dcbw@redhat.com> intended-for: hostap-1
* P2P: Allow p2p_invite-persistent to specify channel for GOJouni Malinen2012-08-311-1/+1
| | | | | | | The freq and ht40 parameters can now be used with the p2p_invite command when reinvoking a persistent group as the GO. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* Add support for using GCMP cipher from IEEE 802.11adJouni Malinen2012-08-291-1/+18
| | | | | | | | | | | | | | | | This allows both hostapd and wpa_supplicant to be used to derive and configure keys for GCMP. This is quite similar to CCMP key configuration, but a different cipher suite and somewhat different rules are used in cipher selection. It should be noted that GCMP is not included in default parameters at least for now, so explicit pairwise/group configuration is needed to enable it. This may change in the future to allow GCMP to be selected automatically in cases where CCMP could have been used. This commit does not included changes to WPS or P2P to allow GCMP to be used. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* P2P: Add option for adding extra delay to p2p_findJouni Malinen2012-08-231-1/+1
| | | | | | | | | | A new optional delay=<search delay in milliseconds> parameter can now be used with p2p_find command to request an extra delay between search iterations. This can be used, e.g., to make p2p_find friendlier to concurrent operations by avoiding it from taking 100% of the radio resources. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* P2P: Add optional "ht40" argument for p2p_connectRajkumar Manoharan2012-08-151-1/+1
| | | | | | | This can be used to start negotiated GO in 40 MHz channel width in 5GHz band. Signed-hostap: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
* P2P: Enable 40 MHz support for autonomous P2P group additionRajkumar Manoharan2012-08-151-2/+2
| | | | | | | | Add optional "ht40" argument for p2p_group_add command to enable 40 MHz in 5GHz band. This configures the secondary channel, when HT support is enabled and if the HW supports 40 MHz channel width. Signed-hostap: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
* Convert os_realloc() for an array to use os_realloc_array()Jouni Malinen2012-08-132-12/+14
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* Convert os_zalloc() for an array to use os_calloc()Jouni Malinen2012-08-132-6/+6
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* wpa_supplicant: Add DBus "Reassociate" commandPaul Stewart2012-08-093-0/+36
| | | | | | | Create a DBus command to reassociate, similar to the ctrl-interface "reassociate" command. Signed-hostap: Paul Stewart <pstew@chromium.org>
* D-Bus: Fix wpas_dbus_getter_bss_expire_countFernando Herrera2012-08-041-1/+1
| | | | | | | bss_expire_count getter was getting a wrong value. Fix it to return bss_expiration_scan_count. intended-for: hostap-1
* D-Bus: Remove network_object dictionary entry from signal GroupStartedMichael Naumov2012-08-041-7/+0
| | | | | | | | | | The network_object path should be returned by the NetworkAdded signal and not by the GroupStarted Signal. Starting a Group does not necessarily validate the network object. Signed-hostap: Michael Naumov <michael.naumov@intel.com> Signed-hostap: Nirav Shah <nirav.j2.shah@intel.com> intended-for: hostap-1
* Fix a couple memory leaksPaul Stewart2012-08-041-0/+1
| | | | | | Found using valgrind. Signed-hostap: Paul Stewart <pstew@chromium.org>
* Update license notification in D-Bus interface filesJouni Malinen2012-07-0218-144/+36
| | | | | | | | This updates these files to use the license notification that uses only the BSD license. The changes were acknowledged by email (Dan Williams <dcbw@redhat.com>, Sun, 01 Jul 2012 15:53:36 -0500). Signed-hostap: Jouni Malinen <j@w1.fi>
* Export disconnect reason code to dbusGary Morain2012-06-304-0/+40
| | | | | | | | | | | In the properties changed signal, added a new property "DisconnectReason", which carries the IEEE 802.11 reason code of the most recent disassociation or deauthentication event. The reason code is negative if it is locally generated. The property is sent to the DBUS immediately so as to prevent it from being coalesced with other disconnect events. Signed-off-by: Gary Morain <gmorain@chromium.org>
* Allow autoscan parameters to be changed in SCANNING stateJouni Malinen2012-06-261-0/+2
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* Start autoscan for first connection attemptJouni Malinen2012-06-261-1/+1
| | | | | | | | | Use wpa_supplicant_set_state() to initialize state to DISCONNECT so that autoscan gets initialized properly. This needs a change in autoscan_init() to avoid extra scan request that would postpone the first scan request when an interface is added. Signed-hostap: Jouni Malinen <j@w1.fi>
* D-Bus: Add AutoScan interface method to set/unset autoscan parametersTomasz Bursztyka2012-06-263-0/+58
| | | | Signed-hostap: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
* Add automatic scanning supportTomasz Bursztyka2012-06-261-0/+4
| | | | | | | | | | | | | | | | | | | Like bgscan, autoscan is an optional module based feature to automate scanning but while disconnected or inactive. Instead of requesting directly a scan, it only sets the scan_interval and the sched_scan_interval. So, if the driver supports sched_scan, autoscan will be able to tweak its interval. Otherwise, the tweaked scan_interval will be used. If scan parameters needs to be tweaked, an autoscan_params pointer in wpa_s will provide those. So req_scan / req_sched_scan will not set the scan parameters as they usually do, but instead will use this pointer. Modules will not have to request a scan directly, like bgscan does. Instead, it will need to return the interval it wants after each notification. Signed-hostap: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
* wpa_supplicant: Report EAP connection progress to DBusPaul Stewart2012-06-042-0/+50
| | | | | | | | | | | | | | | | | | | | | 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>
* P2P: Add option for Provision Discovery before GO NegotiationJouni Malinen2012-05-111-1/+1
| | | | | | | | | | 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>
* Update copyright and license notification in D-Bus interace P2P filesJouni Malinen2012-05-072-17/+6
| | | | | | | | | 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>