Commit graph

405 commits

Author SHA1 Message Date
Jouni Malinen
e3802622db nl80211: Define set_freq for wpa_supplicant, too 2010-04-11 20:36:16 +03:00
Jouni Malinen
b3db190fa2 Started to make set_ap_wps_ie() capable of adding multiple IEs
This mechanism can be used to add various IEs to Beacon and Probe
Response frames and it should be made clear that it is not reserved
only for WPS IE.
2010-04-11 20:16:43 +03:00
Jouni Malinen
814782b9fe Allow driver wrappers to indicate maximum remain-on-channel duration 2010-04-11 19:42:37 +03:00
Jouni Malinen
de12717a56 nl80211: Fix key configuration in wpa_supplicant AP mode 2010-04-11 19:35:24 +03:00
Jouni Malinen
bc19f67240 nl80211: Remove forgotten Action frame registration example 2010-04-11 19:32:07 +03:00
Jouni Malinen
f3585c8a85 Simplify driver_ops for virtual interface add/remove
There is no absolute requirement for separating address allocation
into separate functions, so simplify the driver wrapper interface
to use just if_add and if_remove instead of adding the new
alloc_interface_addr() and release_interface_addr() functions.

if_add() can now indicate if the driver forced a different interface
name or address on the virtual interface.
2010-04-11 19:23:09 +03:00
Jouni Malinen
f8bf142175 nl80211: Fix memory leak on send_action error path 2010-04-11 12:29:16 +03:00
Jouni Malinen
7733991281 nl80211: Start using NL80211_ATTR_LOCAL_STATE_CHANGE
This removes transmission of some unnecessary Deauthentication
frames in cases where we only need to clear the local state. In
addition, this resolves issues for 802.11r FT-over-DS by allowing
authentication state to be set locally even when no actual
Authentication frame is to be transmitted.
2010-04-08 11:31:37 +03:00
Jouni Malinen
27cf8871ad Sync with wireless-testing.git include/linux/nl80211.h
This adds NL80211_ATTR_LOCAL_STATE_CHANGE.
2010-04-08 11:29:54 +03:00
Jouni Malinen
f8130b07bb driver_osx: Update set_key arguments to fix build 2010-04-04 08:13:46 +03:00
Jouni Malinen
b91ab76e8c Add test commands for sending deauth/disassoc without dropping state
This can be used to test 802.11w by sending a protected or unprotected
deauth/disassoc frame.

hostapd_cli deauth <dst addr> test=<0/1>
hostapd_cli disassoc <dst addr> test=<0/1>

test=0: unprotected
test=1: protected
2010-03-29 12:01:40 -07:00
Jouni Malinen
b625473c6c Add driver command and event for signal strength monitoring 2010-03-28 15:31:04 -07:00
Jouni Malinen
93910401c9 nl80211: Parse CQM events 2010-03-28 13:56:40 -07:00
Jouni Malinen
d43331b6ea Sync with wireless-testing.git include/linux/nl80211.h 2010-03-28 12:47:17 -07:00
Holger Schurig
2ea2fcc7e6 nl80211: Fix WEP key configuration for prior to authentication
The driver data was changed from struct wpa_driver_nl80211_data * to
struct i802_bss * and the internal call will need to match that change.
2010-03-27 22:22:17 -07:00
Jouni Malinen
9fad706c68 nl80211: Add more debug information about scan request parameters 2010-03-26 22:22:38 -07:00
Jouni Malinen
15664ad01a nl80211: Silence set_key ENOLINK failure messages on key clearing
This happens in common case and is expected, so there is no need to
include the potentially confusing failure message in the debug log.
2010-03-26 21:58:31 -07:00
Jouni Malinen
2a7e7f4e4a FT: Add driver op for marking a STA authenticated
This can be used with FT-over-DS where FT Action frame exchange
triggers transition to State 2 (authenticated) without Authentication
frame exchange.
2010-03-13 18:28:15 +02:00
Jouni Malinen
73fc617d5c nl80211: Fix FT Action send command
Need to include payload header in the data length to avoid sending
truncated FT Action frame.
2010-03-12 00:41:03 +02:00
Masashi Honma
c1bbb0cee1 NetBSD: Fix driver_bsd.c build
On NetBSD 5.0.2, wpa_supplicant build results in messages below.

../src/drivers/driver_bsd.c: In function 'wpa_driver_bsd_get_ssid':
../src/drivers/driver_bsd.c:876: warning: passing argument 2 of 'bsd_get_ssid'
from incompatible pointer type
../src/drivers/driver_bsd.c:876: warning: passing argument 3 of 'bsd_get_ssid'
makes integer from pointer without a cast
../src/drivers/driver_bsd.c:876: error: too many arguments to function
'bsd_get_ssid'
../src/drivers/driver_bsd.c: In function 'wpa_driver_bsd_scan':
../src/drivers/driver_bsd.c:1125: warning: passing argument 2 of 'bsd_set_ssid'
from incompatible pointer type
../src/drivers/driver_bsd.c:1125: warning: passing argument 3 of 'bsd_set_ssid'
makes integer from pointer without a cast
../src/drivers/driver_bsd.c:1125: error: too many arguments to function
'bsd_set_ssid'
gmake: *** [../src/drivers/driver_bsd.o] Error 1

