Commit graph

486 commits

Author SHA1 Message Date
Jouni Malinen
b57e086cc1 Mark management frame processing functions to use const buffer 2009-12-13 23:25:30 +02:00
Jouni Malinen
ba091c06c5 Mark ieee802_11_parse_elems() input and parsed elems const
In addition, re-order IE pointers and u8 length so that the shorter
length fields are together to allow compiler to optimize structure size.
2009-12-13 23:11:11 +02:00
Jouni Malinen
f8b1f69561 Use generic driver events for TX status and RX reporting
Replace driver wrapper calls to hostapd_tx_status(),
hostapd_rx_from_unknown_sta(), hostapd_mgmt_rx(), and
hostapd_mgmt_tx_cb() with new generic driver events
EVENT_TX_STATUS, EVENT_RX_FROM_UNKNOWN, and EVENT_RX_MGMT.

This cleans up lot of the driver wrapper code to be less dependent
on whether it is being used within wpa_supplicant AP mode or hostapd.
2009-12-13 23:05:39 +02:00
Jouni Malinen
fcf0f87d97 Replace hostapd_button_pushed() with generic driver event 2009-12-13 21:21:10 +02:00
Jouni Malinen
f2dab64ee3 Fix EVENT_FT_RRB_RX processing 2009-12-13 21:19:02 +02:00
Jouni Malinen
1cd973d501 Replace hostapd_michael_mic_failure() with generic driver event 2009-12-13 21:17:11 +02:00
Jouni Malinen
8043e72589 Add BSS ctx to if_add() driver op
This remove the need from driver_test.c to go through internal hostapd
structures to find the appropriate BSS when reporting events on secondary
BSSes.
2009-12-13 18:54:11 +02:00
Jouni Malinen
9b5d2b8b9c Merge hostapd/sta_flags.h into sta_info.h
The separate header file is not needed since none of the driver wrappers
include it anymore. Move the WLAN_STA_* definitions back to be together
with struct sta_info definition.
2009-12-13 11:41:46 +02:00
Jouni Malinen
0de39516ae Map STA flags into values defined in driver.h
This removes need for including hostapd/sta_flags.h into driver
wrappers and removes any remaining dependencies between driver flags
and internal hostapd flags.
2009-12-13 11:35:39 +02:00
Jouni Malinen
a34325dde9 Remove unneeded hostapd_wmm_sta_config()
The WMM STA flag is already taken care of by handle_assoc_cb() and there
is no point trying to do this unless hostapd is taking care MLME
processing, so no need to call this from drv_callbacks.c.
2009-12-13 11:14:21 +02:00
Jouni Malinen
60c8cfb4fb Remove usused flags parameter from sta_add() driver op 2009-12-13 11:05:22 +02:00
Jouni Malinen
af586419fd Add more WPA/IEEE 802.1X parameters into set_ieee8021x() driver op
This gets rid of the need to touch internal hostapd data structures
directly from the driver wrappers.
2009-12-12 23:50:29 +02:00
Jouni Malinen
e3bd3912ca Change set_ieee8021x driver op to use parameters structure
This makes it easier to extent the set of parameters passed to
this driver wrapper function.
2009-12-12 23:32:44 +02:00
Jouni Malinen
08fd8c15a0 Replace direct driver call to wpa_ft_rrb_rx() with driver event
This avoids need to include hostapd/wpa.h into the driver wrappers.
2009-12-12 22:43:26 +02:00
Jouni Malinen
50b5bf4eda Remove obsolete Prism54.org driver support (driver_prism54.c)
The Prism54.org project seems have been dead for a while and it does not
look like this driver would ever be maintained again. Furthermore, it is
difficult to find a version that would work with the driver_prism54.c
wrapper and there is another driver for these card in the Linux kernel
tree.

