libeap.git
14 years agoOnly expire scanned BSSes based on new scan results
Jouni Malinen [Sat, 2 Jan 2010 11:57:44 +0000 (13:57 +0200)]
Only expire scanned BSSes based on new scan results

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.

14 years agoWPS: Use BSS table instead of raw scan results
Jouni Malinen [Sat, 2 Jan 2010 11:36:12 +0000 (13:36 +0200)]
WPS: Use BSS table instead of raw scan results

14 years agodbus: Cleaned up signal message construction functions
Jouni Malinen [Sat, 2 Jan 2010 10:06:44 +0000 (12:06 +0200)]
dbus: Cleaned up signal message construction functions

14 years agodbus: Simplify _wpa_dbus_dict_fill_value_from_variant() a bit
Jouni Malinen [Sat, 2 Jan 2010 08:59:51 +0000 (10:59 +0200)]
dbus: Simplify _wpa_dbus_dict_fill_value_from_variant() a bit

14 years agodbus: Share the same function for type to type-as-string conversion
Jouni Malinen [Sat, 2 Jan 2010 08:45:03 +0000 (10:45 +0200)]
dbus: Share the same function for type to type-as-string conversion

14 years agodbus: Use common code for checking key parameter
Jouni Malinen [Sat, 2 Jan 2010 08:39:19 +0000 (10:39 +0200)]
dbus: Use common code for checking key parameter

No need to duplicate the check into many functions.

14 years agoWPS: Fix Probe Request processing to handle missing attribute
Jouni Malinen [Fri, 1 Jan 2010 21:38:51 +0000 (23:38 +0200)]
WPS: Fix Probe Request processing to handle missing attribute

WPS IE parsing for PBC mode did not check whether the UUID-E attribute
was included before dereferencing the pointer. This could result in the
AP crashing when processing and invalid Probe Request frame.

14 years agodbus: Document DebugLevel values
Jouni Malinen [Fri, 1 Jan 2010 21:17:07 +0000 (23:17 +0200)]
dbus: Document DebugLevel values

14 years agodbus: Fix WPS ProcessCredentials property setter to use Boolean
Jouni Malinen [Fri, 1 Jan 2010 21:06:10 +0000 (23:06 +0200)]
dbus: Fix WPS ProcessCredentials property setter to use Boolean

The incorrect type used with property setter call did not allow
the property to be modified.

14 years agodbus: Add debug printing on property setter type mismatches
Jouni Malinen [Fri, 1 Jan 2010 21:05:44 +0000 (23:05 +0200)]
dbus: Add debug printing on property setter type mismatches

14 years agodbus: Set ProcessCredentials to get WPS Credential signal
Jouni Malinen [Fri, 1 Jan 2010 21:04:27 +0000 (23:04 +0200)]
dbus: Set ProcessCredentials to get WPS Credential signal

14 years agodbus: Add example script for running WPS PBC
Jouni Malinen [Fri, 1 Jan 2010 20:34:15 +0000 (22:34 +0200)]
dbus: Add example script for running WPS PBC

14 years agodbus: Split wpas_dbus_handler_wps_start() into helper functions
Jouni Malinen [Fri, 1 Jan 2010 20:33:47 +0000 (22:33 +0200)]
dbus: Split wpas_dbus_handler_wps_start() into helper functions

14 years agoFix a typo in doxygen specification
Jouni Malinen [Fri, 1 Jan 2010 20:15:32 +0000 (22:15 +0200)]
Fix a typo in doxygen specification

14 years agodbus: Fix a typo in function name (invald -> invalid)
Jouni Malinen [Fri, 1 Jan 2010 19:52:29 +0000 (21:52 +0200)]
dbus: Fix a typo in function name (invald -> invalid)

14 years agonl80211/wext: Hardcode all auth_algs as supported
Jouni Malinen [Fri, 1 Jan 2010 19:41:19 +0000 (21:41 +0200)]
nl80211/wext: Hardcode all auth_algs as supported

There does not seem to be a driver interface for fetching auth_algs
capability, but this may be used by some external application, so
hardcode all auth_algs as supported for now.

14 years agodbus: Fix init-failure-detection
Jouni Malinen [Fri, 1 Jan 2010 19:30:58 +0000 (21:30 +0200)]
dbus: Fix init-failure-detection