This patch solves this issue.
2010-03-10 23:33:10 +02:00
Jouni Malinen
7b90c16aa9 nl80211: Add preliminary implementation of FT Action send
This is a step in adding FT support with nl80211-based drivers.
driver_nl80211.c is now registering to handle the FT Action frames
and is able to transmit FT Request frame. Received FT Action frames
are not yet indicated as driver events.
2010-03-07 22:47:39 +02:00
Jouni Malinen
5205c4f98a nl80211: Fix driver context pointer for auth-failure-case
The new per-BSS context needs to be used here when calling
wpa_driver_nl80211_deauthenticate() to avoid passing incorrect
data type to the function.
2010-03-07 21:29:34 +02:00
Jouni Malinen
0ebdf62735 Remove unnecessary ifname parameter from set_ap_wps_ie() driver op 2010-03-07 11:51:50 +02:00
Jouni Malinen
d3e3a20565 Remove unnecessary ifname parameter from set_ht_params() driver op 2010-03-07 11:49:27 +02:00
Jouni Malinen
3234cba40e Remove unnecessary ifname parameter to sta_set_flags() driver op 2010-03-07 11:45:41 +02:00
Jouni Malinen
62847751e4 Remove unnecessary ifname parameter from sta_add() driver op 2010-03-07 11:42:41 +02:00
Jouni Malinen
8709de1ae8 Remove unnecessary ifname parameter from hapd_get_ssid/hapd_set_ssid 2010-03-07 11:36:45 +02:00
Jouni Malinen
aa48451698 Remove unnecessary ifname parameter from set_generic_elem() driver op 2010-03-07 11:33:06 +02:00
Jouni Malinen
d5dd016a8a Remove unneeded ifname parameter from set_privacy() driver op 2010-03-07 11:29:17 +02:00
Jouni Malinen
044372a333 driver_test: Use driver private BSS context instead of BSS lookup
The ifname-based lookup can now be replaced with the new mechanism that
allows driver wrappers to register per-BSS context data.
2010-03-07 11:26:35 +02:00
Jouni Malinen
7ab68865c0 Remove unneeded iface parameter from if_add() driver op 2010-03-07 10:05:05 +02:00
Felix Fietkau
071799872f hostapd: fix a segfault in the error path of the nl80211 if_add function 2010-03-07 09:59:22 +02:00
Jouni Malinen
05ba8690cb nl80211: Unregister forgotten eloop socket on init failure 2010-03-06 22:37:48 +02:00
Jouni Malinen
8b897f5a17 Remove unnecessary ifname parameter from set_beacon()
The new per-BSS driver context makes this unnecessary.
2010-03-06 22:36:40 +02:00
Felix Fietkau
a2e40bb650 hostapd: Fix interface selection for the nl80211 driver
This patch allows the nl80211 driver to create its own per-bss context
and pass it to the drv_priv pointer of the hostapd bss state.
With this and the following patch, stations can associate to and switch
between multiple BSS interfaces of a single wiphy.
This obsoletes a few instances of passing ifname to a callback, those
can be removed in a separate patch.
It might also be useful to move more fields from the driver data to the
per-bss data structure in the future.
2010-03-06 22:22:56 +02:00
Felix Fietkau
4c32757d22 hostapd: add ifname to the sta_set_flags callback
This fixes multi-BSS STA operations (e.g., setting AUTHORIZED flag) with
nl80211-based drivers.
2010-03-06 20:44:31 +02:00
Kel Modderman
09bd6e8cca wpa_supplicant: fix FTBFS on Debian GNU/kFreeBSD
This patch allows wpa_supplicant to compile on Debian's kfreebsd
architectures.