The hostapd integration in driver_prism54.c is quite different from the
other driver wrappers and would require major effort to get it cleaned
up. Since there does not seem to be any real users for the cleaned up
version, there does not seem to be justification to spend this effort on
the wrapper. This old code is making it much more difficult to clean up
the driver interface and at this point, the best option seems to be to
remove the driver wrappers. Should someone really still need this, the
old code will continue to be available in hostapd 0.6.x.
2009-12-12 20:52:12 +02:00
Jouni Malinen
0531006644 driver_wired: Move STA entry processing away from driver wrapper
Get rid of hostapd/sta_info.h dependency by introducing a new driver
callback function for hostapd.
2009-12-12 20:39:25 +02:00
Jouni Malinen
7e683ceeb4 WPS: Handle Selected Registrar as a union of info from all Registrars
Instead of using the latest selected registrar change, collect selected
registrar information separately from all registrars and use the union
of this information when building the WPS IE for Beacon and Probe
Response frames.

Note: SetSelectedRegistrar UPnP action does not include a unique
identifier, so the ER matching routine is based only on the IP address
of the ER. In theory, there could be multiple ERs using the same IP
address (but different port or URL), so there may be some corner cases
that would not always match the correct ER entry at the AP. Anyway, this
is not really expected to occur in normal use cases and even if it did
happen, the selected registrar information is not any worse than it was
before when only the last change from any registrar for being
advertized.
2009-12-12 16:54:59 +02:00
Jouni Malinen
5e9c730a2b WPS: Remove unnecessary GetDevice and PutMessage callbacks
These callbacks can be handled internally within core WPS code, so there
is no need to go through wps_hostapd.c with a callback function that is
just calling back into the core WPS code.
2009-12-12 16:47:39 +02:00
Jouni Malinen
d0d45d8276 WPS: Remove unnecessary SetSelectedRegistrar callback
This can be handled internally within core WPS code, so there is no
need to go through wps_hostapd.c with a callback function that is just
calling back into the core WPS code.
2009-12-12 16:46:33 +02:00
Jouni Malinen
50ceddcfd6 Fix dh_groups.o build for some configurations
Need to include dh_groups.o in the build even if not all DH groups
are included. Only internal crypto build case was doing this properly.
2009-12-11 17:24:42 +02:00
Jouni Malinen
616ea674c8 Fix hostapd build without RADIUS server 2009-12-11 16:29:28 +02:00
Jouni Malinen
9008a3e44d Merge get_seqnum_igtk() driver op with get_seqnum()
IEEE 802.11w uses distinct key indexes (4 and 5) so the same
get_seqnum() handler can be used to fetch packet number for both
TKIP/CCMP and BIP(using IGTK).

