Commit graph

78 commits

Author SHA1 Message Date
Jouni Malinen ca806fb540 P2P: Indicate WPS events from AP mode only during group formation
The duplicated WPS event in the parent interface should only be used
during P2P group formation, i.e., when the WPS operation was actually
started using the parent interface. When authorizing a client to
connect to an already running group, the WPS command is issued on
the group interface and there is no need to duplicate the event to
the parent interface.
2010-11-18 12:42:02 +02:00
Jouni Malinen 9dd7d6b09c WPS: Add special AP Setup Locked mode to allow read only ER
ap_setup_locked=2 can now be used to enable a special mode where
WPS ER can learn the current AP settings, but cannot change then.
In other words, the protocol is allowed to continue past M2, but
is stopped at M7 when AP is in this mode. WPS IE does not
advertise AP Setup Locked in this case to avoid interoperability
issues.

In wpa_supplicant, use ap_setup_locked=2 by default. Since the AP PIN
is disabled by default, this does not enable any new functionality
automatically. To allow the read-only ER to go through the protocol,
wps_ap_pin command needs to be used to enable the AP PIN.
2010-11-17 16:48:39 +02:00
Jouni Malinen 70d84f11fe WPS: Add wps_ap_pin ctrl_iface command for wpa_supplicant AP mode
This can be used to control the AP PIN in wpa_supplicant AP mode
in the same way as the identical command in hostapd ctrl_iface.
2010-11-17 16:46:55 +02:00
Jouni Malinen de979d8fc7 Fix max_stations to apply to associated STAs, not P2P peers
This driver capability limit was supposed to indicate limit on
how many stations can associate with us in the AP mode, not how
many P2P peers are stored in the peer table.
2010-10-19 17:17:04 +03:00
Jouni Malinen dae608d5d3 Add max_num_sta config option for wpa_supplicant AP mode
This can be used to limit the number of stations allowed to be
connected to the AP.
2010-10-19 17:08:20 +03:00
Anil Gathala Sudha a0dee79709 P2P: Send AP mode WPS-FAIL event to parent interface
The AP operation with wpa_supplicant requires an additional callback
to get the needed event information from hostapd side so that
wpa_msg() can be called for wpa_s->parent if needed.
2010-10-14 20:57:00 +03:00
Sudhakar Swaminathan 0f66abd25b P2P: Add option for disabling intra BSS distribution
p2p_intra_bss configuration parameter can now be used to
disable/enable intra BSS distribution (bridging of frames between
the clients in a group).
2010-09-10 10:30:26 -07:00
Ardong Chen 2f9929ffcc WPS: Allow pending WPS operation to be cancelled
A new ctrl_interface command, WPS_CANCEL, can now be used to cancel
a pending or ongoing WPS operation. For now, this is only available
with wpa_supplicant (either in station or AP mode). Similar
functionality should be added for hostapd, too.
2010-09-10 10:30:25 -07:00
Jouni Malinen 56815b2b7d Copy WPS strings into AP configuration when using wpa_supplicant AP 2010-09-09 07:17:21 -07:00
Jouni Malinen 0e14267a31 P2P: Avoid segfault on AP deinit after failed AP start 2010-09-09 07:17:21 -07:00
Jouni Malinen f80a2237ca Fix AP mode wps_pin command to return the entered PIN
This command is supposed to return the PIN value that was generated
or passed in as an argument. In the AP case, the entered PIN was not
being returned.
2010-09-09 07:17:21 -07:00
Jouni Malinen eea2fd9eff P2P: Add mechanism for configuring UAPSD parameters for group
This is needed to be able to change parameters for dynamically
created interfaces between the creation of the interface and
association/start AP commands.

Following ctrl_interface commands can now be used:

P2P_SET client_apsd disable
- disable configuration (i.e., use driver default) in client mode

P2P_SET client_apsd <BE>,<BK>,<VI>,<VO>;<max SP Length>
- enable UASPD with specific trigger configuration (0/1) per AC
  (max SP Length is currently ignored)

P2P_SET go_apsd disable
- disable configuration (i.e., use driver default) in AP mode

