Commit message (Collapse)AuthorAgeFilesLines
* Describe requirements for contributions to hostap.gitJouni Malinen2011-10-292-0/+106
| | | | | This provides explicit description of requirements for contributions that have been assumed and less formally confirmed in the past.
* Remove www directory (w1.fi web pages)Jouni Malinen2011-10-2922-2211/+0
| | | | | These are now maintained in a separate repository (hostap-www.git) and do not need to remain in hostap.git.
* Remove unused valid_bss_mask driver_opsJouni Malinen2011-10-296-43/+0
* Remove unconfigurable cts_protection_typeJouni Malinen2011-10-292-23/+5
| | | | | | | This was included in the AP configuration parameters, but there has been no way to set it to anything else than the default automatic mode. Remove this parameter and just hardcode ERP determination to follow the automatic mode.
* For MS-CHAP, convert the password from UTF-8 to UCS-2Evan Broder2011-10-281-26/+80
| | | | | | | | | | | | | The MS-CHAPv1 and MS-CHAPv2 RFCs specify that the password is a string of "Unicode characters", which for Windows means UCS-2; thus the password could be any even-length string of up to 512 bytes. Instead of making the incompatible change of requiring the incoming password to be UCS-2 encoded, assume the password is UTF-8 encoded and convert it before using it in NtPasswordHash and EncryptPwBlockWithPasswordHash. Signed-off-by: Evan Broder <ebroder@mokafive.com>
* wpa_cli: Argument completion for p2p_group_removeJouni Malinen2011-10-281-0/+71
| | | | Track active P2P groups and complete p2p_group_remove argument.
* wpa_cli: Add completion functions for P2P peers and BSSesJouni Malinen2011-10-283-0/+238
| | | | | Keep a local list of found P2P peers and BSS entries and use those to complete arguments for p2p_peer, p2p_connect, and bss commands.
* dl_list: Add DEFINE_DL_LISTJohannes Berg2011-10-281-0/+3
| | | | This allows statically defining an empty initialised list.
* P2P: Fix frequency in the P2P_EVENT_GROUP_STARTED eventJithu Jance2011-10-281-2/+5
| | | | | | P2P Client did not show correct frequency in the control interface event P2P_EVENT_GROUP_STARTED. Fix that by using the frequency from the BSS table or association event.
* P2P: Notify device expiry via P2P-DEVICE-LOST eventJithu Jance2011-10-282-0/+7
| | | | | This patch will notify applications listening over control socket about the device expiry [from p2p peer list].
* Automatically include WPS and AP support if P2P is enabledJouni Malinen2011-10-282-0/+4
| | | | | CONFIG_WPS=y and CONFIG_AP=y are required if CONFIG_P2P=y so we may as well enable them automatically in that case.
* nl80211: Ignore netlink interface down if interface is upJouni Malinen2011-10-283-0/+31
| | | | | | | | | | | | | The netlink event processing is delayed since they are only returned after control returns to eloop. This can result in netlink down events being processed at a point when the interface has is actually still there (the first event on new interface is down) and that can result in odd behavior especially when the resulting interface-disabled event is delivered to AP mode interface with wpa_supplicant. Work around this by filtering netlink down events if the matching interface is up at the time the netlink event is processed. This fixes an issue brought up by commit 36d84860bbe09641f782fcc21b09e5a6952b4629.
* Fix WPA authenticator configuration to not leave uninitialized fieldsJouni Malinen2011-10-281-0/+1
| | | | | | | | hostapd_wpa_auth_conf() is called on uninitialized memory and the conditional blocks in this function may leave some fields into uninitialized state. This can result in unexpected behavior elsewhere since some of the variables may be used without matching #ifdef blocks. Fix this by zeroing the memory.
* TDLS: Do not clear peer data too early for teardownJouni Malinen2011-10-271-5/+6
| | | | | | TPK will be needed to be able to generate FTIE MIC for the teardown message, so maintain peer data for a bit longer in case the teardown FTIE request comes back from the driver.
* TDLS: Disable link on various error casesJouni Malinen2011-10-271-0/+10
| | | | This is needed to be able to return back to AP path on error cases.
* TDLS: Disable previous link to fix renegotiationJouni Malinen2011-10-271-0/+8
* TDLS: Fix concurrent initialization test codeJouni Malinen2011-10-271-0/+13
| | | | | Must not use data from peer TDLS Setup Request if the concurrent initialization from us is supposed to be the one that gets completed.
* TDLS: Fix teardown on renegotiationJouni Malinen2011-10-271-1/+5
| | | | | Need to disable the link when receiving TDLS Setup Request from a peer with which a direct link has already been set up.
* TDLS: Fix long frame test for teardownJouni Malinen2011-10-271-1/+2
* P2P: Stop any on-going "p2p_find" on creating an Autonomous GOJithu Jance2011-10-251-0/+4
| | | | | | | | | | | | This patch stops any on-going "p2p_find" on creating an Autonomous GO. This is already taken care in case of invoking a persistent GO. GO as such will be advertising via the beacons for other devices to discover. So normally the GO doesn't need to do a p2p_find until and unless it wants to invite a P2P Client. In case of Invite scenario, logically it is better to do a explicit discover [via user intervention] after the GO is created. This patch will help to reduce battery wastage [due to p2p_find operations] in scenarios where user creates a GO and doesn't initiate a connection.
* wlantest: Add STA counters for disconnect reason 6/7 RXJouni Malinen2011-10-253-2/+26
| | | | | | | | | These can be useful in tests involving association state mismatch between the AP and the STA (i.e., STA assumes it is still associated but the AP does not have association state). In such a case, the AP would be sending out unprotected Deauthentication or Disassociation frames with reason code 6 or 7 depending on what frame is triggering this.
* Interworking: Fix Advertisement Protocol element length limitJay Katabathuni2011-10-251-1/+1
| | | | | | The Query Response Length Limit is not allowed to be zero when this is sent by the AP. Use 0x7F to indicate that the limit is based on maximum number of GAS fragments.
* P2P: Append P2P Device Address to AP-STA-CONNECTED eventJithu Jance2011-10-243-3/+40
| | | | | | | | | | | | | | | For P2P, the p2p_connect takes in device address argument to make a connection. However the connected event AP-STA-CONNECTED comes with interface address. The application listening on events would find it difficult to map interface address to the p2p device address which is provided for connection. Append P2P Device Address to AP-STA-CONNECTED event for P2P Client connection. This will help applications to easily map the P2P Interface Address to P2P Device Address on CONNECTED event. For non-P2P case, it will just print the usual STA MAC address alone. Signed-off-by: Jithu Jance <jithu@broadcom.com>
* P2P: Fix wpa_supplicant crash on P2P WPS PBC overlap caseJithu Jance2011-10-242-10/+16
| | | | | | | Once PBC overlap detected when using dynamic group interfaces, the wpa_s corresponding to P2P group interface is freed. This patch avoids accessing the wpa_s data structure after it is freed. This fixes a possible crash in P2P client role in such a case.
* P2P: Advertise Persistent Reconnect group capabilityJouni Malinen2011-10-246-17/+70
| | | | | | | | The persistent_reconnect configuration parameter was used to decide whether to accept invitation to re-establish a persistent group. However, this was not being advertised in the Group Capability bitmap. Add the Persistent Reconnect bit based on this configuration to GO Negotiation frames and Beacon/Probe Response frames from the GO.
* TDLS: Make use of wpa_tdls_add_peer to avoid code duplicationArik Nemtsov2011-10-231-11/+2
| | | | | | | Use the wpa_tdls_add_peer function to allocate TDLS peer structures. Signed-off-by: Arik Nemtsov <arik@wizery.com> Cc: Kalyan C Gaddam <chakkal@iit.edu>
* TDLS: Support mgmt-frame Tx for ctrl-iface operationsArik Nemtsov2011-10-233-4/+23
| | | | | | | | Use capability information to decide whether to perform a given TDLS operation internally or through mgmt-frame Tx. Signed-off-by: Arik Nemtsov <arik@wizery.com> Cc: Kalyan C Gaddam <chakkal@iit.edu>
* TDLS: Add peer as a STA during link setupArik Nemtsov2011-10-236-9/+93
| | | | | | | | | | | | | | | | | | | Before commencing setup, add a new STA entry to the driver representing the peer. Later during setup, update the STA entry using information received from the peer. Extend sta_add() callback for adding/modifying a TDLS peer entry and connect it to the TDLS state machine. Implement this callback for the nl80211 driver and send peer information to kernel. Mark TDLS peer entries with a new flag and translate it to a corresponding nl80211 flag in the nl80211 driver. In addition, correct TDLS related documentation in the wpa_driver_ops structure. Signed-off-by: Arik Nemtsov <arik@wizery.com> Cc: Kalyan C Gaddam <chakkal@iit.edu>
* TDLS: Collect peer capabilities and supp-rates during link setupArik Nemtsov2011-10-233-23/+77
| | | | | | | | | Record the capabilities and supported rates of the TDLS peer during link setup. These are given in the IEs passed in Setup Request and Setup Response frames. Signed-off-by: Arik Nemtsov <arik@wizery.com> Cc: Kalyan C Gaddam <chakkal@iit.edu>
* TDLS: Implement low-ack event for lost TDLS peersArik Nemtsov2011-10-233-0/+21
| | | | | | | | Disable the direct connection when a TDLS peer stops responding to packets, as indicated by the "LOW ACK" event coming from a driver. Signed-off-by: Arik Nemtsov <arik@wizery.com> Cc: Kalyan C Gaddam <chakkal@iit.edu>
* TDLS: Support sending TDLS discovery requestsArik Nemtsov2011-10-232-0/+13
| | | | | | | Allow sending a TDLS discovery request as a frame through the driver. Signed-off-by: Arik Nemtsov <arik@wizery.com> Cc: Kalyan C Gaddam <chakkal@iit.edu>
* TDLS: Support sending a teardown frame from usermodeArik Nemtsov2011-10-233-15/+58
| | | | | | | | | | When a driver does not implement the TDLS_TEARDOWN operation internally, send an explicit TDLS link teardown frame to the driver. Change all teardown calls to use these calling semantics. Signed-off-by: Arik Nemtsov <arik@wizery.com> Cc: Kalyan C Gaddam <chakkal@iit.edu>
* TDLS/nl80211: Support receiving TDLS discovery response framesArik Nemtsov2011-10-232-0/+18
| | | | | | | | | Register for the TDLS discovery response public action frame in nl80211. Print out a debug message when a Discovery Resp frame is received and validated. Signed-off-by: Arik Nemtsov <arik@wizery.com> Cc: Kalyan C Gaddam <chakkal@iit.edu>
* TDLS: Process discovery requests and send discovery responsesArik Nemtsov2011-10-232-1/+88
| | | | | | | | | When a discovery request is received, add the peer to the TDLS peer cache and send a response containing minimal data. Mandatory IEs in the discovery response frame will be filled out by the driver. Signed-off-by: Arik Nemtsov <arik@wizery.com> Cc: Kalyan C Gaddam <chakkal@iit.edu>
* TDLS: Get TDLS related capabilities from driverArik Nemtsov2011-10-236-5/+66
| | | | | | | | | | | | | | Put glue code in place to propagate TDLS related driver capabilities to the TDLS state machine. If the driver doesn't support capabilities, assume TDLS is supported internally. When TDLS is explicitly not supported, disable all user facing TDLS operations. Signed-off-by: Arik Nemtsov <arik@wizery.com> Cc: Kalyan C Gaddam <chakkal@iit.edu>
* nl80211: Implement TDLS callback functions and propagate capabilitiesArik Nemtsov2011-10-232-0/+108
| | | | | | | | | | | Allow passing high-level TDLS commands and TDLS frames to kernel via new nl80211 commands. Propagate TDLS related nl80211 capability flags from kernel and add them as driver capability flags. Signed-off-by: Arik Nemtsov <arik@wizery.com> Cc: Kalyan C Gaddam <chakkal@iit.edu>
* TDLS: Use a valid dialog-token in a setup requestArik Nemtsov2011-10-231-1/+1
| | | | | | | A zero dialog-token is considered invalid by IEEE Std 802.11z-2010. Signed-off-by: Arik Nemtsov <arik@wizery.com> Cc: Kalyan C Gaddam <chakkal@iit.edu>
* TDLS: Support setting CONFIG_TDLS_TESTING in .configArik Nemtsov2011-10-232-0/+8
| | | | | Signed-off-by: Arik Nemtsov <arik@wizery.com> Cc: Kalyan C Gaddam <chakkal@iit.edu>
* nl80211: Handle special TDLS direct link key index useJouni Malinen2011-10-231-0/+4
| | | | | | An ugly hack is currently used to indicate keys for TDLS direct link: key_idx == -1. That needs to be converted to 0 for cfg80211 to accept the key.
* hwsim_test: Fix silly bug in select() result processingJouni Malinen2011-10-231-2/+2
* Remove incorrect statement about get_hw_feature_data() driver_opsJouni Malinen2011-10-231-3/+0
| | | | | | This function is actually needed for quite a bit more than just user space MLME implementation. The old comment here has not been accurate for a long time, so get rid of it.
* Remove unused driver_ops client MLME functionsJouni Malinen2011-10-234-167/+0
| | | | | | | | These driver_ops functions set_channel, set_ssid, set_bssid, mlme_add_sta, and mlme_remove_sta were used with the user space MLME implementation in wpa_supplicant. That was only for testing purposes and was removed, but these driver_ops were forgotten. Remove them now to remove confusing driver_ops definitions.
* wpa_supplicant: Check rate sets before joining BSSChristian Lamparter2011-10-231-0/+112
| | | | | | | IEEE Std 802.11-2007 demands that in order to join a BSS all required basic rates have to be supported by the hardware. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
* wpa_supplicant: Unify hardware feature dataChristian Lamparter2011-10-236-49/+42
| | | | | | | | | The hardware feature data is required in several different places throughout the code. Previously, the data was acquired and freed on demand, but with this patch wpa_supplicant will keep a single copy around at runtime for everyone to use. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
* Allow driver wrappers to indicate whether HT info is knownJouni Malinen2011-10-232-0/+5
| | | | | This is needed to be able to figure out whether the driver is known not to support HT.
* Postpone global_init() call until first driver instance is initializedJouni Malinen2011-10-232-33/+38
| | | | | | | This avoids allocating global driver state for driver wrappers that are built in but not used. This can save some resources and avoids failures with driver_nl80211.c that is now initializing netlink connections for nl80211 in global_init().
* TLS: Validate RSA ClientKeyExchange length fieldJouni Malinen2011-10-231-5/+13
| | | | | Instead of using implicit length based on the received buffer, validate RSA ClientKeyExchange based on the explicit length field.
* Remove unused variablesJouni Malinen2011-10-234-17/+21
* dbus: Removed unused local variableGrant Erickson2011-10-231-8/+0
| | | | Signed-off-by: Grant Erickson <marathon96@gmail.com>
* Fix hostapd_wpa_auth_send_ether() return valueJouni Malinen2011-10-231-1/+1
| | | | | This was not currently used for anything, but better return the correct value instead of hardcoded -1.