This was broken in previous cleanup.

14 years agodbus: Cleaned up initialization and integration with eloop
Jouni Malinen [Fri, 1 Jan 2010 19:21:20 +0000 (21:21 +0200)]
dbus: Cleaned up initialization and integration with eloop

14 years agodbus: Remove perror() calls
Jouni Malinen [Fri, 1 Jan 2010 18:50:12 +0000 (20:50 +0200)]
dbus: Remove perror() calls

The perror() calls do not make much sense with libdbus functions and
wpa_printf() would really be used for all error printing anyway. In
addition, many of the error messages on out-of-memory cases are not
really of much use, so they were removed. This is also cleaning up
some of the error path handling to avoid duplicated code.

14 years agodbus: Clean up dbus_path/dbus_new_path use
Jouni Malinen [Fri, 1 Jan 2010 17:12:31 +0000 (19:12 +0200)]
dbus: Clean up dbus_path/dbus_new_path use

These cannot be NULL, so there is no point in checking for that. In
addition, the accessor function for this is just making the code harder
to understand.

14 years agodbus: Get rid of unnecessary string duplication in dbus_path
Jouni Malinen [Fri, 1 Jan 2010 16:56:07 +0000 (18:56 +0200)]
dbus: Get rid of unnecessary string duplication in dbus_path

There is no point in making it so complex to initialize a string
with two allocations and a function call.

14 years agodbus: Remove wpas_dbus_callbacks abstraction
Jouni Malinen [Fri, 1 Jan 2010 16:45:29 +0000 (18:45 +0200)]
dbus: Remove wpas_dbus_callbacks abstraction

This callback structure was specific to the new D-Bus API which makes
it more or less pointless. It is just simpler to call the notification
functions directly. More proper design could be to use a generic
mechanism for registering notification callbacks into notify.c, but
that is not yet available and should not be designed just based on a
single user.

14 years agodbus: Do not include libdbus dbus/dbus.h into dbus_{old,new}.h
Jouni Malinen [Fri, 1 Jan 2010 16:20:05 +0000 (18:20 +0200)]
dbus: Do not include libdbus dbus/dbus.h into dbus_{old,new}.h

These header files are included outside the dbus subdirectory and there
is not really any need to force the libdbus dbus/dbus.h header file to
be included into these files.

14 years agodbus: Move the SIGPOLL FreeBSD compat code into dbus_common.c
Jouni Malinen [Fri, 1 Jan 2010 16:16:24 +0000 (18:16 +0200)]
dbus: Move the SIGPOLL FreeBSD compat code into dbus_common.c

No point in storing this in header files anymore since SIGPOLL is only
used in dbus_common.c.

14 years agodbus: Get rid of unused static inline functions
Jouni Malinen [Fri, 1 Jan 2010 16:14:44 +0000 (18:14 +0200)]
dbus: Get rid of unused static inline functions

14 years agodbus: Optimize introspection to use single pass for interfaces
Jouni Malinen [Fri, 1 Jan 2010 16:08:23 +0000 (18:08 +0200)]
dbus: Optimize introspection to use single pass for interfaces

There is no need to go through methods, signals, and properties in
two loops and only collect interfaces in the first run. Get rid of
unnecessary CPU use by generating the XML data for interfaces with
a single pass.

14 years agodbus: Get rid of libxml2 dependency with introspection
Jouni Malinen [Fri, 1 Jan 2010 15:51:15 +0000 (17:51 +0200)]
dbus: Get rid of libxml2 dependency with introspection

The XML used in D-Bus introspection is simple and there is no need to use
libxml2 to generate it. This gets rid of the dependency on the large
library by using internal XML generation.

14 years agodbus: Split extract_interfaces() into helper functions
Jouni Malinen [Fri, 1 Jan 2010 13:50:00 +0000 (15:50 +0200)]
dbus: Split extract_interfaces() into helper functions

14 years agodbus: Cleanup and fix loops
Jouni Malinen [Fri, 1 Jan 2010 12:25:25 +0000 (14:25 +0200)]
dbus: Cleanup and fix loops

Simpler to use for loops instead of handling next pointer selection
in all places. In addition, couple of functions could have ended up
in an infinite loop on error path since the pointer update was missed.

