Jouni Malinen
376900708a
dbus: Check that wpa_s->scan_res != NULL before dereferencing it
2009-12-26 13:55:22 +02:00
Jouni Malinen
2ee055b3c0
Indicate interface removal only if the interface was added successfully
2009-12-26 13:45:07 +02:00
Jouni Malinen
2f00ad446e
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.
2009-12-26 13:36:05 +02:00
Jouni Malinen
a646086d51
dbus: Use os_*() wrappers for memory allocations consistently
...
This is needed to avoid bogus WPA_TRACE error reports.
2009-12-26 12:29:24 +02:00
Jouni Malinen
719347511a
Get rid of unnecessary typedefs for enums.
2009-12-26 10:35:08 +02:00
Jouni Malinen
81f4f6195e
Include header files explicitly in *.c, not via header files
2009-12-26 00:31:51 +02:00
Jouni Malinen
6e6e8c31ff
Replace src/ap/driver_i.h with non-inlined functions in ap_drv_ops.c
2009-12-26 00:21:22 +02:00
Jouni Malinen
8b06c1ed0d
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.
2009-12-26 00:12:25 +02:00
Jouni Malinen
6226e38d00
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.
2009-12-26 00:05:40 +02:00
Jouni Malinen
fcfda83bf9
Add new src/ap directory into Doxygen documents
2009-12-25 23:32:49 +02:00
Jouni Malinen
1b56c26c40
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.
2009-12-25 20:12:26 +02:00
Jouni Malinen
70db2ab308
Move rest of the generic AP mode functionality into src/ap
2009-12-25 20:06:07 +02:00
Jouni Malinen
481a11c94f
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.
2009-12-25 19:48:41 +02:00
Jouni Malinen
a911a6e61f
Do not use virtual driver_ops for wpa_supplicant AP mode
...
Initialize struct hostapd_data driver context with the same driver
information that was initialized earlier during wpa_supplicant start.
This allows the AP mode operations to be completed directly with the
same calls in AP code without having to maintain a separate translation
layer between the AP and station mode driver context.
2009-12-25 19:47:08 +02:00
Jouni Malinen
8c5fe31fe8
Move driver deinitialization away from hostapd.c
...
This matches with the earlier change of moving driver initialization
and allows more control on how the driver context is managed.
2009-12-25 18:32:44 +02:00
Jouni Malinen
a4f2110934
Clean up some of the hostapd.h function prototype definitions
...
Not all prototypes in hostapd.h really belong there. This is an initial
step in cleaning that up.
2009-12-25 14:20:35 +02:00
Jouni Malinen
0aef3ec832
Move hostapd_prune_associations() into ap/utils.c
2009-12-25 14:06:26 +02:00
Jouni Malinen
c442055ecf
Move WPA authenticator glue code into a separate file
2009-12-25 14:02:17 +02:00
Jouni Malinen
2586bc64d0
Move authentication server setup into separate file
2009-12-25 13:43:43 +02:00
Jouni Malinen
ad44e244b1
Move iapp.c into src/ap
2009-12-25 13:04:45 +02:00
Jouni Malinen
0e2d35c614
Move ctrl_iface_ap.c into src/ap
2009-12-25 12:25:55 +02:00
Jouni Malinen
e5f2b59c7e
Move hostapd driver initialization away from hostapd.c
...
This makes it easier to customize AP mode initialization for
wpa_supplicant.
2009-12-25 12:21:11 +02:00
Jouni Malinen
363b9e6052
Fix wpa_supplicant CONFIG_AP build
2009-12-25 12:06:53 +02:00
Jouni Malinen
64ee63a0d8
wired: Use os_*() wrappers more consistently
...
Need to allocate and free memory with same style to avoid WPA_TRACE
errors.
2009-12-25 11:54:02 +02:00
Jouni Malinen
bee07ce805
hostapd: Do not call eloop_terminate() on interface setup failure
...
The caller is able to handle the error code properly and there is no
need to forcefully stop the eloop run here.
2009-12-25 11:51:20 +02:00
Jouni Malinen
65668bfb77
Add forgotten src/ap/utils.c file
...
Commit 32da61d9c9
was supposed to add
this file.
2009-12-25 01:31:28 +02:00
Jouni Malinen
9fdeaf8f3a
WPS: Fix a memory leak if set_ie_cb() is not set
...
Skip WPS IE building for Beacon and Probe Response frames is set_ie_cb()
is not set. This fixes a memory leak and optimizes operations by not
allocating memory and building the WPS IEs unnecessarily.
2009-12-25 01:29:59 +02:00
Jouni Malinen
32da61d9c9
Move wps_hostapd.c into src/ap
2009-12-25 01:26:37 +02:00
Jouni Malinen
1057d78eb8
Move generic AP functionality implementation into src/ap
...
This code can be shared by both hostapd and wpa_supplicant and this
is an initial step in getting the generic code moved to be under the
src directories. Couple of generic files still remain under the
hostapd directory due to direct dependencies to files there. Once the
dependencies have been removed, they will also be moved to the src/ap
directory to allow wpa_supplicant to be built without requiring anything
from the hostapd directory.
2009-12-25 01:12:50 +02:00
Jouni Malinen
6d1278e998
Remove direct driver calls from tkip_countermeasures.c
2009-12-25 00:39:22 +02:00
Jouni Malinen
2ce86d9d72
Remove direct driver calls from ieee802_11.c
2009-12-25 00:35:10 +02:00
Jouni Malinen
bdee6fceb9
Remove direct driver calls from sta_info.c
2009-12-25 00:30:16 +02:00
Jouni Malinen
36592d31c1
Remove direct driver calls from vlan_init.c
2009-12-25 00:17:07 +02:00
Jouni Malinen
677449b97e
Remove direct driver calls from beacon.c
2009-12-25 00:10:31 +02:00
Jouni Malinen
2f3e0bd4d4
Remove need for direct driver calls from ieee802_11_auth.c
2009-12-24 23:49:19 +02:00
Jouni Malinen
d24df7c33d
Avoid direct call to hostapd_new_assoc_sta from ieee802_11.c
2009-12-24 23:42:13 +02:00
Jouni Malinen
a2de634d1c
Removed hostapd_new_assoc_sta() from driver wrapper API
...
This is not called directly by any of the driver wrappers anymore, so
the function can be removed from driver.h and drv_callbacks.c.
2009-12-24 23:30:32 +02:00
Jouni Malinen
94709ea358
Avoid a direct call to drv_callbacks.c from beacon.c
2009-12-24 23:20:53 +02:00
Jouni Malinen
010401fe65
Move hostapd_set_drv_ieee8021x() into ap_drv_ops
2009-12-24 23:17:11 +02:00
Jouni Malinen
4c2ddda495
Move hostapd-to-driver flag mapping to be within ap_drv_ops.c
2009-12-24 23:11:16 +02:00
Jouni Malinen
d3b86aed73
Move wpa_drivers dependency into config_file.c
...
This cleans up config.o from driver wrapper dependencies.
2009-12-24 22:50:17 +02:00
Jouni Malinen
a3d4fafa41
Remove direct driver calls from accounting.c
2009-12-24 22:24:57 +02:00
Jouni Malinen
41d719d6e0
Move hostapd configuration parser into separate file
...
config.c includes now only the generic helper functions that are needed
both for hostapd and the AP mode operations in wpa_supplicant.
hostapd/config_file.c is only needed for hostapd.
2009-12-24 21:05:40 +02:00
Jouni Malinen
45cefa0bf3
Move more driver ops into struct hostapd_driver_ops
...
This removes need to include driver_i.h into ieee802_1x.c.
2009-12-24 20:41:30 +02:00
Jouni Malinen
579bc0e64c
Move hostapd_set_privacy() call to hostapd.c
...
IEEE 802.1X code does not need to know about this driver configuration
mechanism and all the other calls were already in hostapd.c.
2009-12-24 20:18:55 +02:00
Jouni Malinen
c90933d2a3
Use hostapd driver op wrapper for send_mgmt_frame
2009-12-24 20:13:44 +02:00
Jouni Malinen
14f7938660
Merge driver ops set_wps_beacon_ie and set_wps_probe_resp_ie
...
set_ap_wps_ie() is not used to set WPS IE for both Beacon and Probe
Response frames with a single call. In addition, struct wpabuf is used
instead of separate u8* and length fields. This avoids duplicated
allocation of the IEs and simplifies code in general.
2009-12-24 19:46:06 +02:00
Jouni Malinen
bf65bc638f
hostapd: Use separate driver operations abstraction
...
It would be bettet to avoid including driver_i.h, i.e., direct driver
operation calls from hostapd components. This is an initial step in
that direction for WPS IE updates.
2009-12-24 16:15:22 +02:00
Jouni Malinen
9aca440199
Drop WPA_TRACE reference before eloop timeout handler call
...
This avoids bogus error reports for cases where the timeout handler
frees the memory that was pointed to by the eloop timeout context.
2009-12-24 12:41:20 +02:00
Jouni Malinen
1b9eb51bbd
Enable IPv6 support for libutils.a and libradius.a
2009-12-24 12:27:42 +02:00