Commit graph

11444 commits

Author SHA1 Message Date
Jouni Malinen
9351257cfb 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.
2009-04-22 16:11:22 +03:00
Jouni Malinen
4bc181ecc7 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.
2009-04-22 16:01:37 +03:00
Jouni Malinen
f55802e8bf 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).
2009-04-22 15:27:51 +03:00
Jouni Malinen
ad6494515e 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.
2009-04-21 18:11:07 +03:00
Jouni Malinen
30985b8600 Remove unused set_retry() driver op 2009-04-21 18:01:43 +03:00
Jouni Malinen
5645fbdc85 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).
2009-04-21 17:54:50 +03:00
Jouni Malinen
3ec97afe57 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).
2009-04-21 16:45:16 +03:00
Jouni Malinen
a8d6ffa48f wpa_supplicant AP: Add sta_set_flags 2009-04-20 16:33:13 +03:00
Jouni Malinen
db149ac949 wpa_supplicant AP: Add EAPOL frame TX and RX
This allows WPA-Personal 4-way handshake to be completed successfully.
2009-04-20 16:27:45 +03:00
Jouni Malinen
07d9a55297 wpa_supplicant AP: Update WPA/RSN configuration
Couple of additional operations are needed to make hostapd configuration
valid for WPA.
2009-04-20 16:11:08 +03:00
Jouni Malinen
13405f3542 nl80211: Mark state disassociated on local deauth/disassoc 2009-04-20 11:37:35 +03:00
Jouni Malinen
c3dc92e85f Make deauthentication and disassociation consistent
This fixes an issue where the station was not marked disassociated
properly with locally requested deauthentication.
2009-04-20 11:36:47 +03:00
Jouni Malinen
83935317a7 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.
2009-04-20 11:35:21 +03:00
Jouni Malinen
0f4e8b4f65 wpa_supplicant AP: add sta_add() and sta_remove() 2009-04-17 20:09:20 +03:00
Jouni Malinen
be301e56b6 wpa_supplicant AP: Fix build after hostapd driver_ops changes 2009-04-17 16:41:53 +03:00
Jouni Malinen
460456f832 nl80211: Add/remove monitor interface dynamically based on mode 2009-04-17 16:27:38 +03:00
Jouni Malinen
8a27af5c70 nl80211: Delete Beacon information on deinit in wpa_supplicant AP mode 2009-04-17 16:06:12 +03:00
Jouni Malinen
b08d177aad 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.
2009-04-17 15:58:34 +03:00
Jouni Malinen
61693eaa80 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.
2009-04-17 15:47:37 +03:00
Jouni Malinen
c811d5bc78 nl80211: Use ifndef hostapd to reduce binary size
Number of areas are not used by hostapd, so remove them from the build.
2009-04-17 15:36:06 +03:00
Jouni Malinen
6d550fbeea nl80211: Fix secondary BSS ifindex
This was broken by a cleanup patch that moved from ifname to ifindex.
2009-04-17 13:33:30 +03:00
Jouni Malinen
4b9841d34c 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.
2009-04-17 13:29:29 +03:00
Jouni Malinen
412036f5f0 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.
2009-04-17 11:55:51 +03:00
Jouni Malinen
731723a5bd 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.
2009-04-17 11:37:22 +03:00
Jouni Malinen
7af376e456 nl80211: Fix wpa_supplicant build 2009-04-17 11:23:24 +03:00
Jouni Malinen
41d931ee37 nl80211: Add helper functions for SIOC{G,S}IFHWADDR 2009-04-17 11:22:16 +03:00
Jouni Malinen
b8c4d6df5f 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.
2009-04-16 19:08:58 +03:00
Jouni Malinen
bbaf083777 nl80211: Share more of init/deinit code 2009-04-16 17:16:41 +03:00
Jouni Malinen
37b7d08204 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.
2009-04-16 16:36:03 +03:00
Jouni Malinen
ad1e68e6b5 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.
2009-04-16 16:22:40 +03:00
Jouni Malinen
814aaa844a Fix small HTTP processing issues
Parse "Transfer-Encoding: chunked" properly.
Get more data if read buffer is empty when starting to process the body.
2009-04-15 11:18:09 +03:00
Jouni Malinen
9fff9fdcf9 nl80211: Use shared code for netlink initialization 2009-04-14 15:52:05 +03:00
Jouni Malinen
7da3abe711 nl80211: Merge handle_frame() implementations 2009-04-14 15:35:03 +03:00
Jouni Malinen
f019981aee nl82011: Use common code for setting channel 2009-04-14 15:15:33 +03:00
Jouni Malinen
c720f2cd56 nl80211: Remove inclusion of unneeded header files 2009-04-14 15:03:07 +03:00
Jouni Malinen
071f8ac4df nl80211: Fix management frame sending after driver_ops cleanup
hostapd ended up with unregistered send_mlme() in commit
9f324b61ba. Fix this by registering the
handler both for wpa_supplicant-AP and hostapd use. [Bug 310]
2009-04-14 13:12:58 +03:00
Jouni Malinen
b615a25e4e wpa_supplicant AP: Fix hw_mode for 5 GHz channels 2009-04-12 12:10:08 +03:00
Jouni Malinen
b4fd6fab5b Share driver beacon configuration handlers 2009-04-09 23:44:39 +03:00
Jouni Malinen
92f475b4d8 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.
2009-04-09 23:28:21 +03:00
Jouni Malinen
989f52c639 Remove unneeded inclusion of hostapd header files 2009-04-09 20:53:29 +03:00
Jouni Malinen
2135f224db nl80211: Share common interface processing code 2009-04-09 20:41:21 +03:00
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