14 years agodbus: Use strdup instead of malloc+strncpy
Jouni Malinen [Fri, 1 Jan 2010 12:15:12 +0000 (14:15 +0200)]
dbus: Use strdup instead of malloc+strncpy

14 years agodbus: Move introspection support into a separate file
Jouni Malinen [Fri, 1 Jan 2010 12:03:00 +0000 (14:03 +0200)]
dbus: Move introspection support into a separate file

14 years agodbus: Use CONFIG_DBUS instead of old||new
Jouni Malinen [Fri, 1 Jan 2010 11:26:56 +0000 (13:26 +0200)]
dbus: Use CONFIG_DBUS instead of old||new

14 years agodbus: Remove unnecessary ifdef CONFIG_CTRL_IFACE_DBUS_NEW
Jouni Malinen [Fri, 1 Jan 2010 11:18:37 +0000 (13:18 +0200)]
dbus: Remove unnecessary ifdef CONFIG_CTRL_IFACE_DBUS_NEW

This header file is only included if the new D-Bus API is enabled.

14 years agodbus: Fix example get-list-of-interfaces operation
Jouni Malinen [Fri, 1 Jan 2010 11:16:33 +0000 (13:16 +0200)]
dbus: Fix example get-list-of-interfaces operation

14 years agodbus: Update example script to use the new API
Jouni Malinen [Fri, 1 Jan 2010 11:10:09 +0000 (13:10 +0200)]
dbus: Update example script to use the new API

14 years agodbus: Divide DebugParams property to three separate properties
Witold Sowa [Fri, 1 Jan 2010 11:00:22 +0000 (13:00 +0200)]
dbus: Divide DebugParams property to three separate properties

14 years agodbus: Rename InterfaceCreated to InterfaceAdded
Witold Sowa [Fri, 1 Jan 2010 10:49:27 +0000 (12:49 +0200)]
dbus: Rename InterfaceCreated to InterfaceAdded

Change signal name to the one defined in documentation and
introspection data.

14 years agodbus: Add second properties arg to *Added signals
Witold Sowa [Fri, 1 Jan 2010 10:47:59 +0000 (12:47 +0200)]
dbus: Add second properties arg to *Added signals

Add a dictionary argument containing all properties of the newly added
object to BSSAdded, NetworkAdded, and InterfaceAdded signals.

14 years agodbus: Replace BSS 'Properties' property with separate properties
Witold Sowa [Fri, 1 Jan 2010 10:28:24 +0000 (12:28 +0200)]
dbus: Replace BSS 'Properties' property with separate properties

In addition, remove Quality and Noise properties since the BSS table
is not the correct place for fetching per-channel information (Noise)
and Quality is not well-defined (nor available from many drivers).

14 years agodbus: Fix get_all_properties() to handle NULL return from getter
Jouni Malinen [Fri, 1 Jan 2010 10:27:10 +0000 (12:27 +0200)]
dbus: Fix get_all_properties() to handle NULL return from getter

This needs to avoid trying to add the NULL entry into the D-Bus
message since libdbus will make the program terminate in such a case.

14 years agodbus: Add generic properties getter and setter
Witold Sowa [Fri, 1 Jan 2010 09:56:56 +0000 (11:56 +0200)]
dbus: Add generic properties getter and setter

14 years agodbus: Define priv argument for object rather than for method
Witold Sowa [Fri, 1 Jan 2010 09:33:41 +0000 (11:33 +0200)]
dbus: Define priv argument for object rather than for method

We don't actually need to define separate user_data argument for
each method handler and property getter/setter. Instead, we can define
one argument for the whole object. That will make it easier to register
objects like BSS or Networks which require allocating and freeing
memory for their arguments.

14 years agodbus: Add example script for fetching all properties with Getall
Jouni Malinen [Fri, 1 Jan 2010 09:00:11 +0000 (11:00 +0200)]
dbus: Add example script for fetching all properties with Getall

14 years agodbus: Rename old D-Bus API files to include "_old"
Jouni Malinen [Thu, 31 Dec 2009 19:55:32 +0000 (21:55 +0200)]
dbus: Rename old D-Bus API files to include "_old"

This makes it easier to figure out which file is used by which
D-Bus interface.

