wpasupplicant
12 years agoMerge commit 'garage/master' master
Jukka Rissanen [Wed, 8 Jul 2009 08:56:11 +0000 (11:56 +0300)]
Merge commit 'garage/master'

12 years agoMaemo debianization.
Jukka Rissanen [Wed, 8 Jul 2009 08:50:52 +0000 (11:50 +0300)]
Maemo debianization.

12 years agowelcome
www-data [Wed, 8 Jul 2009 08:50:27 +0000 (11:50 +0300)]
welcome

12 years agoFix eap_example build with renamed EAP_* server defines
Jouni Malinen [Tue, 30 Jun 2009 16:52:10 +0000 (19:52 +0300)]
Fix eap_example build with renamed EAP_* server defines

1e5839e06fbc20945044239984b652da9c3fc772 renamed the defines for EAP
server, but did not update the eap_example Makefile to match. This
broke the server side of the EAP example (no methods were actually
enabled).

12 years agoFix EAP-TNC peer memory leak on an error path
Ryuji [Tue, 30 Jun 2009 16:39:13 +0000 (19:39 +0300)]
Fix EAP-TNC peer memory leak on an error path

12 years agoAdd root .gitignore file to cleanup ignore lists
Jouni Malinen [Mon, 29 Jun 2009 18:47:19 +0000 (21:47 +0300)]
Add root .gitignore file to cleanup ignore lists