Since the new get_seqnum_igtk() handler was not actually implemented by
any driver wrapper, this may also fix BIP/IGTK sequence number reporting
with driver_nl80211.c.
2009-12-11 00:15:54 +02:00
Jouni Malinen
3484a18a13 hostapd: Remove unused bridge_packets configuration option
There was code for configuring this, but no driver wrapper actually
implements the actual setting. Remove this for now to reduce potential
confusion and to simply the driver interface.
2009-12-09 22:06:43 +02:00
Jouni Malinen
fb7842aa51 Remove struct hostapd_rate_data from driver API
In addition to the bitrate, the only other variable in this structure
is used internally in hostapd. Move this structure into hostapd.h and
make the driver API use simpler data structure (array of bitrates).
2009-12-09 21:57:50 +02:00
Jouni Malinen
22a7c9d735 Merge bss_add/bss_remove drivers ops into if_add/if_remove
if_add/if_remove can now be used as the generic driver ops for adding
and removing virtual interfaces of various types. In addition,
driver_nl80211.c is now including this code unconditionally, so that
the functions are not limited only for hostapd.
2009-12-09 16:49:28 +02:00
Jouni Malinen
b5996353e7 Remove unused if_update() driver op 2009-12-09 15:47:20 +02:00
Jouni Malinen
95272a888c Fix conditional EAP-SIM/AKA DB code selection 2009-12-06 19:48:25 +02:00
Jouni Malinen
d45354be53 Move IEEE 802.11n HT management code into a separate file 2009-12-06 19:41:47 +02:00
Jouni Malinen
eb53b752df Remove unnecessary CONFIG_IEEE80211N use 2009-12-06 19:17:54 +02:00
Jouni Malinen
644a8f2208 Remove unused phytype RX info variable 2009-12-06 18:54:58 +02:00
Jouni Malinen
22a7f39f23 Remove unused hostapd reconfig code 2009-12-06 18:48:30 +02:00
Jouni Malinen
5c90d47657 Move EAP-SIM DB conditional build into hostapd 2009-12-06 18:23:53 +02:00
Jouni Malinen
74784010af Remove conditional no-RADIUS build from src/radius
Make it responsibility of the src/radius user to handle conditional
build rules.
2009-12-06 17:53:59 +02:00
Jouni Malinen
0e574b07f8 Move hlr_auc_gw into hostapd directory
This is a separate program and is used mainly with hostapd, so it is
better to move this into the hostapd subdirectory now that Milenage
code has already been moved into src/crypto. Milenage was the only
generic component in hlr_auc_gw.
2009-12-06 16:33:19 +02:00
Jouni Malinen
1a70777868 Remove unneeded CONFIG_INTERNAL_X509 and NEED_SHA256 defines 2009-12-06 16:19:13 +02:00
Jouni Malinen
be473f3f09 Split crypto_internal.c into parts to clean up build
This makes it easier to make src/libcrypto.a and only link in
code that is really used.
2009-12-06 14:37:46 +02:00
Jouni Malinen
127608152e Move EAP method registration away from src/eap_{peer,server}
This makes it easier to make a library out of EAP methods without
losing possiblity of binary size optimization by linker dropping
unreferenced code.
2009-12-06 11:28:41 +02:00
Jouni Malinen
be916e0012 Remove Milenage test from hostapd/Makefile 2009-12-05 21:27:19 +02:00
Jouni Malinen
43df4cc2ca Move milenage.[ch] into src/crypto 2009-12-05 21:00:52 +02:00
Jouni Malinen
05df8cb3f6 Fix hostapd build with WPS disabled 2009-12-04 00:29:10 +02:00
Jouni Malinen
362bd35f2d Add more Doxygen documentation for RADIUS server implementation 2009-12-02 21:29:32 +02:00
Jouni Malinen
e0e14a7bc3 Move internal EAPOL authenticator defines into their own file
This is an initial step in further cleaning up the EAPOL authenticator
use to avoid requiring direct accesses to the internal data structures.
For now, number of external files are still including the internal
definitions from eapol_auth_sm_i.h, but eventually, these direct
references should be removed.
2009-11-29 23:16:04 +02:00
Jouni Malinen
03da66bd59 Remove src/crypto from default include path
In addition, start ordering header file includes to be in more
consistent order: system header files, src/utils, src/*, same
directory as the *.c file.
2009-11-29 23:04:43 +02:00
Jouni Malinen
5586f500a0 Split handle_assoc() into number of helper functions 2009-11-29 22:14:57 +02:00
Jouni Malinen
9294bfefc7 Mark IE input to hostapd_eid_wmm_valid() const 2009-11-29 22:10:38 +02:00
Jouni Malinen
2a3c6f5077 Check AID availability before handling HT state updates on association 2009-11-29 21:11:10 +02:00
Jouni Malinen
df84268ae7 Allocate sta->ht_capabilities dynamically
This avoids need for conditional inclusion of header file into
sta_info.h and cleans up the code a bit.
2009-11-29 21:07:52 +02:00
Jouni Malinen
b60d6f61e4 Make HOSTAPD_DUMP_STATE configurable with CONFIG_NO_DUMP_STATE
This removes the hardcoded definition from Makefile and cleans up
source code by moving the mail HOSTAPD_DUMP_STATE blocks into separate
files to avoid conditional compilation within files.
2009-11-29 20:18:47 +02:00
Jouni Malinen
281c950be4 Move EAPOL authenticator state machine into src/eapol_auth
This is now completely independent from hostapd-specific code, so
it can be moved to be under the src tree.
2009-11-29 20:03:28 +02:00
Jouni Malinen
a2befd37cc Change EAPOL authenticator hapd pointers to be opaque context
This cleans up the eapol_sm.c interface to not depend on any
hostapd-specific data structures.
2009-11-29 19:49:14 +02:00