14 years agodbus: Do not deinitialize new D-Bus API if it is not initialized
Jouni Malinen [Thu, 31 Dec 2009 19:50:12 +0000 (21:50 +0200)]
dbus: Do not deinitialize new D-Bus API if it is not initialized

This fixes a crash on error path when D-Bus initialization fails.

14 years agodbus: Share common initialization code for both old and new interface
Jouni Malinen [Wed, 30 Dec 2009 22:15:56 +0000 (00:15 +0200)]
dbus: Share common initialization code for both old and new interface

This was mostly identical code that had been copied for the new D-Bus
API implementation and as such, should really have been shared from
the beginning. In addition, the copied code ended up generating
interesting stack traces since the actual D-Bus connection was being
shared even though the pointer to it was stored in two distinct
data structures. The old D-Bus code ended up dispatching some
D-Bus callbacks which ended up running the new D-Bus code.

Since the private context pointers were mostly identical, everything
seemed to more or less work, but this design was just making things
more complex and potentially very easy to break.

14 years agoFix couple of memory leaks in wpa_config_get_all()
Jouni Malinen [Wed, 30 Dec 2009 20:37:23 +0000 (22:37 +0200)]
Fix couple of memory leaks in wpa_config_get_all()

14 years agowpa_gui-qt4: Update BSS entries in Peers dialog dynamically
Jouni Malinen [Wed, 30 Dec 2009 20:18:18 +0000 (22:18 +0200)]
wpa_gui-qt4: Update BSS entries in Peers dialog dynamically

Use the new BSS added/removed events to add/remove BSS (AP) entries
in the Peers dialog.

14 years agodbus: Verify dbus_message_new_method_return() return value before use
Jouni Malinen [Tue, 29 Dec 2009 21:46:50 +0000 (23:46 +0200)]
dbus: Verify dbus_message_new_method_return() return value before use

14 years agodbus: Fix D-Bus network and BSS object registration/unregistration
Jouni Malinen [Tue, 29 Dec 2009 20:17:18 +0000 (22:17 +0200)]
dbus: Fix D-Bus network and BSS object registration/unregistration

Do not try to unregister BSS objects twice (the latter one with invalid
path) and make sure all network objects get added and removed properly
(the ones read from configuration file were not being registered, but
were tried to be unregistered).

14 years agoWPS: Add Enrollee-seen event message and wpa_gui-qt4 Peers entry
Jouni Malinen [Mon, 28 Dec 2009 14:24:04 +0000 (16:24 +0200)]
WPS: Add Enrollee-seen event message and wpa_gui-qt4 Peers entry

This can be used to show active Enrollees in AP mode to make it
easier to provision a new device.

14 years agoWPS: Clear SSID selection if more than one BSSID match is found
Jouni Malinen [Mon, 28 Dec 2009 14:07:15 +0000 (16:07 +0200)]
WPS: Clear SSID selection if more than one BSSID match is found

Need to use wildcard SSID matching for WPS connection if the same
BSSID occurs multiple time in scan results since any of the SSIDs
may be used.

14 years agoMark wpabuf_get_trace() static
Jouni Malinen [Mon, 28 Dec 2009 14:02:11 +0000 (16:02 +0200)]
Mark wpabuf_get_trace() static

14 years agoInclude header file to verify prototypes
Jouni Malinen [Mon, 28 Dec 2009 14:01:21 +0000 (16:01 +0200)]
Include header file to verify prototypes

14 years agoDefine struct wpa_ssid::mode as an enum with more readable values
Jouni Malinen [Mon, 28 Dec 2009 14:00:36 +0000 (16:00 +0200)]
Define struct wpa_ssid::mode as an enum with more readable values

14 years agotest: Register more complete set of channels and rates
Jouni Malinen [Mon, 28 Dec 2009 11:39:57 +0000 (13:39 +0200)]
test: Register more complete set of channels and rates

14 years agotest: Use previously requested BSSID when adding a new interface
Jouni Malinen [Mon, 28 Dec 2009 11:38:18 +0000 (13:38 +0200)]
test: Use previously requested BSSID when adding a new interface

14 years agoAdd [ESS] flag for scan/BSS info from ctrl_iface
Jouni Malinen [Mon, 28 Dec 2009 11:35:51 +0000 (13:35 +0200)]
Add [ESS] flag for scan/BSS info from ctrl_iface