This removes need for local configuration to ignore *.o and *~
and allows the src/*/.gitignore files to be removed (subdirectories
will inherit the rules from the root .gitignore).

12 years agoEAP-SIM peer: Remove AT_NOTIFICATION from Notification response
Jouni Malinen [Mon, 29 Jun 2009 18:42:29 +0000 (21:42 +0300)]
EAP-SIM peer: Remove AT_NOTIFICATION from Notification response

This attribute is not supposed to be used in the response frame (i.e.,
it is only in the EAP-Request/SIM-Notification frame) per RFC 4186
chapters 10.1 and 9.9. This is a minor bug since the server is required
to ignore the contents of the EAP-Response/SIM-Notification during
protected result indication per chapter 6.2.

EAP-AKA peer was already following the similar specification in RFC 4187,
but this was somehow missed in the EAP-SIM peer implementation.

12 years agoRename variable to avoid gcc warning about shadowed names
Jouni Malinen [Mon, 29 Jun 2009 18:26:48 +0000 (21:26 +0300)]
Rename variable to avoid gcc warning about shadowed names

12 years agoAdd generic infrastructure for Probe Request callbacks
Jouni Malinen [Fri, 12 Jun 2009 15:13:40 +0000 (18:13 +0300)]
Add generic infrastructure for Probe Request callbacks

Instead of calling specific Probe Request handler functions, use a
generic mechanism that allows multiple callback functions to be
registered for getting notification on receive Probe Request frames.

12 years agoReplace hostapd_wps_probe_req_rx() with more generic ProbeReq notifier
Jouni Malinen [Fri, 12 Jun 2009 14:31:43 +0000 (17:31 +0300)]
Replace hostapd_wps_probe_req_rx() with more generic ProbeReq notifier

The driver wrappers should not need to include wps_hostapd.h, so let's
make this easier by introducing a driver callback for reporting Probe
Request frames.

12 years agoX.509: Add parsing of alternative name to internal TLS implementation
Jouni Malinen [Thu, 11 Jun 2009 20:47:35 +0000 (23:47 +0300)]
X.509: Add parsing of alternative name to internal TLS implementation

The alternative name extensions are now parsed, but the actual values
are not yet used for alt. subject name matching.

12 years agoWPS: Change wpa_supplicant wps_reg to not send out M8
Jouni Malinen [Wed, 10 Jun 2009 12:53:35 +0000 (15:53 +0300)]
WPS: Change wpa_supplicant wps_reg to not send out M8

Since we do not currently support changing the AP settings received
from M7, there is no point in actually sending out the M8 that would
likely trigger the AP to reconfigure itself and potentially reboot.
For now, we just receive the AP settings in M7 and add a local network
configuration block based on those, but NACK the message. This makes
wps_reg work like wps_pin, but by using the AP PIN instead of a client
PIN.

12 years agodriver_bsd.c: Use new MLME method of association.
Roy Marples [Fri, 29 May 2009 19:41:43 +0000 (22:41 +0300)]
driver_bsd.c: Use new MLME method of association.

Old way does not work with all drivers on NetBSD and FreeBSD are
also using this so should be a safe change. [Bug 312]

Signed-off-by: Roy Marples <roy@marples.name>

12 years agodriver_bsd.c: Reduce code duplication between hostapd and wpa_supplicant
Roy Marples [Fri, 29 May 2009 19:38:55 +0000 (22:38 +0300)]
driver_bsd.c: Reduce code duplication between hostapd and wpa_supplicant

Add generic functions to get/set 80211 vars, set 80211 params and
get/sid ssid.
Change NetBSD defines to match the ioctl used for portability.
Check size we're copying into instead of assuming IFNAMSIZ.

Signed-off-by: Roy Marples <roy@marples.name>

12 years agoComment out unused functions if IEEE8021X_EAPOL is not defined
Jouni Malinen [Fri, 29 May 2009 19:35:31 +0000 (22:35 +0300)]
Comment out unused functions if IEEE8021X_EAPOL is not defined

12 years agohostapd: EAP-AKA' needs SHA256
Jouni Malinen [Fri, 29 May 2009 19:35:08 +0000 (22:35 +0300)]
hostapd: EAP-AKA' needs SHA256

12 years agobsd: Get rid of printf size_t warnings with 64-bit builds
Jouni Malinen [Fri, 29 May 2009 19:34:07 +0000 (22:34 +0300)]
bsd: Get rid of printf size_t warnings with 64-bit builds

12 years agohostapd: nl80211 retry creating a interface if it fails the first time
Karl Hiramoto [Fri, 29 May 2009 18:48:19 +0000 (21:48 +0300)]
hostapd: nl80211 retry creating a interface if it fails the first time

If hostapd segfaults, or is killed with -9, or the interface already exists,
when the interface is created, it will fail.

Configuration file: /tmp/hostapd/hostapd.conf
Failed to create interface mon.wlan0_0.
Using interface wlan0_0 with hwaddr 00:13:01:01:08:0a and ssid 'IG_0405_LAN'
Failed to set beacon head/tail or DTIM period
Failed to create interface wlan0_1.

Try to remove the interface and re-create it before aborting.

12 years agoFix STA flag setting for auto-authorization if 802.1X/WPA is not used
Jouni Malinen [Thu, 28 May 2009 14:37:47 +0000 (17:37 +0300)]
Fix STA flag setting for auto-authorization if 802.1X/WPA is not used

The authorized flag needs to be added to the set_flags mask to fix
the flags_or/_and values that are now used with the new nl80211
attribute.

12 years agodbus: add 'scanning' property
Dan Williams [Wed, 27 May 2009 18:06:40 +0000 (21:06 +0300)]
dbus: add 'scanning' property

When the supplicant is connected and performs a scan, it doesn't enter
WPA_SCANNING state for various reasons.  However, external programs
still need to know that the supplicant is scanning since they may not
wish to perform certain operations during a scan (as those operations
will likely fail or yield incorrect results).  Add a 'scanning' property
and signal to the supplicant dbus interface to allow clients to
synchronize better with the supplicant when it scans.

Signed-off-by: Dan Williams <dcbw@redhat.com>

12 years agowext: disconnect at init and deinit
Dan Williams [Wed, 27 May 2009 18:01:26 +0000 (21:01 +0300)]
wext: disconnect at init and deinit

To ensure the supplicant starts and ends with a clean slate (keys are
already cleaned up at init and deinit time), force a null BSSID and
bogus SSID to ensure the driver isn't connected to anything.

Signed-off-by: Dan Williams <dcbw@redhat.com>

12 years agowext: Fix deauthentication to do IW_MLME_DEAUTH prior to disconnect
Dan Williams [Wed, 27 May 2009 17:57:29 +0000 (20:57 +0300)]
wext: Fix deauthentication to do IW_MLME_DEAUTH prior to disconnect

4853d5ac847efbfe54b80eeefabc2932696414c9 had a small bug in the order
of these function calls in _wext_deauthenticate() (_disassociate()
did have the correct order). The deauthentication frame is supposed
to go out (if driver supports that) before we disconnect more
forcefully.

12 years agowext: don't force-disconnect in ad-hoc mode
Dan Williams [Wed, 27 May 2009 17:55:15 +0000 (20:55 +0300)]
wext: don't force-disconnect in ad-hoc mode

Otherwise the driver might interpret the request as a request to
create/join a new adhoc network with the bogus SSID.

Signed-off-by: Dan Williams <dcbw@redhat.com>

12 years agohostapd: Require EAPOL-Key type to match with selected protocol
Jouni Malinen [Wed, 27 May 2009 06:52:24 +0000 (09:52 +0300)]
hostapd: Require EAPOL-Key type to match with selected protocol

Previously, we would have allowed both the WPA and RSN EAPOL-Key
types to be used regardless of whether the association is using
WPA or RSN/WPA2. This shouldn't result in any significant problems
on the Authenticator side, but anyway, we should check the type and
ignore the EAPOL-Key frames that used unexpected type.

12 years agoWPS: Add support for setting timeout for PIN
Jouni Malinen [Tue, 26 May 2009 14:44:44 +0000 (17:44 +0300)]
WPS: Add support for setting timeout for PIN

hostapd_cli wps_pin command can now have an optional timeout
parameter that sets the PIN lifetime in seconds. This can be used
to reduce the likelihood of someone else using the PIN should an
active PIN be left in the Registrar.

12 years agohostapd: Fix internal crypto build without TLS
Jouni Malinen [Tue, 26 May 2009 14:09:04 +0000 (17:09 +0300)]
hostapd: Fix internal crypto build without TLS

12 years agohostapd: Fix non-802.11w build
Jouni Malinen [Tue, 26 May 2009 14:08:43 +0000 (17:08 +0300)]
hostapd: Fix non-802.11w build

12 years agoResolve couple of compiler warnings
Jouni Malinen [Tue, 26 May 2009 14:08:16 +0000 (17:08 +0300)]
Resolve couple of compiler warnings

12 years agodriver_bsd.c: use get_scan_results2
Masashi Honma [Thu, 21 May 2009 08:34:54 +0000 (11:34 +0300)]
driver_bsd.c: use get_scan_results2

The attached patch will replace get_scan_results with get_scan_results2.
This is a preparation for WPS on BSD.
And I erased "wpa_scan_result_compar". Because scan result
sorting will be done with "wpa_scan_result_compar" on
"scan_helpers.c".

I have done below tests on NetBSD with an atheros card.
- WPA2-PSK(CCMP)
- WPA-PSK(TKIP)
- PEAP(MSCHAPv2)
- EAP-TLS
- EAP-TTLS(MSCHAPv2)

12 years agoFix hostapd and wpa_supplicant comipilation on NetBSD 4.0.1
Masashi Honma [Thu, 21 May 2009 08:21:09 +0000 (11:21 +0300)]
Fix hostapd and wpa_supplicant comipilation on NetBSD 4.0.1

12 years agonl80211: Add support for IEEE 802.1X port control in station mode
Jouni Malinen [Thu, 14 May 2009 18:54:47 +0000 (21:54 +0300)]
nl80211: Add support for IEEE 802.1X port control in station mode

This adds a cleaner mechanism for protecting against unauthorized
data frames than the previously used drop_unencrypted mechanism
(which is not even available with nl80211 and had to use a WEXT
ioctl.

The old drop_unencrypted code is left in for now as the final
surviving WEXT use in driver_nl80211.c. However, it can be removed
from the build by defining NO_WEXT. It may also be removed
eventually when most users are expected to be using recent enough
kernel version.

12 years agonl80211: Add support for NL80211_ATTR_STA_FLAGS2
Jouni Malinen [Thu, 14 May 2009 18:53:21 +0000 (21:53 +0300)]
nl80211: Add support for NL80211_ATTR_STA_FLAGS2

For now, the old code using NL80211_ATTR_STA_FLAGS is left in for
backwards compatibility with older kernel versions. It may be removed
eventually when most users are expected to be running with new
enough kernel version.

12 years agoSync with linux/nl80211.h from wireless-testing.git
Jouni Malinen [Thu, 14 May 2009 18:51:59 +0000 (21:51 +0300)]
Sync with linux/nl80211.h from wireless-testing.git

12 years agonl80211: Add MFP flag configuration for station mode
Jouni Malinen [Tue, 12 May 2009 08:55:18 +0000 (11:55 +0300)]
nl80211: Add MFP flag configuration for station mode

This fixes IEEE 802.11w use with driver_nl80211.c in station mode.

12 years agoFix WMM and MFP STA flag setting with flags_or/flags_and
Jouni Malinen [Mon, 11 May 2009 10:49:57 +0000 (13:49 +0300)]
Fix WMM and MFP STA flag setting with flags_or/flags_and

These were included correctly in total_flags, but not in
flags_or/flags_and.

12 years agoDrop unprotected Robust Action frames from MFP STAs
Jouni Malinen [Fri, 8 May 2009 09:51:28 +0000 (12:51 +0300)]
Drop unprotected Robust Action frames from MFP STAs

These frames are delivered through mac80211 monitor interface, so we
need to filter them out in hostapd.

12 years agohwsim_test: Tool for testing data connectivity with mac80211_hwsim
Jouni Malinen [Thu, 7 May 2009 14:59:53 +0000 (17:59 +0300)]
hwsim_test: Tool for testing data connectivity with mac80211_hwsim

This program can be used to verify that both unicast and broadcast
data frames can be transmitted successfully through mac80211_hwsim
interfaces.

12 years agoAdd more debugging details for SA Query processing
Jouni Malinen [Wed, 6 May 2009 16:04:01 +0000 (19:04 +0300)]
Add more debugging details for SA Query processing

12 years agoUpdate SA Query transaction id length based on IEEE 802.11w/D8.0
Jouni Malinen [Wed, 6 May 2009 15:57:17 +0000 (18:57 +0300)]
Update SA Query transaction id length based on IEEE 802.11w/D8.0

IEEE 802.11w/D8.0 changed the length of the SA Query transaction
identifier from 16 to 2 octets.

12 years agoReject hostapd configuration without channel for nl80211 drivers
Jouni Malinen [Wed, 6 May 2009 13:07:43 +0000 (16:07 +0300)]
Reject hostapd configuration without channel for nl80211 drivers

We could use auto-channel selection here eventually, but for now,
reject the configuration since it is not going to work correctly
(Beacon and Probe Response frames use incorrect value  in DS Params).

12 years agoWPS methods exported over DBus
Jaime Soriano Pastor [Wed, 6 May 2009 10:23:41 +0000 (13:23 +0300)]
WPS methods exported over DBus

I've exported the methods wpsPbc, wpsReg and wpsPin (patch attached),
so wpa_supplicant should be able to connect with WPS using the dbus
interface. I couldn't test it well because the problem seems to be in
my wireless card, a Broadcom BCM4328. At least it seems to do the same
using both interfaces. With ndiswrapper driver the "wpsie" entry
(thanks Dan!) didn't appear, and with the Broadcom wl driver it
appears but I cannot associate using WPS.

12 years agowpa_supplicant: add DBus method for changing debug parameters
Helmut Schaa [Wed, 6 May 2009 08:54:00 +0000 (11:54 +0300)]
wpa_supplicant: add DBus method for changing debug parameters

Add a new DBus method "setDebugParams" which takes the parameters
debug_level, debug_timestamp and show_keys as input and updates the
internal debug variables accordingly.

To change the debug level, enable/disable timestamps and enable/disable
show_keys the following dbus-send command can be used:

dbus-send --system --dest=fi.epitest.hostap.WPASupplicant --print-reply
/fi/epitest/hostap/WPASupplicant fi.epitest.hostap.WPASupplicant.setDebugParams
int32:0 boolean:false boolean:false

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>

12 years agoAdd code to re-use an existing ctrl_iface socket file
Jouni Malinen [Wed, 6 May 2009 08:31:45 +0000 (11:31 +0300)]
Add code to re-use an existing ctrl_iface socket file

Port the code from wpa_supplicant to re-use an existing ctrl_iface
socket file if the file does not seem to be in use. This allows
hostapd to recover from unclean shutdown of the control interface.

12 years agoWPS: Add a workaround for auth/encr type flags mismatches
Jouni Malinen [Wed, 6 May 2009 07:56:18 +0000 (10:56 +0300)]
WPS: Add a workaround for auth/encr type flags mismatches

Some deployed implementations seem to advertise incorrect information
in this attribute. For example, Linksys WRT350N seems to have a
byteorder bug that breaks this negotiation. In order to interoperate
with existing implementations, assume that the Enrollee supports
everything we do.

12 years agoGeneral revision of RoboSwitch driver
Jouke Witteveen [Sun, 26 Apr 2009 18:25:48 +0000 (21:25 +0300)]
General revision of RoboSwitch driver

Attached is a patch for the RoboSwitch driver in trunk. It is a
general revision of the source code.

Changes:
- Improved IEEE 802.1X conformance ([1])
- Better conformity to Broadcom specifications
- Fixed compatibility with different chipset revisions

It is worth noting that performance may drop a little using the new
driver. This can be overcome by using "multicast_only=1" as a
parameter. In that case only packets to the PAE group address are
regarded, as the previous revision of the driver did. A more detailed
description of the parameter and it's consequences is available at [2]
(summary: use "multicast_only=1" whenever possible).

[1] http://lists.shmoo.com/pipermail/hostap/2009-February/019398.html
[2] http://forum.openwrt.org/viewtopic.php?id=19873

12 years agoAdd handling of SME auth/assoc timeout events
Jouni Malinen [Thu, 23 Apr 2009 21:08:24 +0000 (00:08 +0300)]
Add handling of SME auth/assoc timeout events

This allows wpa_supplicant to start searching for other APs (or re-try)
if the MLME times out.

12 years agoRemove unused set_broadcast_ssid() driver op
Jouni Malinen [Wed, 22 Apr 2009 13:15:24 +0000 (16:15 +0300)]
Remove unused set_broadcast_ssid() driver op

None of the driver wrappers user this. hostapd-controlled broadcast SSID
hiding can only be used with drivers that use hostapd for handling
Beacon and Probe Request/Response frames.

12 years agoRemove the unused set_ieee80211d driver op
Jouni Malinen [Wed, 22 Apr 2009 13:11:22 +0000 (16:11 +0300)]
Remove the unused set_ieee80211d driver op

None of the driver wrappers use this. Only the drivers that use hostapd
for Beacon and Probe Request/Response handling can now use IEEE 802.11d
properly.

12 years agoAdd new wpa_supplicant driver op for setting 802.1X port status
Jouni Malinen [Wed, 22 Apr 2009 13:01:37 +0000 (16:01 +0300)]
Add new wpa_supplicant driver op for setting 802.1X port status

This can be used with drivers that implement PAE to control whether
normal data frames (non-EAPOL) are allowed.

12 years agoMove default_wep_key variable into EAPOL authenticator data
Jouni Malinen [Wed, 22 Apr 2009 12:27:51 +0000 (15:27 +0300)]
Move default_wep_key variable into EAPOL authenticator data

With this change, eapol_sm.c does not need to dereference main hostapd
structures anymore (i.e., hostapd.h is not needed to be included).

12 years agonl80211: Replace WEXT code for RTS/fragmentation threshold
Jouni Malinen [Tue, 21 Apr 2009 15:11:07 +0000 (18:11 +0300)]
nl80211: Replace WEXT code for RTS/fragmentation threshold

nl80211 has new attributes for setting RTS and fragmentation threshold
values. Use these instead of the old WEXT ioctls.

12 years agoRemove unused set_retry() driver op
Jouni Malinen [Tue, 21 Apr 2009 15:01:43 +0000 (18:01 +0300)]
Remove unused set_retry() driver op

12 years agonl80211: Sync with linux/nl80211.h from wireless-testing.git
Jouni Malinen [Tue, 21 Apr 2009 14:54:50 +0000 (17:54 +0300)]
nl80211: Sync with linux/nl80211.h from wireless-testing.git

Note: This changes values for existing NL80211_ATTR_MAX_SCAN_IE_LEN
and NL80211_ATTR_KEY_TYPE (for some reason, they ended up getting
swapped in wireless-testing.git) and as such, could break Michael
MIC  error reporting (well, at least partially).

12 years agowpa_supplicant AP: Add preliminary support for WPS Internal Registrar
Jouni Malinen [Tue, 21 Apr 2009 13:45:16 +0000 (16:45 +0300)]
wpa_supplicant AP: Add preliminary support for WPS Internal Registrar

When in AP mode, wpa_supplicant is now enabling WPS (only Internal
Registrar). wpa_cli wps_pbc and wps_pin commands can be used to initiate
WPS negotiation similarly to how this is done in station mode (though,
the BSSID parameter is ignored).

12 years agowpa_supplicant AP: Add sta_set_flags
Jouni Malinen [Mon, 20 Apr 2009 13:33:13 +0000 (16:33 +0300)]
wpa_supplicant AP: Add sta_set_flags

12 years agowpa_supplicant AP: Add EAPOL frame TX and RX
Jouni Malinen [Mon, 20 Apr 2009 13:27:45 +0000 (16:27 +0300)]
wpa_supplicant AP: Add EAPOL frame TX and RX

This allows WPA-Personal 4-way handshake to be completed successfully.

12 years agowpa_supplicant AP: Update WPA/RSN configuration
Jouni Malinen [Mon, 20 Apr 2009 13:11:08 +0000 (16:11 +0300)]
wpa_supplicant AP: Update WPA/RSN configuration

Couple of additional operations are needed to make hostapd configuration
valid for WPA.

12 years agonl80211: Mark state disassociated on local deauth/disassoc
Jouni Malinen [Mon, 20 Apr 2009 08:37:35 +0000 (11:37 +0300)]
nl80211: Mark state disassociated on local deauth/disassoc

12 years agoMake deauthentication and disassociation consistent
Jouni Malinen [Mon, 20 Apr 2009 08:36:47 +0000 (11:36 +0300)]
Make deauthentication and disassociation consistent

This fixes an issue where the station was not marked disassociated
properly with locally requested deauthentication.

12 years agoDisconnect if 4-way handshake processing fails
Jouni Malinen [Mon, 20 Apr 2009 08:35:21 +0000 (11:35 +0300)]
Disconnect if 4-way handshake processing fails

There is no point in trying to continue if a 4-way handshake frame is
discarded or if PTK/GTK/IGTK configuration fails. Force the client to
disconnect in such a case to avoid confusing user by claiming the
connection was successfully completed.

12 years agowpa_supplicant AP: add sta_add() and sta_remove()
Jouni Malinen [Fri, 17 Apr 2009 17:09:20 +0000 (20:09 +0300)]
wpa_supplicant AP: add sta_add() and sta_remove()

12 years agowpa_supplicant AP: Fix build after hostapd driver_ops changes
Jouni Malinen [Fri, 17 Apr 2009 13:41:53 +0000 (16:41 +0300)]
wpa_supplicant AP: Fix build after hostapd driver_ops changes

12 years agonl80211: Add/remove monitor interface dynamically based on mode
Jouni Malinen [Fri, 17 Apr 2009 13:27:38 +0000 (16:27 +0300)]
nl80211: Add/remove monitor interface dynamically based on mode

12 years agonl80211: Delete Beacon information on deinit in wpa_supplicant AP mode
Jouni Malinen [Fri, 17 Apr 2009 13:06:12 +0000 (16:06 +0300)]
nl80211: Delete Beacon information on deinit in wpa_supplicant AP mode

12 years agoUse C99 designated initializers to cleanup driver_ops setup
Jouni Malinen [Fri, 17 Apr 2009 12:58:34 +0000 (15:58 +0300)]
Use C99 designated initializers to cleanup driver_ops setup

These driver wrappers use UNIX domain sockets and as such, won't be
built with Microsoft compiler. Consequently, use of C99-style designated
initializers can be used to make these files easier to maintain. Only
driver_ndis.c needs to support the old C89-style due to Microsoft
compiler not supporting newer C standard.

12 years agohostapd: Remove unused passive scan functionality
Jouni Malinen [Fri, 17 Apr 2009 12:47:37 +0000 (15:47 +0300)]
hostapd: Remove unused passive scan functionality

This was not really supported by any of the included driver wrappers. If
this functionality is desired in the future, this (or something similar)
can be added with the changes needed into a driver wrapper to use the
mechanism.

12 years agonl80211: Use ifndef hostapd to reduce binary size
Jouni Malinen [Fri, 17 Apr 2009 12:36:06 +0000 (15:36 +0300)]
nl80211: Use ifndef hostapd to reduce binary size

Number of areas are not used by hostapd, so remove them from the build.

12 years agonl80211: Fix secondary BSS ifindex
Jouni Malinen [Fri, 17 Apr 2009 10:33:30 +0000 (13:33 +0300)]
nl80211: Fix secondary BSS ifindex

This was broken by a cleanup patch that moved from ifname to ifindex.

12 years agoMove more multi-BSSID processing into drv_callbacks.c
Jouni Malinen [Fri, 17 Apr 2009 10:29:29 +0000 (13:29 +0300)]
Move more multi-BSSID processing into drv_callbacks.c

This simplifies driver wrapper operations and removes last direct
struct hostapd_data dereferences from driver_nl80211.c. In addition,
some of the TX callbacks are now fixed for secondary BSSes.

12 years agoProvide own_addr buffer in hapd_init() parameters
Jouni Malinen [Fri, 17 Apr 2009 08:55:51 +0000 (11:55 +0300)]
Provide own_addr buffer in hapd_init() parameters

This reduces number of places in driver wrapper that would need to
dereference struct hostapd_data pointer directly.

12 years agoAdd own_addr as a parameter to sta_deauth() and sta_disassoc()
Jouni Malinen [Fri, 17 Apr 2009 08:37:22 +0000 (11:37 +0300)]
Add own_addr as a parameter to sta_deauth() and sta_disassoc()

This fixes deauth/disassoc frames in secondary BSSes when using
multi-BSSID. In addition, it reduces need to dereference
struct hostapd_data inside driver wrappers.

12 years agonl80211: Fix wpa_supplicant build
Jouni Malinen [Fri, 17 Apr 2009 08:23:24 +0000 (11:23 +0300)]
nl80211: Fix wpa_supplicant build

12 years agonl80211: Add helper functions for SIOC{G,S}IFHWADDR
Jouni Malinen [Fri, 17 Apr 2009 08:22:16 +0000 (11:22 +0300)]
nl80211: Add helper functions for SIOC{G,S}IFHWADDR

12 years agoRemove dead code related to WDS setup
Jouni Malinen [Thu, 16 Apr 2009 16:08:58 +0000 (19:08 +0300)]
Remove dead code related to WDS setup

hostapd does not have any code that would actually call this, so there
is no current need to try to figure out how to set up WDS links with
nl80211.

12 years agonl80211: Share more of init/deinit code
Jouni Malinen [Thu, 16 Apr 2009 14:16:41 +0000 (17:16 +0300)]
nl80211: Share more of init/deinit code

12 years agonl80211: Make it possible to build without WEXT support
Jouni Malinen [Thu, 16 Apr 2009 13:36:03 +0000 (16:36 +0300)]
nl80211: Make it possible to build without WEXT support

NO_WEXT can be defined to disable all remaining WEXT uses from
driver_nl80211.c. This breaks some functionality, so the code is still
in use by default. Anyway, the new #ifdef blocks make it easy to search
for areas that need to be converted to nl80211.

12 years agoClean up HT40 scan and share nl80211 scanning code
Jouni Malinen [Thu, 16 Apr 2009 13:22:40 +0000 (16:22 +0300)]
Clean up HT40 scan and share nl80211 scanning code

Instead of adding a new driver_ops for fetching neighbor BSS data (that
nl80211 driver interface had to scan during initialization), share the
same scan operations that wpa_supplicant is using. This gets rid of
duplicated scan code in driver_nl80211.c (and better yet, removes large
part of old WEXT code).

hostapd interface initialization is now completed in a callback, if
needed, i.e., he_features channel/hw_mode selection can use as much time
as needed. This can also help with radar detection in the future.

12 years agoFix small HTTP processing issues
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.

12 years agonl80211: Use shared code for netlink initialization
Jouni Malinen [Tue, 14 Apr 2009 12:52:05 +0000 (15:52 +0300)]
nl80211: Use shared code for netlink initialization

12 years agonl80211: Merge handle_frame() implementations
Jouni Malinen [Tue, 14 Apr 2009 12:35:03 +0000 (15:35 +0300)]
nl80211: Merge handle_frame() implementations

12 years agonl82011: Use common code for setting channel
Jouni Malinen [Tue, 14 Apr 2009 12:15:33 +0000 (15:15 +0300)]
nl82011: Use common code for setting channel

12 years agonl80211: Remove inclusion of unneeded header files
Jouni Malinen [Tue, 14 Apr 2009 12:03:07 +0000 (15:03 +0300)]
nl80211: Remove inclusion of unneeded header files

12 years agonl80211: Fix management frame sending after driver_ops cleanup
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]

12 years agowpa_supplicant AP: Fix hw_mode for 5 GHz channels
Jouni Malinen [Sun, 12 Apr 2009 09:10:08 +0000 (12:10 +0300)]
wpa_supplicant AP: Fix hw_mode for 5 GHz channels

12 years agoShare driver beacon configuration handlers
Jouni Malinen [Thu, 9 Apr 2009 20:44:39 +0000 (23:44 +0300)]
Share driver beacon configuration handlers

12 years agoMerge hostapd driver init functions into one
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.

12 years agoRemove unneeded inclusion of hostapd header files
Jouni Malinen [Thu, 9 Apr 2009 17:53:29 +0000 (20:53 +0300)]
Remove unneeded inclusion of hostapd header files

12 years agonl80211: Share common interface processing code
Jouni Malinen [Thu, 9 Apr 2009 17:41:21 +0000 (20:41 +0300)]
nl80211: Share common interface processing code

12 years agonl80211: Share monitor mode filtering and reading functions
Jouni Malinen [Thu, 9 Apr 2009 17:20:21 +0000 (20:20 +0300)]
nl80211: Share monitor mode filtering and reading functions

12 years agoShare same set_country driver op for hostapd and wpa_supplicant
Jouni Malinen [Thu, 9 Apr 2009 17:01:25 +0000 (20:01 +0300)]
Share same set_country driver op for hostapd and wpa_supplicant

12 years agoShare management frame send 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.

12 years agoRemove flags parameter from send_mgmt_frame() driver op
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.

12 years agonl80211: Replace hostapd WEXT events with nl80211 events
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.

12 years agonl80211: Add Michael MIC failure event processing for wpa_supplicant
Jouni Malinen [Thu, 9 Apr 2009 13:50:48 +0000 (16:50 +0300)]
nl80211: Add Michael MIC failure event processing for wpa_supplicant

12 years agoSync linux/nl80211.h with wireless-testing.git
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.

12 years agonl80211: Merge hostapd and wpa_supplicant key configuration
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.

12 years agonl80211: Fix channel 14 use
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]

12 years agoUse common get_hw_feature_data for hostapd and wpa_supplicant
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.

12 years agoMerge wpa_supplicant and hostapd driver wrapper implementations
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.

12 years agoFix couple of forgotten wpa_hw_modes -> hostapd_hw_modes
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.