aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix crash when a local deauth occurs (squash)HEADp2p-upstream-androidEyal Shapira2012-03-151-1/+1
| | | | | | The check added in "Ignore a deauth from a different BSS than the current one" didn't account for addr being null which may happen when the deauth is locally generated.
* nl80211: fix warningsEyal Shapira2012-03-151-1/+1
| | | | fopen returns a file pointer and not an int
* Enable only unicast RXFILTER by defaultEyal Shapira2012-03-151-4/+7
| | | | | | | | | | commit 123075 "Always set RXFILTER 0 and 1" configured RX filters 0 and 1 by default which would allow receiving of unicast and bcast traffic by default. Change that to enable only unicast traffic by default as this is more common with vendors and bcast traffic should be usually filtered out unless specifically configured.
* P2P: Ignore PBC overlap in P2P provisioningEyal Shapira2012-03-151-0/+8
| | | | | | | PBC overlap can be ignored as the P2P client knows that it should connect to the P2P GO so no point of failing the WPS session in case of overlap because some other AP had WPS PBC on at the same time.
* Increase the scan_interval to 15 secsEyal Shapira2012-03-151-1/+1
| | | | | | The current periodic scan by wpa_s is set to 5 secs. This is too short so increase it to 15 secs.
* Initiate a periodic normal scan in addition to sched scanEyal Shapira2012-03-151-3/+3
| | | | | | | Some applications (e.g. detecting open network around in Android) require periodic broadcast scan results. The periodic broadcast scan was replaced by sched scan completely. Re-enable these scan alongside sched scans.
* P2P: update scan resultsEliad Peller2012-03-151-2/+12
| | | | | | | | | (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>
* increase the eapol pending timer to 500msEliad Peller2012-03-151-1/+1
|
* P2P: notify about disconnection only when neededEliad Peller2012-03-151-1/+1
| | | | | | | | | wpas_notify_state_changed() notifies about disconnection when new_state < WPA_ASSOCIATED, without checking the old state. This finally might fire the p2p idle group timer during the connection attempt. Signed-off-by: Eliad Peller <eliad@wizery.com>
* Execute p2p_find instead of p2p_listenEliad Peller2012-03-151-0/+5
| | | | | | | In order for the Android UI to update its peers list, p2p_find should be used but the Android WiFi Direct UI uses p2p_listen for some reason. So workaround it by starting a p2p_find instead.
* P2P: ignore neg_req with previously used dialog_tokenEliad Peller2012-03-151-0/+8
| | | | | | | | | | | | | | The p2p spec is a bit broken. if for some reason we get duplicate negotiation request, the supplicant will generate 2 different responses (different SSIDs) with the same dialog token. The remote peer will confirm one of them, but it will probably be the wrong one (the first he received)... Workaround it but ignoring negotiation requests with the last used dialog_token. Signed-off-by: Eliad Peller <eliad@wizery.com>
* Add CONFIG_ROAMING to wpa_s MakefileEyal Shapira2012-03-151-0/+4
| | | | | The option was added only in Android.mk and was missing in the Makefile used in native linux
* nl80211_driver: add private commands to use dropbcastLuciano Coelho2012-03-151-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: Add and align rx filters IDsEyal Shapira2012-03-151-6/+37
| | | | | | | | 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.
* Prevent roaming to a different ESS while connectedEyal Shapira2012-03-151-0/+8
| | | | | | | | | | While connected to a certain ESS prevent roaming to a different ESS AP even if its signal is better. This prevents an undesired switch between networks in this example scenario: 2 network profiles configured Net1 and Net2. We're already associated to an AP on the ESS Net1 and while walking with the device we get close to an AP from ESS Net2. Before this change a decision to switch to Net2 was made.
* P2P: Add p2p_cli deinit opEliad Peller2012-03-155-2/+31
| | | | | | | | | | | On p2p group removal, the GO is deinitialized correctly (and the vif mode is set back to sta), but the P2P_CLI isn't deinitialized, and the vif stays in P2P_CLI mode. Add a new deinit_p2p_cli op (similar to deinit_ap), which currently only sets the interface back to sta mode. Signed-off-by: Eliad Peller <eliad@wizery.com>
* Ignore a deauth from a different BSS than the current oneEyal Shapira2012-03-151-3/+13
| | | | | | This fixes an issue with roaming where the previous BSS would send a DEAUTH during the roaming and this would caused the supplicant to disconnect.
* Roam back to the origin AP when assoc/auth times outEyal Shapira2012-03-154-10/+90
| | | | | | When roaming, avoid going to DISCONNECTED in case assoc or auth times out with the new AP. Instead attempt to reconnect back to old AP.
* bgscan_learn: implement notify_beacon_loss hookEyal Shapira2012-03-152-2/+9
| | | | | | | Trigger immediate scan and switch to short interval upon receiving beacon loss indication TODO: implement this also in bgscan_simple
* bgscan_learn: Scan all channels in certain scenariosEyal Shapira2012-03-151-14/+26
| | | | | | | | | The current scanning of learned frequencies and only a single new frequency every interval may result in a very long time until a specific channel where a BSS candidate operates would be scanned (especially if working on both 2.4 and 5Ghz). To better handle this scan all frequencies when signal is low and we haven't learned more than 1 channel.
* initiate roaming on beacon_lossEliad Peller2012-03-158-0/+28
| | | | | | | | | Add wpa_s->roaming to indicate (forced) roaming request. set it on beacon_loss event. (no need to disconnect if there is no available ap, as the driver will send disassoc after some time) Signed-off-by: Eliad Peller <eliad@wizery.com>
* update nl80211_copy.hEliad Peller2012-03-151-0/+1
| | | | Signed-off-by: Eliad Peller <eliad@wizery.com>
* Add blacklist expirationEliad Peller2012-03-152-0/+53
| | | | | | | | | | | With the current implementation, once a BSS was added to the blacklist, it can't go out. Add a simple timeout (2 minutes) to allow blacklist expiration. TODO: the timeout should probably be set more dynamically, or at least make it configurable... Signed-off-by: Eliad Peller <eliad@wizery.com>
* Fix initial interval of bgscan_learnEyal Shapira2012-03-151-1/+9
| | | | | | | | | | | In case the initial signal level of the associated BSS was above the given threshold , bgscan_learn module would begin using the short_interval but never switch to the long_interval as there would be no signal change event. Make the init code poll for the current signal level and set scan_interval accordingly. This logic exists in bgscan_simple but was missing in bgscan_learn.
* Add API and CLI command to control sched scan intervalsEyal Shapira2012-03-154-3/+90
| | | | | | | | Enable control over the sched scan intervals parameters through a new wpa_s API (SCHED_SCAN_INTERVALS) and a matching wpa_cli command. Signed-off-by: Eyal Shapira <eyal@wizery.com>
* hostapd: only updated already-set beacons when processing OLBCLuciano Coelho2012-03-153-2/+12
| | | | | | | | | | | When hostapd is about to start an AP using HT40, it starts a scan to check whether it is allowed or not. If OLBC is detected before the scan has completed, it sets the beacons prematurely. To fix this, instead of setting all beacons when OLBC is detected, only update the ones that have already been started. Signed-off-by: Luciano Coelho <coelho@ti.com>
* config: enable NL80211Luciano Coelho2012-03-152-2/+2
| | | | | | Just enable it in both hostapd and wpa_s. Signed-off-by: Luciano Coelho <coelho@ti.com>
* wpa_s: add API to disable or enable roamingEyal Shapira2012-03-154-14/+28
| | | | | | | If bgscan is configured then it will be disabled and enabled as well as roaming. This allows wpa_s users to disable roaming and bgscan when they wish (e.g. device screen is turned off/on) To disable send "SET roaming_disabled 1" and to enable replace with 0.
* wpa_supplicant: update config file to support bgscanIdo Reis2012-03-151-0/+6
| | | | | Change-Id: Iec36d01c34e53c6e503d1078f5a43277b78c7378 Signed-off-by: Ido Reis <idor@ti.com>
* hostapd: enable N rates in .configIdo Reis2012-03-151-1/+1
| | | | | Change-Id: I945161d57a1c7c326bbc1f172eae2d7c3211a733 Signed-off-by: Ido Reis <idor@ti.com>
* wpa_s: Disable bgscan and roaming when driver support is limitedEyal Shapira2012-03-154-3/+31
| | | | | | | | Some drivers are limited in certain conditions (e.g. wl12xx on multi role with a single channel) and would like wpa_s to disable bgscan and roaming attempts in these situations. Signed-off-by: Eyal Shapira <eyal@wizery.com>
* nl80211: Handle ROAMING_SUPPORT eventEyal Shapira2012-03-152-0/+38
| | | | | | | | Some drivers may notify us that roaming support changed. This is passed on to wpa_s in order to take that into account regarding bgscan and roaming. Signed-off-by: Eyal Shapira <eyal@wizery.com>
* sched scan: add support for short and long intervalsEyal Shapira2012-03-155-44/+89
| | | | | Configure sched scan to use short and long intervals if the driver supports it
* sched scan: Add config parameters for short and long intervalsEyal Shapira2012-03-154-2/+57
| | | | Part of support for short and long intervals
* sched scan: read driver support for sched scan intervalsEyal Shapira2012-03-154-0/+10
| | | | | | | Use the feature flag reported by NL80211 to know if the driver supports short and long intervals in the sched scan API. This is a prep patch for the actual handling of this flag.
* nl80211: sync with linux/nl80211.hEyal Shapira2012-03-151-5/+54
|
* Fix wpa_supplicant and hostapd native linux compilationEyal Shapira2012-03-151-0/+3
| | | | | Android related stuff weren't ifdef'd properly which broke down native linux compilation
* Fix deauth with reason 7 due to multiple assoc_req receivedEyal Shapira2012-03-151-0/+9
| | | | | | | | | | | | | | | Additional assoc_reqs received after an initial assoc_req (due to a timeout in the STA) was already being handled caused the handle_assoc flow to run again and in the process delete the station added to the driver (in add_pre_assoc_sta). A race would occur where assoc_resp was already sent to the STA (as part of the handling of the initial assoc_req) and it sent a null data packet which arrived while the station was deleted. This caused the packet to be classified as a class 3 frame coming from an unknown STA and a deauth would occur. Fix this by discarding additional assoc_req between receiving the 1st assoc_req and getting a tx callback for the assoc_resp. Signed-off-by: Eyal Shapira <eyal@wizery.com>
* save eapol for later use (EAPOL Start race)Eliad Peller2012-03-134-0/+38
| | | | | | [ Includes null check missing from the original patch - Arik ] Signed-off-by: Arik Nemtsov <arik@wizery.com>
* add station before getting assoc resp tx completionEliad Peller2012-03-131-39/+48
| | | | | | | | | Add the station before sending the association response (rather than after tx completion), in order to handle EAPOL-Start before tx completion race. Signed-off-by: Arik Nemtsov <arik@wizery.com>
* AP: use uapsd if go_apsd was setEliad Peller2012-03-131-3/+1
| | | | | | | | | | | | don't set params.uapsd to -1, as it's a valid value. set conf->bss->wmm_enabled and conf->bss->wmm_uapsd to enable (and advertise) wmm. This is currently only a workaround, until we'll have a more generic way to set GO params. Signed-off-by: Arik Nemtsov <arik@wizery.com>
* P2P: use GO channel for Operating Channel IEEliad Peller2012-03-134-3/+9
| | | | | | | [ To be upstreamed - Arik ] Change-Id: I5285126515b47cd3b4cdce717310835f23a78f0a Signed-off-by: Eliad Peller <eliad@wizery.com>
* nl80211: Do not send HANGED event on private command failureYotam Rubin2012-03-131-27/+29
| | | | | | | | | 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
* sched scan: Continue to scan even if previous scan cancel failsEyal Shapira2012-03-131-4/+8
| | | | | | | cancel_sched_scan might fail if there wasn't any scan going on before. This shouldn't stop a new sched scan attempt. Signed-off-by: Eyal Shapira <eyal@wizery.com>
* sched scan: Avoid changing state to SCANNINGEyal Shapira2012-03-132-47/+35
| | | | | | | | sched scan was indicating to the supplicant that scanning was in progress which prevented broadcast scan attempts from cli (or in Android from the framework). Signed-off-by: Eyal Shapira <eyal@wizery.com>
* sched scan: Logic changesEyal Shapira2012-03-134-119/+66
| | | | | | | | Scan up to 16 network of the top priority in the configuration using sched scan. If there are more than 16 use normal scan as well. Stop using the timeout mechanism and interval/timeout backoffs. Signed-off-by: Eyal Shapira <eyal@wizery.com>
* sched scan: Avoid scan if no enabled networksEyal Shapira2012-03-131-1/+3
| | | | | | | | | | There's no point to sched scan when there's no enabled networks. This also fixes a bug where the supplicant would reset its scan results in case such a sched scan was initiated and therefore would cause a "flickering" network list effect on Android. (For a moment you see the network list and the next it's empty) Signed-off-by: Eyal Shapira <eyal@wizery.com>
* sched scan: Continue to scan even if previous scan cancel failsEyal Shapira2012-03-133-9/+17
| | | | | | | cancel_sched_scan might fail if there wasn't any scan going on before. This shouldn't stop a new sched scan attempt. Signed-off-by: Eyal Shapira <eyal@wizery.com>
* sched scan: Update scan according to changes in network listEyal Shapira2012-03-133-4/+19
| | | | | | | | sched scan wasn't updated according to changes in the network list (enable/disable/remove). This caused the FW to continue scanning with the wrong list configured which triggered problems. Signed-off-by: Eyal Shapira <eyal@wizery.com>
* sched scan: Turn passive scan into activeEyal Shapira2012-03-131-0/+5
| | | | | | In case there are no scan_ssid networks in the conf passive scan was done. Better do an active scan using broadcast probe request as it's shorter