Commit graph

676 commits

Author SHA1 Message Date
Marcel Holtmann
a2753c285f dbus: Use simple strings for debug level
Instead of using some magic integer values that really only mean
something to WPA internal code, just use simple strings. Possible
values are "msgdump", "debug", "info", "warning" and "error" which
map directly to WPA debugging support.
2010-01-04 16:22:26 +02:00
Jouni Malinen
9c3a2284de Fix compiler warnings for non-WPS build 2010-01-03 21:21:03 +02:00
Jouni Malinen
abd9fafab6 Standardize on a single definition of auth_alg bitfield values 2010-01-03 21:14:40 +02:00
Jouni Malinen
70f8cc8ec8 Share the same enum for MFP configuration
The three existing enums were already depending on using the same
values in couple of places and it is just simpler to standardize on
one of these to avoid need for mapping between different enums for
the exact same thing.
2010-01-03 21:02:51 +02:00
Jouni Malinen
d1f9c410c1 Remove src/drivers/scan_helpers.c
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.
2010-01-03 20:27:32 +02:00
Jouni Malinen
9ba9fa07cc Move wpa_supplicant specific scan code away from src/drivers
This fits better in wpa_supplicant/scan.c. Couple of remaining
scan_helpers.c functions are currently used in driver wrappers,
but they can likely be removed in the future.
2010-01-03 18:48:11 +02:00
Jouni Malinen
1d041bec84 Use generic driver event notification for AP mode assoc/disassoc 2010-01-03 18:22:22 +02:00
Jouni Malinen
a8e0505bf0 Use driver event, EVENT_EAPOL_RX, for EAPOL frame indication 2010-01-03 17:44:40 +02:00
Jouni Malinen
55777702cd Add driver API functionality for off-channel Action frames
This adds new commands and events for allowing off-channel Action
frame exchanges to be requested. This functionality is not yet used
and is only fully supported by driver_test.c at this point.
driver_nl80211.c has support for the remain-on-channel commands, but
the Action frame TX/RX part is still pending review for the kernel
code and as such, is not yet included here.
2010-01-03 13:57:51 +02:00
Jouni Malinen
7bfc47c34f Add driver ops for allocating interface addresses
This adds placeholder code for allowing the virtual interfaces to be
pre-allocated a MAC address before the interface type is known with
drivers that do not handle interface type changes.
2010-01-03 13:42:06 +02:00
Jouni Malinen
504e905c6e Add a driver op for enabling Probe Request reporting in station mode 2010-01-03 13:30:22 +02:00
Jouni Malinen
9646a8ab8b Remove unnecessary wpa_event_type typedef 2010-01-03 13:10:12 +02:00
Jouni Malinen
fdbe50ed98 Fix CONFIG_AP=y build after driver API changes 2010-01-03 13:05:54 +02:00
Jouni Malinen
2a8b74163e Move struct hostapd_frame_info definition away from driver API
This is internal data structure for hostapd/AP functionality and does
not need to be defined in driver.h.
2010-01-03 12:37:02 +02:00
Jouni Malinen
245519e0cd Replace wpa_supplicant_sta_rx() call with driver event
Get rid of wpa_supplicant_sta_rx() and add a new driver event that is
marked to be used only with driver_test.c. In addition, remove this
functionality from privsep wrapper. This is only use for client mode
MLME testing with driver_test.c.
2010-01-03 11:50:26 +02:00
Jouni Malinen
7d7d57b2dc Use shared function for figuring out if BSS is in use
The BSS that is currently in use must not be freed even if it does
not show up in scan results.
2010-01-03 10:55:31 +02:00
Jouni Malinen
1c83b67efd Fix memory corruption on BSS entry reallocation
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).
2010-01-03 01:25:43 +02:00
Jouni Malinen
2f1a90188c dbus: Use free_dbus_object_desc() consistently to free object descriptor 2010-01-03 01:01:56 +02:00
Jouni Malinen
e90bd80cf5 dbus: Remove duplication of object methods/signals/properties
There is no need to duplicate the method/signal/property arrays that
were registered for objects. The registration was using static arrays
on methods/signals/properties in all places and we can as well use
those throughout without having to allocate memory and copy all the
entries for every object. This reduces number of allocations and
amount of unnecessary code quite a bit.
2010-01-03 00:52:30 +02:00
Jouni Malinen
3e87bd5478 dbus: Use stack for temporary object path
This is small enough buffer to not require more complex dynamic
allocation for temporary use.
2010-01-02 17:17:00 +02:00
Jouni Malinen
8f770587d9 Maintain a pointer to the current BSS table entry 2010-01-02 16:59:19 +02:00
Jouni Malinen
a1fd2ce54e Do not store raw scan results
Use scan results to update the BSS table and to select the BSS for
connection, but do not store the results for longer time.
2010-01-02 16:41:38 +02:00
Jouni Malinen
6fa81a3b3f Use BSS table entry instead of raw scan result for connection 2010-01-02 16:16:02 +02:00
Jouni Malinen
e48f0fb6a7 Use BSS table for WPA get-Beacon-IEs operation 2010-01-02 15:26:50 +02:00
Jouni Malinen
16b71ac217 Convert ctrl_iface scan_results cmd to use BSS table 2010-01-02 15:19:35 +02:00
Jouni Malinen
9734dc17b6 dbus: Use BSS table instead of raw scan results in older API
Change the old D-Bus API to use the new BSS table instead of raw
scan results.
2010-01-02 15:13:25 +02:00
Jouni Malinen
8d923a4acf 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.
2010-01-02 13:57:44 +02:00
Jouni Malinen
59f2caa925 WPS: Use BSS table instead of raw scan results 2010-01-02 13:36:12 +02:00
Jouni Malinen
88ba1f7213 dbus: Cleaned up signal message construction functions 2010-01-02 12:06:44 +02:00
Jouni Malinen
fff9ab1b2d dbus: Simplify _wpa_dbus_dict_fill_value_from_variant() a bit 2010-01-02 10:59:51 +02:00
Jouni Malinen
97d3f8c3a9 dbus: Share the same function for type to type-as-string conversion 2010-01-02 10:45:03 +02:00
Jouni Malinen
c221499782 dbus: Use common code for checking key parameter
No need to duplicate the check into many functions.
2010-01-02 10:39:19 +02:00
Jouni Malinen
6c68b0db5d 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.
2010-01-01 23:06:10 +02:00
Jouni Malinen
ec99cb7b00 dbus: Add debug printing on property setter type mismatches 2010-01-01 23:05:44 +02:00
Jouni Malinen
2fd13f1bae dbus: Set ProcessCredentials to get WPS Credential signal 2010-01-01 23:04:27 +02:00
Jouni Malinen
1701996209 dbus: Add example script for running WPS PBC 2010-01-01 22:34:15 +02:00
Jouni Malinen
d8d8c6d02a dbus: Split wpas_dbus_handler_wps_start() into helper functions 2010-01-01 22:33:47 +02:00
Jouni Malinen
db9a76c032 dbus: Fix a typo in function name (invald -> invalid) 2010-01-01 21:52:29 +02:00
Jouni Malinen
f65a5b7598 dbus: Fix init-failure-detection
This was broken in previous cleanup.
2010-01-01 21:30:58 +02:00
Jouni Malinen
ccafcbed32 dbus: Cleaned up initialization and integration with eloop 2010-01-01 21:21:20 +02:00
Jouni Malinen
c2b8c674cb 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.
2010-01-01 20:50:12 +02:00
Jouni Malinen
c49cf2d68f 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.
2010-01-01 19:12:31 +02:00
Jouni Malinen
1912049828 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.
2010-01-01 18:56:07 +02:00
Jouni Malinen
52bdd880a3 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.
2010-01-01 18:45:29 +02:00
Jouni Malinen
bad0dc3c0c 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.
2010-01-01 18:20:05 +02:00
Jouni Malinen
36b5c6871c 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.
2010-01-01 18:16:24 +02:00
Jouni Malinen
00a4784d24 dbus: Get rid of unused static inline functions 2010-01-01 18:14:44 +02:00
Jouni Malinen
d316584c6a 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.
2010-01-01 18:08:23 +02:00
Jouni Malinen
ce4f7fdbdd 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.
2010-01-01 17:51:15 +02:00
Jouni Malinen
21e338a860 dbus: Split extract_interfaces() into helper functions 2010-01-01 15:50:00 +02:00