aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/wpa_supplicant_i.h
Commit message (Collapse)AuthorAgeFilesLines
* Move network add/remove operations to a common functionRoshan Pius2016-08-181-0/+2
| | | | | | | | | All the 3 control interfaces: socket based, dbus & binder needs to perform the same sequence of steps for network add/remove. So, move these to a common utility method in |wpa_supplicant.c| instead of duplicating the code everywhere. Signed-off-by: Roshan Pius <rpius@google.com>
* Move disconnect command handling to a common placeRoshan Pius2016-08-131-0/+1
| | | | | | | | Move out the disconnect command handling from |ctrl_iface.c| to |wpa_supplicant.c| so that it can be reused across the different control interfaces (socket, dbus & binder). Signed-off-by: Roshan Pius <rpius@google.com>
* P2P: Allow P2P listen being offloaded to the driver/firmwarePeng Xu2016-07-031-0/+1
| | | | | | | | | | | | | This allows P2P Listen to be offloaded to device to enhance power saving. To start P2P listen offload, from wpa_cli interface, issue the command: p2p_lo_start <freq> <period> <interval> <count> To stop P2P listen offload, issue the command: p2p_lo_stop Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* wpa_supplicant: Handle LCI requestDavid Spinadel2016-04-171-0/+10
| | | | | | | | | | | | | | Handle radio measurement request that contains LCI request. Send measurement report based on a configurable LCI report element. The LCI report element is configured over the control interface with SET lci <hexdump of the element> and cleared with SET lci "" Signed-off-by: David Spinadel <david.spinadel@intel.com>
* wpa_supplicant: Add LCI and civic request to Neighbor Report RequestDavid Spinadel2016-04-161-1/+2
| | | | | | | | | | | | | | | | Add an option to request LCI and Location Civic Measurement in Neighbor Report Request frame, as described in IEEE P802.11-REVmc/D5.0, 9.6.7.6. Note: This changes the encoding format of the NEIGHBOR_REP_REQUEST ssid=<val> parameter. This used to be parsed as raw SSID data which is problematic for accepting additional parameters. The new encoding allows either a string within double-quotation marks or a hexdump of the raw SSID. Thew new format: NEIGHBOR_REP_REQUEST [ssid=<SSID>] [lci] [civic] Signed-off-by: David Spinadel <david.spinadel@intel.com>
* utils: Add ssid_parse() functionDavid Spinadel2016-04-161-5/+0
| | | | | | | | | | Add a function that parses SSID in text or hex format. In case of the text format, the SSID is enclosed in double quotes. In case of the hex format, the SSID must include only hex digits and not be enclosed in double quotes. The input string may include other arguments after the SSID. Signed-off-by: David Spinadel <david.spinadel@intel.com>
* binder: Implement interface add/remove methodsRoshan Pius2016-04-021-0/+3
| | | | | | | | | | | | | This commit implements the methods defined in Supplicant service: 1. CreateInterface 2. RemoveInterface 3. GetInterface The binder service returns the corresponding iface binder object references which can be used by clients to control a specific interface. Signed-off-by: Roshan Pius <rpius@google.com>
* binder: Add binder skeletal code for AndroidRoshan Pius2016-04-021-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Create the skeletal binder interface for wpa_supplicant. The interface hierarchy is based off the existing dbus interface(https://w1.fi/wpa_supplicant/devel/dbus.html). Since we use libbinder, the binder interface codebase needs to be written in C++ and can only be compiled on Android platform for now. The aidl files define binder RPC interfaces. The Android build system generates the corresponding C++ interface classes which needs to be implemented by the server process. The clients can obtain a reference to the binder service (root object) using: android::String16 service_name("fi.w1.wpa_supplicant"); android::sp<android::IBinder> binder = android::defaultServiceManager()->getService(service_name); Once a reference to the root object is retrieved, the clients can obtain references to other RPC objects using that root object methods. Signed-off-by: Roshan Pius <rpius@google.com>
* Include previous BSSID in connection request to indicate reassociationJouni Malinen2016-03-241-1/+2
| | | | | | | | This allows the SME-in-the-driver case to get similar information about reassociation that was already available for the SME-in-wpa_supplicant case. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* Add interface matching support with -M, guarded by CONFIG_MATCH_IFACERoy Marples2016-03-221-0/+16
| | | | | | | | | The new wpa_supplicant command line argument -M can be used to describe matching rules with a wildcard interface name (e.g., "wlan*"). This is very useful for systems without udev (Linux) or devd (FreeBSD). Signed-off-by: Roy Marples <roy@marples.name>
* mesh: Use appropriate BLOCKED state durationMasashi Honma2016-03-201-1/+0
| | | | | | | | | | | | | | Previously, BLOCKED state duration slightly increased up to 3600. Though the BLOCKED state could be canceled by ap_handle_timer(). Because the timer timeouts in ap_max_inactivity(default=300sec) and remove STA objects (the object retains BLOCKED state). This patch re-designs my commit bf51f4f82bdb50356de5501acac53fe1b91a7b86 ('mesh: Fix remaining BLOCKED state after SAE auth failure') to replace mesh_auth_block_duration by ap_max_inactivity and remove incremental duration. Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
* D-Bus: Add association response status code property for failure casesNaveen Singh2016-03-061-0/+3
| | | | | | | | | | (Re)Association Response frame with status code other than 0 is now notified over DBUS as a part of PropertiesChanged signal. This can be used by application in case AP is denying association with status code 17 (band steering) so that it does not interfere in the BSSID selection logic of wpa_supplicant. Signed-off-by: Naveen Singh <nasingh@google.com>
* wpa_supplicant: Expose wpas_get_bands() and related APILior David2016-03-031-5/+3
| | | | | | | | Expose the functions wpas_get_bands() and wpas_freq_to_band() and the enum wpa_radio_work_band, since they will be needed outside wpa_supplicant.c. Signed-off-by: Lior David <qca_liord@qca.qualcomm.com>
* P2P: Add a separate pointer to the P2P Device instanceLior David2016-02-271-0/+1
| | | | | | | | | | | | | | | In many places in the code there was a reference to wpa_s->parent to get from group interface to p2p_dev interface. These places can break if P2P_DEVICE interface would need to be used with the primary interface as the group interface, since the parent of the primary interface points to itself and not the p2p_dev interface. Fix this by adding a separate "p2pdev" pointer to wpa_supplicant, it will be the same as parent pointer in most cases but whenever the primary interface is used as a group interface, change it to point to the correct p2p_dev interface. Signed-off-by: Lior David <qca_liord@qca.qualcomm.com>
* WNM: Optimize a single BSS transition management candidate scanJouni Malinen2016-02-261-0/+1
| | | | | | | | | | | If the BSS Transition Management Request frame includes only a single candidate and we need to scan for the BSS to get up-to-date information, use a scan for the known BSSID instead of wildcard BSSID. In addition, set the SSID in the scan if it is known based on old scan results in the BSS table. This removes unnecessary Probe Response frames when we are interested in results from only a single BSS. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* MBO: Send WNM-Notification when cellular capabilities changeAvraham Stern2016-02-221-0/+1
| | | | | | | Send a WNM-Notification to the associated AP to indicate changes in cellular data capabilities. Signed-off-by: Avraham Stern <avraham.stern@intel.com>
* WNM: Add candidate list to BSS transition responseAvraham Stern2016-02-221-0/+5
| | | | | | | | | Add the transition candidate list to BSS Transition Management Response frame. The candidates preference is set using the regular wpa_supplicant BSS selection logic. If the BSS transition request is rejected and updated scan results are not available, the list is not added. Signed-off-by: Avraham Stern <avraham.stern@intel.com>
* MBO: Add MBO IE to BSS Transition Management Response frameAvraham Stern2016-02-221-0/+3
| | | | | | | | | When rejecting a BSS Transition Management Request frame, add MBO IE to the BSS Transition Management Response frame to specify the transition rejection reason. Signed-off-by: David Spinadel <david.spinadel@intel.com> Signed-off-by: Avraham Stern <avraham.stern@intel.com>
* MBO: Parse MBO IE in BSS Transition Management Request framesAvraham Stern2016-02-221-0/+18
| | | | | | | | | | | | | Add parsing of MBO IE in BSS Transition Management Request frames. If the MBO IE includes the association retry delay attribute, do not try to reconnect to the current BSS until the delay time is over. If the MBO IE includes the cellular data connection preference attribute or the transition rejection reason attribute, send a message to upper layers with the data. Signed-off-by: David Spinadel <david.spinadel@intel.com> Signed-off-by: Avraham Stern <avraham.stern@intel.com>
* MBO: Add Supported Operating Classes element to Association RequestAvraham Stern2016-02-221-0/+2
| | | | Signed-off-by: Avraham Stern <avraham.stern@intel.com>
* MBO: Prevent association to APs that explicitly disallow thisDavid Spinadel2016-02-221-0/+1
| | | | | | | Prevent association to MBO APs that have association disallowed attribute in MBO IE in Beacon or Probe Response frames. Signed-off-by: David Spinadel <david.spinadel@intel.com>
* MBO: Add cellular capability to MBO IEDavid Spinadel2016-02-221-0/+1
| | | | | | | | Add cellular capability attribute to MBO IE and add MBO IE with cellular capabilities to Probe Request frames. By default, cellular capability value is set to Not Cellular capable (3). Signed-off-by: David Spinadel <david.spinadel@intel.com>
* MBO: Send MBO WNM-Notification Request frames to notify changesDavid Spinadel2016-02-221-0/+1
| | | | | | | | Send a WNM-Notification Request frame with Non-preferred Channel Report subelement if the non-preferred channels list changes during an association. Signed-off-by: David Spinadel <david.spinadel@intel.com>
* MBO: Implement MBO non-preferred channel report in Association RequestDavid Spinadel2016-02-221-0/+18
| | | | | | | Add MBO IE with non-preferred channels to (Re)Association Request frames. Signed-off-by: David Spinadel <david.spinadel@intel.com>
* wpa_supplicant: Share a single get_mode() implementationAvraham Stern2016-02-211-0/+3
| | | | | | There is no need to duplicate this helper function in multiple files. Signed-off-by: Avraham Stern <avraham.stern@intel.com>
* HS 2.0: Convert icon storage to use dl_listJouni Malinen2015-12-191-2/+2
| | | | | | This simplifies the list operations quite a bit. Signed-off-by: Jouni Malinen <j@w1.fi>
* HS 2.0: Add a command to retrieve icon with in-memory storageJan Nordqvist2015-12-191-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a new command based Hotspot 2.0 icon retrieval option. In short, here is the new command sequence: 1. REQ_HS20_ICON <bssid> <file-name> 2. event: RX-HS20-ICON <bssid> <file-name> <size> 3. GET_HS20_ICON <bssid> <file-name> <offset> <size> (if needed, repeat with larger offset values until full icon is fetched) 5. DEL_HS20_ICON <bssid> <file-name> REQ_HS20_ICON is a new command that is analogous to HS20_ICON_REQUEST with the slight difference that an entry to store the icon in memory is prepared. The RX-HS20-ICON event has been augmented with BSSID, file-name and size, and GET_HS20_ICON is used to retrieve a chunk of up to <size> bytes of icon data at offset <offset>. Each chunk is returned as a base64 encoded fragment, preceded by "HS20-ICON-DATA", BSSID, and file-name as well as the starting offset of the data. If there is no entry prepared for the icon when the ANQP result comes back, hs20_process_icon_binary_file falls back to legacy behavior. Finally the DEL_HS20_ICON command deletes (all) icons associated with BSSID and file-name (there could be several if retries are used and they have different dialog tokens). Signed-off-by: Jan Nordqvist <jannq@google.com>
* dbus: Add support for vendor specific elementsAvichal Agarwal2015-12-061-0/+6
| | | | | | | | | | | | | | | | | | The new methods are 1. VendorElemAdd "i" "ay" i=integer ay=array of bytes 2. VendorElemGet "i" i=integer (output array of bytes) 3. VendorElemRem "i" "ay" i=integer ay=array of bytes These provide functionality similar to the control interface commands VENDOR_ELEM_ADD, VENDOR_ELEM_GET, and VENDOR_ELEM_REMOVE. Signed-off-by: Avichal Agarwal <avichal.a@samsung.com> Signed-off-by: Purushottam Kushwaha <p.kushwaha@samsung.com> Signed-off-by: Kyeong-Chae Lim <kcya.lim@samsung.com> Signed-off-by: Mayank Haarit <mayank.h@samsung.com> Signed-off-by: Dilshad Ahmad <dilshad.a@samsung.com> [VendorElemGet to return array of bytes instead of string; cleanup] Signed-off-by: Jouni Malinen <j@w1.fi>
* Add support for configuring scheduled scan plansAvraham Stern2015-11-301-1/+7
| | | | | | | | | | | | Add the option to configure scheduled scan plans in the config file. Each scan plan specifies the interval between scans and the number of scan iterations. The last plan will run infinitely and thus specifies only the interval between scan iterations. usage: sched_scan_plans=<interval:iterations> <interval2:iterations2> ... <interval> Signed-off-by: Avraham Stern <avraham.stern@intel.com>
* P2P: Add support for VHT 80+80 MHz and 160 MHzAhmad Kholaif2015-11-251-0/+3
| | | | | | | | | The new max_oper_chwidth and freq2 arguments to P2P_CONNECT, P2P_INVITE, and P2P_GROUP_ADD control interface commands can be used to request larger VHT operating channel bandwidth to be used than the previously used maximum 80 MHz. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* P2P: Add a testing option to force P2P GO CSAIlan Peer2015-11-221-0/+1
| | | | | | | Add a testing option to force a P2P GO CSA on successful invitation to join an active P2P GO. Signed-off-by: Ilan Peer <ilan.peer@intel.com>
* Add VHT support for MeshPeter Oh2015-11-191-0/+1
| | | | | | | | | | Mesh Points themselves have capability to support VHT as long as hardware supports it. However, supporting VHT in mesh mode was disabled because no one had clearly tested and confirmed its functionality. Since VHT80 has now been verified to work with ath10k QCA988X driver and mac80211_hwsim, enable VHT support in mesh mode. Signed-off-by: Peter Oh <poh@qca.qualcomm.com>
* WNM: Ignore WNM-Sleep Mode Response if WNM-Sleep Mode has not been usedJouni Malinen2015-11-101-0/+1
| | | | | | | | The AP is not expected to send out a WNM-Sleep Mode Response frame without the STA trying to use WNM-Sleep Mode. Drop such unexpected responses to reduce unnecessary processing of the frame. Signed-off-by: Jouni Malinen <j@w1.fi>
* P2PS: Indicate the chosen operating frequencyIlan Peer2015-10-111-0/+1
| | | | | | | | On successful P2P PD, report the chosen frequency in case the local device is going to be the P2P GO, so in can later be used to instantiate the new P2P GO, etc. Signed-off-by: Ilan Peer <ilan.peer@intel.com>
* Parallelize distinct radio work operationsKanchanapally, Vidyullatha2015-09-301-0/+10
| | | | | | | | | This commit contains the necessary changes to parallelize distinct radio work operations which are different in type and the band used, only when the underlying driver is capable of supporting such simultaneous offchannel operations. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* P2P: Require fresh scan results for persistent group re-invocationJouni Malinen2015-08-211-0/+2
| | | | | | | | | | | | | | | | | | The P2P group is not yet operating when going through invitation exchange for re-invocation. Previously, an old cached scan result could be used to skip the scan immediately after the invitation exchange. While this may result in the fastest possible connection, it does have some issues with cases where the GO takes some time to start up. It would also be at least theoretically possible for some of the BSS parameters to be different, so having a fresh scan result from the new GO instance may be desired in any case. Add a mechanism to skip scan results that have been last updated before a specific point in time and as the first user for this mechanism, require chan results to be more recent than the invitation message exchange for the P2P Client role in persistent group re-invocation case. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* P2PS: Authorize any peer for P2PS method if interface address not knownAndrei Otcheretianski2015-08-061-1/+1
| | | | | | | | | | | | | | | | | When P2PS PD with default P2PS method is done, the peer that becomes GO should authorize the client. However, P2PS specification doesn't require the client to include its intended interface address in PD Request/Response. As a result, the P2P Client's interface address may not be known and any address may need to be authorized. Previously, client's P2P Device Address was used for authorization, which is not correct when a dedicated interface is used for P2P Client. This is not resulting in a connection failure, however it causes a significant delay (until WPS_PIN_TIME_IGNORE_SEL_REG elapses). Fix this by authorizing the intended interface address, if known; or any address, if not known. Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
* FST: Mark fst_ies buffer constJouni Malinen2015-08-031-1/+1
| | | | | | | | This buffer is owned by the FST module, so mark it const in the set_ies() callback to make it clearer which component is responsible for modifying and freeing this. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* P2P: Fix P2P configuration file nameGautam2015-08-021-1/+1
| | | | | | | | | The P2P configuration file is wrongly set as STA configuration file, even though a separate configuration file is mentioned with '-m' option. Add initialization and deallocation of global.params->conf_p2p_dev to fix this. Signed-off-by: Gautam <gautams@broadcom.com>
* QCA vendor command support to set band to driverSrinivas Dasari2015-07-281-1/+1
| | | | | | | | | Add vendor command to pass SET setband command to the driver and read the updated channel list from driver when this notification succeeds. This allows the driver to update its internal channel lists based on setband configuration. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* FST: Integration into wpa_supplicantAnton Nayshtut2015-07-161-0/+16
| | | | | | This commit integrates the FST into the wpa_supplicant. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* P2P: Handle P2P Device dedicated interface parent removalIlan Peer2015-06-191-11/+12
| | | | | | | | | | | | | | | | | In case of a network interface removal, check if the interface was also the parent interface of the P2P Device dedicated interface. If this is the case, then stop the P2P Device functionality, and remove the P2P Device dedicated interface. In case that the interface is added again and P2P Device functionality can be enabled again, add a new P2P Device dedicated interface and allow further P2P Device functionality. In case that the P2P Device dedicated interface is re-created, the original P2P Device configuration file is needed, so store it in the global params (instead in the wpa_interface configuration). Signed-off-by: Ilan Peer <ilan.peer@intel.com>
* P2P: Fix PBC overlap detectionAvraham Stern2015-06-191-0/+2
| | | | | | | | | | | | | | PBC overlap detection searches for another BSS with active PBC in the BSS table. However, when a separate P2P interface is used, scan results without P2P IE are not saved in the BSS table, so non-P2P BSS's with active PBC will not be detected. Fix this by iterating only the WPS AP array instead of the BSS table. This is also more efficient since only WPS APs may have active PBC. This also fixes hwsim test "grpform_pbc_overlap" when a dedicated P2P Device is used. Signed-off-by: Avraham Stern <avraham.stern@intel.com>
* P2PS: Enable Probe Request frame processing by P2P ClientMax Stepanov2015-06-141-0/+1
| | | | | | | | | | | | | | | | 1. Add global p2p_cli_probe property to enable/disable Probe Request frame RX reporting for connected P2P Clients. The property can be set to 0 - disable or 1 - enable. The default value is 0. 2. Enable Probe Request frame RX reporting for P2P Client on WPA_COMPLETED state if p2p_cli_probe property is set to 1. Disable it when an interface state is changing to any other state. 3. Don't cancel Probe Request frame RX reporting on wpa_stop_listen for a connected P2P Client handling Probe Request frames. Signed-off-by: Max Stepanov <Max.Stepanov@intel.com> Reviewed-by: Ilan Peer <ilan.peer@intel.com>
* Add support to request a scan with specific SSIDsKrishna Vamsi2015-06-051-0/+3
| | | | | | | | | | Support a request to scan specific SSIDs given by user with the SCAN command. The SSID list can be suffixed to the scan command as follows. For example, if SSIDs "ABC" and "abc123" need to be specifically scanned, the command should be "SCAN ssid 414243 ssid 616263313233". The value of the SSID is passed in hexadecimal representation. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* P2P: Use p2p_init_wpa_s for P2P command redirection over D-BusIlan Peer2015-05-251-1/+0
| | | | | | | | | | | | | D-Bus used the p2p_dev member in struct wpa_supplicant to track the interface used for P2P Device operations. However, this is not needed as the interface used for P2P Device operations is stored in struct wpa_global->p2p_init_wpa_s. Replace all the redirections to wpa_s->p2p_dev with redirections to wpa_s->global->p2p_init_wpa_s and removed this member as it is no longer needed. Signed-off-by: Ilan Peer <ilan.peer@intel.com>
* D-Bus Fix network_is_persistent_group() for P2P operationsJouni Malinen2015-04-291-2/+2
| | | | | | | | | | | | | | Commit c2762e410fa319f75a174aeb12343beddf99fce4 ('P2P: Update D-Bus network object semantics during group formation') added this helper function to determine whether a network block is used for storing a persistent group information. However, it implemented this in a way that matches both persistent group storage and an operating persist group instance. This does not seem to match the expected behavior for the D-Bus objects, so fix this to match only the persistent group storage case to avoid registering/unregistered incorrect D-Bus objects for groups. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* Declare all read only data structures as constMikael Kanstrup2015-04-251-8/+8
| | | | | | | | By analysing objdump output some read only structures were found in .data section. To help compiler further optimize code declare these as const. Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
* WPS: Enforce five second minimum time before AP iterationHu Wang2015-04-241-0/+1
| | | | | | | | | | | | | | Previously, wpa_supplicant was using number of scan iterations (WPS_PIN_SCAN_IGNORE_SEL_REG = 3) to give some time for finding a WPS AP with Selected Registrar TRUE before starting to iterate through all WPS APs. While this works fine in most cases, some drivers may return the initial three scan results so quickly that the total amount of time is only couple of seconds in case none of the APs are initially advertising Selected Registrar TRUE. To give some more time for APs (WPS Registrars) to become ready, add an additional constraint on the iteration based on time (WPS_PIN_TIME_IGNORE_SEL_REG = 5 seconds). Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* Use SSID_MAX_LEN define instead of value 32 when comparing SSID lengthJouni Malinen2015-04-221-3/+3
| | | | | | This makes the implementation easier to understand. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>