aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* WPS: Update dev.config_methods in wps_update_configjim1_lin2012-08-081-0/+1
| | | | | | dev.config_methods was not updated when wps_update_config was called. This could lead to mismatching config methods between Probe Request and M1 packets. Add missing part for it.
* Fix a couple memory leaksPaul Stewart2012-08-082-1/+5
| | | | | | Found using valgrind. Signed-hostap: Paul Stewart <pstew@chromium.org>
* android: wpa_s template: set p2p_go_max_inactivity (ANDROID)Eyal Shapira2012-08-081-0/+1
| | | | | | | | | | | Set p2p_go_max_inactivity to 30 secs (instead of the default of 300 secs) to avoid creating a user of experience of a WiFi Direct connection which doesn't disconnect. This may happen if the P2P GO interface misses a deauth/disassoc frame and keeps on thinking the client is connected. Limit this time to 30 secs which creates a better user experience. Signed-off-by: Eyal Shapira <eyal@wizery.com>
* Add p2p_go_max_inactivity config option (UPSTREAM)Eyal Shapira2012-08-084-0/+17
| | | | | | | | | | | | | | This enables setting a different max inactivity timeout for P2P GO. This timeout is used to detect inactive clients. In some scenarios it may be useful to have control over this and set a shorter timeout than the default 300s. For example when running STA and P2P GO interfaces concurrently, the STA interface may perform scans which may cause the GO to miss a disassoc / deauth frames from a client and keep assuming that the client is connected until the inactivity detection kicks in. 300 secs is a bit too long for such scenarios and creates a bad user experience. Signed-off-by: Eyal Shapira <eyal@wizery.com>
* android: wpa_s template: use group interface and set conc modeArik Nemtsov2012-08-021-0/+2
| | | | | | | | | | Make sure we operate the same way as BRCM, with a separate group interface, by incorporating a driver param. Also set a default p2p_conc_mode (set to 2), to fit WL6/7 cards. Note this will have to be changed to p2p_conc_mode=1 for WL8 cards. Signed-off-by: Arik Nemtsov <arik@wizery.com>
* wpa_s: support p2p concurrency modes when connecting P2PArik Nemtsov2012-08-021-0/+80
| | | | | | | | | | | | | Prevent P2P connection when STA concurrency requirements do not allow it. The behavior is determined according to the p2p_conc_mode config file parameter. We force go_intent=15 if only GO is allowed and abort the connection if join is attempted with go_intent=15. Also manipulate go_intent in our favor (go_intent=14) to minimize the chances of a concurrency conflict in p2p_conc_mode=2. This supersedes a similar previous patch by Eyal S. Signed-off-by: Arik Nemtsov <arik@wizery.com>
* wpa_s: support different p2p concurrency modes when connecting STAArik Nemtsov2012-08-025-10/+42
| | | | | | | | | | | | | support p2p concurrency modes using the p2p_conc_mode=0/1/2 config file parameter. Meaning is as follows: 0 - support STA + P2P CL/GO on the same channel (BRCM default) 1 - support only one connection at a time (WL8) 2 - support STA + P2P GO on same channel, but not P2P CL (WL6/7) When connecting STA, disallow the connection or disconnect existing p2p connection, according to existing concurrency preference. Signed-off-by: Arik Nemtsov <arik@wizery.com>
* nl80211: avoid using another interface for P2P GO (INTERNAL)Eyal Shapira2012-08-021-1/+0
| | | | | | | | | | | | | | | | | Relevant for wl6/7 only, we need to figure out the wl8 MR case. We now declare iface combinations in wlcore due to cfg80211 enforcement of that. Since we declare support for concurrent STA and P2P_GO, wpa_s would like to use another interface for GO. However, since we don't really support P2P_GO so well in MR but we do want to enable it in MR, prevent wpa_s from using P2P concurrent mode. This should be removed once we support P2P_GO properly in MR. [Arik - should be changed to a configuration parameter to wpa_s, and the current default should be preserved] Signed-off-by: Eyal Shapira <eyal@wizery.com>
* Initialize P2P on p2p0 and not wlan0 (JB)Eyal Shapira2012-08-021-4/+7
| | | | | | | | | | | | | | | | | | | | P2P is being initialized using a global struct which points to the first initialized interface wpa_s struct. That's causing P2P commands sent on the control socket matching p2p0 to generate scan and ROC on the wrong interface (wlan0) as well as events like PEER_DEVICE_FOUND are sent on the wrong control socket to the Android framework. This caused the framework to ignore these and prevent displaying the P2P peer in the UI. Solve it by an ugly hack for now to enable P2P only when the interface p2p0 is being initialized. This probably should be fixed upstream as well by marking somehow on which interface you can do p2p or enable p2p per interface. Signed-off-by: Eyal Shapira <eyal@wizery.com>
* Increase P2P_MAX_CLIENT_IDLE to 20 secs (BRCM)Eyal Shapira2012-08-021-0/+5
| | | | | | | | | | | | | This is from Jithu Jance submission to hostap ML: Consider the disconnect event generated due to EAP-FAILURE(after WPS handshake) during the P2P connection. In this disconnect context, the group idle timer will be set to 10 and assoc retry starts. If the connection doesn't go through in the first attempt the group will be removed. This is because the authentication timeout happens at 10secs and the assoc will be retried only after that. Signed-off-by: Eyal Shapira <eyal@wizery.com>
* Handle new interface parameter in ctrl commands (BRCM)Eyal Shapira2012-08-021-0/+29
| | | | | | | | Some commands sent to wpa_s by the framework in JB include a new interface parameter. Handle it and dispatch the the command on the correct interface. Signed-off-by: Eyal Shapira <eyal@wizery.com>
* Fix a crash in WPS PBC overlap (BRCM)Eyal Shapira2012-08-021-0/+5
| | | | | | | | | | | Supposedly fixed a crash which occurs during actual PBC overlap according to BRCM commit log. (Not quite sure what's the exact cause of the crash here. However this looks like a non BRCM specific change so take it). p2p_dev_addr can be NULL in some of the calls. Might cause a problem ?) Signed-off-by: Eyal Shapira <eyal@wizery.com>
* 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-023-7/+63
| | | | | | | | | | | 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-022-0/+16
| | | | | | | | | | | | | | 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: Defer p2p scan if scanning on other interfaces (BRCM)Eyal Shapira2012-08-021-0/+24
| | | | | | | | | | The current defer p2p scan until scan complete works only when the scanning is done on the same interface. However in Android case there are scans in progress on the STA interface so these would fail the p2p_scan and consequently the p2p find. 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>
* nl80211: add parameter to force multi channel concurrency (BRCM)Eyal Shapira2012-08-021-0/+9
| | | | | | | Add a parameter which can be set from wpa_s commandline or conf file to force real multi channel. Signed-off-by: Eyal Shapira <eyal@wizery.com>
* nl80211: fix extending shared_freq detection to AP/GO (BRCM)Eyal Shapira2012-08-021-0/+4
| | | | | | | | Commit d3bd0f "nl80211: Extend shared_freq to handle AP/GO mode interfaces" still discards AP/GO interfaces so effectively shared_freq won't work on AP/GO interaces like intended. Signed-off-by: Eyal Shapira <eyal@wizery.com>
* P2P: fix freq conflict resolution in case of P2P and STAEyal Shapira2012-08-022-25/+31
| | | | | | | | | | | | | | | The conflict resolution code doesn't run in case wpa_s SME is used so moved it up wpa_supplicant_associate. wpas_p2p_handle_frequency_conflicts assumes use of a different interface created for p2p group (p2p_group_interface != 0) but that's not necessarily the case with all drivers. Switch to detect if an iface is used for P2P_GO by looking at current_ssid->mode. [Arik - fix the separate interface case, was broken by the original patch] Signed-off-by: Eyal Shapira <eyal@wizery.com> Signed-off-by: Arik Nemtsov <arik@wizery.com>
* P2P: Resolve frequency conflicts between STA and P2P (BRCM)Eyal Shapira2012-08-025-1/+83
| | | | | | | | | | | | | | Upon association check whether there's a a frequency conflict given that no support for multi channel. In case there's a freq conflict with an existing P2P_GO or P2P_CLI decide how to resolve it (which one to disable or disconnect) according to the priority configuration. Effectively on Android JB, STA is always prioritized over P2P so in case of a conflict P2P will be disconnected so that STA can associate on a different channel. Signed-off-by: Eyal Shapira <eyal@wizery.com>
* Prep work to configure a prioritized interface (BRCM)Eyal Shapira2012-08-024-0/+25
| | | | | | | | | | | 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>
* nl80211: Use native cfg80211 sta events (BRCM)Dmitry Shmidt2012-08-021-90/+15
| | | | | | | | | | [Eyal - Keep specific BRCM specific stuff under ANDROID_BRCM_P2P_PATCH and not ANDROID_P2P which TI solution compiles with] Change-Id: I0f6222839ac87241f1bfbbb1fdc6469bf6359652 Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> Signed-off-by: Eyal Shapira <eyal@wizery.com>
* Fix p2p service discoveryIrfan Sheriff2012-08-023-3/+100
| | | | | | | - Fix listen timing to improve SD reliability - Fix SD packet scheduling Signed-off-by: Eyal Shapira <eyal@wizery.com>
* Fix null pointer access for SSID printing.andy2_kuo2012-08-022-2/+4
|
* Fix SSID printing in eventsIrfan Sheriff2012-08-022-2/+4
|
* Add SSID in supplicant change eventIrfan Sheriff2012-08-022-4/+8
|
* Allow immediate scan request even if another scan was scheduled laterDmitry Shmidt2012-08-021-1/+2
| | | | Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
* Android.mk: Define ANDROID_P2PEyal Shapira2012-08-022-0/+4
| | | | | | | | | | | | Changes within #ifdef ANDROID_P2P are BRCM additions which are non BRCM specific and there should be included. That's in contrast of ANDROID_BRCM_P2P_PATCH which mark parts that are BRCM implementation specific (like device_ap_sme) and therefore would be compiled in only when compiling with BRCM driver. Change-Id: I031f0908055756b6e85b64c5151c18b8a73b9841 Signed-off-by: Eyal Shapira <eyal@wizery.com>
* wpa_supplicant: Fix compilation without BOARD_WPA_SUPPLICANT_DRIVERDmitry Shmidt2012-08-021-6/+2
| | | | Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
* Use keystore ENGINE for private key operationsKenny Root2012-08-021-0/+9
| | | | | | | | | | | The new keystore ENGINE is usable to perform private key operations when we can't get the actual private key data. This is the case when hardware crypto is enabled: the private key never leaves the hardware. Subsequently, we need to be able to talk to OpenSSL ENGINEs that aren't PKCS#11 or OpenSC. This just changes a few #define variables to allow us to talk to our keystore engine without having one of those enabled and without using a PIN.
* Restore OpenSSL ENGINE supportKenny Root2012-08-022-6/+0
| | | | We now use an OpenSSL ENGINE to support keystore functionality.
* Add network connection event for statusIrfan Sheriff2012-08-021-0/+9
| | | | | We need both supplicant state and network connection state for proper sync up with framework
* Add state message sent after 'status' commandDmitry Shmidt2012-08-021-0/+7
| | | | Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
* Moving keystore to system/securityKenny Root2012-08-022-2/+2
| | | | | keystore used to be in frameworks/base/cmds/keystore, but this include needs to be changed to support the move to system/security
* wpa_supplicant: delay scans only for android builds (INTERNAL)Eliad Peller2012-08-021-0/+4
| | | | | | | | | | | | commit e48cd17 ("android: Delay scan after startup to prevent race with framework (INTERNAL)") is fixing some bug wrt. android framework, but introduce pretty annoying delay when working with native linux. Surround the new functionality with ifdefs in order to apply it only for android build. Signed-off-by: Eliad Peller <eliad@wizery.com>
* android: Delay scan after startup to prevent race with framework (INTERNAL)Eyal Shapira2012-08-021-1/+1
| | | | | | | | | | | | | | | | | | | | On Android, the immediate scan may cause the following race: 1. Framework starts wpa_s 2. wpa_s loads and initates a scan 3. A matching AP is found and successfully connected to 4. wpa_s reports CTRL-EVENT-CONNECTED but the framework WiFi state machine didn't progress yet to the correct state so this event is unexpected. 5. As a result the DHCP state machine isn't triggered. The end result is successful assoc with the AP but no DHCP request being sent. Avoid this by delaying the initial scan by scan_interval. This doesn't delay getting scan results or connectibg to a rememebered AP as the Android framework initiates a scan through the control interface anyways after detecting that the supplicant started. Signed-off-by: Eyal Shapira <eyal@wizery.com>
* Use normal scan on first scan after initEyal Shapira2012-08-021-4/+1
| | | | | | | | Avoid using sched scan as the initial scan after wpa_s init. This prevents a scenario on Android in which the Android framework scan is preempted by a saved scan_ssid AP being connected to due to immediate sched scan. This delays receiving scan results.
* wpa_supplicant: reduce wps2 IE in conf template (INTERNAL)Ido Reis2012-08-021-0/+5
|
* wpa_supplicant: VERSION_STR_POSTFIX is now defined to 'git describe'Ido Reis2012-08-021-1/+1
|
* print ctrl_iface commandsEliad Peller2012-08-021-0/+1
| | | | | | | | the android wpa_supplicant currently doesn't implement wpa_hexdump_ascii, so add a simple print for the control interface commands Signed-off-by: Eliad Peller <eliad@wizery.com>
* Use exact interface as socket parameter for initIrfan Sheriff2012-08-021-1/+1
| | | | | | | | | | | For p2p, there are virtual interfaces (like p2p-wlan0-X) created and that results in binding to the common init socket right now. Instead, have the init bind fail for p2p interfaces and create seperate sockets specified by the ctrl_interface path in config file Bug: 5002384 Change-Id: Ia155df079a0bcca1871b6bcab2ef7111f0cba6c1
* Android: wpa_s: changes to default build configEyal Shapira2012-08-021-1/+7
| | | | | | | Enable roaming and bgscan Signed-off-by: Eyal Shapira <eyal@wizery.com> Signed-off-by: Ido Reis <idor@ti.com>
* Android: hostapd: enable N rates in build configIdo Reis2012-08-021-1/+1
| | | | Signed-off-by: Ido Reis <idor@ti.com>
* config: enable NL80211Luciano Coelho2012-08-022-2/+2
| | | | | | Just enable it in both hostapd and wpa_s. Signed-off-by: Luciano Coelho <coelho@ti.com>
* nl80211_driver: add private commands to use dropbcastLuciano Coelho2012-08-021-2/+76
| | | | | | | | Add DRIVER DROPBCAST {GET,ENABLE,DISABLE} commands to show the current setting, enable and disable the feature of dropping all broadcast packets while in suspend mode. Signed-off-by: Luciano Coelho <coelho@ti.com>
* nl80211: Implement some private cmdsYotam Rubin2012-08-021-27/+29
| | | | | | | | | | | | | | | | | Implement the LINKSPEED and RSSI/RSSI-APPROX private commands. Upstream implementation sends the HANGED state event on private command failure. Unimplemented commands were sent to the driver as-is, causing the HANGED event to be sent and cause a recovery. Private command handling was modified so that only implemented commands are sent to the driver and the sending of the HANGED event was removed. [Arik - The "linkspeed" driver command incorrectly reported the rate in kbps. Fix this] Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Yotam Rubin <yotam@wizery.com>
* nl80211: add support for drop rx filtersEyal Shapira2012-08-021-0/+34
| | | | | | | | Enable configuring rx filters which will be dropped even if matching another rx filter. This can be used for generating exception filters. Signed-off-by: Eyal Shapira <eyal@wizery.com>
* driver_nl80211: Enable only unicast RXFILTER by defaultPontus Fuchs2012-08-021-1/+10
| | | | | | | | | In GB the framework always enabled RXFILTER for unicast and bcast. This seems to be missing in ICS so enable unicast by default as this is always required. Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com> Signed-off-by: Eyal Shapira <eyal@wizery.com>
* driver_nl80211: Add and align rx filters IDsEyal Shapira2012-08-021-11/+33
| | | | | | | | | | Add more patterns (SSDP, ARP, DHCP) and align IDs to a common vendor Android framework implementation. Note that ARP pattern shouldn't be used as our FW responds to ARPs by default without waking up the host. It is added only for ID alignments purposes. Signed-off-by: Eyal Shapira <eyal@wizery.com>