Commit graph

953 commits

Author SHA1 Message Date
Jouni Malinen
072ad14cc4 nl80211: Share monitor mode filtering and reading functions 2009-04-09 20:20:21 +03:00
Jouni Malinen
e785c2ba3b Share same set_country driver op for hostapd and wpa_supplicant 2009-04-09 20:01:25 +03:00
Jouni Malinen
9f324b61ba 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.
2009-04-09 19:57:20 +03:00
Jouni Malinen
8342130269 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.
2009-04-09 19:42:19 +03:00
Jouni Malinen
5b7b85f669 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.
2009-04-09 17:10:22 +03:00
Jouni Malinen
35583f3fa6 nl80211: Add Michael MIC failure event processing for wpa_supplicant 2009-04-09 16:50:48 +03:00
Jouni Malinen
ac184de0ec Sync linux/nl80211.h with wireless-testing.git
This adds support for Michael MIC failure events and info on maximum
supported scan IE length.
2009-04-09 16:39:24 +03:00
Jouni Malinen
1ad1cdc241 nl80211: Merge hostapd and wpa_supplicant key configuration
No need to duplicate more or less identical code.
2009-04-09 16:31:11 +03:00
Francesco Gringoli
5a0ffb5f1f 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]
2009-04-09 14:51:31 +03:00
Jouni Malinen
c3965310e6 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.
2009-04-09 14:11:39 +03:00
Jouni Malinen
c51218372f 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.
2009-04-09 13:40:12 +03:00
Jouni Malinen
c2220ec0b7 Fix couple of forgotten wpa_hw_modes -> hostapd_hw_modes
Some build configurations resulted in failure due to missed structure
rename.
2009-04-06 15:02:48 +03:00
Jouni Malinen
a0b2f99bd7 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.
2009-04-04 16:58:16 +03:00
Jouni Malinen
acae30ed7b 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.
2009-04-03 21:17:23 +03:00
Jouni Malinen
f82ef4d8db 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).
2009-04-03 21:04:25 +03:00
Jouni Malinen
6143f11705 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.
2009-04-03 20:55:19 +03:00
Jouni Malinen
c043aadc40 nl80211: Remove unuset set_privacy() and set_internal_bridge() 2009-04-03 20:44:03 +03:00
Jouni Malinen
515cf93f8c 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.
2009-04-03 20:40:07 +03:00
Jouni Malinen
c213cc0433 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.
2009-04-03 20:14:39 +03:00
Jouni Malinen
282d55908b wpa_supplicant AP: Add get_hw_feature_data
This is enough to allow open mode association to be completed with
driver_nl80211.c.
2009-04-03 19:11:22 +03:00
Jouni Malinen
6caf9ca68c Share same hw_feature definitions between hostapd and wpa_supplicant 2009-04-03 19:04:20 +03:00
Jouni Malinen
0892aaaf51 Set own MAC address in AP data structures 2009-04-03 16:53:09 +03:00
Jouni Malinen
2c2010acda Implement management frame TX for wpa_supplicant AP mode 2009-04-03 16:45:09 +03:00
Jouni Malinen
6179d2fd7d Fix driver_ops function documentation 2009-04-03 16:35:46 +03:00
Jouni Malinen
6de726abb5 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.
2009-04-03 11:59:08 +03:00
Jouni Malinen
a9a2cb5abb Merge wireless_event_{,de}init() into {,de}init() driver op 2009-04-03 11:51:40 +03:00
Jouni Malinen
0915d02c3c wpa_supplicant AP: Add management frame RX for nl80211 2009-04-02 21:59:14 +03:00
Jouni Malinen
f1f54cb8b1 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.
2009-04-02 19:54:13 +03:00
Jouni Malinen
d2440ba01b Add Beacon configuration for wpa_supplicant AP mode 2009-04-02 16:09:48 +03:00
Jouni Malinen
74f2ad326f 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).
2009-04-02 16:05:21 +03:00
Jouni Malinen
2e24a366ea nl80211: Add IGTK (AES-128-CMAC) configuration
This was somehow forgotten from IEEE 802.11w/MFP patches from
wpa_supplicant -Dnl80211.
2009-04-01 17:14:07 +03:00
Jouni Malinen
efa4607800 SME: Add processing for rejected associations 2009-04-01 17:10:36 +03:00
Jouni Malinen
c0a6190815 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]
2009-04-01 12:04:36 +03:00
Jouni Malinen
d61f48ba1d nl80211: Remove forgotten comment about SIOCSIWMODE 2009-03-31 15:25:10 +03:00
Jouni Malinen
1b2a72e884 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.
2009-03-31 14:25:15 +03:00
Jouni Malinen
d8816397c3 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.
2009-03-31 14:14:16 +03:00
Jouni Malinen
e8a029fb6d 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.
2009-03-31 14:09:30 +03:00
Jouni Malinen
73267b9ca4 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.
2009-03-30 19:00:55 +03:00
Jouni Malinen
6ce4b59342 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.
2009-03-30 18:48:41 +03:00
Jouni Malinen
9c6d8e1db5 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.
2009-03-30 17:55:37 +03:00
Jouni Malinen
0f2b2c1973 Add needed AP driver wrappers (most of which are still to-do) 2009-03-27 17:13:54 +02:00
Jouni Malinen
07f117edb5 Set hostapd configuration based on wpa_supplicant AP mode config 2009-03-27 16:45:47 +02:00
Jouni Malinen
c813b69546 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.
2009-03-27 16:10:14 +02:00
Masashi Honma
871bb568d2 Fix: Loop in driver selection routine
Increment an index variable not 'i' but 'j'.

(this was broken yesterday by a cleanup change
3067ac2bb8)
2009-03-27 10:49:47 +02:00
Jouni Malinen
d3a9822542 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
2009-03-26 21:55:01 +02:00
Jouni Malinen
2d5b792d2b 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.
2009-03-26 20:37:05 +02:00
Jouni Malinen
89111f3bbc Rename struct wpa_driver_ops to hapd_driver_ops
This avoids conflicts with the wpa_supplicant structure with the same
name.
2009-03-26 20:35:49 +02:00
Jouni Malinen
b6a7859d15 Move hostapd_init() into main.c 2009-03-26 19:23:41 +02:00
Jouni Malinen
3067ac2bb8 Get rid of couple of shadowed variable warnings 2009-03-26 19:23:02 +02:00
Jouni Malinen
21db94c5dc Remove shadowed variable 2009-03-26 19:09:25 +02:00