path: root/wpa_supplicant/ctrl_iface.c
Commit message (Collapse)AuthorAgeFilesLines
* Declare wpa_debug_* variables in src/utils/wpa_debug.hJouni Malinen2013-12-311-3/+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>
* Declare wpa_drivers in src/drivers/driver.hJouni Malinen2013-12-311-2/+0
| | | | | | This avoids some warnings from sparse. Signed-hostap: Jouni Malinen <j@w1.fi>
* Clear EAPOL Logoff state on FLUSH commandJouni Malinen2013-12-311-0/+1
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* Reset WPA parameters to default values on FLUSH commandJouni Malinen2013-12-291-0/+4
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* Make local UUID available through ctrl_iface STATUS commandJouni Malinen2013-12-291-0/+12
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* Clear wps_fragment_size on FLUSH commandJouni Malinen2013-12-291-0/+1
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* Make CONFIG_TESTING_OPTIONS=y enable all testing optionsJouni Malinen2013-12-261-2/+2
| | | | | | | This makes it easier to enable various testing parameters and functionality in build configuration. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* Optional scan id for ctrl_iface SCAN requestsJouni Malinen2013-12-261-0/+19
| | | | | | | | | | | | | | This allows users of wpa_supplicant control interface to figure out when their specific scan command has been started and completed. For example: CTRL-EVENT-SCAN-STARTED > scan freq=2412,2417 passive=1 use_id=1 3 CTRL-EVENT-SCAN-RESULTS CTRL-EVENT-SCAN-STARTED id=3 CTRL-EVENT-SCAN-RESULTS id=3 Signed-hostap: Jouni Malinen <j@w1.fi>
* Allow passive scan to be requested with SCAN passive=1Jouni Malinen2013-12-261-0/+6
| | | | | | | This allows external programs to request wpa_supplicant to execute a passive scan (i.e., do not send any Probe Request frames). Signed-hostap: Jouni Malinen <j@w1.fi>
* Allow channel list to be specified for SCAN commandJouni Malinen2013-12-261-30/+90
| | | | | | | | | | | The new freq=<frequency ranges> parameter to the SCAN command can be used to request a scan to be performed on the specified set of channels instead of on all channels. For example, "wpa_cli scan freq=2400-2500,5180" would scan channels 1-14 and 36. Only the channels that the driver indicates as enabled and that are within the specified ranges are included in the request. Signed-hostap: Jouni Malinen <j@w1.fi>
* Clean up cipher capability printsJouni Malinen2013-12-251-105/+38
| | | | | | | Use an array of ciphers and a loop instead of copy-pasted copies of the same printing functionality for each cipher. Signed-hostap: Jouni Malinen <j@w1.fi>
* Add definitions for new cipher suites from IEEE Std 802.11ac-2013Jouni Malinen2013-12-241-0/+36
| | | | | | | 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>
* wpa_supplicant: Use monotonic time for RX/BSS timesJohannes Berg2013-12-241-2/+2
| | | | | | | | | | The BSS table, scan timeout, and related functionality should use monotonic time since they care about relative values (age) only. Unfortunately, these are all connected, so the patch can't be split further. Another problem with this is that it changes the driver wrapper API. Though, it seems only the test driver is using this. Signed-hostap: Johannes Berg <johannes.berg@intel.com>
* Android: P2P: Remember country localeDmitry Shmidt2013-11-221-1/+12
| | | | | | | This updates P2P modules based on the Android specific DRIVER COUNTRY command. Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
* Android: Add driver_cmd for arbitrary driver commandsJouni Malinen2013-11-221-0/+19
| | | | | | | | | This is a mechanism used in Android to extend driver interface in vendor specific ways. This is included only for the purpose of Android compatibility. Proper interface commands should be used for any new functionality. Signed-hostap: Jouni Malinen <j@w1.fi>
* Handle legacy scan interruption of sched_scan/PNOJithu Jance2013-11-181-2/+2
| | | | | | | | | | | | | | | | While starting from PNO start context, the scheduled scan was not setting the flag wpa_s->scanning. This was resulting in the subsequent SCAN command to proceed further and send command to nl80211/cfg80211. The expected behavior of cancelling sched_scan was not happening here. While sched_scan is in progress and a legacy scan comes on the cli/socket, the sched_scan is cancelled and normal scan is allowed to continue. However, sometimes sched_scan cancelled event comes a bit delayed and we will send out the scan command before the wpa_s->scanning is cleared. Instead, reschedule the incoming scan req if the wpa_s->scanning shows that it is still in progress. Signed-hostap: Jithu Jance <jithu@broadcom.com>
* Add chan_switch to ctrl interface of wpa_supplicant and hostapdAndrei Otcheretianski2013-11-171-0/+3
| | | | | | | Add chan_switch to the control interface of wpa_supplicant and hostapd, and also to wpa_cli and hostapd_cli. Signed-hostap: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
* Android: Add state message sent after 'status' commandDmitry Shmidt2013-11-171-0/+20
| | | | | | | | This triggers re-transmission of CTRL-EVENT-STATE-CHANGE and CTRL-EVENT-CONNECTED events on STATUS command for Android framework specific processing. Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
* TDLS: Provide external control to specify the peers for setupSunil Dutt2013-11-151-0/+8
| | | | | | | | | | | | | | | | There are use cases requesting the host driver to initiate the TDLS setup with the peer only when configured by the external applications. Thus, enable this control by tdls_external_control=1 and pass the requisite information for the specific TDLS operation to the driver on the request from such use cases. This operation mode expects the driver to initiate TDLS link automatically based on signal strength and traffic to a peer and tear down links whenever they are not used or suitable due to signal strength etc. The list of peers with which such operations are to be performed are provided with the TDLS driver operations. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* Prohibit PNO start during assoc process and in connect stateDmitry Shmidt2013-11-071-0/+6
| | | | Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
* Replace unnecessary UTF-8 characters with ASCII versionsJouni Malinen2013-11-021-1/+1
| | | | | | | There is no need for using UTF-8 in these files when perfectly fine ASCII versions of these characters exist. Signed-hostap: Jouni Malinen <j@w1.fi>
* Interworking: Report STATUS:sp_type even if domain is not configuredJouni Malinen2013-10-291-3/+1
| | | | | | | | This allows sp_type={home,roaming,unknown} to be used to determine network type with SIM-based credentials even if the domain name parameter is not configured explicitly. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* P2P: Add VHT parameter to P2P operationsEliad Peller2013-10-271-17/+25
| | | | | | | | | | | | 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>
* WPS: Clear known_wps_freq in addition to after_wpsJouni Malinen2013-10-271-0/+2
| | | | | | | Both of these variables can result in optimized WPS scans, so better clear these more consistently to avoid unexpected single-channel scans. Signed-hostap: Jouni Malinen <j@w1.fi>
* Make frequency range list routines more generalJouni Malinen2013-10-221-34/+7
| | | | | | | This allows the frequency range list implementation to be shared for other purposes. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* WPS: Clear after_wps from number of new locationsJouni Malinen2013-10-201-0/+2
| | | | | | | | This makes it less likely to forget WPS single-channel scan optimization in effect after having completed the WPS operation or in case WPS operating gets cancelled. Signed-hostap: Jouni Malinen <j@w1.fi>
* Send CTRL-RSP command response before processing EAPOL updateJouni Malinen2013-10-191-6/+15
| | | | | | | | | | | | This is what the original implementation did years ago, but the move to using separate control interface backends re-ordered the implementation to process EAPOL notification first. Use a registered timeout to allow the ctrl_iface response to be sent out first to get somewhat faster response time and to avoid pending operations that could result in ctrl_iface response and unsolicited event messages from getting mixed up. Signed-hostap: Jouni Malinen <j@w1.fi>
* Interworking: Add support for multiple home FQDNsJouni Malinen2013-10-181-9/+21
| | | | | | | | Credentials can now be configured with more than one FQDN ('domain' field in the cred block) to perform Domain Name List matching against multiple home domains. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* P2P: Show P2P flag in BSS entries also based on Beacon framesJouni Malinen2013-10-141-1/+4
| | | | | | | | It is possible that a P2P GO has been discovered through a non-P2P scan that did not return P2P IE in Probe Response frames. To cover those cases, check also Beacon frame (if received) for P2P IE. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* Add driver status information to control interfaceJouni Malinen2013-09-281-0/+2
| | | | | | | | STATUS-DRIVER command can now be used to fetch driver interface status information. This is mainly for exporting low-level driver interface information for debug purposes. Signed-hostap: Jouni Malinen <j@w1.fi>
* P2P: Use group formation timeout on persistent group GOJouni Malinen2013-09-261-1/+2
| | | | | | | | | | | | | | | | 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>
* Use configured sched_scan interval for the PNO scanKamath Vinayak2013-09-151-2/+5
| | | | | | | | The interval for the PNO scan did not use the configured sched_scan interval. This commit addresses the same by using the configured value or the default of 10 seconds if configuration parameter is not used. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* SAE: Fix build without CONFIG_AP=yJouni Malinen2013-09-031-1/+4
| | | | Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* P2P: Add a command for removing a client from all groupsJouni Malinen2013-09-011-0/+23
| | | | | | | | | | The new control interface command P2P_REMOVE_CLIENT <P2P Device Address|iface=Address> can now be used to remove the specified client from all groups (ongoing and persistent) in which the local device is a GO. This will remove any per-client PSK entries and deauthenticate the device. Signed-hostap: Jouni Malinen <j@w1.fi>
* P2P: Allow per-device PSK to be assignedJouni Malinen2013-09-011-1/+6
| | | | | | | | | | | | | | | "wpa_cli p2p_set per_sta_psk <0/1>" can now be used to disable/enable use of per-device PSKs in P2P groups. This is disabled by default. When enabled, a default passphrase is still generated by the GO for legacy stations, but all P2P and non-P2P devices using WPS will get a unique PSK. This gives more protection for the P2P group by preventing clients from being able to derive the unicast keys used by other clients. This is also a step towards allowing specific clients to be removed from a group reliably without having to tear down the full group to do so. Signed-hostap: Jouni Malinen <j@w1.fi>
* P2P: Add state info to global STATUS commandJouni Malinen2013-08-251-2/+10
| | | | | | | This can be used for debugging purposes to see what the current P2P module state is. Signed-hostap: Jouni Malinen <j@w1.fi>
* Add STATUS command to global control interfaceJouni Malinen2013-08-251-0/+44
| | | | | | | | | This provides global status information that is applicable to all interfaces (e.g., P2P state). In addition, ifname/address pairs are listed to get information of all the interfaces that are currently managed through this wpa_supplicant instance. Signed-hostap: Jouni Malinen <j@w1.fi>
* Add SAVE_CONFIG command to global control interfaceJouni Malinen2013-08-251-0/+30
| | | | | | | This iterates through all interfaces and saves configuration file updates for each interface that allows it (update_config=1). Signed-hostap: Jouni Malinen <j@w1.fi>
* Add SET command for global control interfaceJouni Malinen2013-08-251-0/+25
| | | | | | | | This allows global parameters to be set through the global control interface without having to use IFNAME prefix. For now, this covers only the wifi_display parameter. Signed-hostap: Jouni Malinen <j@w1.fi>
* TDLS: Tear down TDLS using wpas_drv_tlds_oper() if not externalArend van Spriel2013-07-201-2/+9
| | | | | | | | | | When the device indicates to take care of TDLS operations the TDLS setup is done calling wpas_drv_tdls_oper(). This patch does a similar thing for the teardown. This fixes failure of teardown: "TDLS: Could not find peer <mac> for link Teardown" Signed-hostap: Arend van Spriel <arend@broadcom.com>
* Add AVG_RSSI report in signal_pollAndrei Otcheretianski2013-06-221-0/+8
| | | | | | | | Add AVG_RSSI report to the signal_poll command if it is reported by the kernel. Signed-hostap: Andrei Otcheretianski <andrei.otcheretianski@intel.com> Signed-hostap: Ilan Peer <ilan.peer@intel.com>
* Add bandwidth and center freq info to signal_pollAndrei Otcheretianski2013-06-221-3/+48
| | | | | Signed-hostap: Andrei Otcheretianski <andrei.otcheretianski@intel.com> Signed-hostap: Ilan Peer <ilan.peer@intel.com>
* Stop TKIP countermeasures on FLUSH commandJouni Malinen2013-05-241-0/+3
| | | | | | | This is needed to get wpa_supplicant into clean state during testing if a test case triggers countermeasures. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* Add test code for fetching the last configured GTKJouni Malinen2013-05-201-0/+8
| | | | | | | | | | | | This can be useful for some test cases, so allow wpa_supplicant to be built with special test functionality to expose the current (last configured) GTK. This is disabled by default and can be enabled by adding following line into .config: CFLAGS += -DCONFIG_TESTING_GET_GTK The GTK can then be fetched with "wpa_cli get gtk". Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* P2P: Direct global ctrl_iface commands automatically for P2PJouni Malinen2013-05-181-0/+100
| | | | | | | | | | | | | | | | The P2P management operations like P2P_FIND and P2P_CONNECT are not really specific to any network interface. These are P2P Device level operations that are in more global device context. Allow those to be sent through the global control interface without IFNAME parameter. For now, these commands are directed within wpa_supplicant to the network interface that initialized the global P2P context. This may change in the future if a special context is added for P2P operations. Anyway, such changes can now be done internally within wpa_supplicant without affecting this global control interface design from external view point. Signed-hostap: Jouni Malinen <j@w1.fi>
* Allow global ctrl_iface to be used for per-interface commandsJouni Malinen2013-05-181-0/+34
| | | | | | | | | | "IFNAME=<ifname> " prefix can now be used on the wpa_supplicant global control interface to direct a command to a specific interface instead of having to use an interface specific control interface for this. This allows a single socket to be used for controlling multiple virtual interfaces. Signed-hostap: Jouni Malinen <j@w1.fi>
* WNM: Add sending of BSS Transition Management QueryVinayak Kamath2013-05-161-0/+16
| | | | | | | The new control interface command can be used to send a BSS Transition Management Query frame to the current AP. Signed-hostap: Vinayak Kamath <vkamat@codeaurora.org>
* Clear extra_blacklist_count on FLUSH commandJouni Malinen2013-04-281-0/+1
| | | | | | | This is needed to avoid old blacklist failure counts from being valid after state flush. Signed-hostap: Jouni Malinen <j@w1.fi>
* wpa_supplicant: Add get_capability freqBruno Randolf2013-04-231-0/+57
| | | | | | | | | | | | | Add "get_capability freq" command to print a more verbose list of channels and frequencies in MHz. The tag "NO_IBSS" is added, if IBSS mode is not allowed on a channel. This allows userspace programs to get the frequencies and limitations associated with each channel. This extends the information already provided in "get_capability channels" but a new interface is chosen because of backwards compatibility considerations. Signed-hostap: Bruno Randolf <br1@einfach.org>
* WPS NFC: Allow configuration token to be built from network blockJouni Malinen2013-04-011-1/+5
| | | | | | | "WPS_NFC_CONFIG_TOKEN <WPS/NDEF> <network id>" can now be used to build an NFC configuration token from a locally configured network. Signed-hostap: Jouni Malinen <j@w1.fi>