aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * hostapd: implement channel switch request drv ops (INTERNAL)Victor Goldenshtein2012-09-134-0/+55
| | | | | | | | | | | | New hostapd_channel_switch – to handle channel switch request. Signed-hostap: Victor Goldenshtein <victorg@ti.com>
| * nl80211: make unicast RX filter always match STA iface mac (ANDROID)Eyal Shapira2012-09-131-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is part of changing the RX filters configuration to being global and not dependent on the interface context. RX filter #0 should point to a filter matching any unicast frame sent to the STA (wlan0) mac. The configuration is done by querying the mac address of the interface. As we now have reconfiguration of filters done from the context of the p2p interface filter #0 would get reconfigured with the P2P dev mac. Avoid this by hard coded querying for the mac of wlan0 when creating the pattern for RX filter #0. Signed-off-by: Eyal Shapira <eyal@wizery.com>
| * nl80211: reconfigure RX filters whenever a new interface is added (ANDROID)Eyal Shapira2012-09-131-0/+35
| | | | | | | | | | | | | | | | | | | | This is used to reconfigure RX filters to include a new filter whenever the P2P group interface is added. The new filter matches any unicast frame sent to a dest mac which matches the P2P group interface mac. This is important as otherwise we wouldn't allow any data frames through to this interface. Signed-off-by: Eyal Shapira <eyal@wizery.com>
| * nl80211: support configuring RX filters dynamically (ANDROID)Eyal Shapira2012-09-121-5/+128
| | | | | | | | | | | | | | | | | | | | | | | | The current RX filters are statically defined and can only be enabled or disabled by the DRIVER RX-FILTER commands. Add support to add or remove RX filters "on the fly" from within wpa_s code so we can use this to add an RX filter matching unicast packets going to the new P2P interface mac. Whenever the filters change the whole list of filters needs to be configured to the kernel. Signed-off-by: Eyal Shapira <eyal@wizery.com>
| * nl80211: make rx filters config global (ANDROID)Eyal Shapira2012-09-121-12/+24
| | | | | | | | | | | | | | | | | | | | | | | | The RX filters (wowlan) configuration is per interface but this doesn't reflect the state in the kernel where it's per hw device (effectively in Android global). In JB this is more important as wpa_s uses up to 3 different interfaces when running P2P+STA. Also, fix a minor bug in nl80211_toggle_wowlan_trigger where the wpa_s wowlan state changed even if configuring the kernel failed. Signed-off-by: Eyal Shapira <eyal@wizery.com>
| * nl80211: Remove driver specific commands not used in JB (JB)Eyal Shapira2012-09-121-99/+0
| | | | | | | | | | | | | | | | | | | | The following driver specific commands aren't used in JB and were replaced by other APIs: POWERMODE,GETPOWER,LINKSPEED,RSSI,RSSI-APPROX Remove code handling these commands. Signed-off-by: Eyal Shapira <eyal@wizery.com>
| * nl80211: Remove driver command DROPBCAST (ANDROID)Eyal Shapira2012-09-121-74/+0
| | | | | | | | | | | | | | | | There's no support for this in the driver for now as the relevant patches were dropped. Therefore remove relevant code in wpa_s as well. Signed-off-by: Eyal Shapira <eyal@wizery.com>
* | wpa_supplicant: template conf file updateVishal Mahaveer2012-09-171-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Android we don't have to hardcode device related parameters in wpa_supplicant.conf file. It comes from Android properties as shown below, device_name --> ro.product.name manufacturer --> ro.product.manufacturer model_name --> ro.product.model model_number --> ro.product.model serial_number --> ro.serialno Also use_p2p_group_interface=1 part is defined in service defenition Change-Id: Ifd6c60c3c493a52c8a4dd45ab9cfcb244e1b7c71 Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
* | Merge commit 'ol_r8.a4.02' into d-jb-releaseVishal Mahaveer2012-09-1724-97/+292
|\ \ | |/
| * Make copies basic_rates list more usefulJouni Malinen2012-09-071-0/+2
| | | | | | | | | | | | | | | | | | | | | | Commit e5693c4775bae65faa960f80889f98b0a6cb2e1c added a copy of the determined basic rate set into struct hostapd_iface, but did not actually copy the terminating -1 value. This could be problematic if something were to actually try to use this list since would be no way to know what is the last entry in the list. Fix this by copying the terminating value. Signed-hostap: Jouni Malinen <j@w1.fi>
| * P2P: prefer operating channels where HT40 is possibleArik Nemtsov2012-09-041-0/+15
| | | | | | | | | | | | | | | | When no other user preference is specified, opt to use an operating channel that allows HT40 operation. This way, if driver capabilities and regulatory constraints allow, we might enjoy increased bandwidth. Signed-hostap: Arik Nemtsov <arik@wizery.com>
| * P2P: always re-select oper channel if not hard codedArik Nemtsov2012-09-041-1/+16
| | | | | | | | | | | | | | | | | | | | | | Since the operating channel is randomly set to 1/6/11 on init, which is always in the channel intersection, we were effectively ignoring the set of p2p preferred channels. Fix this by trying to get the best channel we can, unless the user hard coded the operating channel in the configuration file. Fall back to the initial randomly selected channel if a better one cannot be chosen. Signed-hostap: Arik Nemtsov <arik@wizery.com>
| * android: wpa_s template: allow HT40 GO by default (ANDROID)Arik Nemtsov2012-09-041-1/+2
| | | | | | | | Signed-off-by: Arik Nemtsov <arik@wizery.com>
| * P2P: add a conf parameter to start a GO as HT40 if allowedArik Nemtsov2012-09-044-2/+15
| | | | | | | | | | | | | | | | | | | | When specified in the conf file this parameter will make all invocations of p2p_group_add and p2p_connect behave as if "ht40" has been specified on the command line. This shouldn't do harm since regulatory constraints and driver capabilities are consulted anyway before starting HT40 mode. Signed-hostap: Arik Nemtsov <arik@wizery.com>
| * P2P: Use larger GO config timeout if HT40 is usedJouni Malinen2012-09-046-3/+36
| | | | | | | | | | | | | | Increase GO config timeout if HT40 is used since it takes some time to scan channels for coex purposes before the BSS can be started. Signed-hostap: Jouni Malinen <j@w1.fi>
| * P2P: Add optional "ht40" argument for p2p_connectRajkumar Manoharan2012-09-046-8/+21
| | | | | | | | | | | | | | This can be used to start negotiated GO in 40 MHz channel width in 5GHz band. Signed-hostap: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
| * P2P: Enable 40 MHz support for autonomous P2P group additionRajkumar Manoharan2012-09-048-19/+70
| | | | | | | | | | | | | | | | 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>
| * P2P: Move channel validation into a separate functionRajkumar Manoharan2012-09-041-25/+38
| | | | | | | | Signed-hostap: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
| * Supply the connection scan results to bgscan after initYoni Divinsky2012-09-041-1/+9
| | | | | | | | | | | | | | | | | | If bgscan is enabled, then bgscan is initiated after the connection, with no bss scan result information. Since a scan was performed prior to the connection, the information exists and can be used to initialize the bgscan's cache. Signed-hostap: Yoni Divinsky <yoni.divinsky@ti.com>
| * Revert "Supply the connection scan results to bgscan after init"Arik Nemtsov2012-09-041-5/+1
| | | | | | | | | | | | | | This reverts commit 1cd9da6b88d7dd9b3c887b62a584aba4bb08299f. This old commit has a memory leak. Use a newer commit from upstream that amends this.
| * Remove default ACM=1 from AC_VO and AC_VIJouni Malinen2012-09-042-4/+4
| | | | | | | | | | | | | | | | | | | | There is no need to mandate admission control (ACM=1) by default, so clear that flag in the case the configuration file does not specify wmm_ac_{vo,vi}_acm value. This gets closer to the values mentioned in the sample hostapd.conf file and reduces the need to specify WMM parameters in the configuration file for most common use cases. Signed-hostap: Jouni Malinen <j@w1.fi>
| * AP: configure basic rates from iface and not confArik Nemtsov2012-09-041-1/+1
| | | | | | | | | | | | | | | | | | The conf doesn't contain any basic rates in some cases. Most notably, when starting a p2p GO in 5Ghz. Use the iface rates which are initialized in hostapd_prepare_rates() to the conf rates or set to default values if no conf values exist. Signed-hostap: Arik Nemtsov <arik@wizery.com>
| * ctrl_iface: allow forcing go_intent during p2p_connect (ANDROID)Arik Nemtsov2012-08-151-9/+17
| | | | | | | | | | | | | | | | | | | | | | | | Allow the p2p_connect command to ignore android p2p concurrency considerations. Use the command line argument "no_p2p_conc" to p2p_connect in order to be able to set the go_intent. For instance: wpa_cli p2p_connect 00:11:22:33:44:55 pbc no_p2p_conc go_intent=3 Signed-off-by: Arik Nemtsov <arik@wizery.com>
| * Add P2P IEs to probe requests only when in P2P (UPSTREAM)Eyal Shapira2012-08-135-1/+26
| | | | | | | | | | | | | | | | | | | | | | | | The current code caused P2P and consquently WPS IEs to be added to any probe as the check was for non null global->p2p. global->p2p gets set whenever P2P is initialized globally and that occurs on the first interface init. Fix this by indicating wps is in use only when in active P2P discovery or connection establishement. (i.e. not P2P_IDLE - either doing search, neg or provisioning) Signed-off-by: Eyal Shapira <eyal@wizery.com>
| * WPS: fix nonce comparisons (UPSTREAM)Eyal Shapira2012-08-132-12/+12
| | | | | | | | | | | | | | Multiple memcmps of nonces were actually comparing only the first byte instead of all 16 bytes. Signed-off-by: Eyal Shapira <eyal@wizery.com>
| * Fix adding extra ies in sched scan (UPSTREAM)Eyal Shapira2012-08-121-7/+9
| | | | | | | | | | | | | | | | | | Refactoring done in commit 46ee04 IEEE 802.11u: Allow Interworking and HESSID to be configured broke adding extra ies in sched scan. Fix it and remove unused params arg in wpa_supplicant_extra_ies. Signed-off-by: Eyal Shapira <eyal@wizery.com>
| * P2P: Increase GO Negotiation timeoutsJouni Malinen2012-08-122-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | p2p_set_timeout() calls in GO Neg Req/Resp TX callbacks used timeout of 100 ms which is the value given in the P2P specification for GO Negotiation, but this was actually shorter than the wait-for-offchannel-TX value (200 ms) used for the driver call. In addition, it looks like some devices (e.g., Galaxy Nexus with JB image) can take longer time to reply to GO Negotiation Response (somewhere between 200 and 250 ms has been observed). Increase the wait-for-GO-Neg-Resp timeout from 100 ms to 200 ms if GO Negotiation Request frame was acknowledged (this matches with the offchannel wait timeout that used previously). The no-ack case is left at 100 ms since we use GO Negotiation Request frame also to discover whether the peer is on its Listen channel. Increase the wait-for-GO-Neg-Conf timeout from 100 ms to 250 ms (and increase the offchannel wait timeout to matching 250 ms) as a workaround for devices that take over 200 ms to reply to GO Negotiation Response. Signed-hostap: Jouni Malinen <j@w1.fi>
* | Android.mk: update version stringVishal Mahaveer2012-08-101-1/+1
|/ | | | | | Update version string to differentiate this tree from Google tree Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
* Fix wpa_s crash and kickstart sched scan (INTERNAL-SQ)Eyal Shapira2012-08-091-1/+2
| | | | | | | | | | | | | | | data may be NULL and should be checked before dereferencing it. This can happen when scan times out for example. Another bug fixed is that sched scan wouldn't be kick started from anywhere. Previously it was started following a normal scan which didn't find any results. Fix it by start it if it's not running. (These issues were introduced by commit a523a28 wpa_s: don't reschedule the sched scan on each scan complete event and the fix should be squashed into it) Signed-off-by: Eyal Shapira <eyal@wizery.com> Signed-off-by: Victor Goldenshtein <victorg@ti.com>
* SME: Fix handle Netgear APs WEP shared quirks (UPSTREAM-SQ)William List2012-08-091-1/+1
| | | | | | | | | | | | | | | If the network entry is created with both WPA_AUTH_ALG_OPEN and WPA_AUTH_ALG_SHARED set in wpa_s->current_ssid->auth_alg, the existing logic will end up picking WPA_AUTH_ALG_LEAP instead of shared when open authentication fails. Fix this by using a bitwise-and to check for WPA_AUTH_ALG_OPEN instead. (Should be squashed into commit 2e35a02 SME: Handle Netgear APs WEP shared quirks) Signed-Off-By: William List <wlist@ti.com> Signed-Off-By: Eyal Shapira <eyal@wizery.com>
* 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>