14 years agoAdd scan parameter support for client MLME
Jouni Malinen [Mon, 28 Dec 2009 11:34:03 +0000 (13:34 +0200)]
Add scan parameter support for client MLME

14 years agonl80211: Add more debug prints for mode changes and interface add/remove
Jouni Malinen [Mon, 28 Dec 2009 11:25:17 +0000 (13:25 +0200)]
nl80211: Add more debug prints for mode changes and interface add/remove

14 years agoAdd an option for driver wrappers to report operational frequency
Jouni Malinen [Mon, 28 Dec 2009 11:23:13 +0000 (13:23 +0200)]
Add an option for driver wrappers to report operational frequency

14 years agoAllow Probe Request callbacks to terminate iteration
Jouni Malinen [Mon, 28 Dec 2009 11:14:58 +0000 (13:14 +0200)]
Allow Probe Request callbacks to terminate iteration

14 years agoAllocate Probe Response and Beacon buffers based on WPS IE length
Jouni Malinen [Mon, 28 Dec 2009 10:58:27 +0000 (12:58 +0200)]
Allocate Probe Response and Beacon buffers based on WPS IE length

This IE is of variable length and it is better to allocate the frame
buffer taking this length into account to prepare for future
additions.

14 years agoFix wpa_cli with libreadline and WPA_TRACE to use consistent alloc
Jouni Malinen [Mon, 28 Dec 2009 10:13:52 +0000 (12:13 +0200)]
Fix wpa_cli with libreadline and WPA_TRACE to use consistent alloc

Need to use strdup(), not os_strdup() here since the readline/fgets
result needs to use same style for memory allocation to avoid WPA_TRACE
errors.

14 years agoFix crash on BSS deinit getting called before BSS init
Jouni Malinen [Mon, 28 Dec 2009 10:11:23 +0000 (12:11 +0200)]
Fix crash on BSS deinit getting called before BSS init

14 years agoInclude BSS table unconditionally in the wpa_supplicant build
Jouni Malinen [Sun, 27 Dec 2009 23:14:56 +0000 (01:14 +0200)]
Include BSS table unconditionally in the wpa_supplicant build

This will allow more cleanup to be done for scan results processing
since all code can now be made to depend on the BSS table instead of
the temporary scan results.

Once remaining code has been converted to use the BSS table, the new
scan results can be freed immediately after the BSS table has been
updated. In addition, filtering of BSS information should be added
to better support systems with limited resources. For now, memory
use can be limited by defining WPA_BSS_MAX_COUNT to be smaller.
Anyway, better filtering of results to only the configured networks
should be added to improve this.

14 years agodbus: Use the new BSS table with the new D-Bus API
Jouni Malinen [Sun, 27 Dec 2009 23:10:07 +0000 (01:10 +0200)]
dbus: Use the new BSS table with the new D-Bus API

Replace the scan results -based implementation with the use of information
from the new BSS table maintained by wpa_supplicant to get a more stable
source of BSS data. Change the use of BSSID as the key for the BSS object
to use the BSS table unique identifier so that multi-SSID APs can be
handled properly.

14 years agoAdd wpa_bss_get_max_rate() to match with old scan_res helpers
Jouni Malinen [Sun, 27 Dec 2009 23:09:32 +0000 (01:09 +0200)]
Add wpa_bss_get_max_rate() to match with old scan_res helpers

14 years agoUse wpa_msg_ctrl() for WPS AP available events
Jouni Malinen [Sun, 27 Dec 2009 22:44:10 +0000 (00:44 +0200)]
Use wpa_msg_ctrl() for WPS AP available events

No need to include these MSG_INFO level events in stdout/syslog,
so deliver them only to ctrl_iface monitors.

14 years agoAdd ctrl_iface events for BSS added/removed
Jouni Malinen [Sun, 27 Dec 2009 22:42:51 +0000 (00:42 +0200)]
Add ctrl_iface events for BSS added/removed

14 years agoChange BSS ctrl_iface command to use BSS table instead of scan results
Jouni Malinen [Sun, 27 Dec 2009 22:33:20 +0000 (00:33 +0200)]
Change BSS ctrl_iface command to use BSS table instead of scan results

