aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/ap.c
Commit message (Collapse)AuthorAgeFilesLines
* Get rid of duplicated cipher suite and AKM definitionsJouni Malinen2013-12-311-3/+2
| | | | | | | | | | | | | WPA_CIPHER_* and CIPHER_* are used for the exact same set of cipher suites with the main difference being that the WPA_CIPHER_* version is suitable to be used as a bitfield. Similarly, WPA_KEY_MGMT_* and KEY_MGMT_* have similar design for AKMs. There is no need to maintain two separate copies of the definitions since the bitfield compatible version can be used for both needs. Get rid of the CIPHER_* and KEY_MGMT_* versions to clean up the implementation by getting rid of unnecessary mapping functions. Signed-hostap: Jouni Malinen <j@w1.fi>
* Add definitions for new cipher suites from IEEE Std 802.11ac-2013Jouni Malinen2013-12-241-1/+3
| | | | | | | 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>
* nl80211/hostapd: Extend channel switch notify handlingJanusz Dziedzic2013-12-081-2/+2
| | | | | | | Adds support for VHT by parsing bandwidth and center_freq{1,2}. Signed-hostap: Michal Kazior <michal.kazior@tieto.com> Signed-hostap: Janusz Dziedzic <janusz.dziedzic@tieto.com>
* Add chan_switch to ctrl interface of wpa_supplicant and hostapdAndrei Otcheretianski2013-11-171-0/+12
| | | | | | | 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>
* Add AP channel switch mechanismAndrei Otcheretianski2013-11-171-0/+14
| | | | | | | | | Build CSA settings and call the driver to perform the switch. Construct Beacon, Probe Response, and (Re)Association Response frames both for CSA period and for the new channel. These frames are built based on the current configuration. Add CSA IE in Beacon and Probe Response frames. Signed-hostap: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
* hostapd: Make hostapd_config::bss array of pointersJouni Malinen2013-10-291-8/+8
| | | | | | | | This makes it more convenient to move BSS configuration entries between struct hostapd_config instances to clean up per-BSS configuration file design. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* P2P: Remove compiler warning without CONFIG_IEEE80211NJouni Malinen2013-10-271-0/+2
| | | | | | | | | | Commit ca9bc5b5666a08c741ddd21c451ecb92aa33a11a added wpas_conf_ap_vht() as a static function with the caller within CONFIG_IEEE80211N, but the function outside. This resulted in a compiler warning for wpa_supplicant AP/P2P builds when CONFIG_IEEE80211N=y was not used. Fix that by using matching conditional block around the function. Signed-hostap: Jouni Malinen <j@w1.fi>
* P2P: Add VHT supportEliad Peller2013-10-271-0/+30
| | | | | | | Start GO with VHT support if VHT option was requested and the appropriate channels are available. Signed-hostap: Eliad Peller <eliadx.peller@intel.com>
* P2P: Fix crash when failed to create GO interfaceaosp-kk-from-upstreamVinay Krishna Eranna2013-09-031-5/+0
| | | | | | | | | | | | | | | | | wpa_supplicant crashes if driver configuration for AP mode interface configuration fails after group negotiation. This is because of a regression from commit 1075b2957169d8f9d6dddd7679339c751dc9515b that ends up freeing the wpa_s instance from within wpa_supplicant_create_ap() without the caller knowing. Fix this by using an eloop timeout to free remove the P2P group so that wpa_supplicant_create_ap() and especially wpa_supplicant_associate() callers do not need to know about interface getting possibly removed. In addition, move the P2P specific code into p2p_supplicant.c where it really belongs. This allows the already existing group formation timeout to be used by reducing the timeout to zero. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* P2P: Maintain list of per-client PSKs for persistent groupsJouni Malinen2013-09-011-0/+15
| | | | | | | | | Record all generated per-client PSKs in the persistent group network block and configure these for the GO Authenticator whenever re-starting the persistent group. This completes per-client PSK support for persistent groups. Signed-hostap: Jouni Malinen <j@w1.fi>
* P2P: Allow per-device PSK to be assignedJouni Malinen2013-09-011-0/+1
| | | | | | | | | | | | | | | "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>
* Clear EAPOL supplicant configuration info on current_ssid changesJouni Malinen2013-08-251-0/+3
| | | | | | | | | | | | There were some code paths that allowed obsolete configuration data pointer to be maintained within EAPOL supplicant in case a network was removed while not connection to it (i.e., wpa_s->current_ssid not pointing to the network that was removed). This could result in use of freed memory, e.g., from eap_sm_notify_ctrl_attached() when a new control interface connected prior to the EAPOL supplicant configuration pointer got updated. Signed-hostap: Jouni Malinen <j@w1.fi>
* wpa_supplicant: Fix AP mode frequency initializationAvraham Stern2013-08-251-12/+8
| | | | | | | | | | In AP mode the frequency was initialized only after trying to set up the AP which caused failure. Move AP frequency initialization to the right place. This allows an AP mode network block without the frequency parameter to be used with the default channel 11 being selected in that case. Signed-hostap: Avraham Stern <avraham.stern@intel.com>
* P2P: Report group formation failure on error to start GO modeJouni Malinen2013-07-111-0/+5
| | | | | | | | There is no need to wait for the 15 second group formation timeout before indicating P2P group formation failure if GO mode cannot be started successfully for some reason. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* Remove 802.11b rates only in case of P2P group operationAlexander Bondar2013-06-221-1/+3
| | | | | | | | | | 11b rates removal have had impact on SoftAP functionality in wpa_supplicant. This patch verifies that only in case of P2P group operation 11b rates will be eliminated. Refer also to commit 4c2c30289305b67c09f464ba29352b008b5ec433. Signed-hostap: Alexander Bondar <alexander.bondar@intel.com> Signed-hostap: Ilan Peer <ilan.peer@intel.com>
* Use a common frequency to channel conversion functionJouni Malinen2013-04-271-14/+7
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* P2P: Increase GTK rekeying period to 24 hoursJouni Malinen2013-04-231-0/+10
| | | | | | | Strong ciphers do not need frequent rekeying, so increase the default GTK rekeying period to 24 hours. Signed-hostap: Jouni Malinen <j@w1.fi>
* hostapd/wpa_s: Use driver's extended capabilitiesJohannes Berg2013-03-311-0/+3
| | | | | | | | Some extended capabilities (I'm currently interested in "Operating Mode Notification" for VHT) are implemented by the kernel driver and exported in nl80211. Use these in hostapd/wpa_supplicant. Signed-hostap: Johannes Berg <johannes.berg@intel.com>
* Add ap_vendor_elements for wpa_supplicant AP/P2P GO modeJouni Malinen2013-03-211-0/+5
| | | | | | | | This new parameter allows wpa_supplicant AP mode operations to use similar design to the vendor_elements parameter in hostapd to add vendor_elements into Beacon/Probe Response IE parameters. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* Allow wpa_supplicant AP mode to configure Beacon intervalJouni Malinen2013-03-011-0/+7
| | | | | | | | | | | | | | | beacon_int (in TU) can now be used to configure Beacon interval for AP mode operations (including P2P GO) in wpa_supplicant. This can be set either in a network block or as a global parameter in the configuration file (or with "SET beacon_int <value>" control interface command) to apply for all networks that do not include the beacon_int parameter to override the default. In addition, this commits extends the dtim_period parameter to be available as a global parameter to set the default value. dtim_period is now stored in the configuration file, too, if it was set. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* WPS: Fix build without CONFIG_WPS_NFCJouni Malinen2013-02-151-0/+4
| | | | | | | | Commit bbf41865c90c2e16510712fa32290729c194422d added calls to functions that are only defined if CONFIG_WPS_NFC=y. Protect those calls properly to avoid build issues. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* WPS: Add support for NFC handover select generation with wpa_supplicantJouni Malinen2013-02-151-0/+12
| | | | | | | | When wpa_supplicant is controlling an AP mode interface, it can generate the alternative carrier record for NFC connection handover select message similarly to the way this is done in hostapd. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* WPS: Add support for config token generation with wpa_supplicantJouni Malinen2013-02-151-0/+12
| | | | | | | | When wpa_supplicant is controlling an AP mode interface, it can generate the NFC configuration token similarly to the way this is done in hostapd. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* Move cipher to enum wpa_cipher conversion into wpa_common.cJouni Malinen2013-01-131-1/+2
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* Use a helper function for selection group cipher for AP modeJouni Malinen2013-01-131-18/+5
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* Move cipher suite selection into common helper functionsJouni Malinen2013-01-131-9/+3
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* Remove reassociated_connection variableJouni Malinen2012-12-251-1/+0
| | | | | | | | | | | This was used to select between "(auth)" and "(reauth)" in CTRL-EVENT-CONNECTED events. However, the variable was not cleared anywhere else apart from the AP deinit case. As such, it did not really provide correct information and is not really of much use even with proper clearing added. As such, it is cleaner to just get rid of this altogether. Signed-hostap: Jouni Malinen <j@w1.fi>
* Introduce 60 GHz bandVladimir Kondratiev2012-12-181-0/+4
| | | | | | | | | | | | | | | Basic support for the 60 GHz band. Neither P2P nor WPS are yet taken care off. Allows to start AP with very simple config: network={ ssid="test" mode=2 frequency=60480 key_mgmt=NONE } Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* P2P: Reduce redundant PSK generation for GOMasashi Honma2012-11-111-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The PSK generation done by pbkdf2_sha1() is one of the longest CPU time users according to our profiling from boot to GO started. So I have reduced some steps. I could boot a GO by this command sequence. ------------- add_net set_network 0 ssid '"DIRECT-XX"' set_network 0 psk '"123456789012345678901234567890123456789012345678901234567890123"' set_network 0 proto RSN set_network 0 key_mgmt WPA-PSK set_network 0 pairwise CCMP set_network 0 auth_alg OPEN set_network 0 mode 3 set_network 0 disabled 2 p2p_group_add persistent=0 freq=2412 ------------- By this sequence, pbkdf2_sha1() was called three times and the function calculates the same value each time. Reduce number of calls to pbkdf2_sha1() from 3 to 1 by caching the previous result. Signed-hostap: Masashi Honma <masashi.honma at gmail.com>
* WPS: Allow PIN timeout to be specified with wpa_supplicant AP/GOJouni Malinen2012-10-101-2/+3
| | | | | | | | Extend the wpa_cli wps_pin command to support specification of the PIN expiration time in seconds similarly to hostapd_cli wps_pin command when using wpa_supplicant for AP mode (including P2P GO). Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* Add support for using GCMP cipher from IEEE 802.11adJouni Malinen2012-08-291-0/+5
| | | | | | | | | | | | | | | | This allows both hostapd and wpa_supplicant to be used to derive and configure keys for GCMP. This is quite similar to CCMP key configuration, but a different cipher suite and somewhat different rules are used in cipher selection. It should be noted that GCMP is not included in default parameters at least for now, so explicit pairwise/group configuration is needed to enable it. This may change in the future to allow GCMP to be selected automatically in cases where CCMP could have been used. This commit does not included changes to WPS or P2P to allow GCMP to be used. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* P2P: Enable 40 MHz support for autonomous P2P group additionRajkumar Manoharan2012-08-151-0/+12
| | | | | | | | Add optional "ht40" argument for p2p_group_add command to enable 40 MHz in 5GHz band. This configures the secondary channel, when HT support is enabled and if the HW supports 40 MHz channel width. Signed-hostap: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
* Convert os_zalloc() for an array to use os_calloc()Jouni Malinen2012-08-131-1/+1
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* wpa_supplicant AP/P2P: Enable WMM param configurationYoni Divinsky2012-08-121-0/+4
| | | | | | | | | | | In case of P2P GO and AP mode, wpa_supplicant uses the default hostapd parameters for WMM. 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. Allow this to be changed through wpa_supplicant configuration file with wmm_ac_* parameters. Signed-hostap: Yoni Divinsky <yoni.divinsky@ti.com>
* Convert remaining SSID routines from char* to u8*Jouni Malinen2012-08-071-1/+0
| | | | | | | This makes it more explicit that the SSID is not a null terminated C string. Signed-hostap: Jouni Malinen <j@w1.fi>
* nl80211: Handle CH_SWITCH eventThomas Pedersen2012-06-251-0/+11
| | | | | | | 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>
* wpa_supplicant: Support dtim_period configuration for AP modeEtay Luz2012-06-041-0/+3
| | | | Signed-off-by: Etay Luz <eluz@qca.qualcomm.com>
* P2P: Store SSID of the group in p2p_group dataJouni Malinen2012-05-081-3/+2
| | | | | | | | This can be used with P2P management operations that need to verify whether the local device is operating a specific group based on P2P Group ID attribute from a peer. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* Allow pbc_in_m1 workaround to be enabled in wpa_supplicant AP modeWei-Jen Lin2012-05-031-0/+1
| | | | | | | | | This workaround for Windows 7 WPS probing mechanism was previously allowed only with hostapd, but the same interoperability issue can happen with wpa_supplicant AP/GO mode. Allow the workaround to be enabled in wpa_supplicant configuration for these uses. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* Allow disable_ht to override 11n configuration in AP modeVasanthakumar Thiagarajan2012-04-111-2/+11
| | | | | | This is being done only for station mode, extend it to AP mode as well. Signed-hostap: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
* Pass signal strength through, fix unitsJohannes Berg2012-04-011-2/+4
| | | | | | | | | | | | | | | | 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>
* Add wps_cancel for hostapd_cliAnirban Sirkhell2012-03-301-16/+1
| | | | | | | 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>
* wpa_supplicant: Add provision to configure inactivity period in AP modeVasanthakumar Thiagarajan2012-03-271-0/+3
| | | | | | | | This patch adds a configuration in network block, ap_max_inactivity, for station's inactivity period when in AP mode. The time period is configured in seconds, by default 300 seconds. Signed-hostap: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
* Add support for hidden SSID in wpa_supplicant AP modeVivek Natarajan2012-02-271-1/+6
| | | | | | | This also disables WPS support if hidden SSID is enabled in AP mode. Signed-off-by: Vivek Natarajan <nataraja@qca.qualcomm.com> Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* Add wpa_supplicant AP mode STA deauthenticate/disassociate commandsJithu Jance2012-02-251-0/+20
| | | | | | | | Move disassociate and deauthenticate commands to ctrl_iface_ap.c, so that they ares accessible for wpa_supplicant AP mode and wpa_cli (with CONFIG_AP option enabled). Signed-hostap: Jithu Jance <jithu@broadcom.com>
* Remove the GPL notification from files contributed by Jouni MalinenJouni Malinen2012-02-111-8/+2
| | | | | | | Remove the GPL notification text from the files that were initially contributed by myself. Signed-hostap: Jouni Malinen <j@w1.fi>
* P2P: Maintain a list of P2P Clients for persistent group on GOJouni Malinen2011-12-221-2/+2
| | | | | | | | | | Add a new persistent group network block field, p2p_client_list, to maintain a list of P2P Clients that have connected to a persistent group. This allows GO of a persistent group to figure out more easily whether re-invocation of a persistent group can be used with a specific peer device. Signed-hostap: Jouni Malinen <j@w1.fi>
* P2P: Fix GO start on interface that has active station connectionJouni Malinen2011-12-211-2/+6
| | | | | | | | | The active station connection triggered wpa_supplicant AP mode startup to try to update Beacon IEs before the AP mode was properly initialized and that resulted in NULL pointer dereference in driver_nl80211.c. Fix this by skipping the IE update before the AP mode is initialized. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* Maintain internal copy of Probe Response offload capabilitiesArik Nemtsov2011-12-101-0/+1
| | | | | Signed-hostap: Arik Nemtsov <arik@wizery.com> Signed-off-by: Arik Nemtsov <arik@wizery.com>
* Fix generated WPS PIN values to use zero-paddingSzymon Bigos2011-12-021-2/+2
| | | | | The dynamically generated PINs are supposed to have 8 digits, but some PIN generatation cases were not zero-padding these properly.