P2P_SET go_apsd <0/1>
- disable/enable APSD in AP mode
2010-09-09 07:17:21 -07:00
Jouni Malinen d9d6a58c8f P2P: Fix invitation to active group to use correct operating channel
Invitation Request must use the current operating frequency of the
group, not the default operating channel.
2010-09-09 07:17:20 -07:00
Jouni Malinen 6e3f4b89ea P2P: Let the driver wrapper know if association is for P2P group 2010-09-09 07:17:17 -07:00
Jouni Malinen e44f8bf20a P2P: Add P2P configuration and callbacks in hostapd code 2010-09-09 07:17:17 -07:00
Jouni Malinen b22128efdc P2P: Add initial version of P2P Module 2010-09-09 07:17:17 -07:00
Jouni Malinen 4c2c302893 P2P: Remove 802.11b rates from wpa_supplicant AP mode operations
TODO: do this only for P2P group interface
2010-09-09 07:17:17 -07:00
Jouni Malinen 2c5d725c65 P2P: Add dynamic network config block parameters for P2P 2010-09-09 07:17:16 -07:00
Jouni Malinen 31fcea931d WPS 2.0: Add support for AuthorizedMACs attribute
Advertize list of authorized enrollee MAC addresses in Beacon and
Probe Response frames and use these when selecting the AP. In order
to provide the list, the enrollee MAC address should be specified
whenever adding a new PIN. In addition, add UUID-R into
SetSelectedRegistrar action to make it potentially easier for an AP
to figure out which ER sent the action should there be multiple ERs
using the same IP address.
2010-09-09 06:07:47 -07:00
Jouni Malinen c706d5aa17 Add wpa_supplicant AP mode events for Public Action frames 2010-04-11 20:33:33 +03:00
Jouni Malinen f90ceeaabf wpa_supplicant AP mode: Add function for enabling MAC address filtering
This can be used to allow only a specific station to associate.
2010-04-11 20:08:00 +03:00
Jouni Malinen 48b357a989 Make sure AP interface is initialize before accepting WPS commands 2010-04-11 20:06:12 +03:00
Jouni Malinen 7a649c7dda wpa_supplicant AP: More thorough AP mode deinit 2010-04-11 20:03:39 +03:00
Jouni Malinen 508545f3a9 Add more wpa_supplicant AP mode parameters for the driver wrapper
This makes it easier to configure AP mode for drivers that take care
of WPA/RSN IE generation.
2010-04-11 20:02:01 +03:00
Jouni Malinen 4b768ed0b2 Add registerable callback for wpa_supplicant AP mode completion 2010-04-11 19:59:33 +03:00
Jouni Malinen a8e0505bf0 Use driver event, EVENT_EAPOL_RX, for EAPOL frame indication 2010-01-03 17:44:40 +02:00
Jouni Malinen fdbe50ed98 Fix CONFIG_AP=y build after driver API changes 2010-01-03 13:05:54 +02:00
Jouni Malinen 2a8b74163e Move struct hostapd_frame_info definition away from driver API
This is internal data structure for hostapd/AP functionality and does
not need to be defined in driver.h.
2010-01-03 12:37:02 +02:00
Jouni Malinen d7dcba70bc Define struct wpa_ssid::mode as an enum with more readable values 2009-12-28 16:00:36 +02:00
Jouni Malinen 58c26600ca Fix wpa_supplicant build with CONFIG_AP=y 2009-12-27 21:33:18 +02:00
Jouni Malinen f7c4783379 Split hostapd_interface_deinit() into deinit and free parts
This allows the driver interface to be deinitialized before
struct hostapd_data instance gets freed. This needs to be done so
that the driver wrapper does not maintain a context pointer to
freed memory.
2009-12-27 21:31:13 +02:00
Jouni Malinen 6226e38d00 Rename some src/ap files to avoid duplicate file names
Doxygen and some build tools may get a bit confused about same file
name being used in different directories. Clean this up a bit by
renaming some of the duplicated file names in src/ap.
2009-12-26 00:05:40 +02:00
Jouni Malinen 1b56c26c40 Get rid of direct hostapd_for_each_interface() calls
src/ap/*.c must not call functions in hostapd or wpa_supplicant
directories directly, so avoid this by using a callback function
pointer.
2009-12-25 20:12:26 +02:00
Jouni Malinen 70db2ab308 Move rest of the generic AP mode functionality into src/ap 2009-12-25 20:06:07 +02:00
Jouni Malinen a911a6e61f Do not use virtual driver_ops for wpa_supplicant AP mode
Initialize struct hostapd_data driver context with the same driver
information that was initialized earlier during wpa_supplicant start.
This allows the AP mode operations to be completed directly with the
same calls in AP code without having to maintain a separate translation
layer between the AP and station mode driver context.
2009-12-25 19:47:08 +02:00
Jouni Malinen 8c5fe31fe8 Move driver deinitialization away from hostapd.c
This matches with the earlier change of moving driver initialization
and allows more control on how the driver context is managed.
2009-12-25 18:32:44 +02:00
Jouni Malinen 0e2d35c614 Move ctrl_iface_ap.c into src/ap 2009-12-25 12:25:55 +02:00
Jouni Malinen e5f2b59c7e Move hostapd driver initialization away from hostapd.c
This makes it easier to customize AP mode initialization for
wpa_supplicant.
2009-12-25 12:21:11 +02:00
Jouni Malinen 363b9e6052 Fix wpa_supplicant CONFIG_AP build 2009-12-25 12:06:53 +02:00
Jouni Malinen 1057d78eb8 Move generic AP functionality implementation into src/ap
This code can be shared by both hostapd and wpa_supplicant and this
is an initial step in getting the generic code moved to be under the
src directories. Couple of generic files still remain under the
hostapd directory due to direct dependencies to files there. Once the
dependencies have been removed, they will also be moved to the src/ap
directory to allow wpa_supplicant to be built without requiring anything
from the hostapd directory.
2009-12-25 01:12:50 +02:00
Felix Fietkau fbbfcbac29 hostapd: Add WDS (4-address frame) mode with per-station interfaces
This mode allows associated stations to use 4-address frames to allow
layer 2 bridging to be used. At least for the time being, this is only
supported with driver=nl80211.
2009-12-24 11:46:22 +02:00
Jouni Malinen 094393b144 Copy config_methods and device_type configuration for AP mode 2009-12-21 16:10:21 +02:00
Jouni Malinen 1078126f64 Add "keypad" to config methods for wpa_supplicant AP mode with WPS 2009-12-21 11:51:31 +02:00
Jouni Malinen 9969e5a46a Make hostapd_for_each_interface() take context pointer as argument
This removes need for using eloop_get_user_data().
2009-12-19 19:07:31 +02:00
Jouni Malinen b57e086cc1 Mark management frame processing functions to use const buffer 2009-12-13 23:25:30 +02:00
Jouni Malinen f8b1f69561 Use generic driver events for TX status and RX reporting
Replace driver wrapper calls to hostapd_tx_status(),
hostapd_rx_from_unknown_sta(), hostapd_mgmt_rx(), and
hostapd_mgmt_tx_cb() with new generic driver events
EVENT_TX_STATUS, EVENT_RX_FROM_UNKNOWN, and EVENT_RX_MGMT.

This cleans up lot of the driver wrapper code to be less dependent
on whether it is being used within wpa_supplicant AP mode or hostapd.
2009-12-13 23:05:39 +02:00
Jouni Malinen 331c12086f Fix CONFIG_AP=y build after driver_ops set_key merge 2009-11-23 17:15:45 +02:00
Jouni Malinen 5d67487244 Merge set_beacon driver_ops into a single one
Clean up driver interface by merging hostapd and wpa_supplicant
specific set_beacon driver_ops into a single one. In addition,
merge set_beacon_int into to the same operation.
2009-11-23 15:26:05 +02:00
Jouni Malinen 43fb529750 Add AP mode WPA status into ctrl_iface 2009-10-16 18:35:45 +03:00
Jouni Malinen 35deb646cc Fix CONFIG_AP=y build without CONFIG_CTRL_IFACE 2009-10-13 11:15:39 +03:00