In addition, provide another option for iterating through the BSS
entries. The old iteration: "BSS 0", "BSS 1", .. with index number.
The new iteration: "BSS FIRST", "BSS NEXT-<prev id>", .. with id
fetched from the previous output (id=<id> line).

14 years agoAdd BSS list sorted by id and add some helper functions
Jouni Malinen [Sun, 27 Dec 2009 22:30:38 +0000 (00:30 +0200)]
Add BSS list sorted by id and add some helper functions

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.

14 years agoAdd handling of BSSAdded and BSSRemoved events
Jouni Malinen [Sun, 27 Dec 2009 19:42:02 +0000 (21:42 +0200)]
Add handling of BSSAdded and BSSRemoved events

14 years agoFix wpa_supplicant build with CONFIG_AP=y
Jouni Malinen [Sun, 27 Dec 2009 19:33:18 +0000 (21:33 +0200)]
Fix wpa_supplicant build with CONFIG_AP=y

14 years agoSplit hostapd_interface_deinit() into deinit and free parts
Jouni Malinen [Sun, 27 Dec 2009 19:31:13 +0000 (21:31 +0200)]
Split hostapd_interface_deinit() into deinit and free parts

This allows the driver interface to be deinitialized before
struct hostapd_data instance gets freed. This needs to be done so
that the driver wrapper does not maintain a context pointer to
freed memory.

14 years agotest: Add WPA_TRACE reference check for driver ctx
Jouni Malinen [Sun, 27 Dec 2009 19:20:25 +0000 (21:20 +0200)]
test: Add WPA_TRACE reference check for driver ctx

This will catch too early freeing of the context pointer before the
driver wrapper has been deinitialized.

14 years agoAdd BSS table to track scan results without dropping information
Jouni Malinen [Sun, 27 Dec 2009 19:07:47 +0000 (21:07 +0200)]
Add BSS table to track scan results without dropping information

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.

14 years agoFix a typo in a doxygen comment
Jouni Malinen [Sun, 27 Dec 2009 15:13:15 +0000 (17:13 +0200)]
Fix a typo in a doxygen comment

14 years agodbus: Split message_handler() into readable helper functions
Jouni Malinen [Sat, 26 Dec 2009 19:26:56 +0000 (21:26 +0200)]
dbus: Split message_handler() into readable helper functions

14 years agoImport http://student.agh.edu.pl/~wsowa/new-dbus-api.html
Jouni Malinen [Sat, 26 Dec 2009 17:54:24 +0000 (19:54 +0200)]
Import student.agh.edu.pl/~wsowa/new-dbus-api.html

Import D-Bus API reference into Doxygen documentation for
wpa_supplicant.

14 years agodbus: Add an example python script for using the new dbus interface
Jouni Malinen [Sat, 26 Dec 2009 16:41:01 +0000 (18:41 +0200)]
dbus: Add an example python script for using the new dbus interface

This has example code for fetching and interface object and optionally
creating a new interface is one is not found. After that, a scan is
requested and the script continues to listed for signals from
wpa_supplicant and print information about scan results and state
changes.

14 years agodbus: Remove unnecessary indentation by cleaning up if/else structure
Jouni Malinen [Sat, 26 Dec 2009 15:28:19 +0000 (17:28 +0200)]
dbus: Remove unnecessary indentation by cleaning up if/else structure

14 years agodbus: split wpas_dbus_handler_scan() into number of helper functions
Jouni Malinen [Sat, 26 Dec 2009 15:06:28 +0000 (17:06 +0200)]
dbus: split wpas_dbus_handler_scan() into number of helper functions

Make this code readable by splitting it into pieces and fix couple of
emmory leaks on error paths.

14 years agodbus: Fix build without os_free available as a pointer
Jouni Malinen [Sat, 26 Dec 2009 14:20:37 +0000 (16:20 +0200)]
dbus: Fix build without os_free available as a pointer

Need to add a wrapper function to be able to handle the need for
having a function pointer for freeing function for dbus use.

14 years agodbus: Fix Scan invalid args reporting (uninitialize variable)
Jouni Malinen [Sat, 26 Dec 2009 12:37:04 +0000 (14:37 +0200)]
dbus: Fix Scan invalid args reporting (uninitialize variable)

Must initialize key to be NULL since it can be used in an error
message. If the Scan method did not actually include any dict entries,
the uninitialized pointer was used and this could result in
wpa_supplicant crashing.

