aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant
Commit message (Collapse)AuthorAgeFilesLines
* dbus: Export new 'suiteb192' capabilityHEADmasterAntonio Cardace44 hours1-1/+4
| | | | | | | | Export a new 'suiteb192' capability to indicate that wpa_supplicant was built with WPA-EAP-SUITE-B-192 support and accepts 'key_mgmt=WPA-EAP-SUITE-B-192'. Signed-off-by: Antonio Cardace <acardace@redhat.com>
* DBus: Add 'owe' to interface CapabilitiesBrian Norris44 hours1-0/+6
| | | | Signed-off-by: Brian Norris <briannorris@chromium.org>
* wpa_cli: Add WPS_EVENT_OVERLAP to action scriptsBerkay Ercan45 hours1-0/+2
| | | | | | | | | WPS_EVENT_OVERLAP case was missing on wpa_cli_action_process function in wpa_cli.c, so when the overlap event occurs, there was no event message sent to the action script. Add this event case to the function. Signed-off-by: Berkay Ercan <berkay.ercan@airties.com> Signed-off-by: Veli Demirel <veli.demirel@airties.com>
* FT: Update key mgmt properly in RSNE during roamingShiva Sankar Gajula45 hours1-13/+14
| | | | | | | | | | | | | | | | When STA is performing roam from WPA3 AP to WPA2 AP, the STA was including key mgmt FT-SAE instead of FT-PSK in FT Authentication request RSNE when using driver-based SME. This is because the RSNE/MDE/FTE were updated and forwarded to the driver using the NL80211_CMD_UPDATE_FT_IES command before updating key mgmt properly. Because of this, the AP is rejecting FT Authentication request with WLAN_REASON_UNSPECIFIED reason code which is due to the invalid keymgmt in RSNE. Fix this by reordering IE population to happen earlier in the sequence so that the updated key mgmt information can be provided when using NL80211_CMD_UPDATE_FT_IES. Signed-off-by: Shiva Sankar Gajula <sgajula@codeaurora.org>
* Add user configured vendor IEs to default scan IEsVinita S. Maloo45 hours2-3/+22
| | | | | | | | Add user configured vendor IEs for Probe Request frames to default scan IEs so that these IEs will be included in the Probe Request frames for the scans issued also by components other than wpa_supplicant. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
* Android: Pass the vendor events to $(BOARD_WPA_SUPPLICANT_PRIVATE_LIB)Sunil Dutt2020-12-211-0/+4
| | | | | | | | | | | | | | | | | | Android has a mechanism to extend the driver interface in vendor specific ways. This implementation of the vendor interface is done in $(BOARD_WPA_SUPPLICANT_PRIVATE_LIB). Extend this to allow the vendor events to be provided to this library to facilitate the event processing. Introduce a new board configuration via $(BOARD_WPA_SUPPLICANT_PRIVATE_LIB_EVENT) rather than reusing $(BOARD_WPA_SUPPLICANT_PRIVATE_LIB) to enable this event handling in the private library. This is to avoid compilation issues for wpa_driver_nl80211_driver_event() with the already existing private library implementations defined with $(BOARD_WPA_SUPPLICANT_PRIVATE_LIB). Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
* P2P: Delay P2P scan when an external scan is in progressPurushottam Kushwaha2020-12-211-3/+19
| | | | | | | | | When an external scan is in progress on the same radio, delay the P2P search operation based on configuration parameter p2p_search_delay. The "search_delay" configuration done through p2p_find always takes precedence over this delay value set due to an external scan trigger. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
* P2P: Recover p2p_find operation in case of failure to fetch scan resultsSunil Dutt2020-12-213-3/+32
| | | | | | | | | | | | Add a handler to notify failures to fetch the scan results and provide an option to override default behavior of requesting a new scan in one second in such an error condition. Use this new handler mechanism to continue the p2p_find operation (by invoking p2p_scan_res_handled) for an interim scenario where the p2p_scan attempt fails to get the scan results from the driver which can happen, e.g., if there are parallel updates to the cfg80211 scan results. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
* Drop unexpected connection event while disconnectedVamsi Krishna2020-12-211-0/+5
| | | | | | | | | | | | | | | | | | | | | | If there is a disconnect command from wpa_supplicant immediately after the driver sends a connection event to userspace but before that event is received and processed by wpa_supplicant, wpa_supplicant processes the disconnect command and a self-generated disconnected event first followed by the connected event received from the driver. As a result wpa_supplicant moves to the WPA_COMPLETED state. Whereas the driver processes the disconnect command received from wpa_supplicant after it sends the connected event and moves to the disconnected state. Due to this race between the disconnect command from wpa_supplicant and the connected event from the driver, wpa_supplicant is moving to the connected state though the driver is moving to the disconnected state which results in abnormal functionality. Ignore the connection event coming from the driver when wpa_supplicant is not trying to connect after a disconnect command is issued but before the next connect command is issued to fix the above mentioned race condition. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
* DPP2: Add DPP_CONTROLLER commands to hostapd_cli and wpa_cliDisha Das2020-12-161-0/+20
| | | | | | | Add the DPP control interface DPP_CONTROLLER_START and DPP_CONTROLLER_STOP commands to the CLIs. Signed-off-by: Disha Das <dishad@codeaurora.org>
* Use bool for is_6ghz variables and functionsJouni Malinen2020-12-119-13/+14
| | | | | | | Replace the implicit boolean checks that used int variables with use of a more explicit bool variable type. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
* Extend the setband support for 6 GHz and band combinationsVeerendranath Jakkam2020-12-115-15/+29
| | | | | | | | | | Support possible band combinations of 2.4 GHz, 5 GHz, and 6 GHz with QCA_WLAN_VENDOR_ATTR_SETBAND_MASK attribute. Ensure backwards compatibility with old drivers that are using QCA_WLAN_VENDOR_ATTR_SETBAND_VALUE attribute and supporting only 2.4 GHz and 5 GHz bands. Signed-off-by: Veerendranath Jakkam <vjakkam@codeaurora.org>
* scan: Add a helper function to append supported freqs from a given bandVeerendranath Jakkam2020-12-113-61/+38
| | | | | | | This functionality was repeated for couple of times. Use a shared helper function to avoid code duplication. Signed-off-by: Veerendranath Jakkam <vjakkam@codeaurora.org>
* nl80211: Report invalid signal and noise when info is unavailableAvraham Stern2020-12-041-1/+1
| | | | | | | | | | | | | | | | | | | When the driver sends a CQM RSSI threshold event, wpa_supplicant queries the driver for the signal and noise values. However, it is possible that by that time the station has already disconnected from the AP, so these values are no longer valid. In this case, indicate that these values are invalid by setting them to WPA_INVALID_NOISE. Previously a value of 0 would be reported, which may be confusing as this is a valid value. Since nl80211_get_link_signal() and nl80211_get_link_noise() already set invalid values for a case of failure, just use the value set by these functions even if they fail. Signed-off-by: Avraham Stern <avraham.stern@intel.com> Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com> Reviewed-by: Brian Norris <briannorris@chromium.org>
* wpa_supplicant: Initial connection speedupFrederik Juul2020-12-024-1/+50
| | | | | | | | | | | | | Add initial_freq_list to wpa_supplicant configuration. This option allows wpa_supplicant to scan a smaller list of frequencies when it starts. This in turn allows for a faster connection to an already known network. This limit applies only for the initial scan operation and does not restrict other channels from being used in consecutive scans. Tests have shown this to reduce the amount of time for connecting to a network from roughly 3 seconds to roughly 0.1 second. Signed-off-by: Frederik Juul <frederik.juul@3shape.com>
* mesh: Move mesh frequency setting to its own functionMarkus Theil2020-11-301-27/+35
| | | | Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
* mesh: Fix DFS deinit/initMarkus Theil2020-11-301-11/+83
| | | | | | | | | | | | | The hostapd DFS code deinitializes and initializes the AP interface, if a clean channel switch is not possible. In this case the AP code paths would deinit the driver, for example nl80211, without wpa_supplicant code paths getting notice of this. Therefore add callbacks for wpa_supplicant mesh methods, which are called on init/deinit of the AP BSS. These callbacks are then used to handle the reset in the mesh code. Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
* mesh: Fix for mesh init/deinitMarkus Theil2020-11-303-20/+26
| | | | | | | | | Send mesh group started notification after join completion callback is called. Implement outstanding TODO, to leave the mesh network on deinit. Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
* mesh: Fix mesh_oom testMarkus Theil2020-11-301-1/+1
| | | | | | | Only change freq params, if ifmsh->freq is set initially, which only happens if hostapd_get_hw_features in setup_interface2 succeeds. Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
* mesh: Inform kernel driver about DFS handler in userspacePeter Oh2020-11-301-0/+1
| | | | | | | The kernel requires indication of DFS handler residing in user space (NL80211_ATTR_HANDLE_DFS) to enable DFS channels. Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
* mesh: Fix channel switch error during CACPeter Oh2020-11-301-0/+38
| | | | | | | | | | Mesh interface would have used its channel parameters that were configured during initialization even after channel switch due to DFS radar detection during CAC which could result in a channel switch error. Fix the error by updating the channel parameters when channel has been changed from the initial one. Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
* mesh: Update ssid->frequency as pri/sec channels switchPeter Oh2020-11-301-0/+1
| | | | | | | | | | ssid->frequency is one of the variables used to get the channel number from a given frequency. Leaving it as unchanged when pri/sec channel switch will cause picking up a wrong channel number after applying the secondary channel offset for HT40 and leads to failing interface bring-up. Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
* mesh: Use setup completion callback to complete mesh joinPeter Oh2020-11-301-1/+11
| | | | | | | | | | | | | | | | Mesh join function is the last function to be called during mesh join process, but it's been called a bit earlier than it's supposed to be, so that some mesh parameter values such as VHT capabilities were not applied correct when mesh join is in process. Moreover, the current design of mesh join that is called directly after mesh initialization isn't suitable for DFS channels to use, since mesh join process should be paused until DFS CAC is done and resumed after it's done. The callback will be called by hostapd_setup_interface_complete_sync(). There is a possibility that completing mesh init fails, so add error handling codes for that. Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
* AP: Check driver support while auto-selecting bandwidth for AP/P2P GOSreeramya Soratkal2020-11-231-1/+22
| | | | | | | | | | | | | | | | | | If the maximum operating channel width for AP/P2P GO is not specified, it is auto-selected during configuration. While selecting the channel width, if VHT is supported and 160 MHz channels are available, 160 MHz channel width is preferred to 80 MHz. During the selection of the channel width, the corresponding driver capabilities were not checked. As a result, the AP/P2P GO configuration was set to use the available 160 MHz channels even if the driver did not have capability to support the 160 MHz channel width causing failure to start the AP/P2P GO. Fix this by checking the driver support for the 160 MHz channel width while selecting the channel width for AP/P2P GO. Signed-off-by: Sreeramya Soratkal <ssramya@codeaurora.org>
* Indicate whether additional ANQP elements were protectedJouni Malinen2020-11-233-4/+17
| | | | | | | | | | | | Store information on whether extra ANQP elements were received using the protection alternative (protected GAS during an association using PMF) and make this available through the control interface BSS command. For example: anqp[277]=<hexdump> protected-anqp-info[277]=1 Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
* BSS: Use variable length array for IEs at the end of struct wpa_bssJouni Malinen2020-11-162-4/+5
| | | | | | | | Replace the previously used design "(u8 *) (bss + 1)" with a variable length array at the end of struct wpa_bss bss->ies[] in hopes of making this easier to understand for static analyzers. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
* BSS: Use wrapper function for getting a pointer to the IE bufferJouni Malinen2020-11-168-30/+35
| | | | | | | This makes it easier to change the internal struct wpa_bss design for storing the variable length IE buffers. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
* BSS: Add wpa_bss_get_ie_ext() wrapperJouni Malinen2020-11-164-4/+19
| | | | | | | This removes need from the callers to know the struct wpa_bss details for the location of the memory area for storing the IEs. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
* Mark wpa_bss_get_fils_cache_id() argument constJouni Malinen2020-11-162-2/+2
| | | | | | This function does not modify the BSS entry. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
* nl80211: Send the sae_pwe value to the driverRohan Dutta2020-11-161-0/+4
| | | | | | | | Use NL80211_ATTR_SAE_PWE attribute to indicate the sae_pwe value to the driver during the NL80211_CMD_START_AP and NL80211_CMD_CONNECT in WPA3-Personal networks which are using SAE authentication. Signed-off-by: Rohan Dutta <drohan@codeaurora.org>
* P2P: Include p2p_6ghz_disable in global configurationSreeramya Soratkal2020-11-161-5/+8
| | | | | | | | | | | | | | Previously, the configuration to disable the 6 GHz band remained local to the P2P interface. With this there is a possibility of 6 GHz channels being included in the channel list when the channel list needs to be updated if the state changes on one of the interfaces. Include the configuration to disable the 6 GHz band for P2P as a global configuration value to prevent the inclusion of 6 GHz channels in the channel list for P2P when the channel list needs to be updated during the state change in one of the interfaces. Signed-off-by: Sreeramya Soratkal <ssramya@codeaurora.org>
* Add connect fail reason code from the driver to assoc reject eventVinita S. Maloo2020-11-161-4/+37
| | | | | | | | | | Add support to report a vendor specific connect fail reason code fetched from the driver to users by adding the reason code to the event CTRL-EVENT-ASSOC-REJECT. Fetch the connect fail reason code when the driver sends a failure connection result and append the reason code, if available, to assoc reject event. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
* Set NLA_F_NESTED flag with NL80211_ATTR_VENDOR_DATA conditionallyVinita S. Maloo2020-11-102-6/+19
| | | | | | | | | | | | | | | | | | | | | | | | The newer kernel versions enforce strict netlink attribute policy validation and will cause cfg80211 to reject vendor commands with NL80211_ATTR_VENDOR_DATA if NLA_F_NESTED attribute is not set but if the vendor command is expecting nested data within NL80211_ATTR_VENDOR_DATA attribute. Most of the earlier instances were addressed by adding NLA_F_NESTED flag in nla_nest_start(). This commit addresses the remaining instance in which NL80211_ATTR_VENDOR_DATA is populated using data set by user through the control interface. Enhance the control interface VENDOR command to indicate whether the vendor subcommand uses nested attributes within NL80211_ATTR_VENDOR_DATA attribute or not. Set NLA_F_NESTED flag for existing QCA vendor commands which use nested attributes within the NL80211_ATTR_VENDOR_DATA attributes so that the old frameworks implementations for already existing commands work without any issues. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
* BSS/scan: More conversions to for_each_element_id()Jouni Malinen2020-11-042-42/+45
| | | | | | | | | Use the common IE parsing routine in hope of trying to make the length checks easier for static analyzers. In addition, try to make the *_vendor_ie_multi() cases easier to analyze as well even though they cannot use for_each_element_id(). Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
* dbus: Check eloop registration failure in add_watch handlerJouni Malinen2020-11-041-11/+12
| | | | | | | Report failures at lower layer to the upper layer D-Bus handling of socket registration to allow failures to be addressed more cleanly. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
* BSS: Convert wpa_bss_get_vendor_ie() to use for_each_element_id()Jouni Malinen2020-11-031-10/+7
| | | | | | | Use the common IE parsing routine in hope of trying to make the length checks easier for static analyzers. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
* HS 2.0: Clarify OSU Friendly Name length validationJouni Malinen2020-11-031-4/+15
| | | | | | | | | This extends the changes in commit 0570a3ea7d87 ("HS 2.0: Clarify OSU Provider list length validation") to cover the length field for the OSU Friendly Name value to try to get this easier for static analyzers to understand. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
* Remove unused variable updateJouni Malinen2020-11-021-1/+1
| | | | | | | | | Commit e8b85c078e73 ("iface match: Unspecified matched interfaces should not log driver fails") removed the only use of the added interface wpa_s pointer, but left that pointer setting in place. Remove it to keep static analyzers happy. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
* 6 GHz: Add support for missing 6 GHz operating classesVeerendranath Jakkam2020-10-302-20/+92
| | | | | | | | | | Add support for missing 6 GHz operating classes as defined in IEEE P802.11ax/D7.0. This is needed to avoid OCV failures on the 6 GHz band when the channel width is larger than 20 MHz. Signed-off-by: Veerendranath Jakkam <vjakkam@codeaurora.org>
* P2P: Consider BSS entry pending for P2P joining as a known BSSSreeramya Soratkal2020-10-261-0/+22
| | | | | | | | | | Consider the BSS entry that is pending for the P2P group join operation also as a known network along with the existing configured networks. This prevents removal of the BSS entry that is still in the process of P2P join operation from the BSS table when the number of entries exceed bss_max_count. Signed-off-by: Sreeramya Soratkal <ssramya@codeaurora.org>
* P2P: Include p2p_add_cli_chan parameter while cloning the configurationSreeramya Soratkal2020-10-221-0/+1
| | | | | | | | | | | The dynamically created P2P group interface did not consider the channels that can be used by the P2P client during the P2P group formation. Copy the p2p_add_cli_chan parameter while cloning the configuration to the P2P group interface. This allows the dynamically created group interface case to form the group in the specific client-only channels when the device is a P2P client in the group. Signed-off-by: Sreeramya Soratkal <ssramya@codeaurora.org>
* Fix couple more typosJouni Malinen2020-10-192-6/+4
| | | | | | Couple of similar cases that were not included in the previous commit. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
* wpa_supplicant: Fix typosYegor Yefremov2020-10-1923-50/+50
| | | | Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
* wpa_supplicant: Remove unfeasible conditions in config parsingAndrei Otcheretianski2020-10-191-3/+1
| | | | | | | | pos can't be NULL in wpa_global_config_parse_str(), so there is no point checking this, especially when pos was already dereferenced earlier. Remove the redundant conditions. Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
* wpa_cli: Don't access uninitialized variablesAndrei Otcheretianski2020-10-191-2/+5
| | | | | | | Don't print potentially uninitialized variables in wpa_ctrl_command_bss(). Some compilers and analyzers may warn about it. Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
* wpa_supplicant: Fix frequency config for VHT/HE casesMarkus Theil2020-10-161-9/+13
| | | | | | | Fix compilation without CONFIG_P2P and only set secondary channel seg idx if we use a mode supporting a sec channel for VHT/HE. Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
* Fix spelling of "unexpected" in messagesJouni Malinen2020-10-161-1/+1
| | | | Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
* MSCS: Fix decapsulating subelements from MSCS descriptorVamsi Krishna2020-10-141-2/+5
| | | | | | | | Fix pointer sent for decapsulating subelements from MSCS descriptor IE while processing (re)association response frames. Fixes: af8ab3208d03 ("MSCS: Parse result of MSCS setup in (Re)Association Response frames") Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
* wpa_supplicant: Enable VHT and HE in default config parametersMarkus Theil2020-10-142-1/+4
| | | | | | | Enable VHT and HE as default config parameters in order for wpa_supplicant AP mode to use it, if hw support is given. Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
* wpa_supplicant: Handle HT40 and mode downgrade in AP modeMarkus Theil2020-10-141-9/+43
| | | | | | | | | | | Add some missing pieces to the interface configuration of AP/mesh mode in wpa_supplicant. - check for secondary channel and HT40 capability - try to downgrade to IEEE 802.11b if 802.11g is not available Especially with the HT40 check, this code now performs all settings, which the deleted/duplicated mesh code did. Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>