Commit graph

893 commits

Author SHA1 Message Date
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
3dfda83d9c P2P: Add Device Password ID to GO Neg Request RX event
This event indicates the Device Password ID that the peer tried
to use in GO Negotiation. For example:
P2P-GO-NEG-REQUEST 02:40:61:c2:f3:b7 dev_passwd_id=4
2010-09-09 07:17:20 -07:00
Jouni Malinen
4147a2cc64 P2P: Fix p2p_connect join with interface address
Need to fetch P2P Device Address from the peers table in case the
p2p_connect join command uses interface address.
2010-09-09 07:17:20 -07:00
Jouni Malinen
72044390f3 P2P: Add support for cross connection
If enabled, cross connection allows GO to forward IPv4 packets
using masquerading NAT from the P2P clients in the group to an
uplink WLAN connection. This is disabled by default and can be
enabled with "wpa_cli p2p_set cross_connect 1" on the P2P device
interface.
2010-09-09 07:17:20 -07:00
Jouni Malinen
aefb53bd5d P2P: Disable periodic NoA when non-P2P STA is connected
For now, this applies to the test command that can be used to set
periodic NoA (p2p_set noa). The value are stored and periodic NoA
is enabled whenever there are no non-P2P STAs connected to the GO.
2010-09-09 07:17:20 -07:00
Jouni Malinen
4c08c0bd57 P2P: Include P2P IE in (Re)AssocReq to infra AP if it uses P2P IE
While this is not strictly speaking required by the P2P specification
for a not-P2P Managed Device, this can provide useful information for
the P2P manager AP and may be needed to pass certification tests.
2010-09-09 07:17:20 -07:00
Jouni Malinen
43a3863516 Trigger scan on reload-config only if there are enabled networks 2010-09-09 07:17:20 -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
dcf788d1a4 WPS: Fix configuration strings on config reload
Previously, freed memory could be used as device name (and other similar
parameters) when building WPS IE after SIGHUP.
2010-09-09 07:17:20 -07:00
Jouni Malinen
af8ab1ae97 P2P: Use 'Enrollee info' WPS request type in P2P scans
This avoids setting explicit Request-to-Enrollee request when
WPS 2.0 is used.
2010-09-09 07:17:20 -07:00
Jouni Malinen
131cb37c2d P2P: Allow pre-authorization of invitation to apply to src addr
For client-invites-device case, the pre-authorization of an invitation
to running group will need to allow Invitation Request from specified
address, too. This is for testing uses only.
2010-09-09 07:17:19 -07:00
Jouni Malinen
6d4747a9a2 Add P2P Interface Address into ctrl_iface status output 2010-09-09 07:17:19 -07:00
Jouni Malinen
80c9582a5f P2P: Add test command for filtering which peers are discovered
"wpa_cli p2p_set peer_filter <MAC address>" can now be used to
only allow a single P2P Device (based on P2P Device Address) to be
discovered for testing. Setting the address to 00:00:00:00:00:00
disables the filter.
2010-09-09 07:17:19 -07:00
Jouni Malinen
6e6963ea86 P2P: Add test mode for SD to force fragmented response 2010-09-09 07:17:19 -07:00
Jouni Malinen
18708aadfc P2P: Initial support for SD fragmentation (GAS Comeback Request/Response) 2010-09-09 07:17:19 -07:00
Jouni Malinen
2a43101e48 P2P: Fix memory leak in SD service entries
Need to flush stored service entries when wpa_supplicant is being
terminated.
2010-09-09 07:17:19 -07:00
Jouni Malinen
bf608cad56 P2P: Rename SD info not available define to match with spec change 2010-09-09 07:17:19 -07:00
Jouni Malinen
706887fc28 P2P: Stop early when processing not-persistent invitation result 2010-09-09 07:17:19 -07:00
Jouni Malinen
2e062d5d74 P2P: Fix Group ID in Invitation Request from active GO
Need to get P2P Device Address, not the Interface Address.
2010-09-09 07:17:19 -07:00
Jouni Malinen
108def931e P2P: Add command for pre-authorizing an invitation to an active group
This is mainly designed for testing and allows p2p_connect join auth
to be used to accept a specific invitation to an active group that
may be received in the future.
2010-09-09 07:17:19 -07:00
Jouni Malinen
3c5126a41f P2P: Set Device Password ID in WPS M1/M2 per new rules
If the P2P client (WPS Enrollee) uses a PIN from the GO (Registrar),
Device Password ID in M1 & M2 is set to Registrar-specified.
2010-09-09 07:17:19 -07:00
Jouni Malinen
ef922c4a34 P2P: Run a scan before provision discovery in p2p_connect join
This is needed to make sure we have fresh BSS information for the GO.
2010-09-09 07:17:19 -07:00
Jouni Malinen
c381508d88 P2P: Implement power save configuration
wpa_cli p2p_set ps <0/1/2>
wpa_cli p2p_set oppps <0/1>
wpa_cli p2p_set ctwindow <0..> msec
2010-09-09 07:17:19 -07:00
Jouni Malinen
07a30a66c3 P2P: Do not schedule new remain-on-channel if waiting for drv event
The driver event for remain-on-channel may be delayed in a way that
allows management-frame-received event to be received before
wpa_supplicant knows that the driver is actually already on the
previously requested channel. We should not request a new
remain-on-channel to send a response to just a frame if we are waiting
for the driver to get to the same channel. Instead, just continue
waiting for the driver event.
2010-09-09 07:17:18 -07:00
Jouni Malinen
d6ae995057 P2P: Fix infinite loop on interface selection for Action frame TX
When the first wpa_supplicant interface is not the correct one for
transmitting an Action frame (e.g., P2P Presence Request frame
uses a group interface), the code got stuck in an infinite busy
loop. Fix the iteration to go through the interfaces properly.
2010-09-09 07:17:18 -07:00
Jouni Malinen
df91238b54 P2P: wpa_qui-qt4: Add P2P functionality into the GUI 2010-09-09 07:17:18 -07:00
Jouni Malinen
42f0101b4d P2P: wpa_cli action calls for P2P group started/removed events 2010-09-09 07:17:18 -07:00
Jouni Malinen
57faa1cee8 wpa_cli: Add P2P commands 2010-09-09 07:17:18 -07:00
Jouni Malinen
9fdd0fada7 P2P: Add disassociation/deauthentication IE notifications 2010-09-09 07:17:18 -07:00
Jouni Malinen
9bae1be0a1 P2P: Map driver events to P2P event notifications 2010-09-09 07:17:18 -07:00
Jouni Malinen
0c6b310e83 P2P: Show P2P info in ctrl_iface scan results 2010-09-09 07:17:18 -07:00
Jouni Malinen
d23bd8940f P2P: Show P2P Device Address in wpa_cli status 2010-09-09 07:17:18 -07:00
Jouni Malinen
b563b3882e P2P: Add control interface commands for P2P 2010-09-09 07:17:18 -07:00
Jouni Malinen
0817de904e P2P: Optimize scan timeouts for group formation 2010-09-09 07:17:17 -07:00
Jouni Malinen
5f3a6aa0a4 P2P: Add P2P IE into (Re)Association Request frames 2010-09-09 07:17:17 -07:00
Jouni Malinen
0e65037c27 P2P: Add P2P IE into Probe Request frames 2010-09-09 07:17:17 -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
fdadd5fe03 P2P: Do not register l2_packet on dedicated P2P device interface 2010-09-09 07:17:17 -07:00
Jouni Malinen
73e492693d P2P: Add TODO note for Group Formation bit use in AP selection 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
4dac02455a P2P: Use config block with disabled==2 to store persistent groups 2010-09-09 07:17:17 -07:00
Jouni Malinen
75bde05d53 P2P: Add driver operations for P2P use 2010-09-09 07:17:16 -07:00
Jouni Malinen
2ff99b3c38 P2P: Do not save temporary networks 2010-09-09 07:17:16 -07:00
Jouni Malinen
b2c5a4a3df P2P: Do not filter BSSes based on SSID during P2P Provisioning
TODO: Use group id from GO Neg instead(?)
2010-09-09 07:17:16 -07:00
Jouni Malinen
9fa243b295 P2P: Let WPS code know if it is used in a P2P group 2010-09-09 07:17:16 -07:00
Jouni Malinen
e3768e7c94 P2P: Add global configuration parameters for P2P 2010-09-09 07:17:16 -07:00
Jouni Malinen
2c5d725c65 P2P: Add dynamic network config block parameters for P2P 2010-09-09 07:17:16 -07:00