Jouni Malinen [Wed, 15 Apr 2009 08:18:09 +0000 (11:18 +0300)]
Fix small HTTP processing issues
Parse "Transfer-Encoding: chunked" properly.
Get more data if read buffer is empty when starting to process the body.
Jouni Malinen [Tue, 14 Apr 2009 12:52:05 +0000 (15:52 +0300)]
nl80211: Use shared code for netlink initialization
Jouni Malinen [Tue, 14 Apr 2009 12:35:03 +0000 (15:35 +0300)]
nl80211: Merge handle_frame() implementations
Jouni Malinen [Tue, 14 Apr 2009 12:15:33 +0000 (15:15 +0300)]
nl82011: Use common code for setting channel
Jouni Malinen [Tue, 14 Apr 2009 12:03:07 +0000 (15:03 +0300)]
nl80211: Remove inclusion of unneeded header files
Jouni Malinen [Tue, 14 Apr 2009 10:12:58 +0000 (13:12 +0300)]
nl80211: Fix management frame sending after driver_ops cleanup
hostapd ended up with unregistered send_mlme() in commit
9f324b61babe2fb2a80544a8739eee065e73cd7b. Fix this by registering the
handler both for wpa_supplicant-AP and hostapd use. [Bug 310]
Jouni Malinen [Sun, 12 Apr 2009 09:10:08 +0000 (12:10 +0300)]
wpa_supplicant AP: Fix hw_mode for 5 GHz channels
Jouni Malinen [Thu, 9 Apr 2009 20:44:39 +0000 (23:44 +0300)]
Share driver beacon configuration handlers
Jouni Malinen [Thu, 9 Apr 2009 20:28:21 +0000 (23:28 +0300)]
Merge hostapd driver init functions into one
Use a parameter structure to pass in information that can be more easily
extended in the future. Include some of the parameters that were
previously read directly from hapd->conf in order to reduce need for
including hostapd/config.h into driver wrappers.
Jouni Malinen [Thu, 9 Apr 2009 17:53:29 +0000 (20:53 +0300)]
Remove unneeded inclusion of hostapd header files
Jouni Malinen [Thu, 9 Apr 2009 17:41:21 +0000 (20:41 +0300)]
nl80211: Share common interface processing code
Jouni Malinen [Thu, 9 Apr 2009 17:20:21 +0000 (20:20 +0300)]
nl80211: Share monitor mode filtering and reading functions
Jouni Malinen [Thu, 9 Apr 2009 17:01:25 +0000 (20:01 +0300)]
Share same set_country driver op for hostapd and wpa_supplicant
Jouni Malinen [Thu, 9 Apr 2009 16:57:20 +0000 (19:57 +0300)]
Share management frame send driver op for hostapd and wpa_supplicant
The same implementation can be shared in most cases, so better share the
same driver_ops handler function.
Jouni Malinen [Thu, 9 Apr 2009 16:42:19 +0000 (19:42 +0300)]
Remove flags parameter from send_mgmt_frame() driver op
This was not documented properly and was not really used nor would it be
suitable to be used in generic way as it was implemented. It is better
to just remove the parameter since there does not seem to be any
reasonable use for it.
Jouni Malinen [Thu, 9 Apr 2009 14:10:22 +0000 (17:10 +0300)]
nl80211: Replace hostapd WEXT events with nl80211 events
This shares the nl80211 event processing with wpa_supplicant and removes
the old WEXT code from driver_nl80211.c.
Jouni Malinen [Thu, 9 Apr 2009 13:50:48 +0000 (16:50 +0300)]
nl80211: Add Michael MIC failure event processing for wpa_supplicant
Jouni Malinen [Thu, 9 Apr 2009 13:39:24 +0000 (16:39 +0300)]
Sync linux/nl80211.h with wireless-testing.git
This adds support for Michael MIC failure events and info on maximum
supported scan IE length.
Jouni Malinen [Thu, 9 Apr 2009 13:31:11 +0000 (16:31 +0300)]
nl80211: Merge hostapd and wpa_supplicant key configuration
No need to duplicate more or less identical code.
Francesco Gringoli [Thu, 9 Apr 2009 11:51:31 +0000 (14:51 +0300)]
nl80211: Fix channel 14 use
nl80211 interface has a trivial bug that prevents it to work correctly
with channel 14. Channel frequency is erroneously 2848 instead of 2484.
To correct it just apply this patch. [Bug 308]
Jouni Malinen [Thu, 9 Apr 2009 11:11:39 +0000 (14:11 +0300)]
Use common get_hw_feature_data for hostapd and wpa_supplicant
This merges the driver wrapper implementations to use the same
implementation both for hostapd and wpa_supplicant operations to avoid
code duplication.
Jouni Malinen [Thu, 9 Apr 2009 10:40:12 +0000 (13:40 +0300)]
Merge wpa_supplicant and hostapd driver wrapper implementations
This commit merges the driver_ops structures and implementations from
hostapd/driver*.[ch] into src/drivers. This is only an initial step and
there is room for number of cleanups to share code between the hostapd
and wpa_supplicant parts of the wrappers to avoid unnecessary source
code duplication.
Jouni Malinen [Mon, 6 Apr 2009 12:02:48 +0000 (15:02 +0300)]
Fix couple of forgotten wpa_hw_modes -> hostapd_hw_modes
Some build configurations resulted in failure due to missed structure
rename.
Jouni Malinen [Sat, 4 Apr 2009 13:58:16 +0000 (16:58 +0300)]
nl80211: Fix static WEP key configuration when using SME
Need to set WEP keys before requesting authentication in order to get
Shared Key authentication working. Previously, the WEP keys were not set
at all when using SME in wpa_supplicant.
Jouni Malinen [Fri, 3 Apr 2009 18:17:23 +0000 (21:17 +0300)]
nl80211: Add bridge interfaces from secondary BSSes to ifidx list
This fixes EAPOL RX for secondary BSSes that are in a bridge that does
not match with the bridge used for the primary BSS.
Jouni Malinen [Fri, 3 Apr 2009 18:04:25 +0000 (21:04 +0300)]
nl80211: Fix EAPOL frame RX for secondary BSSes
Need to figure out which BSS should process the frame based on the
source address (STA/Supplicant MAC address).
Jouni Malinen [Fri, 3 Apr 2009 17:55:19 +0000 (20:55 +0300)]
nl80211: Remove dead code
The EAPOL packet socket is not bound to a specific ifindex, so no need
to setup the address for a bind() call that is not here anyway.
Jouni Malinen [Fri, 3 Apr 2009 17:44:03 +0000 (20:44 +0300)]
nl80211: Remove unuset set_privacy() and set_internal_bridge()
Jouni Malinen [Fri, 3 Apr 2009 17:40:07 +0000 (20:40 +0300)]
Mark STA authorized if IEEE 802.1X and WPA is not used
This fixes multi-BSS configuration with driver_nl80211.c to mark STAs
that use secondary BSSes with open/static WEP without having to make
driver_nl80211.c track 802.1X configuration for each BSS.
Jouni Malinen [Fri, 3 Apr 2009 17:14:39 +0000 (20:14 +0300)]
Fix some multi-BSSID configuration operations
Static WEP keys were configured only for the first BSS. In addition,
STAs were flushed only for the first BSS. These operations should be in
hostapd_setup_bss(), not setup_interface().
Remove extra call to ieee802_11_set_beacon() for the first BSS. This
should only be done from hostapd_setup_bss(), i.e., once for each BSS.
Jouni Malinen [Fri, 3 Apr 2009 16:11:22 +0000 (19:11 +0300)]
wpa_supplicant AP: Add get_hw_feature_data
This is enough to allow open mode association to be completed with
driver_nl80211.c.
Jouni Malinen [Fri, 3 Apr 2009 16:04:20 +0000 (19:04 +0300)]
Share same hw_feature definitions between hostapd and wpa_supplicant
Jouni Malinen [Fri, 3 Apr 2009 13:53:09 +0000 (16:53 +0300)]
Set own MAC address in AP data structures
Jouni Malinen [Fri, 3 Apr 2009 13:45:09 +0000 (16:45 +0300)]
Implement management frame TX for wpa_supplicant AP mode
Jouni Malinen [Fri, 3 Apr 2009 13:35:46 +0000 (16:35 +0300)]
Fix driver_ops function documentation
Jouni Malinen [Fri, 3 Apr 2009 08:59:08 +0000 (11:59 +0300)]
Remove unused driver_ops
get_rts, get_frag, get_retry, and set_key_tx_rx_threshold were not used
anywhere, so get rid of them.
Jouni Malinen [Fri, 3 Apr 2009 08:51:40 +0000 (11:51 +0300)]
Merge wireless_event_{,de}init() into {,de}init() driver op
Jouni Malinen [Thu, 2 Apr 2009 18:59:14 +0000 (21:59 +0300)]
wpa_supplicant AP: Add management frame RX for nl80211
Jouni Malinen [Thu, 2 Apr 2009 16:54:13 +0000 (19:54 +0300)]
Fix RSN parameter setting for multi-BSS case
rsn_pairwise and wpa_group were set properly only for the last BSS, but
they do need to be set for all BSSes.
Jouni Malinen [Thu, 2 Apr 2009 13:09:48 +0000 (16:09 +0300)]
Add Beacon configuration for wpa_supplicant AP mode
Jouni Malinen [Thu, 2 Apr 2009 13:05:21 +0000 (16:05 +0300)]
Merge set_dtim_period() into set_beacon()
No need for a separate driver_ops handler for setting DTIM period since
this is always set at the same time with the Beacon data. Beacon
interval is still set separately since it is consider per-radio
parameter (Beacon data and DTIM period are per-BSS parameters).
Jouni Malinen [Wed, 1 Apr 2009 14:14:07 +0000 (17:14 +0300)]
nl80211: Add IGTK (AES-128-CMAC) configuration
This was somehow forgotten from IEEE 802.11w/MFP patches from
wpa_supplicant -Dnl80211.
Jouni Malinen [Wed, 1 Apr 2009 14:10:36 +0000 (17:10 +0300)]
SME: Add processing for rejected associations
Jouni Malinen [Wed, 1 Apr 2009 09:04:36 +0000 (12:04 +0300)]
Fix SHA-256-based KDF when using CCMP as the pairwise cipher
IEEE 802.11r KDF uses key length in the derivation and as such, the PTK
length must be specified correctly. The previous version was deriving
using 512-bit PTK regardless of the negotiated cipher suite; this works
for TKIP, but not for CCMP. Update the code to use proper PTK length
based on the pairwise cipher.
This fixed PTK derivation for both IEEE 802.11r and IEEE 802.11w (when
using AKMP that specifies SHA-256-based key derivation). The fixed
version does not interoperate with the previous versions. [Bug 307]
Jouni Malinen [Tue, 31 Mar 2009 12:25:10 +0000 (15:25 +0300)]
nl80211: Remove forgotten comment about SIOCSIWMODE
Jouni Malinen [Tue, 31 Mar 2009 11:25:15 +0000 (14:25 +0300)]
nl80211: Remove SIOCGIWRANGE and assume TKIP+CCMP+WPA+WPA2
All currently known drivers that use nl80211/cfg80211 support these, so
no need to use old WEXT ioctl for figuring out capabilities.
Jouni Malinen [Tue, 31 Mar 2009 11:14:16 +0000 (14:14 +0300)]
nl80211: Remove WEXT Michael MIC event processing
mac80211 does not use this type of Michael MIC event, so this is not
really used and proper Michael MIC failure processing will be added
using an nl80211 event once that gets added into wireless-testing.git.
Jouni Malinen [Tue, 31 Mar 2009 11:09:30 +0000 (14:09 +0300)]
nl80211: Remove WEXT_COMPAT
It looks like both new nl80211 operations (scan and auth/assoc) end up
being added in Linux 2.6.30, so we do not need to maintain the backwards
compatibility code in wpa_supplicant.
Jouni Malinen [Mon, 30 Mar 2009 16:00:55 +0000 (19:00 +0300)]
WPS: Fix local configuration update after AP configuration
Update credential to only include a single authentication and
encryption type in case the AP configuration includes more than one
option. Without this, the credential would be rejected if the AP was
configured to allow more than one authentication type.
Jouni Malinen [Mon, 30 Mar 2009 15:48:41 +0000 (18:48 +0300)]
WPS: Fix hostapd runtime WPS configuration after Enrollee run
If the AP is configured with WPS, we need to update the local WPS data
in order to provide correct credentials for Enrollees.
Jouni Malinen [Mon, 30 Mar 2009 14:55:37 +0000 (17:55 +0300)]
Make channel number available to set_freq()
Since we have the channel number, we could as well pass it to the driver
wrapper should there be drivers that use channel number instead of
frequency.
Jouni Malinen [Fri, 27 Mar 2009 15:13:54 +0000 (17:13 +0200)]
Add needed AP driver wrappers (most of which are still to-do)
Jouni Malinen [Fri, 27 Mar 2009 14:45:47 +0000 (16:45 +0200)]
Set hostapd configuration based on wpa_supplicant AP mode config
Jouni Malinen [Fri, 27 Mar 2009 14:10:14 +0000 (16:10 +0200)]
Update driver SSID and 802.1X/WPA parameters on configuration reload
This is needed for WPS AP reconfiguration with driver wrappers that do
not use hostapd MLME.
Masashi Honma [Fri, 27 Mar 2009 08:49:47 +0000 (10:49 +0200)]
Fix: Loop in driver selection routine
Increment an index variable not 'i' but 'j'.
(this was broken yesterday by a cleanup change
3067ac2bb82553c99cb84e32ede82de434ee1070)
Jouni Malinen [Thu, 26 Mar 2009 19:55:01 +0000 (21:55 +0200)]
Add support for specifying subset of enabled frequencies to scan
A new network block parameter, scan_freq, can be used to specify subset
of frequencies to scan. This can speed up scanning process considerably
if it is known that only a small subset of channels is actually used in
the network. A union of configured frequencies for all enabled network
blocks is used in scan requests.
Currently, only driver_nl80211.c has support for this functionality.
For example, following parameter marks 2.4 GHz channels 1, 6, 11 to be
scanned: scan_freq=2412 2437 2462
Jouni Malinen [Thu, 26 Mar 2009 18:37:05 +0000 (20:37 +0200)]
Add preliminary hostapd data structure initialization for AP mode
wpa_supplicant can now initialize hostapd data structures when mode=2 is
used to set up an AP. The hostapd configuration is not yet set based on
wpa_supplicant network configuration block. In addition, the glue code
for hostapd driver_ops needs number of functions that will be needed for
AP functionality.
Jouni Malinen [Thu, 26 Mar 2009 18:35:49 +0000 (20:35 +0200)]
Rename struct wpa_driver_ops to hapd_driver_ops
This avoids conflicts with the wpa_supplicant structure with the same
name.
Jouni Malinen [Thu, 26 Mar 2009 17:23:41 +0000 (19:23 +0200)]
Move hostapd_init() into main.c
Jouni Malinen [Thu, 26 Mar 2009 17:23:02 +0000 (19:23 +0200)]
Get rid of couple of shadowed variable warnings
Jouni Malinen [Thu, 26 Mar 2009 17:09:25 +0000 (19:09 +0200)]
Remove shadowed variable
Jouni Malinen [Thu, 26 Mar 2009 17:06:02 +0000 (19:06 +0200)]
Move main() and configuration file related functions into main.c
This makes it easier to share hostapd.c with wpa_supplicant
Jouni Malinen [Thu, 26 Mar 2009 14:08:17 +0000 (16:08 +0200)]
Move wpa_supplicant_create_ap() into ap.c
Jouni Malinen [Thu, 26 Mar 2009 14:06:15 +0000 (16:06 +0200)]
Allow hostapd/config.h and wpa_supplicant/config_ssid.h coexist
Move the shared IEEE 802.11w enum definition into src/common/defs.h to
avoid redefinition when both configuration structures are included into
the same file.
Jouni Malinen [Thu, 26 Mar 2009 13:32:02 +0000 (15:32 +0200)]
Fix WPS UPnP SSDP on 32-bit targets
The memcpy was using incorrect size (of pointer; should have been of
data structure) for the client address. This ended up working on 64-bit
targets, but left part of the address uninitialized on 32-bit targets.
Jouni Malinen [Wed, 25 Mar 2009 15:49:22 +0000 (17:49 +0200)]
Move hostapd driver_ops to use similar set_key with wpa_supplicant
Jouni Malinen [Wed, 25 Mar 2009 14:55:09 +0000 (16:55 +0200)]
Replace deprecated add_sta() with add_sta2()
Jouni Malinen [Wed, 25 Mar 2009 14:48:22 +0000 (16:48 +0200)]
Remove deprecated version of set_freq() and rename the new version
Jouni Malinen [Wed, 25 Mar 2009 14:45:57 +0000 (16:45 +0200)]
Remove unused set_assoc_ap() wpa_driver_ops
The need for this was removed with the experimental
hostapd-as-a-client-STA functionality.
Jouni Malinen [Wed, 25 Mar 2009 14:35:26 +0000 (16:35 +0200)]
Fix wpa_supplicant AP build after hostapd header file cleanup
Jouni Malinen [Wed, 25 Mar 2009 14:29:00 +0000 (16:29 +0200)]
Include config.h explicitly into files that actually use it
hostapd.h does not need to include config.h.
Jouni Malinen [Wed, 25 Mar 2009 14:13:35 +0000 (16:13 +0200)]
Move STA entry structure into sta_info.h and remove ap.h
This cleans up some of the hostapd include file usage and only includes
the needed STA flags into driver wrappers.
Jouni Malinen [Wed, 25 Mar 2009 13:54:25 +0000 (15:54 +0200)]
Replace sta_aid array with bitfield
The actual pointer to struct sta_info was not really used and it is
enough to use a single bit to indicate whether an AID is allocated. This
makes the BSS data take less memory while making the allocation routine
faster and removing the arbitrary MAX_AID_TABLE_SIZE limit of 128 STAs.
Jouni Malinen [Wed, 25 Mar 2009 13:35:00 +0000 (15:35 +0200)]
Move AID derivation into a separate function
Jouni Malinen [Wed, 25 Mar 2009 10:23:42 +0000 (12:23 +0200)]
Link in AP functionality from hostapd when CONFIG_AP=y
This is only allowing the code to be compiled and linked in; the actual
functionality is not yet enabled.
Jouni Malinen [Wed, 25 Mar 2009 10:06:19 +0000 (12:06 +0200)]
Rename EAP server defines from EAP_* to EAP_SERVER_*
This allows separate set of EAP server and peer methods to be built into
a single binary.
Jouni Malinen [Wed, 25 Mar 2009 09:38:47 +0000 (11:38 +0200)]
Initial step in adding simple AP mode support into wpa_supplicant
This version is adding the configuration option (mode=2) for this and
driver capability reporting to figure out whether AP mode can be used.
However, this does not actually implement any real functionality yet.
Jouni Malinen [Wed, 25 Mar 2009 09:36:09 +0000 (11:36 +0200)]
Remove local variable shadowing to avoid a warning
Jouni Malinen [Tue, 24 Mar 2009 18:50:40 +0000 (20:50 +0200)]
driver_nl80211: Fix initial iftype change
Need to set drv->ifindex before calling set_mode(). In addition, set the
mode before setting the interface up to avoid having to set it down
again.
Add more useful error message on mode changes.
Jouni Malinen [Tue, 24 Mar 2009 18:06:02 +0000 (20:06 +0200)]
Deprecate set_drop_unencrypted(), set_auth_alg(), and set_mode()
All these driver handlers can be implemented in associate() handler
which gets all the needed information in the parameters structure. The
old functions that provided only a single parameter will be removed
eventually to clean up the driver_ops structure, so driver wrappers
should start using the newer mechanism.
Jouni Malinen [Mon, 23 Mar 2009 14:42:45 +0000 (16:42 +0200)]
Preparations for 0.6.9 release
Jouni Malinen [Sun, 22 Mar 2009 13:53:46 +0000 (15:53 +0200)]
driver_madwifi: Fix build with old driver versions
Do not reference ie.rsn_ie in wpa_hexdump outside #ifdef MADWIFI_NG.
[Bug 302]
Jouni Malinen [Sat, 21 Mar 2009 20:07:14 +0000 (22:07 +0200)]
Fix UNIX domain socket address handling to be more portable
Remove all fields before sun_path before printing or comparing sun_path
contents. Using offsetof should be portable. In addition, set sun_len
for FreeBSD.
Sam Leffler [Sat, 21 Mar 2009 20:00:27 +0000 (22:00 +0200)]
Fix UNIX domain socket address handling to be more portable
Removing just sun_family is not portable since some systems (e.g.,
FreeBSD) include an additional sun_len field. Using offsetof should be
portable. In addition, set sun_ken for FreeBSD.
Jouni Malinen [Sat, 21 Mar 2009 19:00:37 +0000 (21:00 +0200)]
Fix WPS UPnP build for FreeBSD
Jouni Malinen [Sat, 21 Mar 2009 18:59:07 +0000 (20:59 +0200)]
Fix FreeBSD build by not adding -ldl
Unlike Linux, FreeBSD does not use libdl.
Jouni Malinen [Sat, 21 Mar 2009 18:58:27 +0000 (20:58 +0200)]
Fix driver_bsd.c build for FreeBSD
Jouni Malinen [Sat, 21 Mar 2009 18:57:21 +0000 (20:57 +0200)]
Fix IEEE 802.11r build without CONFIG_CLIENT_MLME
Jouni Malinen [Sat, 21 Mar 2009 18:56:39 +0000 (20:56 +0200)]
Fix CONFIG_DRIVER_RADIUS_ACL=y build
Jouni Malinen [Fri, 20 Mar 2009 21:03:18 +0000 (23:03 +0200)]
nl80211: Make get_ssid behave like get_bssid with SME
Use a local copy of SSID instead of WEXT when using wpa_supplicant-based
SME.
Jouni Malinen [Fri, 20 Mar 2009 20:59:17 +0000 (22:59 +0200)]
nl80211: Make set_bssid() WEXT_COMPAT
Jouni Malinen [Fri, 20 Mar 2009 20:57:46 +0000 (22:57 +0200)]
nl80211: Make PMKSA caching candidate event WEXT_COMPAT
Jouni Malinen [Fri, 20 Mar 2009 20:55:24 +0000 (22:55 +0200)]
nl80211: Mark PMKSA cache operations with WEXT_COMPAT
These are not needed with wpa_supplicant SME.
Jouni Malinen [Fri, 20 Mar 2009 20:44:53 +0000 (22:44 +0200)]
nl80211: Fix no-WEXT_COMPAT build
wpa_driver_nl80211_set_ssid() and wpa_driver_nl80211_set_freq() are only
for WEXT_COMPAT now that the user space MLME code is removed.
Jouni Malinen [Fri, 20 Mar 2009 20:35:19 +0000 (22:35 +0200)]
Document CONFIG_CLIENT_MLME option as specific to test driver
Since user space MLME is not used with nl80211 anymore, this option is
only of use with driver_test.
Jouni Malinen [Fri, 20 Mar 2009 20:31:24 +0000 (22:31 +0200)]
nl80211: Remove user space MLME code
This design did not make it into the kernel and the new user space SME
design has removed the need for keeping the experimental code.
Jouni Malinen [Fri, 20 Mar 2009 20:26:41 +0000 (22:26 +0200)]
Add SME support (separate authentication and association)
This can be used, e.g., with mac80211-based Linux drivers with
nl80211. This allows over-the-air FT protocol to be used (IEEE
802.11r).
Since the nl80211 interface needed for this is very recent (added
today into wireless-testing.git), driver_nl80211.c has backwards
compatibility code that uses WEXT for association if the kernel does
not support the new commands. This compatibility code can be
disabled by defining NO_WEXT_COMPAT. That code will also be removed
at some point to clean up driver_nl80211.c.
Jouni Malinen [Fri, 20 Mar 2009 19:28:34 +0000 (21:28 +0200)]
Update linux/nl80211.h copy based on wireless-testing.git
Jouni Malinen [Thu, 19 Mar 2009 19:42:15 +0000 (21:42 +0200)]
Fix doxygen function comment
Jouni Malinen [Thu, 19 Mar 2009 18:32:45 +0000 (20:32 +0200)]
Add link to mac80211 driver information