aboutsummaryrefslogtreecommitdiffstats
path: root/src/p2p/p2p.c
Commit message (Collapse)AuthorAgeFilesLines
* P2P: Avoid peer expiration while connection in progress (BRCM)Eyal Shapira2012-08-021-1/+34
| | | | | | | | (This seems to be a bug fix squashed in one of the BRCM patches. Could be that the probability of this occuring once the expiration time was reduced to 30s is higher) Signed-off-by: Eyal Shapira <eyal@wizery.com>
* P2P: Improve scan results handling (BRCM)Eyal Shapira2012-08-021-0/+9
| | | | | | | | | | | Avoid reporting scan results to the application in case a P2P search is in progress as there will be many events but the scan is only done on channels 1,6,11. This may cause APs on other channels to "disappear" from the scan results. Also avoid updating P2P interfaces with STA interfaces scan results in order to avoid having results which are not on the social channels. Signed-off-by: Eyal Shapira <eyal@wizery.com>
* P2P: Start blocked p2p find even if scan was on another interface (BRCM)Eyal Shapira2012-08-021-0/+12
| | | | | | | | | | | | | | p2p find can now defer starting the p2p scan due to an ongoing scan on a different interface. Relying on p2p_cb_on_scan_complete which is a per interface flag is wrong here and we won't resume the p2p find in case the scan wasn't on the same interface (which is the case in Android JB). Fix this by relying on the global p2p state instead. (This description is based on analysis of the code as the original BRCM commit doesn't contain any useful information) Signed-off-by: Eyal Shapira <eyal@wizery.com>
* P2P: Decrease peer expiry time (BRCM)Eyal Shapira2012-08-021-0/+4
| | | | | | | Changed from 5 min to 30 secs probably in order to avoid stale peers appearing in the Android UI. Signed-off-by: Eyal Shapira <eyal@wizery.com>
* Fix p2p service discoveryIrfan Sheriff2012-08-021-1/+60
| | | | | | | - Fix listen timing to improve SD reliability - Fix SD packet scheduling Signed-off-by: Eyal Shapira <eyal@wizery.com>
* Revert "P2P: Assume GO Negotiation failed if GO Neg Conf wait times out"Eyal Shapira2012-08-021-8/+0
| | | | | | | Galaxy Nexus takes time to send the GO Neg Confirm (~200ms) and this commit caused the GO Neg to fail because of this. This reverts commit 579a80982ad07619373876c09cdd60e2afcba5b5.
* P2P: update scan resultsEliad Peller2012-08-021-2/+13
| | | | | | | | | (not sure this should go upstream) update p2p scan results (and notify) if the listen_freq or go_state were changed. Signed-off-by: Eliad Peller <eliad@wizery.com>
* p2p: consider age for the p2p scan resultsYoni Divinsky2012-07-301-5/+24
| | | | | | | | | | | | | | | | | Cfg80211 caches the scan results according the channel number. Due to the 15 sec aging this might cause the user mode to see more than one scan result with the same BSSID, e.g. - one scan result for the p2p-device and one for the p2p-GO (once it's enabled). Fix this by updating the device entry only if the new peer entry is newer than the one previously stored. Signed-off-by: Yoni Divinsky <yoni.divinsky@ti.com> Signed-off-by: Victor Goldenshtein <victorg@ti.com> Signed-off-by: Igal Chernobelsky <igalc@ti.com>
* P2P: use GO channel for Operating Channel IEEliad Peller2012-07-301-1/+1
| | | | | | | [ To be upstreamed - Arik ] Change-Id: I5285126515b47cd3b4cdce717310835f23a78f0a Signed-off-by: Eliad Peller <eliad@wizery.com>
* P2P: Fix provision discovery retries during p2p_findJouni Malinen2012-07-231-1/+7
| | | | | | | | | | | | Commit 6b56cc2d97fe9efd1feea8d418714b4658b056f1 added retries of provision discovery request frames in IDLE state. However, it did not make the p2p_find case behave consistently with the new limitied retry behavior. This can result in way too many and frequent PD retries. Fix this by extending the previous commit to address PD retries and maximum retry limit consistently regardless of whether p2p_find is running. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com> intended-for: hostap-1
* P2P: Remove GO neg/invite special cases from searchJohannes Berg2012-06-301-37/+2
| | | | | | | | | | | | There are separate states for these, so we can't really get into this situation unless somebody tries to do multiple things at the same time. p2p_connect stops find and CONNECT state is used to probe the peer on its Listen channel with GO Negotiation Request frames. Similarly, p2p_invite() stops find and INVITE state is used to probe the peer on its Listen channel with Invitation Request frames. The older mechanism of using Search state functionality to find the peer can be removed. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* P2P: Add p2p_client_list support for FullMAC Persistent GOMasashi Honma2012-06-171-12/+17
| | | | | | | | | 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>
* P2P: Fix P2P Client Discoverability bit updatesJouni Malinen2012-06-161-6/+24
| | | | | | | | | | | | | | | | | | | | | The P2P Client Discoverability bit is reserved in most frames and its value in the local P2P peer table should only be updated based on P2P Group Info attribute from a GO. Fix this by avoiding changes to this dev_capab bit based on other P2P frames. It would be more correct to track this separately for each group in which the peer is a member, but since we do not do that for the other group specific information either, this can do for now. It should be noted that prior to commit 18485b5469c5eeea6a552264fbfaabb089a0a557 wpa_supplicant set this bit in all P2P frames. However, that commit changed this to match the specification, i.e., the bit is not set in frames which are received from P2P Device role. As such, this fix is needed to be able to figure out that a peer supports client discoverability capability after that commit. Signed-hostap: Jouni Malinen <j@w1.fi> intended-for: hostap-1
* P2P: Fix setting of P2P Client Discoverability bitMasashi Honma2012-06-161-2/+4
| | | | | | | | | | | | | In the P2P specification v1.1, the P2P Client Discoverability bit is described in Table 12 "Device Capability Bitmap definition". The table says "Within a P2P Group Info attribute and a (Re)association request frame the P2P Client Discoverability field shall be set to 1 when the P2P Device supports P2P Client Discoverability, and is set to 0 otherwise. This field shall be reserved and set to 0 in all other frames or uses.". To match with this, filter out P2P Client Discoverability bit from frames where its use is reserved. Signed-hostap: Masashi Honma <masashi.honma@gmail.com>
* P2P: Address race condition with GO Negotiation Request TX statusNeeraj Kumar Garg2012-06-091-1/+3
| | | | | | | | | | | | | | | | If both peers initiate GO Negotiation at about the same time, it is possible for the GO Negotiation Request frame from the peer to be received between the local attempt to send the GO Negotiation Request and TX status event for that. This could result in both devices sending GO Negotiation Response frames even though one of them should have skipped this based which device uses a higher MAC address. Resolve this race by incrementing go_neg_req_sent when p2p_send_action() returns success instead of doing this from the TX status callback. If the frame is not acknowledged, go_neg_req_sent is cleared in TX status handler. Signed-off-by: Neeraj Garg <neerajkg@broadcom.com>
* P2P: Assume GO Negotiation failed if GO Neg Conf wait times outJouni Malinen2012-06-081-0/+8
| | | | | | | | | | Stop the connection attempt if GO Negotiation Confirm is not received within 100 ms of the GO Negotiation Response getting acknowledged. Previously, we would have continued trying to connect to the peer even in this case which could result in confusing second GO Negotiation Request frame and unnecessarily long wait before indicating failure. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* P2P: Add option for Provision Discovery before GO NegotiationJouni Malinen2012-05-111-3/+8
| | | | | | | | | | This is a workaround for interoperability issues with some deployed P2P implementations that require a Provision Discovery exchange to be used before GO Negotiation. The new provdisc parameter for the p2p_connect command can be used to request this behavior without having to run a separate p2p_prov_disc command. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* P2P: Wait 100 ms if driver fails to start listen operationJouni Malinen2012-05-081-0/+12
| | | | | | | | | | | | | | | | | | | | Some drivers may accept the remain-on-channel command, but instead of indicating start event for remain-on-channel, just indicate that the operation has been canceled immediately. This could result in continuous loop of search/listen states with very limited time to do anything else in wpa_supplicant if the scan command is also completed quickly (e.g., if the driver is unable to scan other channels than the current operating channel). As a workaround, do not start the next step (search) in P2P device discovery if this type of rejection of listen operation is detected. This gives some more time for wpa_supplicant to handle whatever else may be needed at to be done at the same time and reduces the amount of CPU used in a loop that does not really work correctly from the view point of being discoverable. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com> intended-for: hostap-1
* P2P: Fix Device ID matching for Probe Request framesWei-Jen Lin2012-05-021-1/+1
| | | | | | | | | | The misplaced parenthesis caused Device ID matching to check only the first octet of the P2P Device Address, i.e., we could have replied to Probe Request frames that was searching for another device if any of the last five octets of the address were different. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com> intended-for: hostap-1
* P2P: Add option to force SSID/passphrase for GO NegotiationJouni Malinen2012-04-271-3/+22
| | | | | | | | | | | | | An existing persistent group information can now be used to force GO Negotiation to use the previously used SSID/passphrase from a persistent group if we become a GO. This can be used as an alternative to inviting a new P2P peer to join the group (i.e., use GO Negotiation with GO intent 15 instead of starting an autonomous GO and using invitation), e.g., in case a GO Negotiation Request is received from a peer while we are not running as a GO. The persistent group to use for parameters is indicated with persistent=<network id> parameter to p2p_connect. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* P2P: Do not update peer Listen channel based on PD/InvitationJouni Malinen2012-04-261-9/+14
| | | | | | | | | | | | | | | | | | Commits 17bef1e97a5061a8b5443dc24166e28439911f0b and ffe98dfb88a19b66418184955ef272789e3abb68 started using p2p_add_device() with other frames than just Probe Response frames from scan results. However, these changes did not take into account that the PD Request and Invitation Request frames are normally received on the our own Listen channel, not on the Listen channel of the peer. As such, these frames must not be used to update Listen channel information for the peer. Fix this by letting p2p_add_device() know whether the results are from scan results and if not, skip the peer table updates that are specific to Probe Response frames. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com> intended-for: hostap-1
* P2P: Fix disallowing of pending listen command to override connectJouni Malinen2012-04-161-1/+1
| | | | | | | | | | | | Commit d9bdba9f867577ed9da6df9c5c933033c71bcdf2 was supposed to allow p2p_listen to schedule new after scan operation only if a p2p_connect operation was not pending. However, it used incorrect P2P_AFTER_SCAN_ value for this and did not actually prevent overriding of p2p_connect and could have caused some p2p_listen operations to be skipped unnecessarily. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com> intended-for: hostap-1
* DBus: Add ability to report probe requestsJohannes Berg2012-04-011-23/+30
| | | | | | | | | | | | | | | | Some applications require knowing about probe requests to identify devices. This can be the case in AP mode to see the devices before they connect, or even in P2P mode when operating as a P2P device to identify non-P2P peers (P2P peers are identified via PeerFound signals). As there are typically a lot of probe requests, require that an interested application subscribes to this signal so the bus isn't always flooded with these notifications. The notifications in DBus are then unicast only to that application. A small test script is also included. Signed-hostap: Johannes Berg <johannes.berg@intel.com>
* P2P: Use P2P Device ID attribute if Device Info not availableJouni Malinen2012-03-301-5/+8
| | | | | | | | | | | The "BSS p2p_dev_addr=address" command uses p2p_parse_dev_addr() to figure out the P2P Device Address of the GO from scan results. This used to work only if the P2P IE was received from Probe Response frames since only those include the P2P Device Info attribute. Make this work with Beacon frames, too, by using P2P Device ID attribute if the P2P Device Info attribute is not present. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* P2P: Add support for preferred channel listJouni Malinen2012-03-291-0/+33
| | | | | | | | | | | | | | | | | | | | | | p2p_pref_chan configuration parameter can now be used to set the list of preferred channel for P2P GO Negotiation. This will be used in the priority order if the peer does not support the channel we are trying to use as the GO (configured operating channel or the best 2.4 GHz/5 GHz channel) for the case where a forced channel is not used. p2p_pref_chan=<op class:channel>,... For example: p2p_pref_chan=81:1,81:2,81:3,81:4,81:5,81:6 This would configure 2.4 GHz channels 1-6 as the preferred ones with channel 1 the most preferred option. These configuration parameters can be set in wpa_supplicant.conf and dynamically updated with "wpa_cli set <param> <value>". Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* P2P: Fix provisioning info clearing after successful WPS stepJouni Malinen2012-03-011-3/+3
| | | | | | | | | | | | Previously, this provisioning info was cleared using the P2P Interface Address of the GO as the key. That did not always work in the case the where we joined an already running group. This could result in the next connection to that same GO skipping provision discovery. Fix this by finding the peer entry based on its P2P Device Address instead of the P2P Interface Address which may not always be set. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com> intended-for: hostap-1
* P2P: Advertise immediate availability of WPS credentialJouni Malinen2012-02-271-4/+16
| | | | | | | | | | | | | | Use Device Password ID in WSC IE of Probe Request and Probe Response frames to advertise immediate availability of WPS credentials per P2P specification sections 3.1.2.1.1 (Listen State), 3.1.2.1.2 (Scan Phase), and 3.1.2.1.3 (Find Phase). For now, the Device Password ID is set only for the case where we are active GO Negotiation with a specific peer. In practice, this means that the Probe Response frames during pending GO Negotiation (whenever in Listen state) indicate availability of the credential. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* P2P: Make p2p_flush stop P2P operations consistentlyJouni Malinen2012-02-271-5/+1
| | | | | | | | | p2p_flush did not explicit stop all P2P operations, i.e., the exact behavior depended on the P2P module state at the time the p2p_flush command was issued. Make this more consistent by explicitly calling p2p_stop_find() from p2p_flush(). Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* P2P: Fix remain-on-channel use with PD/Invitation Request while in ListenJouni Malinen2012-02-271-0/+10
| | | | | | | | | | | | | | | | | If Listen state was in progress on another channel when a request to send an Action frame (e.g., Provision Discovery Request or Invitation Request to a peer on the peer's Listen channel that is different from our Listenc hannel) is issued, wpa_supplicant tried to use concurrent remain-on-channel operations. While some drivers can handle this cleanly, there are drivers that don't and wpa_supplicant is not expected to request concurrent remain-on-channel operations. Fix this by cancelling the ongoing remain-on-channel with stop_listen prior to sending the Action frame on another channel. If a P2P search was in progress, it will be continued after the timeout on the new operation. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* Remove the GPL notification from files contributed by AtherosJouni Malinen2012-02-111-8/+2
| | | | | | | Remove the GPL notification text from files that were initially contributed by Atheros Communications or Qualcomm Atheros. Signed-hostap: Jouni Malinen <j@w1.fi>
* P2P: Avoid re-starting p2p_search in some corner casesJouni Malinen2012-02-091-0/+14
| | | | | | | | | | | Search (p2p_scan) could already have been started at the point remain-on-channel end event is being processed, e.g., if an Action frame TX is reported immediately aftet the end of an earlier remain-on-channel operation and the response frame is sent using an offchannel operation while p2p_find is still in progress. Avoid trying to re-run p2p_scan while the previous one is still running. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* P2P: Fix p2p_scan() error processing in p2p_search()Jouni Malinen2012-02-091-1/+1
| | | | | | | | | | | | Commit 39185dfa549f076a6be114e0149a3649d302f477 changed the p2p_scan() callback to return 1 in some cases, but forgot to change this p2p_scan() call to handle that properly. Fix this by processing any non-zero value as an error. This regression could leave the P2P module in state where it believed a P2P scan was still running and refused to start some operations until that scan gets completed (which would never happen since it was not really started). Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* P2P: Allow BSS entry to be fetched based on GO P2P Device AddressJouni Malinen2012-02-071-0/+26
| | | | | | | | | | "BSS p2p_dev_addr=<P2P Device Address>" can now be used to fetch a specific BSS entry based on the P2P Device Address of the GO to avoid having to iterate through the full BSS table when an external program needs to figure out whether a specific peer is currently operating as a GO. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* P2P: Do not expire peer entry if we are connected to the peerJouni Malinen2012-01-251-0/+12
| | | | | | | | Even though we may not update P2P peer entry while connected to the peer as a P2P client, we should not be expiring a P2P peer entry while that peer is the GO in a group where we are connected as a P2P client. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* P2P: Do not expire peer entry if peer is connected as a clientJouni Malinen2012-01-251-0/+15
| | | | | | | | Even though we may not receive a Probe Response from the peer during the connection, we should not be expiring a P2P peer entry while that peer is connected to a group where we are the GO. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* P2P: Notify upper framework on stopping the p2p_find(SEARCH)Jithu Jance2012-01-221-0/+3
| | | | | | | | | This patch notifies the upper framework that an on-going discovery has been stopped. This is useful in cases where a p2p_find with a timeout value initiated by the upper framework has been finished or when the framework initiated "p2p_find" is stopped by a "p2p_connect". Signed-hostap: Jithu Jance <jithu@broadcom.com>
* P2P: Allow Device ID to be specified for p2p_find commandJouni Malinen2012-01-081-7/+17
| | | | | | | dev_id=<P2P Device Addr> can now be specified as an argument to p2p_find to request P2P find for a specific P2P device. Signed-hostap: Jouni Malinen <j@w1.fi>
* P2P: Move public P2P_PEER info generation into ctrl_ifaceJouni Malinen2011-12-221-33/+20
| | | | | | | | | | | | | | | | | 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-221-0/+6
| | | | | | | | | 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: 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>
* 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 Provision Discovery channel for some join-GO casesJouni Malinen2011-12-181-2/+2
| | | | | | | | | 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-181-1/+1
| | | | | | | | | | | | | | | | | | 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.
* P2P: Fix Provision Discovery name in debug messagesJouni Malinen2011-12-111-2/+2
| | | | | | | Some debug messages used incorrect name for Provision Discovery. Replace "Provisioning Discovery" with "Provision Discovery". Signed-hostap: Jouni Malinen <j@w1.fi>
* P2P: Skip duplicated provision discovery on joinJithu Jance2011-12-061-0/+28
| | | | | | | If p2p_prov_disc join command is used prior to p2p_connect join, skip the duplicated provision discovery exchange. Signed-hostap: Jithu Jance <jithu@broadcom.com>
* P2P: Clear WPS method when GO negotiation failsJohannes Berg2011-11-181-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When GO negotation fails the WPS method is currently not cleared, which can result in GO negotiation being resumed when a GO negotiation request frame is received from the peer. That is unexpected as locally we already gave up. This manifests itself in getting 1319574733.955685: wlan0: P2P-GO-NEG-FAILURE status=-1 1319574733.955723: P2P: Removing pending group interface p2p-wlan0-0 ... 1319574736.648378: wlan0: P2P: Starting GO Negotiation with previously authorized peer ... 1319574736.650115: wlan0: P2P: Sending GO Negotiation Response ... 1319574736.988038: wlan0: P2P-GO-NEG-SUCCESS 1319574736.988233: P2P: No pending group interface 1319574736.988268: P2P: Create a new interface p2p-wlan0-1 for the group Clear the WPS method to avoid this situation. I wasn't able to test this though, but given the log I can only assume this is how the situation happened. Reported-by: Reinette Chatre <reinette.chatre@intel.com> Signed-hostap: Johannes Berg <johannes.berg@intel.com>
* P2P: Indicate GO Negotiation failure on peer expirationJithu Jance2011-11-181-1/+6
| | | | | | | | | | | | | | | | | | | If P2P device expires while a GO Negotiation is in progress, currently p2p->go_neg_peer is cleared without indicating GO Nego failure. This will result in pending group interfaces to be left over. This patch will indicate GO Negotiation failure and will remove any pending group interfaces. This patch addresses a corner case in GO-Negotiation case. Consider the scenario where two devices A and B are in discovery stage and Device B vanishes [moves out of range] when a connect is issued on the Device A. Then Device A keeps on retrying the GO Negotiation Request till the retry limit is reached. On reaching retry limit, the pending group interface is removed. But suppose if the peer entry in the device list expires before the retry limit is reached, then pending group interface was not removed. Signed-off-by: Jithu Jance <jithu@broadcom.com>
* P2P: Fix collection of member-in-group information for peer entriesJouni Malinen2011-11-181-1/+1
| | | | | | | | Invalid use of memcpy instead of memcmp in comparison resulted in the GO interface address getting set incorrectly if the GO did not show up in scan results anymore. Signed-hostap: Jouni Malinen <j@w1.fi>
* Mark local functions staticJouni Malinen2011-11-181-4/+4
| | | | | | These functions are not used outside the file in which they are defined. Signed-hostap: Jouni Malinen <j@w1.fi>