aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Do not trigger fast reconnection on locally generated deauth/disassocJouni Malinen2012-01-012-4/+21
| | | | | | | | | | | | | | | The deauthentication and disassociation events from nl80211 were being processed identically regardless of whether the frame was generated by the local STA or the AP. This resulted in fast reconnection mechanism getting triggered even in the case where the disconnection was detected locally (e.g., due to beacon loss) while this was supposed to happen only in the case where the AP is sending an explicit Deauthentication or Disassociation frame with a specific reason code. Fix this by adding a new deauth/disassoc event variable to indicate whether the event was generated locally. Signed-hostap: Jouni Malinen <j@w1.fi>
* Clear EAPOL authWhile and heldWhile values when port is disabledJouni Malinen2011-12-311-0/+18
| | | | | | | | | | | | IEEE Std 802.1X-2004 does not clear authWhile and heldWhile in this case, but doing so allows the timer tick to be stopped more quickly when the port is not enabled. Since these variables are used only within HELD and RECEIVE states, clearing them on initialization does not change actual state machine behavior. This reduces some unnecessary operations in port disabled state and cleans up the wpa_supplicant debug log after disconnection. Signed-hostap: Jouni Malinen <j@w1.fi>
* nl80211: Mark Beacon event debug excessiveJouni Malinen2011-12-301-1/+1
| | | | | | | This can show up way too frequently in AP mode to make debug logs readable at debug level. Signed-hostap: Jouni Malinen <j@w1.fi>
* WPS: Cancel previous registered wps_registrar_pbc_timeoutSpencer Chang2011-12-291-0/+1
| | | | | | | | Since wps_registrar_pbc_timeout is called to stop PBC, previously registered wps_registrar_pbc_timeout must be canceled when canceling the WPS operation. Signed-off-by: Spencer Chang <jungwalk@gmail.com>
* nl80211: Fix NL80211_CMD_FRAME to not try offchannel without driver supportJouni Malinen2011-12-291-1/+1
| | | | | | | | | | | | The offchanok parameter is hardcoded to one in number of paths and that added NL80211_ATTR_OFFCHANNEL_TX_OK attribute to NL80211_CMD_FRAME unconditional. cfg80211 rejects this with EINVAL if the driver does not indicate support for offchannel TX. Fix this by not requesting offchannel TX depending on driver capabilities. Remain-on-channel operation was used for those cases anyway, so the additional attribute was not really needed for these in the first place. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* nl80211: Do not stop AP mode Probe Request reporting on Listen stopJouni Malinen2011-12-271-1/+10
| | | | | | | | | | | | When nl80211_setup_ap() has enabled Probe Request reporting, this must not be disabled when P2P Listen state is stopped to avoid breaking AP mode operations. This could happen, e.g., if a Probe Request frame was received from a P2P device that the we are trying to invite to our group (i.e., when operating in GO role). p2p_probe_req_rx() calls p2p_invite_start() in this case and that ends up calling p2p->cfg->stop_listen() which calls probe_req_report() driver op. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* hostapd: Make inactivity polling configurableYogesh Ashok Powar2011-12-252-1/+6
| | | | | | | | | | | | | | | hostapd uses the poll method to check if the station is alive after the station has been inactive for ap_max_inactivity seconds. Make the poll mechanism configurable so that user can choose to disconnect idle clients. This can be especially useful when some devices/firmwares have restrictions on the number of clients that can connect to the AP and that limit is smaller than the total number of stations trying to use the AP. Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com> Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
* Remove obsolete comment on removed PTK rekeying operationJouni Malinen2011-12-241-3/+0
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* Increase initial group key handshake retransmit timeout to 500 msJouni Malinen2011-12-241-3/+5
| | | | | | | | | | The 100 ms timeout on retransmitting group key message can be too short for stations that are in power save mode or if there is a large number of association stations. While the retransmission of the EAPOL-Key frame should allow this to be recovered from, it is useful to avoid unnecessary frames to save soem CPU and power. Signed-hostap: Jouni Malinen <j@w1.fi>
* Drop priority level of the logger message for unexpected replay counterJouni Malinen2011-12-241-1/+1
| | | | | | | This can happen frequently during normal EAPOL-Key exchanges and there is no need to log it at info level. Signed-hostap: Jouni Malinen <j@w1.fi>
* nl80211: Fix mgmt RX for device SME in AP mode without monitorJouni Malinen2011-12-231-2/+30
| | | | | | | | Drivers that use device SME in AP mode may still need to be subscribed for Action frame RX when monitor interface is not used. This fixes number of P2P GO operations with ath6kl. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* nl80211: Fix use_monitor driver capability for non-mac80211 driversJouni Malinen2011-12-231-0/+18
| | | | | | | | | Poll command may be enough for mac80211 to figure out whether monitor interface is to be used, but this change did not take into account non-mac80211 drivers that support AP mode without monitor interface. For example, ath6kl needs to get use_monitor disabled. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* nl80211: Show station flush failures in debug logJouni Malinen2011-12-231-1/+7
| | | | Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* nl80211: Add debug prints for mgmt RX subscriptionJouni Malinen2011-12-231-7/+25
| | | | | | | This makes it easier to figure out which management frames has been subscribed to for RX events. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* P2P: Maintain a list of P2P Clients for persistent group on GOJouni Malinen2011-12-222-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: Move public P2P_PEER info generation into ctrl_ifaceJouni Malinen2011-12-222-36/+35
| | | | | | | | | | | | | | | | | The P2P module provides access to public peer data in struct p2p_peer_info. Use this to build the P2P_PEER information in ctrl_iface.c instead of providing such text format data from the P2P module. The internal data that was previously built in p2p_get_peer_info() as part of the text format peer data is now available through a separate p2p_get_peer_info_txt() function. This is still included in P2P_PEER output to maintain backwards compatibility with external programs that could have started to use this. However, it should be noted that this data is not really supposed to be used for anything else apart from debugging purposes and its format is subject to change. Signed-hostap: Jouni Malinen <j@w1.fi>
* P2P: Replace p2p_get_peer_info with p2p_peer_known when applicableJouni Malinen2011-12-222-0/+14
| | | | | | | | | p2p_get_peer_info() was used in multiple places just to check whether a specific peer is known. This was not the designed use for the function, so introduce a simpler function for that purpose to make it obvious that the p2p_get_peer_info() function is actually used only in ctrl_iface.c. Signed-hostap: Jouni Malinen <j@w1.fi>
* P2P: Fix a typo in a function documentationJouni Malinen2011-12-221-1/+1
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* P2P: Do not allow pending listen command override connectJouni Malinen2011-12-211-0/+6
| | | | | | | | | | If p2p_listen is issued during a p2p_scan, a pending after-scan operation is scheduled. However, since there is support for only a single pending operation, this was able to override a previously scheduled pending connect command. This can break some command sequences, so give higher priority to pending connect operation. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* Android: nl80211: Work around limited genl_ctrl_resolve()Jouni Malinen2011-12-211-0/+36
| | | | | | | | | Android ICS system/core/libnl_2 has very limited genl_ctrl_resolve() implementation that cannot handle names other than nlctrl. Work around that by implementing more complete genl_ctrl_resolve() functionality within driver_nl80211.c for Android builds. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* Lower RX_MGMT driver event debug level for Beacon framesJouni Malinen2011-12-181-1/+15
| | | | | | | | This event can be very frequent in AP mode when Beacon frames from neighboring BSSes are delivered to user space. Drop the debug message priority from DEBUG to EXCESSIVE for Beacon frames. Signed-hostap: Jouni Malinen <j@w1.fi>
* Allow linking with libnl-3 (libnl 3.2 and newer)Ben Greear2011-12-182-16/+30
| | | | | | | | | I needed this patch to compile against the latest libnl code. I added this to my config file: CONFIG_LIBNL32=y Signed-hostap: Ben Greear <greearb@candelatech.com>
* P2P: Reduce the idle time in Wait peer connect stateNeeraj Kumar Garg2011-12-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | When waiting for go_neg frame from the peer in WAIT_PEER_CONNECT state, I have observed that sometimes it takes 20 to 30 secs for successful GO negotiation. I also found out that it is because of 1 second idle time, in WAIT_PEER_CONNECT state. While it is good to have 1 second idle time [for doing power-save or doing some other legacy STA Scan or some other useful stuff], this makes GO Negotiation process slow. We wait for 1 second idle and then listen for a random time between 100(min)-300(max) ms. Assume P1 is in WAIT_PEER_CONNECT state and P2 is the one which is now to send go_neg frame. If P2 sends GO Negotiation frame just at the boundary of 300 ms of P1 and assume that P2 takes close to 600-800 ms for one iteration of sending go_neg request (one iteration is GO Negotiation Request frame time + dwell time + listen_time), P2 needs to transmit at least 16-18 Action frames for hitting the listen time of P1. Following patch reduces the idle time to 500 ms. Alternatively we can increase the listen time interval to 500 ms just for WAIT_PEER_CONNECT state.
* P2P: Fix PROBE_REQ_ONLY flag use for Provision Discovery RequestNeeraj Kumar Garg2011-12-181-1/+1
| | | | | | | | | Provision discovery from a known peer should actually check for dev->flags & P2P_DEV_PROBE_REQ_ONLY. This is creating an issue of updating the listen frequency of peer with the PD request frame frequency. PD request frame will be sent by the peer on our local listen frequency. This patch fixes that error. Suggested check has already been implemented in the invitation req receive path.
* P2P: Fix Provision Discovery channel for some join-GO casesJouni Malinen2011-12-184-8/+13
| | | | | | | | | The Provision Discovery Request needs to be sent on the operating channel of the GO and as such, the frequency from the BSS table (scan results) need to override the frequency in the P2P peer table that could be based on the Listen channel of the GO. Signed-hostap: Jouni Malinen <j@w1.fi>
* P2P: Make GO negotiation peer and group information available over D-BusReinette Chatre2011-12-182-1/+3
| | | | | | | | | | | | | | | | | | The GO negotiation response is very cryptic at the moment. For a success message we only know on which interface the negotiation succeeded, not which peer. For a failure we know the interface also and a status code (number). It will be very useful for clients to know upon receipt of such a message which peer the negotiation occurred with. Now that the peer information is available and the API is changed already, the function composing the D-Bus message might as well include all GO negotiation information. This is done with a dict to make things easier on clients if this result information changes down the line. Signed-hostap: Reinette Chatre <reinette.chatre@intel.com> Signed-hostap: Johannes Berg <johannes.berg@intel.com>
* P2P: Do not include own information in the peer tableMarek Kwaczynski2011-12-181-0/+3
| | | | | | | | | | | | | | | When the station is connected to P2P GO after calling p2p_find command the device sees itself. It is related to lack of filtering itself from clients connected to P2P GO. Step by step: 1. dev1: p2p_group_add 2. dev2: p2p_connect <MAC1> pbc join 3. dev1: wps_pbc 4. dev2: p2p_find Skip P2P client information for our own device from a GO with which we are connected.
* PCSC: Accept 0x67 (Wrong length) as a response to READ RECORDJouni Malinen2011-12-181-1/+1
| | | | | | | | | | It looks like some USIM cards respond with 0x67 (Wrong length) instead of 0x6c to 00 b2 01 04 ff. This was getting rejected in scard_get_record_len(). ETSI TS 102 221 is not very clear on this detail, but it looks fine to accept the 0x67 error value, too, to learn the record length. Signed-hostap: Jouni Malinen <j@w1.fi>
* Make hostapd_eid_wmm_valid() return more logical return valuesJouni Malinen2011-12-172-7/+9
| | | | | | | Return 1/0 instead 0/-1 to indicate valid/invalid element so that the if statement makes more sense with !wmm_valid(). Signed-hostap: Jouni Malinen <j@w1.fi>
* AP: Pass station's WMM configuration to driver wrappersJason Young2011-12-177-21/+17
| | | | | | | This updates a previous patch did more or less the same thing by providing the qosinfo as a single variable to the driver wrappers. Signed-hostap: Jason Young <jason.young@dspg.com>
* nl80211: Fix memory leaks on nla_put_failure error pathsJouni Malinen2011-12-171-0/+9
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* nl80211: Fix memory leak on nla_put_failure error pathsJason Young2011-12-171-2/+31
| | | | Signed-hostap: Jason Young <jason.young@dspg.com>
* nl80211: Send uapsd_queues and max_sp values on STA additionEliad Peller2011-12-171-1/+17
| | | | | | When a new station is added, send its configured WMM params. Signed-off-by: Eliad Peller <eliad@wizery.com>
* AP: Add uapsd_queues and max_sp fieldsEliad Peller2011-12-175-6/+22
| | | | | | | | | Add uapsd_queues and max_sp fields to sta_info struct, and pass them to the sta_add callback. These values are determined by the WMM IE in the (Re)Association Request. Signed-off-by: Eliad Peller <eliad@wizery.com>
* AP: Consider U-APSD driver supportEliad Peller2011-12-173-1/+7
| | | | | | | Check whether the driver advertises support for U-APSD in AP mode, and evaluate wmm_uapsd only in this case. Signed-off-by: Eliad Peller <eliad@wizery.com>
* Android: Fix PNO start function conversionJouni Malinen2011-12-141-1/+2
| | | | | | | | | The wpa_hexdump_ascii() call did not get converted properly and this was missed becaused of it getting defined out from the build. Anyway, this better use the correct variable names should that debug print ever be enabled for Android. Signed-hostap: Jouni Malinen <j@w1.fi>
* nl80211: Fix CONFIG_TDLS=y buildJouni Malinen2011-12-121-1/+1
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* nl80211: Clean up info on netdev or nl80211 not found errorsJouni Malinen2011-12-111-2/+7
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* P2P: Remove unexpected pending Provision Discovery Request in SearchJean-Michel.Bachot2011-12-111-0/+14
| | | | | | | | | | A Pending Provision Discovery Request was sent in SEARCH phase after a previous provision discovery timeout. Fix this by resetting the config method of P2P device in the pending PD reset function. This avoids the sending of a pending Provision Discovery Request during the next P2P search. Signed-off-by: Jean-Michel.Bachot <jean-michelx.bachot@intel.com>
* P2P: Fix Provision Discovery name in debug messagesJouni Malinen2011-12-113-7/+7
| | | | | | | Some debug messages used incorrect name for Provision Discovery. Replace "Provisioning Discovery" with "Provision Discovery". Signed-hostap: Jouni Malinen <j@w1.fi>
* P2P: Reject Presence Request if current NoA cannot be fetchedJouni Malinen2011-12-111-1/+1
| | | | | | | It is safer to assume that the driver could be using NoA and reject any Presence Request unless we are sure that noa NoA is in use. Signed-hostap: Jouni Malinen <j@w1.fi>
* Allow WPA passphrase to be fetched with RADIUS Tunnel-Password attributeMichael Braun2011-12-119-5/+194
| | | | | | | | | | | | This allows per-device PSK to be configured for WPA-Personal using a RADIUS authentication server. This uses RADIUS-based MAC address ACL (macaddr_acl=2), i.e., Access-Request uses the MAC address of the station as the User-Name and User-Password. The WPA passphrase is returned in Tunnel-Password attribute in Access-Accept. This functionality can be enabled with the new hostapd.conf parameter, wpa_psk_radius. Signed-hostap: Michael Braun <michael-dev@fami-braun.de>
* Skip WPS PBC overlap detection if P2P address is the sameVitaly Wool2011-12-111-4/+9
| | | | | | | | | | | | | | | | WPS overlap detection can detect false overlap if a P2P peer changes UUID while authentication is ongoing. Changing UUID is of course wrong but this is what some popular devices do so we need to work around it in order to keep compatibility with these devices. There already is a mechanism in WPS registrar to skip overlap detection if P2P addresses of two sessions match but it wasn't really triggered because the address wasn't filled in in the caller function. Let's fill in this address and also clean up WPS PBC sessions on WSC process completion if UUID was changed. Signed-hostap: Vitaly Wool<vitalywool@gmail.com>
* nl80211: Send Probe Response template to the driverArik Nemtsov2011-12-101-0/+3
| | | | | | | | | Pass the raw Probe Response template to kernel via netlink using the set_ap() driver callback. The data is sent as one of the Beacon attributes. Signed-hostap: Arik Nemtsov <arik@wizery.com> Signed-off-by: Arik Nemtsov <arik@wizery.com>
* Set driver Probe Response template for AP mode offloadArik Nemtsov2011-12-102-0/+55
| | | | | | | | | | | Configure a Probe Response template for drivers that support it. The template is updated when the Beacon template is updated. The Probe Response template is propagated to the driver via the set_ap() callback. Signed-hostap: Arik Nemtsov <arik@wizery.com> Signed-off-by: Arik Nemtsov <arik@wizery.com>
* Split Probe Response generation into a separate functionArik Nemtsov2011-12-101-102/+114
| | | | | | | | This is needed for Probe Response template, so move the code into a separate function that can be shared. Signed-hostap: Arik Nemtsov <arik@wizery.com> Signed-off-by: Arik Nemtsov <arik@wizery.com>
* Maintain internal copy of Probe Response offload capabilitiesArik Nemtsov2011-12-101-0/+7
| | | | | Signed-hostap: Arik Nemtsov <arik@wizery.com> Signed-off-by: Arik Nemtsov <arik@wizery.com>
* nl80211: Propagate Probe Response offload capabilities from kernelArik Nemtsov2011-12-102-0/+43
| | | | | | | | | | Translate nl80211 flags to wpa_supplicant flags for Probe Response offload support. The existence of the nl80211 PROBE_RESP_OFFLOAD_SUPPORT attribute means Probe Response offload is supported. The value of the attribute is a bitmap of supported protocols. Signed-hostap: Arik Nemtsov <arik@wizery.com> Signed-off-by: Arik Nemtsov <arik@wizery.com>
* AP: Improve disconnect and timeout related loggingBen Greear2011-12-103-4/+9
| | | | | | | This previously helped when debugging some auth issues when hitting the AP with 128 association attempts all at once. Signed-off-by: Ben Greear <greearb@candelatech.com>
* AP: Convert some wpa_printf to wpa_msg/dbgBen Greear2011-12-102-5/+6
| | | | | | | This generates better log messages when running multiple interfaces in one process. Signed-off-by: Ben Greear <greearb@candelatech.com>