14 years agoeloop: Fix timeout handler to use local copy of func pointer
Jouni Malinen [Sat, 26 Dec 2009 12:30:50 +0000 (14:30 +0200)]
eloop: Fix timeout handler to use local copy of func pointer

We need to copy not only the context pointers, but also the function
pointer before the timeout gets freed.

14 years agodbus: show messages in debug log
Jouni Malinen [Sat, 26 Dec 2009 12:14:31 +0000 (14:14 +0200)]
dbus: show messages in debug log

14 years agodbus: Check that wpa_s->scan_res != NULL before dereferencing it
Jouni Malinen [Sat, 26 Dec 2009 11:55:22 +0000 (13:55 +0200)]
dbus: Check that wpa_s->scan_res != NULL before dereferencing it

14 years agoIndicate interface removal only if the interface was added successfully
Jouni Malinen [Sat, 26 Dec 2009 11:45:07 +0000 (13:45 +0200)]
Indicate interface removal only if the interface was added successfully

14 years agodbus: Fix wpa_supplicant_add_iface() calls
Jouni Malinen [Sat, 26 Dec 2009 11:36:05 +0000 (13:36 +0200)]
dbus: Fix wpa_supplicant_add_iface() calls

Removed the hack that used typecast to get rid of const by using local
variables that are allocated and freed. Fix couple of memory leaks
and check that the required Ifname parameter is included.

14 years agodbus: Use os_*() wrappers for memory allocations consistently
Jouni Malinen [Sat, 26 Dec 2009 10:29:24 +0000 (12:29 +0200)]
dbus: Use os_*() wrappers for memory allocations consistently

This is needed to avoid bogus WPA_TRACE error reports.

14 years agoGet rid of unnecessary typedefs for enums.
Jouni Malinen [Sat, 26 Dec 2009 08:35:08 +0000 (10:35 +0200)]
Get rid of unnecessary typedefs for enums.

14 years agoInclude header files explicitly in *.c, not via header files
Jouni Malinen [Fri, 25 Dec 2009 22:31:51 +0000 (00:31 +0200)]
Include header files explicitly in *.c, not via header files

14 years agoReplace src/ap/driver_i.h with non-inlined functions in ap_drv_ops.c
Jouni Malinen [Fri, 25 Dec 2009 22:21:22 +0000 (00:21 +0200)]
Replace src/ap/driver_i.h with non-inlined functions in ap_drv_ops.c

14 years agoRemove ap_config.h dependency from driver_i.h
Jouni Malinen [Fri, 25 Dec 2009 22:12:25 +0000 (00:12 +0200)]
Remove ap_config.h dependency from driver_i.h

This adds explicit #include line for ap_config.h into the src/ap/*.c
files that actually use the definitions from there.

14 years agoRename some src/ap files to avoid duplicate file names
Jouni Malinen [Fri, 25 Dec 2009 22:05:40 +0000 (00:05 +0200)]
Rename some src/ap files to avoid duplicate file names

Doxygen and some build tools may get a bit confused about same file
name being used in different directories. Clean this up a bit by
renaming some of the duplicated file names in src/ap.

14 years agoAdd new src/ap directory into Doxygen documents
Jouni Malinen [Fri, 25 Dec 2009 21:32:49 +0000 (23:32 +0200)]
Add new src/ap directory into Doxygen documents

14 years agoGet rid of direct hostapd_for_each_interface() calls
Jouni Malinen [Fri, 25 Dec 2009 18:12:26 +0000 (20:12 +0200)]
Get rid of direct hostapd_for_each_interface() calls

src/ap/*.c must not call functions in hostapd or wpa_supplicant
directories directly, so avoid this by using a callback function
pointer.

14 years agoMove rest of the generic AP mode functionality into src/ap
Jouni Malinen [Fri, 25 Dec 2009 18:06:07 +0000 (20:06 +0200)]
Move rest of the generic AP mode functionality into src/ap

14 years agotest: Use more shared code for driver wrapper AP and station modes
Jouni Malinen [Fri, 25 Dec 2009 17:48:41 +0000 (19:48 +0200)]
test: Use more shared code for driver wrapper AP and station modes

This fixes AP mode use in wpa_supplicant with the
no-AP-driver-wrapper design.