aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant
Commit message (Collapse)AuthorAgeFilesLines
* Initialize iface->sta_seen on allocationJouni Malinen2016-09-211-1/+1
| | | | | | | | | | | | Previously, struct hostapd_iface sta_seen list head was initialized only when completing interface setup. This left a window for operation that could potentially iterate through the list before the list head has been initialized. While the existing code checked iface->num_sta_seen to avoid this case, it is much cleaner to initialize the list when struct hostapd_iface is allocated to avoid any accidental missing of the extra checks before list iteration. Signed-off-by: Jouni Malinen <j@w1.fi>
* P2P: Fix D-Bus persistent parameter in group started event on GOJouni Malinen2016-09-211-1/+1
| | | | | | | | | | | | | | | | | When starting a P2P GO, the struct p2p_go_neg_results may use persistent_group == 2 to indicate use of persistent reconnect. Setting ssid->p2p_persistent_group based on this did not take into account this special case and that ended up in D-Bus code trying to encode 2 as a DBUS_TYPE_BOOLEAN value which results in an assert from the library. Fix this by setting ssid->p2p_persistent_group to 0 or 1 instead of raw params->persistent_group value without any filtering. This is similar to an earlier fix in commit 112fdee738d28c4e8bfb66ad7202d4348c4e7771 ('P2P: Fix D-Bus persistent parameter in group started event') that addressed another code path in sending out this D-Bus signal. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* Fix typos in wpa_supplicant configuration parameter documentationJouni Malinen2016-09-101-9/+9
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* wpa_supplicant: Allow FTM functionality to be publishedLior David2016-09-056-0/+63
| | | | | | | | | | | | Add configuration options that control publishing of fine timing measurement (FTM) responder and initiator functionality via bits 70, 71 of Extended Capabilities element. Typically, FTM functionality is controlled by a location framework outside wpa_supplicant. When framework is activated, it will use wpa_supplicant to configure the STA/AP to publish the FTM functionality. See IEEE P802.11-REVmc/D7.0, 9.4.2.27. Signed-off-by: Lior David <qca_liord@qca.qualcomm.com>
* hostapd: Use stations nsts capability in (Re)Association Response frameTamizh chelvam2016-09-051-1/+1
| | | | | | | | | | | | | | | Some deployed stations incorrectly consider nsts capability in (Re)Association Response frame as required capability instead of maximum capability and if it is greater than station's capability then beamform will not happen in uplink traffic. This commit adds support for an optional workaround to use station's nsts capability in (Re)Association Response frame if the station's nsts is less than AP by using the use_sta_nsts=1 configuration parameter. This configuration is introduced in this commit and it is disabled by default. Signed-off-by: Tamizh chelvam <c_traja@qti.qualcomm.com>
* D-Bus: Add ConfigFile parameter into the interface propertiesJose Blanquicet2016-08-293-0/+30
| | | | | | | | | This patch aims to expose the configuration file path as an interface property, like is done with the driver and the bridge name. Doing so, higher layer programs become responsible to recreate interfaces with the correct configuration file path when programs need to remove them. Signed-off-by: Jose Blanquicet <blanquicet@gmail.com>
* mka: Store cipher suite ID in a u64 instead of u8 pointerSabrina Dubroca2016-08-282-2/+2
| | | | Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
* mka: Remove cs_len argument from the set_current_cipher_suite functionsSabrina Dubroca2016-08-282-6/+4
| | | | | | | | This is a known constant value (CS_ID_LEN, i.e., the length of the EUI64 identifier) and does not need to be provided separately in these function calls. Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
* Initialize hapd->nr_db in hostapd_alloc_bss_data()Jouni Malinen2016-08-221-0/+1
| | | | | | | | | | Previously, this was initialized in hostapd_setup_bss() which made it possible for a REMOVE_NEIGHBOR control interface command to be issued prior to the list head pointers having been set. That resulted in a NULL pointer dereference. Fix this by initializing the list head at the time the data structure gets allocated. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* Move network add/remove operations to a common functionRoshan Pius2016-08-185-86/+106
| | | | | | | | | 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>
* mesh: Report HT operation mode to kernelMasashi Honma2016-08-181-0/+2
| | | | | | | Report HT operation mode to kernel to broadcast correct IE in beacon (for example HT operation IE). Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
* mesh: Use WPA_DRIVER_MESH_CONF_FLAG_* as modification flagMasashi Honma2016-08-181-2/+2
| | | | Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
* mesh: Move max_peer_links parameter to appropriate structMasashi Honma2016-08-181-1/+1
| | | | | | | Accoding to the comment of struct wpa_driver_mesh_bss_params, the max_peer_links parameter should be under that struct. Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
* mesh: Simplify HT40 check codeMasashi Honma2016-08-181-10/+4
| | | | | | | The ht40 variable can only have values -1 or 1 here, so need to try to address ht40 == 0 case. Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
* mesh: Set correct secondary channel offset if HT40 is disabledMasashi Honma2016-08-181-0/+5
| | | | | | | Previously, secondary channel offset could be non zero even though disable_ht40=1. This patch fixes it. Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
* IBSS: Fix a memory leak on RSN error pathJouni Malinen2016-08-131-0/+1
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* Move disconnect command handling to a common placeRoshan Pius2016-08-135-16/+25
| | | | | | | | 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>
* Add group_rekey parameter for IBSSJouni Malinen2016-08-138-6/+23
| | | | | | | The new network profile parameter group_rekey can now be used to specify the group rekeying internal in seconds for IBSS. Signed-off-by: Jouni Malinen <j@w1.fi>
* Fix EAP state machine reset with offloaded roaming and authorizationJouni Malinen2016-08-111-3/+6
| | | | | | | | | | | | If the driver indicates a roamed event with already completed authorization, altAccept = TRUE could have resulted in the EAP state machine ending up in the FAILURE state from the INITIALIZE state. This is not correct behavior and similar cases were already addressed for FT and WPA-PSK. Fix the offloaded roamed+authorized (EAP/PMKSA caching) case by doing similar changes to EAPOL/EAP state variable updates during association event handling. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* binder: Clang format the source codeRoshan Pius2016-08-0711-107/+105
| | | | | | | Add a ".clang-format" file which is pretty close to the rest of wpa_supplicant code base and reformat the binder codebase. Signed-off-by: Roshan Pius <rpius@google.com>
* binder: Expose an aidl interface moduleRoshan Pius2016-08-075-14/+90
| | | | | | | | | | | Restructure the binder related makefile sections to expose a separate |libwpa_binder_interface| which can be imported by clients/tests. While there, Change the name of the binder service to the name used in the selinux permissions. Signed-off-by: Roshan Pius <rpius@google.com>
* Link to, and adjust types for, the PCSC framework included with OSXArran Cudbard-Bell2016-08-071-0/+4
| | | | Signed-off-by: Arran Cudbard-Bell <a.cudbardb@freeradius.org>
* cli: Share a common tokenize_cmd() implementationJouni Malinen2016-08-061-31/+0
| | | | | | wpa_cli and hostapd_cli had identical copies of this function. Signed-off-by: Jouni Malinen <j@w1.fi>
* wpa_cli: Replace str_match() with common str_starts()Jouni Malinen2016-08-061-28/+22
| | | | | | str_match() was identical in behavior to str_starts(). Signed-off-by: Jouni Malinen <j@w1.fi>
* cli: Share a common write_cmd() implementationJouni Malinen2016-08-061-30/+0
| | | | | | wpa_cli and hostapd_cli had identical copies of this function. Signed-off-by: Jouni Malinen <j@w1.fi>
* cli: Share a common get_cmd_arg_num() implementationJouni Malinen2016-08-061-18/+0
| | | | | | wpa_cli and hostapd_cli had identical copies of this function. Signed-off-by: Jouni Malinen <j@w1.fi>
* Share a single str_starts() implementationJouni Malinen2016-08-061-6/+0
| | | | | | No need to define this as a static function in multiple files. Signed-off-by: Jouni Malinen <j@w1.fi>
* Use a common license string for hostapd_cli and wpa_cliMikael Kanstrup2016-08-061-38/+2
| | | | | | Move the license strings for hostapd_cli and wpa_cli to common. Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
* Move parts of wpa_cli to a new common fileMikael Kanstrup2016-08-063-143/+3
| | | | | | | | In preparation for adding further command completion support to hostapd_cli move some cli related utility functions out of wpa_cli into a new common cli file. Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
* wpa_cli: Implement completion routine for get_capabilityMikael Kanstrup2016-08-061-2/+44
| | | | | | Add command completion routine for get_capability command. Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
* P2P: Fix D-Bus persistent parameter in group started eventJouni Malinen2016-08-021-1/+1
| | | | | | | | | | | | wpas_p2p_persistent_group() returns non-zero for persistent groups. This value happens to be 2 instead of 1 due to the P2P_GROUP_CAPAB_PERSISTENT_GROUP value. This ended up with D-Bus code trying to encode 2 as a DBUS_TYPE_BOOLEAN value which results in an assert from the library. Fix this by modifying wpas_p2p_persistent_group() to return 0 or 1 instead of 0 or an arbitrary non-zero. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* Set default scan IEs to the driver (QCA vendor extension)vamsi krishna2016-08-025-0/+46
| | | | | | | | | | This makes wpa_supplicant set default scan IEs to the driver (if the vendor command is supported). The driver can use these IEs in the scan requests initiated by the driver itself. Also the driver can merge these IEs into further scan requests that it receives, in case if the scan request doesn't carry any of the IEs sent in this command. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* mesh: Remove HT IEs if HT is disabledMasashi Honma2016-07-231-0/+7
| | | | | | | | Previously, HT capability IE and HT information IE were included in Beacon and Mesh Peering Open/Confirm frames even if HT is disabled with disable_ht=1. This patch removes these. Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
* mesh: Make DTIM period configurableMasashi Honma2016-07-231-0/+4
| | | | Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
* mesh: Stop joining to different frequency networkMasashi Honma2016-07-231-0/+8
| | | | Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
* mesh: Join an existing MBSS instead of creating a new oneMasashi Honma2016-07-231-9/+12
| | | | | | | If scan results show a matching existing MBSS, join it instead of creating a new MBSS. Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
* Make driver flags available through control interfaceErik Ljungberg2016-07-232-0/+41
| | | | | | This shows the current set of driver flags in wpa_cli and hostapd_cli. Signed-off-by: Erik Ljungberg <erik.ljungberg@sonymobile.com>
* mesh: Report mesh peer AID to kernelMasashi Honma2016-07-231-2/+7
| | | | | | | | | Previously, mesh power management functionality works only with kernel MPM. Because user space MPM did not report mesh peer AID to kernel, the kernel could not identify the bit in TIM element. So this patch reports mesh peer AID to kernel. Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
* MBO: Remove unused assignmentJouni Malinen2016-07-181-1/+0
| | | | | | | | | | The local found variable is not used in this case. Commit 653d227e9f40cad1114c1c96654061446fd8b131 ('MBO: Improve supported operating class generation') introduced this variable and unnecessarily set it here. Remove the write-only assignment to silence static analyzers. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* SME: Fix SA Query local failure handlingJouni Malinen2016-07-171-1/+4
| | | | | | | | If no new sme_sa_query_timer() callback is scheculed, sme_stop_sa_query() needs to be called to allow new SA Query operations to be started after the failure. Signed-off-by: Jouni Malinen <j@w1.fi>
* Clear wpa_s->sme.last_unprot_disconnect.sec on FLUSH commandJouni Malinen2016-07-171-0/+4
| | | | | | | This is needed for hwsim test cases to allow multiple STA-initiated SA Query operations in short amount of time. Signed-off-by: Jouni Malinen <j@w1.fi>
* HS 2.0: Add an event message to note failed OSU provider writeJouni Malinen2016-07-171-0/+2
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* HS 2.0: Add optional no-scan parameter to FETCH_OSUJouni Malinen2016-07-123-4/+16
| | | | | | | | This is mainly for testing purposes to allow multiple FETCH_OSU ANQP operations to be ran without having to wait for full scan between each query. Signed-off-by: Jouni Malinen <j@w1.fi>
* Interworking: Define control interface message prefixes in wpa_ctrl.hJouni Malinen2016-07-112-17/+17
| | | | | | | These control interface event message are used by external programs, so define them a bit more formally in the header file. Signed-off-by: Jouni Malinen <j@w1.fi>
* HS 2.0: Make hs20_build_anqp_req() staticJouni Malinen2016-07-112-4/+2
| | | | | | This function is not used outside hs20_supplicant.c. Signed-off-by: Jouni Malinen <j@w1.fi>
* HS 2.0: Fix hs20_get_icon() error pathJouni Malinen2016-07-041-1/+1
| | | | | | | | | If base64_encode() fails (e.g., due to memory allocation failure), the return value needs to be checked against NULL before using the (not really) returned length value. The error path here ended up reading uninitialized variable. Signed-off-by: Jouni Malinen <j@w1.fi>
* Interworking: Remove unused allow_excluded from interworking_connect()Jouni Malinen2016-07-041-19/+11
| | | | | | | This argument was set to a hardcoded value 1 and as such, the other cases were not reachable. Signed-off-by: Jouni Malinen <j@w1.fi>
* Fix wpa_config_get_all() error pathJouni Malinen2016-07-041-3/+2
| | | | | | | The previous version did not really work at all and it ended up crashing if the os_strdup(field->name) call failed. Signed-off-by: Jouni Malinen <j@w1.fi>
* Interworking: Combine identical error returns into a single oneJouni Malinen2016-07-031-5/+3
| | | | | | | There is no need to maintain separate "return -1;" for each of the wpa_config_set() calls that cannot really fail in practice. Signed-off-by: Jouni Malinen <j@w1.fi>
* P2P: Allow P2P listen being offloaded to the driver/firmwarePeng Xu2016-07-037-1/+167
| | | | | | | | | | | | | 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>