Patch by Stefan Lippers-Hollmann based on work done by Petr Salinger
and Emmanuel Bouthenot for 0.6.X (http://bugs.debian.org/480572).
2010-03-06 10:16:47 +02:00
Jouni Malinen
d2f46a2b13 bsd: Use os_strlcpy instead of strlcpy 2010-03-06 10:04:41 +02:00
Jouni Malinen
3812464cda Add optional scan result filter based on SSID
filter_ssids=1 global configuration parameter can now be used to
enable scan result filtering (with -Dnl80211 only for now) based on
the configured SSIDs. In other words, only the scan results that have
an SSID matching with one of the configured networks are included in the
BSS table. This can be used to reduce memory needs in environments that
have huge number of APs.
2010-03-05 21:42:06 +02:00
Jouni Malinen
207ef3fb12 Add suspend/resume notifications
wpa_supplicant can now be notified of suspend/resume events, e.g.,
from pm-action scripts. This allows wpa_supplicant to clear information
that may become invalid during a suspend operation.
2010-02-27 18:46:02 +02:00
Masashi Honma
c6611ed995 bsd: Use device capability information
This patch enables the use of device capability information from the
driver when possible.
2010-02-16 19:47:00 +02:00
Jouni Malinen
58f6fbe05c nl80211: Add support for off-channel Action TX/RX commands
The kernel side support for this was just added into
wireless-testing.git. This commit adds the driver wrapper code needed
to allow wpa_supplicant to use the new functionality.
2010-02-16 19:41:49 +02:00
Jouni Malinen
b7a2b0b68c Add alloc_interface_addr() drv op option for specifying ifname
Some drivers may need to use a specific ifname for the virtual
interface, so allow them to do this with a new parameter passed
to the alloc_interface_addr() handler.
2010-02-16 19:34:51 +02:00
Jouni Malinen
01b350ed74 Sync with linux/nl80211.h from wireless-testing.git 2010-02-16 19:28:38 +02:00
Masashi Honma
0c6bdf91ea bsd: Aggregate ioctl routines
This patch aggregates ioctls.

First is SIOCS80211. The SIOCS80211's arguments has 3 couples.
        1-1. i_len, i_data
        1-2. i_val
        1-3. i_len, i_data, i_val (currently only IEEE80211_IOC_APPIE)
There were 3 routines for each cases. This patch aggregates these to
one.

Second is SIOCG80211. The SIOCG80211 returns 2 type of value.
        2-1. i_len
        2-2. i_val
There were 2 routines for each cases. This patch aggregates these to
one.

I have tested on both FreeBSD 8.0 and NetBSD 5.0.1 with these cases.

[hostapd]
RSN-PSK(CCMP)/WPA-PSK(TKIP)

[wpa_supplicant(STA)]
RSN-PSK(CCMP)/WPA-PSK(TKIP)

[wpa_supplicant(AP)]
RSN-PSK(CCMP)/WPA-PSK(TKIP)
2010-02-13 13:59:29 +02:00
Masashi Honma
88487b0e0b FreeBSD: Add support for FreeBSD 8.0 STA/AP
This patch adds both wpa_supplicant and hostapd support for
FreeBSD 8.0.

I refered
http://www.jp.freebsd.org/cgi/cvsweb.cgi/src/usr.sbin/wpa/hostapd/driver_freebsd
.c
http://www.jp.freebsd.org/cgi/cvsweb.cgi/src/usr.sbin/wpa/wpa_supplicant/driver_
freebsd.c

I have tested on FreeBSD 8.0 with these cases.

[hostapd]
RSN-PSK(CCMP)/WPA-PSK(TKIP)

[wpa_supplicant(STA)]
RSN-PSK(CCMP)/WPA-PSK(TKIP)

[wpa_supplicant(AP)]
RSN-PSK(CCMP)/WPA-PSK(TKIP)
2010-02-13 13:57:39 +02:00
Masashi Honma
362468d117 FreeBSD: Enable channel control
This patch enables FreeBSD channel control.

I have tested on FreeBSD 7.2 with these cases.

[hostapd]
RSN-PSK(CCMP)/WPA-PSK(TKIP)

[wpa_supplicant(STA)]
RSN-PSK(CCMP)/WPA-PSK(TKIP)

[wpa_supplicant(AP)]
RSN-PSK(CCMP)/WPA-PSK(TKIP)
2010-02-13 13:54:27 +02:00
Masashi Honma
e1b1309b6a bsd: Unify wpa_driver_bsd_ops
The attached patch unifies hostapd wpa_driver_bsd_ops and
wpa_supplicant wpa_driver_bsd_ops.

I have tested on NetBSD 5.0.1 with these cases.

[hostapd]
RSN-PSK(CCMP)/WPA-PSK(TKIP)

[wpa_supplicant(STA)]
RSN-PSK(CCMP)/WPA-PSK(TKIP)

[wpa_supplicant(AP)]
RSN-PSK(CCMP)/WPA-PSK(TKIP)
2010-02-13 13:52:03 +02:00
Masashi Honma
86b24ea93c bsd: Unify struct bsd_driver_data and struct wpa_driver_bsd_data
This patch unifies struct bsd_driver_data and struct wpa_driver_bsd_data.
2010-02-13 13:50:19 +02:00
Masashi Honma
6850c70742 bsd: Use same field name between hostapd and wpa_supplicant
This patch modifies field name of struct bsd_driver_data to use
same name of struct wpa_driver_bsd_data. This is a preparation of
unifying struct bsd_driver_data and struct wpa_driver_bsd_data.
2010-02-13 13:48:52 +02:00