aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/bss.c
Commit message (Collapse)AuthorAgeFilesLines
* wpa_s: make SETBAND take immediate effectVishal Mahaveer2012-08-021-0/+14
| | | | | | | | | | | | Make SETBAND disconnect from the current AP if it's not in the correct band. Also expire APs which aren't in the correct band so scan results will immediately reflect the band change. [Eyal - ammended commit description] Signed-off-by: Panduranga Mallireddy <panduranga_mallireddy@ti.com> Signed-off-by: Vishal Mahaveer <vishalm@ti.com> Signed-off-by: Eyal Shapira <eyal@wizery.com>
* bss: Don't remove a BSS that is in usePaul Stewart2012-06-041-27/+36
| | | | | | | | When looking for a BSS to eject due to too many entries, never pick one that is in use. Otherwise, we run the risk of having pointers to freed data. Signed-hostap: Paul Stewart <pstew@chromium.org>
* HS 2.0: Add Hotspot 2.0 ANQP routinesJay Katabathuni2012-05-081-0/+6
| | | | Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* P2P: Update BSS entries in P2P group interface only if P2P IE is presentNeeraj Kumar Garg2012-04-061-0/+12
| | | | | | | | | | | | | | | For concurrency scenarios we should not update the scan results without P2P IE to P2P group interfaces. This patch is to take care if a scan has been requested on STA interface and scan results are getting updated from sibling to P2P group interface. A P2P GO Probe Response for a legacy STA scan would be without P2P IE. So it will wrongly update the BSS list of P2P group interface too when results are updated from sibling. Since P2P group interfaces are used only for connecting to a P2P group, it is fine to filter out all non-P2P entries from their BSS table. Signed-off-by: Neeraj Garg <neerajkg@broadcom.com>
* BSS: Fix use-after-reallocEliad Peller2012-03-051-0/+2
| | | | | | | | | | After reallocation of the bss struct, current_bss wasn't updated and could hold an invalid pointer (which might get dereferenced later). Update current_bss if the pointer was changed. Signed-hostap: Eliad Peller <eliad@wizery.com> intended-for: hostap-1
* Add BSSID filter for testing purposesJouni Malinen2012-02-161-0/+4
| | | | | | | | | | | wpa_supplicant can now be configured to filter out scan results based on a BSSID filter. Space-separated set of allowed BSSIDs can be set with wpa_cli set bssid_filter command. Filtering mechanism can be disabled by setting this variable to an empty list. When set, only the BSSes that have a matching entry in this list will be accepted from scan results. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* Remove the GPL notification from files contributed by Jouni MalinenJouni Malinen2012-02-111-8/+2
| | | | | | | Remove the GPL notification text from the files that were initially contributed by myself. Signed-hostap: Jouni Malinen <j@w1.fi>
* P2P: Allow BSS entry to be fetched based on GO P2P Device AddressJouni Malinen2012-02-071-0/+17
| | | | | | | | | | "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>
* Interworking: Add ANQP query requestsJouni Malinen2011-10-161-0/+9
| | | | | | | | | | | Add mechanism for using GAS/ANQP to query Interworking related information from APs. The received information is stored in the BSS table and can be viewed with ctrl_iface BSS command. New ctrl_iface command ANQP_GET can be used to fetch ANQP elements from a specific AP. Additional commands FETCH_ANQP and STOP_FETCH_ANQP can be used to initiate and stop an iteration through all APs in the BSS table that indicate support Interworking to fetch ANQP elements from them.
* Drop oldest unknown BSS table entries firstJouni Malinen2011-07-161-5/+51
| | | | | | | | When the BSS table size limit has been reached, drop first the oldest BSS entries for which there is not a matching network in the configuration based on SSID (wildcards are ignored). This makes it less likely to hit connection issues in environments with huge number of visible APs.
* Distinguish empty concatenated vendor-specific IE from missing oneJouni Malinen2011-04-141-2/+5
| | | | | | | | | When comparing BSS table entries, handle empty concatenated vendor-specific IE differently from completely missing IE. This does not change anything for the only currently compared IE that can be fragmented (WPS IE), but it is better to have the generic code here ready for any possible new IE that could be used in with zero-length data.
* wpa_supplicant: Parameterize BSS table expiration age + countSam Leffler2011-03-201-21/+3
| | | | | | Replace compile-time BSS cache expiration age and scan count by config parameters that can be set via wpa_cli and the new D-Bus API. The latter is done with interface properties BSSExpireAge and BSSExpireCount.
* wpa_supplicant: Search BSS list from back to frontNathan Williams2011-03-201-1/+1
| | | | | | | | | | This fixes an issue seen in our wifi testbed, where we frequently switch the SSID of the AP. wpa_supplicant's BSS list will have, for example both <bssid, "Check11b"> (from the previous test) and <bssid, "Check11g"> (from the current test) - note that the bssid is the same for both. The (old) D-Bus API for fetching scan responses from wpa_supplicant is fetch-by-bssid, so the caller (flimflam) incorrectly believes we're associated with <bssid, "Check11b">.
* dbus: Add D-Bus methods to flush the BSS cacheSam Leffler2011-03-201-6/+24
| | | | | | | | | | | Add an "Interface.FlushBSS" method to the new D-Bus API and a "flush" method to the old API. Both take an age parameter that is a threshold (in seconds) for selecting entries to evict. Setting this parameter to zero flushes all entries from the cache. This mechanism is useful for a connection manager to clear state at startup and on resume (where the age parameter may be used to hold onto recent/valid data).
* Use wpa_msg() instead of wpa_printf()Ben Greear2011-02-101-15/+16
| | | | | | | | | | This converts number of debugging messages to use wpa_msg() in order to allow the interface name to be shown with the messages. A new function, wpa_dbg(), is introduced to allow CONFIG_NO_STDOUT_DEBUG=y builds to remove the debug strings. This is otherwise identical with wpa_msg(), but it gets compiled out if stdout debugging is disabled.
* P2P: Show P2P info in ctrl_iface scan resultsJouni Malinen2010-09-091-1/+6
|
* Make maximum BSS table size configurableJouni Malinen2010-03-051-5/+2
| | | | | | New global configuration parameter bss_max_count can now be used to change the maximum BSS table size. The old fixed size limit (200) is used as the default value for this parameter.
* dbus: Change WPA/RSNIE byte array props to dictsWitold Sowa2010-01-161-0/+9
| | | | | | | Expose RSN and WPA properties for BSS objects containing information about key management and cipher suites. Get rid of WPA/RSN/WPSIE byte array properties and add IEs byte array property with all IE data instead.
* Fetch IEs from both Beacon and Probe Response frames if availableJouni Malinen2010-01-161-6/+12
| | | | | | | | This allows the driver wrappers to return two sets of IEs, so that the BSS code can use information from both Beacon and Probe Response frames if needed. For example, some Cisco APs seem to include more information in Wireless Provisioning Services IE when it is in the Beacon frame.
* Make wpa_bss_get_max_rate() a bit more readable with a local variableJouni Malinen2010-01-101-5/+8
|
* Fix alloc validation in wpa_bss_get_bit_rates()Jouni Malinen2010-01-091-1/+1
| | | | | Need to check the value returned by os_malloc(), not the pointer to this value.
* dbus: Add BSS property change notificationsWitold Sowa2010-01-061-0/+131
|
* dbus: Change BSS property MaxRate to RatesWitold Sowa2010-01-041-0/+24
| | | | | Instead of exposing maximum BSS bit rate, expose sorted array of all supported rates.
* Remove src/drivers/scan_helpers.cJouni Malinen2010-01-031-0/+1
| | | | | | | Most of this file was already moved into wpa_supplicant/scan.c and we can remove the file completely by having couple of small helper functions copied to the remaining users outside core wpa_supplicant code.
* Use shared function for figuring out if BSS is in useJouni Malinen2010-01-031-4/+12
| | | | | The BSS that is currently in use must not be freed even if it does not show up in scan results.
* Fix memory corruption on BSS entry reallocationJouni Malinen2010-01-031-0/+3
| | | | | | | The wpa_s->bss_id list was being corrupted when the BSS entry needed to be reallocated due to longer IE data. The entry has to be removed from all lists before reallocation to avoid this (it was only removed from the wpa_s->bss list).
* Maintain a pointer to the current BSS table entryJouni Malinen2010-01-021-1/+2
|
* Only expire scanned BSSes based on new scan resultsJouni Malinen2010-01-021-6/+48
| | | | | | Get more information about scans when updating BSS table information. This allows the missing-from-scans expiration rule to work properly when only partial set of channels or SSIDs are being scanned.
* WPS: Use BSS table instead of raw scan resultsJouni Malinen2010-01-021-3/+2
|
* Fix crash on BSS deinit getting called before BSS initJouni Malinen2009-12-281-0/+2
|
* Add wpa_bss_get_max_rate() to match with old scan_res helpersJouni Malinen2009-12-281-0/+22
|
* Add ctrl_iface events for BSS added/removedJouni Malinen2009-12-281-2/+2
|
* Add BSS list sorted by id and add some helper functionsJouni Malinen2009-12-281-0/+96
| | | | | | | | | This allows the BSS list to be iterated in order of increasing id to avoid problems with new scans reordering entries. The order on the wpa_s->bss list changes with most recently updated entries being moved to the tail of the list while wpa_s->bss_id list maintains its order with new entries being added to the tail and old entries being removed when they expire.
* Add BSS table to track scan results without dropping informationJouni Malinen2009-12-271-0/+262
Collect information from scan results into a BSS table that will not expire information as quickly as scan results where every new scan, no matter for how limited set of channels/SSIDs, clears all old information. For now, this is only used for D-Bus BSS added/removed notifications, but this will likely be extended to be used internally instead of the scan results to better support partial scans.