aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix writing of wpa_supplicant sae_groups configuration parameterJouni Malinen2017-01-071-1/+1
| | | | | | | This integer array is zero terminated, so need to check the value is greater than 0 when writing the parameter. Signed-off-by: Jouni Malinen <j@w1.fi>
* Send BEACON-REQ-TX-STATUS event only for beacon reportsJouni Malinen2017-01-071-2/+8
| | | | | | | | Check the action TX status callback contents more thoroughly and report the BEACON-REQ-TX-STATUS event only if the Measurement Type indicates beacon report. Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: LCI report generation and os_get_reltime() failureJouni Malinen2017-01-071-0/+15
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: TEST_FAIL() support for os_get_random()Jouni Malinen2017-01-071-0/+3
| | | | | | This allows more testing for rarely executed error paths. Signed-off-by: Jouni Malinen <j@w1.fi>
* RRM: Use wpa_hexdump_buf() instead of wpa_hexdump()Jouni Malinen2017-01-071-2/+1
| | | | | | | Simplify the code a bit by using the appropriate debugging function to dump a wpabuf contents. Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: Radio measurement request - link measurementJouni Malinen2017-01-071-0/+48
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* nl80211: Register for Link Measurement Report frames in AP modeJouni Malinen2017-01-071-0/+3
| | | | | | | This is needed to be able to get the response to a link measurement request. Signed-off-by: Jouni Malinen <j@w1.fi>
* RRM: Document Link Measurement Report frame construction stepsJouni Malinen2017-01-071-1/+5
| | | | | | | | Add a comment to note which fields are expected to be updated by the driver. In addition, reorder subfield writing to match the order in which the fields are in the frame. Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: Radio/link measurement request for non-RRM associationJouni Malinen2017-01-071-0/+29
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: Radio measurement request - OOM while rejecting a requestJouni Malinen2017-01-071-0/+23
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: Fix rrm_beacon_req_passive_ap_channels to use passive scanJouni Malinen2017-01-071-1/+1
| | | | | | | | The request from the AP was encoded incorrectly for this test case and an active scan was requested instead of the passive one that was supposed to be used here. Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: Beacon request - active scan mode os_get_random failureJouni Malinen2017-01-071-0/+16
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: Check rrm capabilities with a helper functionJouni Malinen2017-01-071-39/+22
| | | | | | And also move couple of these checks to the beginning of the test case. Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: Remove write-only bssid assignments from rrm test casesJouni Malinen2017-01-071-13/+0
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: Beacon request - passive scan mode - VHTJouni Malinen2017-01-071-0/+102
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* RRM: Fix beacon report scan channels for VHT 80, 80+80, 160 MHz casesJouni Malinen2017-01-071-0/+6
| | | | | | | | ieee80211_chan_to_freq() is not really meant for conversion of 20 MHz primary channel numbers for wider VHT channels, so handle those as special cases here for now. Signed-off-by: Jouni Malinen <j@w1.fi>
* RRM: Move wpabuf_resize() call into wpas_rrm_report_elem()Jouni Malinen2017-01-071-42/+15
| | | | | | | | | | | | | wpabuf_resize() can handle the initial allocation of a wpabuf and all the other callers of wpas_rrm_report_elem() were already using a pointer to a pointer and a wpabuf_resize() call. Simplify this by resizing the wpabuf (if needed) within wpas_rrm_report_elem() instead of having to calculate the needed size in all the callers. Thsi is also fixing one of the allocation sizes to use the correct size instead of a size of a struct that has nothing to do with the allocation (but is larger than the needed five octets, so does not break anything). Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: Prepare rrm_beacon_req_passive_no_match_oom for code changeJouni Malinen2017-01-071-1/+1
| | | | | | | | | Replace the TEST_ALLOC function wpas_beacon_rep_no_results with an earlier function in the backtrace and wpabuf_resize() in preparation to a code change that allows the compiler to optimize out wpas_beacon_rep_no_results(). Signed-off-by: Jouni Malinen <j@w1.fi>
* RRM: Remove unnecessary cb checkJouni Malinen2017-01-071-6/+0
| | | | | | | | | There is only a single caller for wpas_rrm_send_neighbor_rep_request() and it unconditionally uses a callback function, so cb cannot be NULL here and there is no need for additional complexity and extra code size to check for it explicitly. Signed-off-by: Jouni Malinen <j@w1.fi>
* AP: Skip authentication/deauthentication phase for DMG/IEEE 802.11adDedy Lansky2017-01-053-29/+109
| | | | | | | | | | | | | Authentication and Deauthentication frames are not used in DMG/IEEE 802.11ad networks. For DMG/IEEE 802.11ad the following was implemented: Upon receiving association request, allocate the sta object and initialize it as if authentication took place. Upon receiving disassociation, deallocate the sta object. ap_sta_disassociate/ap_sta_deauthenticate/ap_sta_disconnect all use disassociation instead of deauthentication. In driver_nl80211, i802_sta_deauth() is routed to i802_sta_disassoc(). Signed-off-by: Dedy Lansky <qca_dlansky@qca.qualcomm.com>
* AP: Do not look for supported rates in DMG/IEEE 802.11adDedy Lansky2017-01-051-0/+5
| | | | | | | | Supported Rates element is not present in DMG/IEEE 802.11ad frames. Make copy_supp_rates() immediately return with success if hardware mode is IEEE 802.11ad. Signed-off-by: Dedy Lansky <qca_dlansky@qca.qualcomm.com>
* bgscan_simple: Fix short_scan_count comparisonBeni Lev2017-01-051-6/+1
| | | | | | | | | | Previously, the check was done after we reached the maximum and another scan was already triggered. While at it, remove an irrelevant comment that the previous change in the logic here missed. Signed-off-by: Beni Lev <beni.lev@intel.com>
* nl80211: Zero num_modes if nl80211_get_hw_feature_data() failsAndrei Otcheretianski2017-01-051-0/+1
| | | | | | | | | | It was possible that nl80211_get_hw_feature_data() function would return NULL when num_modes is not set to zero. This might result in a later crash when accessing hw.modes. This may be reproduced with hwsim oom tests, for example, dbus_connect_oom. Fix that by zeroing num_modes if NULL is returned. Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
* tests: P2P autonomous GO switching channels (separate group interface)Jouni Malinen2017-01-051-1/+12
| | | | Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* tests: Use group control interface for GO commands in autogo_chan_switchAvraham Stern2017-01-051-2/+2
| | | | | | | | | | | | The channel switch command is intended for the GO interface, but it was not sent on the group control interface. For configurations that use a separate interface for P2P groups, this will fail the test. Fix this by sending the channel switch command on the group control interface and waiting for the channel switch event on the group control interface. Signed-off-by: Avraham Stern <avraham.stern@intel.com>
* nl80211: Use correct attribute for scan flags in vendor scanKanchanapally, Vidyullatha2017-01-051-1/+1
| | | | | | | This fixes the netlink attribute identifier for the scan flags when using QCA_NL80211_VENDOR_SUBCMD_TRIGGER_SCAN. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* eap_proxy: On SIM error flush PMKSAs only for SIM/AKA/AKA' networksPurushottam Kushwaha2017-01-041-1/+29
| | | | | | | | | Previously, SIM state change with SIM_STATE_ERROR cleared all PMKSA entries (including non-SIM networks). Limit this to networks which use SIM-based authentication methods to avoid unnecessarily removal of PMKSA entries. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* tests: Beacon request - active scan mode and old scan resultJouni Malinen2017-01-031-0/+27
| | | | Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* tests: Beacon request - passive scan mode and no matching BSSJouni Malinen2017-01-031-0/+40
| | | | Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* tests: Beacon request - active scan mode and many BSSsJouni Malinen2017-01-035-0/+87
| | | | Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* tests: LCI report generation OOMJouni Malinen2017-01-031-0/+25
| | | | Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* tests: wpa_supplicant and concurrent NEIGHBOR_REP_REQUEST commandsJouni Malinen2017-01-031-0/+25
| | | | Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* tests: NEIGHBOR_REP_REQUEST for AP not supporting neighbor reportJouni Malinen2017-01-031-0/+16
| | | | Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* tests: wpa_supplicant and disconnection during NEIGHBOR_REP_REQUESTJouni Malinen2017-01-031-0/+27
| | | | Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* tests: wpa_supplicant ctrl_iface NEIGHBOR_REP_REQUEST OOMJouni Malinen2017-01-031-0/+29
| | | | Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* Fix OOM handling in neighbor report response handlingJouni Malinen2017-01-031-1/+3
| | | | | | | | The pending neighbor report state needs to be cleared on error path here to avoid getting stuck with being unable to perform any additional neighbor reports during the association. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* tests: wpa_supplicant behavior on NEIGHBOR_REP_REQUEST response timeoutJouni Malinen2017-01-031-0/+23
| | | | Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* tests: Radio measurement request - protocol testingJouni Malinen2017-01-031-0/+97
| | | | Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* Allow LCI request with no subelementsJouni Malinen2017-01-031-1/+2
| | | | | | | Allow shorter request since the subelements are optional to include. Also print the hexdump of the subelements into debug log. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* tests: RRM beacon report with active and passive scanJouni Malinen2017-01-031-0/+215
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* RRM: Enable beacon report with active/passive scan for all driversJouni Malinen2017-01-035-13/+75
| | | | | | | | | The requested behavior can be approximated for most use cases even if the driver does not support reporting exact TSF values for frames. Enable this capability for all drivers to make beacon report processing more useful for a common use case. Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: Beacon request - beacon table modeJouni Malinen2017-01-031-1/+445
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* Report received beacon report with BEACON-RESP-RX eventJouni Malinen2017-01-032-3/+32
| | | | | | | | The new hostapd control interface event "BEACON-RESP-RX <STA address> <dialog token> <report mode> <beacon report>" is now used to report received beacon reports as a reponse to the REQ_BEACON operation. Signed-off-by: Jouni Malinen <j@w1.fi>
* Report beacon request TX status as control interface eventJouni Malinen2017-01-034-2/+46
| | | | | | | | | The new BEACON-REQ-TX-STATUS control interface event is now used to report whether a beacon request (from REQ_BEACON command) was delivered successfully. This event has the following parameters: <STA address> <dialog token> <ack=0/1>. Signed-off-by: Jouni Malinen <j@w1.fi>
* Beacon request through hostapd control interfaceJouni Malinen2017-01-034-0/+142
| | | | | | | | | | The new control interface command "REQ_BEACON <STA addr> [req_mode=<mode>] <beacon request>" can now be used to request hostapd to transmit a measurement request to request a beacon report from an associated STA. This command returns the assigned dialog token (1-255) or FAIL on failure. Signed-off-by: Jouni Malinen <j@w1.fi>
* Add hostapd configuration parameter rrm_beacon_reportJouni Malinen2017-01-032-0/+9
| | | | | | | | rrm_beacon_report=1 can now be used to make hostapd advertise capability for beacon reports (passive, active, table). Actual mechanism for sending out beacon requests will be added in separate commits. Signed-off-by: Jouni Malinen <j@w1.fi>
* Enable Beacon Report using beacon table for all driversJouni Malinen2017-01-032-5/+7
| | | | | | | | | The special parameters for beacon report scan are not needed for the beacon report when using the beacon table measurement mode. Advertise support for this case regardless of whether the driver supports the scan parameters. Signed-off-by: Jouni Malinen <j@w1.fi>
* Update copyright notices for the new year 2017Jouni Malinen2017-01-0318-27/+27
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* Do not add own BSS in neighbor report with invalid op_class/channelJouni Malinen2017-01-031-4/+6
| | | | | | | Verify that ieee80211_freq_to_channel_ext() succeeds before adding the own BSS in the neighbor report. Signed-off-by: Jouni Malinen <j@w1.fi>
* FILS: Fix FILS Realm Information ANQP-element constructionJouni Malinen2017-01-031-0/+1
| | | | | | | | | | The loop to add hash values was supposed to be limited to at most 10000 values, but the count variable was not being decremented in the loop. Fix this by decrementing counting for each iteration. This fixes ANQP-element format in the unlikely case of there being more than 10000 configuration realms. Signed-off-by: Jouni Malinen <j@w1.fi>