aboutsummaryrefslogtreecommitdiffstats
path: root/src/ap
Commit message (Collapse)AuthorAgeFilesLines
* WFD: Add Wi-Fi Display supportJouni Malinen2012-12-141-0/+11
| | | | | | | | | | | | | | | | | | | | This commit adds control interface commands and internal storage of Wi-Fi Display related configuration. In addition, WFD IE is now added to various P2P frames, Probe Request/Response, and (Re)Association Request/Response frames. WFD subelements from peers are stored in the P2P peer table. Following control interface commands are now available: SET wifi_display <0/1> GET wifi_display WFD_SUBELEM_SET <subelem> [hexdump of length+body] WFD_SUBELEM_GET <subelem> Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com> [vishalm@ti.com: Backported it to curent tree] Signed-off-by: Vishal Mahaveer <vishalm@ti.com> Change-Id: Ief0cd61903facd9209927d9dc84c8f093f3b6bac
* hostapd: enable dynamic modification of acl policyNadim Zubidat2012-11-062-0/+59
| | | | | | | | | add APIs for dynamically changing the macaddr_acl policy and mac addresses lists. once changed, hostapd will deauth stations which do not pass the new policy. Signed-off-by: Nadim Zubidat <nadimz@ti.com>
* hostap: add channel switch ability to AP & GO (INTERNAL)Victor Goldenshtein2012-09-137-2/+141
| | | | | | | | | | | | | | | Add channel switch command and handle channel switch request/complete events. New hostapd_eid_csa() which builds the channel switch announcement IE. Add this CSA to the beacon frame prior performing a channel switch and remove it once it's completed. New EVENT_REQ_CH_SW which indicates that the driver has requested to perform a channel switch. Signed-hostap: Victor Goldenshtein <victorg@ti.com>
* hostapd: implement channel switch request drv ops (INTERNAL)Victor Goldenshtein2012-09-133-0/+36
| | | | | | New hostapd_channel_switch – to handle channel switch request. Signed-hostap: Victor Goldenshtein <victorg@ti.com>
* Make copies basic_rates list more usefulJouni Malinen2012-09-071-0/+2
| | | | | | | | | | | Commit e5693c4775bae65faa960f80889f98b0a6cb2e1c added a copy of the determined basic rate set into struct hostapd_iface, but did not actually copy the terminating -1 value. This could be problematic if something were to actually try to use this list since would be no way to know what is the last entry in the list. Fix this by copying the terminating value. Signed-hostap: Jouni Malinen <j@w1.fi>
* Remove default ACM=1 from AC_VO and AC_VIJouni Malinen2012-09-041-2/+2
| | | | | | | | | | There is no need to mandate admission control (ACM=1) by default, so clear that flag in the case the configuration file does not specify wmm_ac_{vo,vi}_acm value. This gets closer to the values mentioned in the sample hostapd.conf file and reduces the need to specify WMM parameters in the configuration file for most common use cases. Signed-hostap: Jouni Malinen <j@w1.fi>
* AP: configure basic rates from iface and not confArik Nemtsov2012-09-041-1/+1
| | | | | | | | | The conf doesn't contain any basic rates in some cases. Most notably, when starting a p2p GO in 5Ghz. Use the iface rates which are initialized in hostapd_prepare_rates() to the conf rates or set to default values if no conf values exist. Signed-hostap: Arik Nemtsov <arik@wizery.com>
* Prep work to configure a prioritized interface (BRCM)Eyal Shapira2012-08-022-0/+6
| | | | | | | | | | | Add a new configurable property which points to the interface name that should prioritized in case of resolving connection conflicts. (This appears to be prep work which doesn't get used however we include it to better align with JB) Signed-off-by: Eyal Shapira <eyal@wizery.com>
* add set/cancel_priority to ap mode as wellEliad Peller2012-08-027-0/+50
| | | | | | | ROC when the ap gets the first auth request, and CROC after authorization (or after connection fails). Signed-off-by: Eliad Peller <eliad@wizery.com>
* ap: add missing WLAN_STA_ASSOC_REQ_OK flag cleanupsEliad Peller2012-08-022-5/+6
| | | | | | | | | | | | cleanup of WLAN_STA_ASSOC_REQ_OK flag is missing in some places (e.g. when deauth a sta). (This in turn caused problems when working as GO, as our internal commit (a3e0a16 "Fix deauth with reason 7 due to multiple assoc_req received") caused reassociations (after WPS) to get dropped. Signed-off-by: Eliad Peller <eliad@wizery.com>
* Fix deauth with reason 7 due to multiple assoc_req receivedEyal Shapira2012-08-021-0/+9
| | | | | | | | | | | | | | | Additional assoc_reqs received after an initial assoc_req (due to a timeout in the STA) was already being handled caused the handle_assoc flow to run again and in the process delete the station added to the driver (in add_pre_assoc_sta). A race would occur where assoc_resp was already sent to the STA (as part of the handling of the initial assoc_req) and it sent a null data packet which arrived while the station was deleted. This caused the packet to be classified as a class 3 frame coming from an unknown STA and a deauth would occur. Fix this by discarding additional assoc_req between receiving the 1st assoc_req and getting a tx callback for the assoc_resp. Signed-off-by: Eyal Shapira <eyal@wizery.com>
* save eapol for later use (EAPOL Start race)Eliad Peller2012-08-024-0/+38
| | | | | | [ Includes null check missing from the original patch - Arik ] Signed-off-by: Arik Nemtsov <arik@wizery.com>
* add station before getting assoc resp tx completionEliad Peller2012-08-021-39/+48
| | | | | | | | | Add the station before sending the association response (rather than after tx completion), in order to handle EAPOL-Start before tx completion race. Signed-off-by: Arik Nemtsov <arik@wizery.com>
* P2P: enable to set in the conf file the wmm paramsYoni Divinsky2012-07-303-14/+6
| | | | | | | | | | In case of P2P GO, the wpa_supplicant uses the default hostapd parameters. In the default parameters the ACM bit for video and voice are set to 1, meaning, P2P devices and stations which are connected to the GO cannot pass voice or video data packets. Signed-hostap: Yoni Divinsky <yoni.divinsky@ti.com>
* Fix AP build without NEED_AP_MLMEJouni Malinen2012-07-071-0/+2
| | | | | | | | | | Commit 1b487b8b1e95e1fbd9e00d52d883ba0ac4c2e4bf added CH_SWITCH event for nl80211, but ended up using hostapd_hw_get_channel() regardless of build configuration for driver interfaces. This function is not always available, so make its use conditional on NEED_AP_MLME. Signed-hostap: Jouni Malinen <j@w1.fi>
* hostapd: Add IEEE 802.11ac VHT IEs into Beacon/Probe ResponseMahesh Palivela2012-06-303-0/+84
| | | | | | | IEEE 802.11ac VHT changes to include VHT IEs in Beacon and Probe Response frames. Signed-hostap: Mahesh Palivela <maheshp@posedge.com>
* hostapd: Initial IEEE 802.11ac (VHT) definitionsMahesh Palivela2012-06-301-0/+4
| | | | | | Add IEEE 802.11ac definitions for config, IEEE structures, constants. Signed-hostap: Mahesh Palivela <maheshp@posedge.com>
* WPS: Share a single function for generating NFS password tokensJouni Malinen2012-06-281-44/+4
| | | | | | | There is no need for both hostapd and wpa_supplicant to have their own functions for this. Signed-hostap: Jouni Malinen <j@w1.fi>
* WPS: Use random_get_bytes() for NFC password idJouni Malinen2012-06-281-2/+4
| | | | | | | os_random() may not be seeded properly, so use stronger mechanism for generating the password id for NFC password tokens. Signed-hostap: Jouni Malinen <j@w1.fi>
* WPS: Add support for NCF password token from APJouni Malinen2012-06-284-0/+109
| | | | | | | | | | | | | | | | The new hostapd ctrl_iface command WPS_NFC_TOKEN can now be used to manage AP-as-Enrollee operations with NFC password token. WPS/NDEF parameters to this command can be used to generate a new NFC password token. enable/disable parameters can be used to enable/disable use of NFC password token (instead of AP PIN) for external Registrars. A preconfigured NFS password token can be used by providing its parameters with new hostapd.conf fields wps_nfc_dev_pw_id, wps_nfc_dh_pubkey, wps_nfc_dh_privkey, and wps_nfc_dev_pw. This use will also depend on WPS_NFC_TOKEN enable/disable commands, i.e., the configured NFS password token is disabled by default. Signed-hostap: Jouni Malinen <j@w1.fi>
* WPS: Add new mechanism for generation NFC configuration tokenJouni Malinen2012-06-282-0/+24
| | | | | | | | The new hostapd ctrl_iface command WPS_NFC_CONFIG_TOKEN can now be used to fetch payload for an NFC configuration token so that an external program can be used to write this on an NFC tag. Signed-hostap: Jouni Malinen <j@w1.fi>
* WPS: Add new mechanism for communicating NFC tag read eventsJouni Malinen2012-06-272-2/+92
| | | | | | | | | | | hostapd ctrl_iface can now be used to deliver payload from read operation of an NFC tag. This allows operations without having to have low-level NFC code within hostapd. For now, the new wps_nfc_tag_read command can be used with NFC password tokens for the case where the AP has an NFC device that is used to read an NFC tag from the station Enrollee. Signed-hostap: Jouni Malinen <j@w1.fi>
* nl80211: Handle CH_SWITCH eventThomas Pedersen2012-06-252-0/+35
| | | | | | | Some drivers may independently decide to switch channels. Handle this by updating the hostapd and wpa_supplicant AP and GO configuration. Signed-hostap: Thomas Pedersen <c_tpeder@qca.qualcomm.com>
* Remove STA entry from AP when starting TKIP countermeasuresJouni Malinen2012-06-251-5/+11
| | | | | | | | | | | | Previously, the STA entry was removed only from the driver and the STA entry within hostapd was just marked disassociated. However, this left the WPA authenticator state machine with an entry and the session was not terminated properly. In addition, the STA entry could have remaining indefinitely if the STA did not reconnect after TKIP countermeasures. Fix this by removing the STA entry from hostapd instead of just leaving it disassociated. Signed-hostap: Jouni Malinen <j@w1.fi>
* Copy Chargeable-User-Identity in PMKSA caching caseJouni Malinen2012-06-172-2/+14
| | | | | | | | Maintain a copy of Chargeable-User-Identity in the PMKSA cache to allow it to be included in accounting messages even if full authentication was not completed. Signed-hostap: Jouni Malinen <j@w1.fi>
* RADIUS DAS: Support Chargeable-User-Identity with Disconnect-RequestJouni Malinen2012-06-171-0/+11
| | | | | | | Chargeable-User-Identity can now be used in Disconnect-Request to identify the station to be disconnected. Signed-hostap: Jouni Malinen <j@w1.fi>
* RADIUS DAS: Add support for Disconnect-RequestJouni Malinen2012-06-171-0/+71
| | | | | | | | Calling-Station-Id, Acct-Session-Id, and User-Name attributes in a Disconnect-Request message can now be used to indicate which station is to be disconnected. Signed-hostap: Jouni Malinen <j@w1.fi>
* RADIUS DAS: Validate Event-TimestampJouni Malinen2012-06-173-0/+7
| | | | | | | | | | DAS will now validate Event-Timestamp value to be within an acceptable time window (300 seconds by default; can be set using radius_das_time_window parameter). In addition, Event-Timestamp can be required in Disconnect-Request and CoA-Request messages with radius_das_require_event_timestamp=1. Signed-hostap: Jouni Malinen <j@w1.fi>
* P2P: Add p2p_client_list support for FullMAC Persistent GOMasashi Honma2012-06-171-1/+10
| | | | | | | | | Currently, FullMAC Persistent GO can't use p2p_client_list because its own hapd->p2p_group is NULL at ap_sta_set_authorized(). This patch changes the processing to use sta->p2p_ie instead of p2p_group_get_dev_addr() on FullMAC GO. Signed-hostap: Masashi Honma <masashi.honma@gmail.com>
* sta_info: Remove duplicated function declarationAntonio Quartulli2012-06-091-1/+0
| | | | | | In sta_info.h, ap_free_sta() was declared twice. Signed-off-by: Antonio Quartulli <ordex@autistici.org>
* Force driver to disassociate STA if no room for the STA entryJouni Malinen2012-05-271-1/+4
| | | | | | | | | | When hostapd (or wpa_supplicant AP mode) limits the maximum number of STA entries with a driver that implements SME, the driver needs to be notified of the failed STA addition. Disassociate the STA if the driver notifies of an association that would go beyond the maximum number of STAs. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* WNM: Add advertisement of BSS max idle periodJouni Malinen2012-05-273-1/+31
| | | | | | | | | | | If WNM is enabled for the build (CONFIG_WNM=y), add BSS max idle period information to the (Re)Association Response frame from the AP and parse this information on the station. For SME-in-wpa_supplicant case, add a timer to handle periodic transmission of the keep-alive frame. The actual request for the driver to transmit a frame is not yet implemented. Signed-hostap: Jouni Malinen <j@w1.fi>
* Add preliminary RADIUS dynamic authorization server (RFC 5176)Jouni Malinen2012-05-064-1/+26
| | | | | | | | | | This adds the basic DAS mechanism to enable hostapd to be configured to request dynamic authorization requests (Disconnect-Request and CoA-Request). This commit does not add actual processing of the requests, i.e., this will only receive and authenticate the requests and NAK them regardless of what operation is requested. Signed-hostap: Jouni Malinen <j@w1.fi>
* hostapd: Allow addition of arbitrary RADIUS attributesJouni Malinen2012-05-054-17/+111
| | | | | | | | New configuration parameters radius_auth_req_attr and radius_acct_req_attr can now be used to add (or override) RADIUS attributes in Access-Request and Accounting-Request packets. Signed-hostap: Jouni Malinen <j@w1.fi>
* hostapd: Add optional Chargeable-User-Identity request (RFC 4372)Jouni Malinen2012-05-052-1/+21
| | | | | | | | radius_request_cui=1 configuration parameter can now be used to configure hostapd to request CUI from the RADIUS server by including Chargeable-User-Identity attribute into Access-Request packets. Signed-hostap: Jouni Malinen <j@w1.fi>
* hostapd: Copy Chargeable-User-Identity into accounting (RFC 4372)Jouni Malinen2012-05-053-1/+48
| | | | | | | If Access-Accept packet includes the Chargeable-User-Identity attribute, copy this attribute as-is into accounting messages. Signed-hostap: Jouni Malinen <j@w1.fi>
* Remove unused variableJouni Malinen2012-04-281-2/+1
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* Fix validation of PSK-from-RADIUS-server required responseJouni Malinen2012-04-211-1/+1
| | | | | | | cache->psk is an array and never NULL. The check here needs to check the cache->has_psk flag instead. Signed-hostap: Jouni Malinen <j@w1.fi>
* AP: Reschedule ap_handle_timer event on (re)associationJouni Malinen2012-04-111-0/+8
| | | | | | | | | Previously, the timeout scheduled during the previous association was used after reassociation if the STA entry had not yet been removed. The next timeout does not need to happen that quickly, so reschedule it during reassociation. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* AP: Add debug information for ap_handle_timer operationsJouni Malinen2012-04-111-0/+33
| | | | | | | This makes it easier to figure out what exactly was done with the ap_handle_timer registration/cancellation based on a debug log. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* AP: Reset STA timeout_next on driver-based-SME associationJouni Malinen2012-04-111-0/+6
| | | | | | | | | | | | The next ap_handle_timer action was already cleared when association is handled with user space -based SME. However, this step was missing from the driver callback for indicating new association. This could result in the first ap_handle_timer timeout on the new association removing the station unexpectedly. Fix this by resetting the timeout_next in hostapd_notif_assoc(). Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com> intended-for: hostap-1
* Fix EAP/WPS to PSK transition on reassociation in authenticatorJouni Malinen2012-04-101-0/+10
| | | | | | | | | | | | | | | | | | A station may move from EAP/WPS key_mgmt to PSK using re-association. In practice, this can happen most likely with WPS when the station runs through the provisioning step (EAP/WPS) followed by PSK authentication. If a deauthentication event is missed from the station for whatever reason, the EAPOL authenticator state machine could have been left running. This can result in various issues, including unexpected disconnection of the station while both the 4-way handshake and EAPOL authenticator state machines (EAP) are running at the same time when the supplicant is trying to use PSK. Fix this by explicitly clearing EAPOL authenticator state machine on (re)association if the new association does not use it. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com> intended-for: hostap-1
* Scan only affected frequencies for 20/40 MHz co-ex check forJouni Malinen2012-04-081-3/+46
| | | | | | | | When starting an AP with HT40 on 2.4 GHz, limit the set of channels to scan for based on the affected frequency range to speed up the AP setup. Signed-hostap: Jouni Malinen <j@w1.fi>
* AP: Add fuzz to idle-timer calculationsBen Greear2012-04-061-2/+8
| | | | | | | | | This should keep us from getting into a state where we bounce large numbers of stations all at once. Spreading out the bounce should cause less stress on the network as the idle stations won't all be trying to reconnect at once. Signed-hostap: Ben Greear <greearb@candelatech.com>
* Change reason code for AP mode BSS termination to 3Jouni Malinen2012-04-031-6/+7
| | | | | | | | | | | | Use reason code 3 (Deauthenticated because sending STA is leaving) instead of reason code 2 (Previous authentication ot valid) in the Deauthentication frame sent at the time a BSS is terminated. This is more accurate reason for the message and allows the stations to get better understand on why they were disconnected. This can be useful especially for P2P clients that can use this as a signal that the P2P group session was ended per P2P specification section 3.2.9. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* Pass signal strength through, fix unitsJohannes Berg2012-04-017-14/+24
| | | | | | | | | | | | | | | | The signal strength is currently never used as the only driver reporting it is nl80211 which uses IEEE80211_RADIOTAP_DB_ANTSIGNAL which is never populated by the kernel. The kernel will (soon) populate IEEE80211_RADIOTAP_DBM_ANTSIGNAL instead though, so use that. Also, since it was never really populated, we can redefine the signal field to be in dBm units only. My next patch will also require knowing the signal strength of probe requests throughout the code (where available), so add it to the necessary APIs. Signed-hostap: Johannes Berg <johannes.berg@intel.com>
* hostapd: Only update already-set beacons when processing OLBCLuciano Coelho2012-04-013-2/+13
| | | | | | | | | | | When hostapd is about to start an AP using HT40, it starts a scan to check whether it is allowed or not. If OLBC is detected before the scan has completed, it sets the beacons prematurely. To fix this, instead of setting all beacons when OLBC is detected, only update the ones that have already been started. Signed-off-by: Luciano Coelho <coelho@ti.com>
* Fix memory leaks on radius_client_send error pathsJouni Malinen2012-04-012-7/+11
| | | | | | | In case this function returns an error, the RADIUS message needs to freed in the caller. Signed-hostap: Jouni Malinen <j@w1.fi>
* Add wps_cancel for hostapd_cliAnirban Sirkhell2012-03-304-0/+45
| | | | | | | Implement wps_cancel for hostapd similarly to how it was already supported in wpa_supplicant AP mode. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* nl80211: Make use of driver's capability to detect inactive stationsVasanthakumar Thiagarajan2012-03-271-0/+1
| | | | | | | | | | | When drivers advertise their capability to free up inactive stations based on ap_max_inactivity, send the inactivity period timeout to driver in NL80211_ATTR_INACTIVITY_TIMEOUT. This introduces a WPA_DRIVER_FLAGS (WPA_DRIVER_FLAGS_INACTIVITY_TIMER) so that the inactivity period will be sent only when this capability bit is set. Signed-hostap: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>