]> git.ipfire.org Git - thirdparty/hostap.git/log
thirdparty/hostap.git
13 years agoP2P: Stop any on-going "p2p_find" on creating an Autonomous GO
Jithu Jance [Tue, 25 Oct 2011 22:28:51 +0000 (01:28 +0300)] 
P2P: Stop any on-going "p2p_find" on creating an Autonomous GO

This patch stops any on-going "p2p_find" on creating an Autonomous GO.
This is already taken care in case of invoking a persistent GO. GO as
such will be advertising via the beacons for other devices to discover.
So normally the GO doesn't need to do a p2p_find until and unless it
wants to invite a P2P Client. In case of Invite scenario, logically it
is better to do a explicit discover [via user intervention] after the GO
is created. This patch will help to reduce battery wastage [due to
p2p_find operations] in scenarios where user creates a GO and doesn't
initiate a connection.

13 years agowlantest: Add STA counters for disconnect reason 6/7 RX
Jouni Malinen [Tue, 25 Oct 2011 21:06:06 +0000 (00:06 +0300)] 
wlantest: Add STA counters for disconnect reason 6/7 RX

These can be useful in tests involving association state mismatch
between the AP and the STA (i.e., STA assumes it is still associated
but the AP does not have association state). In such a case, the AP
would be sending out unprotected Deauthentication or Disassociation
frames with reason code 6 or 7 depending on what frame is triggering
this.

13 years agoInterworking: Fix Advertisement Protocol element length limit
Jay Katabathuni [Tue, 25 Oct 2011 08:31:21 +0000 (11:31 +0300)] 
Interworking: Fix Advertisement Protocol element length limit

The Query Response Length Limit is not allowed to be zero when
this is sent by the AP. Use 0x7F to indicate that the limit is
based on maximum number of GAS fragments.

13 years agoP2P: Append P2P Device Address to AP-STA-CONNECTED event
Jithu Jance [Mon, 24 Oct 2011 21:13:03 +0000 (00:13 +0300)] 
P2P: Append P2P Device Address to AP-STA-CONNECTED event

For P2P, the p2p_connect takes in device address argument to make a
connection. However the connected event AP-STA-CONNECTED comes with
interface address. The application listening on events would find it
difficult to map interface address to the p2p device address which is
provided for connection.

Append P2P Device Address to AP-STA-CONNECTED event for P2P Client
connection. This will help applications to easily map the P2P Interface
Address to P2P Device Address on CONNECTED event. For non-P2P case, it
will just print the usual STA MAC address alone.

Signed-off-by: Jithu Jance <jithu@broadcom.com>
13 years agoP2P: Fix wpa_supplicant crash on P2P WPS PBC overlap case
Jithu Jance [Mon, 24 Oct 2011 20:37:39 +0000 (23:37 +0300)] 
P2P: Fix wpa_supplicant crash on P2P WPS PBC overlap case

Once PBC overlap detected when using dynamic group interfaces, the wpa_s
corresponding to P2P group interface is freed. This patch avoids
accessing the wpa_s data structure after it is freed. This fixes a
possible crash in P2P client role in such a case.

13 years agoP2P: Advertise Persistent Reconnect group capability
Jouni Malinen [Mon, 24 Oct 2011 14:29:37 +0000 (17:29 +0300)] 
P2P: Advertise Persistent Reconnect group capability

The persistent_reconnect configuration parameter was used to decide
whether to accept invitation to re-establish a persistent group.
However, this was not being advertised in the Group Capability bitmap.
Add the Persistent Reconnect bit based on this configuration to GO
Negotiation frames and Beacon/Probe Response frames from the GO.

13 years agoTDLS: Make use of wpa_tdls_add_peer to avoid code duplication
Arik Nemtsov [Mon, 26 Sep 2011 10:55:34 +0000 (13:55 +0300)] 
TDLS: Make use of wpa_tdls_add_peer to avoid code duplication

Use the wpa_tdls_add_peer function to allocate TDLS peer structures.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Cc: Kalyan C Gaddam <chakkal@iit.edu>
13 years agoTDLS: Support mgmt-frame Tx for ctrl-iface operations
Arik Nemtsov [Mon, 26 Sep 2011 10:55:33 +0000 (13:55 +0300)] 
TDLS: Support mgmt-frame Tx for ctrl-iface operations

Use capability information to decide whether to perform a given TDLS
operation internally or through mgmt-frame Tx.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Cc: Kalyan C Gaddam <chakkal@iit.edu>
13 years agoTDLS: Add peer as a STA during link setup
Arik Nemtsov [Sun, 23 Oct 2011 11:02:57 +0000 (14:02 +0300)] 
TDLS: Add peer as a STA during link setup

Before commencing setup, add a new STA entry to the driver representing
the peer. Later during setup, update the STA entry using information
received from the peer.

Extend sta_add() callback for adding/modifying a TDLS peer entry and
connect it to the TDLS state machine. Implement this callback for the
nl80211 driver and send peer information to kernel.

Mark TDLS peer entries with a new flag and translate it to a
corresponding nl80211 flag in the nl80211 driver.

In addition, correct TDLS related documentation in the wpa_driver_ops
structure.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Cc: Kalyan C Gaddam <chakkal@iit.edu>
13 years agoTDLS: Collect peer capabilities and supp-rates during link setup
Arik Nemtsov [Mon, 26 Sep 2011 10:55:31 +0000 (13:55 +0300)] 
TDLS: Collect peer capabilities and supp-rates during link setup

Record the capabilities and supported rates of the TDLS peer during
link setup. These are given in the IEs passed in Setup Request and
Setup Response frames.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Cc: Kalyan C Gaddam <chakkal@iit.edu>
13 years agoTDLS: Implement low-ack event for lost TDLS peers
Arik Nemtsov [Mon, 26 Sep 2011 10:55:30 +0000 (13:55 +0300)] 
TDLS: Implement low-ack event for lost TDLS peers

Disable the direct connection when a TDLS peer stops responding
to packets, as indicated by the "LOW ACK" event coming from a driver.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Cc: Kalyan C Gaddam <chakkal@iit.edu>
13 years agoTDLS: Support sending TDLS discovery requests
Arik Nemtsov [Mon, 26 Sep 2011 10:55:29 +0000 (13:55 +0300)] 
TDLS: Support sending TDLS discovery requests

Allow sending a TDLS discovery request as a frame through the driver.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Cc: Kalyan C Gaddam <chakkal@iit.edu>
13 years agoTDLS: Support sending a teardown frame from usermode
Arik Nemtsov [Mon, 26 Sep 2011 10:55:28 +0000 (13:55 +0300)] 
TDLS: Support sending a teardown frame from usermode

When a driver does not implement the TDLS_TEARDOWN operation internally,
send an explicit TDLS link teardown frame to the driver.

Change all teardown calls to use these calling semantics.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Cc: Kalyan C Gaddam <chakkal@iit.edu>
13 years agoTDLS/nl80211: Support receiving TDLS discovery response frames
Arik Nemtsov [Mon, 26 Sep 2011 10:55:27 +0000 (13:55 +0300)] 
TDLS/nl80211: Support receiving TDLS discovery response frames

Register for the TDLS discovery response public action frame in nl80211.
Print out a debug message when a Discovery Resp frame is received and
validated.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Cc: Kalyan C Gaddam <chakkal@iit.edu>
13 years agoTDLS: Process discovery requests and send discovery responses
Arik Nemtsov [Mon, 26 Sep 2011 10:55:26 +0000 (13:55 +0300)] 
TDLS: Process discovery requests and send discovery responses

When a discovery request is received, add the peer to the TDLS peer
cache and send a response containing minimal data. Mandatory IEs in
the discovery response frame will be filled out by the driver.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Cc: Kalyan C Gaddam <chakkal@iit.edu>
13 years agoTDLS: Get TDLS related capabilities from driver
Arik Nemtsov [Mon, 26 Sep 2011 10:55:25 +0000 (13:55 +0300)] 
TDLS: Get TDLS related capabilities from driver

Put glue code in place to propagate TDLS related driver capabilities to
the TDLS state machine.

If the driver doesn't support capabilities, assume TDLS is supported
internally.

When TDLS is explicitly not supported, disable all user facing TDLS
operations.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Cc: Kalyan C Gaddam <chakkal@iit.edu>
13 years agonl80211: Implement TDLS callback functions and propagate capabilities
Arik Nemtsov [Sun, 23 Oct 2011 10:59:00 +0000 (13:59 +0300)] 
nl80211: Implement TDLS callback functions and propagate capabilities

Allow passing high-level TDLS commands and TDLS frames to kernel
via new nl80211 commands.

Propagate TDLS related nl80211 capability flags from kernel and add them
as driver capability flags.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Cc: Kalyan C Gaddam <chakkal@iit.edu>
13 years agoTDLS: Use a valid dialog-token in a setup request
Arik Nemtsov [Mon, 26 Sep 2011 10:55:35 +0000 (13:55 +0300)] 
TDLS: Use a valid dialog-token in a setup request

A zero dialog-token is considered invalid by IEEE Std 802.11z-2010.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Cc: Kalyan C Gaddam <chakkal@iit.edu>
13 years agoTDLS: Support setting CONFIG_TDLS_TESTING in .config
Arik Nemtsov [Mon, 26 Sep 2011 10:55:22 +0000 (13:55 +0300)] 
TDLS: Support setting CONFIG_TDLS_TESTING in .config

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Cc: Kalyan C Gaddam <chakkal@iit.edu>
13 years agonl80211: Handle special TDLS direct link key index use
Jouni Malinen [Sun, 23 Oct 2011 19:12:32 +0000 (22:12 +0300)] 
nl80211: Handle special TDLS direct link key index use

An ugly hack is currently used to indicate keys for TDLS direct link:
key_idx == -1. That needs to be converted to 0 for cfg80211 to accept
the key.

13 years agohwsim_test: Fix silly bug in select() result processing
Jouni Malinen [Sun, 23 Oct 2011 19:11:48 +0000 (22:11 +0300)] 
hwsim_test: Fix silly bug in select() result processing

13 years agoRemove incorrect statement about get_hw_feature_data() driver_ops
Jouni Malinen [Sun, 23 Oct 2011 17:09:40 +0000 (20:09 +0300)] 
Remove incorrect statement about get_hw_feature_data() driver_ops

This function is actually needed for quite a bit more than just
user space MLME implementation. The old comment here has not been
accurate for a long time, so get rid of it.

13 years agoRemove unused driver_ops client MLME functions
Jouni Malinen [Sun, 23 Oct 2011 17:07:57 +0000 (20:07 +0300)] 
Remove unused driver_ops client MLME functions

These driver_ops functions set_channel, set_ssid, set_bssid,
mlme_add_sta, and mlme_remove_sta were used with the user space
MLME implementation in wpa_supplicant. That was only for testing
purposes and was removed, but these driver_ops were forgotten.
Remove them now to remove confusing driver_ops definitions.

13 years agowpa_supplicant: Check rate sets before joining BSS
Christian Lamparter [Sun, 23 Oct 2011 08:58:54 +0000 (11:58 +0300)] 
wpa_supplicant: Check rate sets before joining BSS

IEEE Std 802.11-2007 7.3.2.2 demands that in order to join a BSS all
required basic rates have to be supported by the hardware.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
13 years agowpa_supplicant: Unify hardware feature data
Christian Lamparter [Sun, 23 Oct 2011 08:58:54 +0000 (11:58 +0300)] 
wpa_supplicant: Unify hardware feature data

The hardware feature data is required in several different places
throughout the code. Previously, the data was acquired and freed on
demand, but with this patch wpa_supplicant will keep a single copy
around at runtime for everyone to use.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
13 years agoAllow driver wrappers to indicate whether HT info is known
Jouni Malinen [Sun, 23 Oct 2011 14:17:39 +0000 (17:17 +0300)] 
Allow driver wrappers to indicate whether HT info is known

This is needed to be able to figure out whether the driver is known
not to support HT.

13 years agoPostpone global_init() call until first driver instance is initialized
Jouni Malinen [Sun, 23 Oct 2011 10:20:52 +0000 (13:20 +0300)] 
Postpone global_init() call until first driver instance is initialized

This avoids allocating global driver state for driver wrappers that
are built in but not used. This can save some resources and avoids
failures with driver_nl80211.c that is now initializing netlink
connections for nl80211 in global_init().

13 years agoTLS: Validate RSA ClientKeyExchange length field
Jouni Malinen [Sun, 23 Oct 2011 10:04:32 +0000 (13:04 +0300)] 
TLS: Validate RSA ClientKeyExchange length field

Instead of using implicit length based on the received buffer, validate
RSA ClientKeyExchange based on the explicit length field.

13 years agoRemove unused variables
Jouni Malinen [Sun, 23 Oct 2011 09:42:55 +0000 (12:42 +0300)] 
Remove unused variables

13 years agodbus: Removed unused local variable
Grant Erickson [Sun, 23 Oct 2011 09:36:04 +0000 (12:36 +0300)] 
dbus: Removed unused local variable

Signed-off-by: Grant Erickson <marathon96@gmail.com>
13 years agoFix hostapd_wpa_auth_send_ether() return value
Jouni Malinen [Sun, 23 Oct 2011 09:33:17 +0000 (12:33 +0300)] 
Fix hostapd_wpa_auth_send_ether() return value

This was not currently used for anything, but better return the correct
value instead of hardcoded -1.

13 years agoComment out scard initialization code if PCSC_FUNCS is not set
Jouni Malinen [Sun, 23 Oct 2011 09:24:36 +0000 (12:24 +0300)] 
Comment out scard initialization code if PCSC_FUNCS is not set

13 years agoRemove unused variable from os_gmtime()
Jouni Malinen [Sun, 23 Oct 2011 09:22:40 +0000 (12:22 +0300)] 
Remove unused variable from os_gmtime()

13 years agonl80211: Remove some unnecessary ifdef HOSTAPD blocks
Jouni Malinen [Sat, 22 Oct 2011 19:51:49 +0000 (22:51 +0300)] 
nl80211: Remove some unnecessary ifdef HOSTAPD blocks

13 years agoRemove user space client MLME
Jouni Malinen [Sat, 22 Oct 2011 19:45:38 +0000 (22:45 +0300)] 
Remove user space client MLME

This code was used only with driver_test.c to allow MLME operations
in hostapd to be tested without having to use a real radio. There
are no plans on extending this to any other use than testing and
mac80211_hwsim has now obsoled the need for this type of testing.
As such, we can drop this code from wpa_supplicant to clean up the
implementation of unnecessary complexity.

13 years agoAdd CONFIG_WPS_REG_DISABLE_OPEN to defconfig
Andrii Bordunov [Sat, 22 Oct 2011 19:24:34 +0000 (22:24 +0300)] 
Add CONFIG_WPS_REG_DISABLE_OPEN to defconfig

13 years agoWPS: Use ifdef blocks consistently for CONFIG_WPS_REG_DISABLE_OPEN
Andrii Bordunov [Sat, 22 Oct 2011 19:21:53 +0000 (22:21 +0300)] 
WPS: Use ifdef blocks consistently for CONFIG_WPS_REG_DISABLE_OPEN

The registrar variable is used only if this macro is defined, so no
need to set it otherwise.

13 years agowpa_priv: Link in trace.o to fix CONFIG_WPA_TRACE build
Andrii Bordunov [Sat, 22 Oct 2011 19:18:54 +0000 (22:18 +0300)] 
wpa_priv: Link in trace.o to fix CONFIG_WPA_TRACE build

13 years agowpa_priv: Link in ieee802_11_common.o if driver_nl80211 is used
Jouni Malinen [Sat, 22 Oct 2011 19:16:11 +0000 (22:16 +0300)] 
wpa_priv: Link in ieee802_11_common.o if driver_nl80211 is used

13 years agowpa_priv: Update function arguments to fix compilation
Andrii Bordunov [Sat, 22 Oct 2011 19:11:40 +0000 (22:11 +0300)] 
wpa_priv: Update function arguments to fix compilation

13 years agoShare a single wpa_scan_results_free() implementation
Jouni Malinen [Sat, 22 Oct 2011 19:09:40 +0000 (22:09 +0300)] 
Share a single wpa_scan_results_free() implementation

There is not really a very good location for this anywhere, but the
function is small enough to live as an inline function for now.

13 years agoRemove unused variable and function
Andrii Bordunov [Sat, 22 Oct 2011 18:59:17 +0000 (21:59 +0300)] 
Remove unused variable and function

13 years agoFix typo in comment related to EAPOL
Ben Greear [Sat, 22 Oct 2011 18:41:09 +0000 (21:41 +0300)] 
Fix typo in comment related to EAPOL

Signed-off-by: Ben Greear <greearb@candelatech.com>
13 years agonl80211: Use one global ioctl socket
Ben Greear [Sat, 22 Oct 2011 18:33:58 +0000 (21:33 +0300)] 
nl80211: Use one global ioctl socket

Saves sockets when using multiple VIFS in a single
wpa_supplicant process.

Signed-off-by: Ben Greear <greearb@candelatech.com>
13 years agonl80211: Use a global netlink command object
Ben Greear [Sat, 22 Oct 2011 16:00:27 +0000 (19:00 +0300)] 
nl80211: Use a global netlink command object

Netlink sockets can be shared among all driver instances, saving
sockets and memory when using multiple interfaces in a single process.

13 years agonl80211: Use global nl_cb template
Ben Greear [Sat, 22 Oct 2011 15:42:42 +0000 (18:42 +0300)] 
nl80211: Use global nl_cb template

All interfaces can share a single nl_cb template.

13 years agonl80211: Clean up error path in wpa_driver_nl80211_init
Ben Greear [Sat, 22 Oct 2011 15:28:06 +0000 (18:28 +0300)] 
nl80211: Clean up error path in wpa_driver_nl80211_init

No need to duplicate the deinit code since wpa_driver_nl80211_deinit()
can be used here to clean up after a failure.

13 years agonl80211: Abstract handle/cache (de)allocation
Johannes Berg [Sat, 22 Oct 2011 13:56:43 +0000 (16:56 +0300)] 
nl80211: Abstract handle/cache (de)allocation

This is a cleanup now and makes it easier to add more sockets in the
future.

13 years agonl80211: Fix hostapd error path
Johannes Berg [Sat, 22 Oct 2011 10:04:47 +0000 (13:04 +0300)] 
nl80211: Fix hostapd error path

i802_init() tries to clean up everything manually, call
wpa_driver_nl80211_deinit() instead and also handle the
EAPOL socket properly.

13 years agonl80211: Use global netlink rtm event object
Ben Greear [Thu, 20 Oct 2011 23:03:25 +0000 (02:03 +0300)] 
nl80211: Use global netlink rtm event object

Netlink sockets can be shared among all driver instances, saving lots
of sockets, spurious log messages, memory, and CPU usage when using
multiple interfaces in a single process.

13 years agohostapd: Call global_init/global_deinit driver_ops
Jouni Malinen [Sat, 22 Oct 2011 08:59:00 +0000 (11:59 +0300)] 
hostapd: Call global_init/global_deinit driver_ops

Now both wpa_supplicant and hostapd allow the driver wrappers to use the
global context similarly.

13 years agonl80211: Use a wrapper for genlmsg_put
Jouni Malinen [Thu, 20 Oct 2011 22:34:54 +0000 (01:34 +0300)] 
nl80211: Use a wrapper for genlmsg_put

This reduces the code size by a kilobyte or so and makes it easier
to replace the netlink instances to be shared among interfaces.

13 years agowext: Do not set SSID on disconnect on Android
Dmitry Shmidt [Fri, 21 Oct 2011 16:11:07 +0000 (19:11 +0300)] 
wext: Do not set SSID on disconnect on Android

Some drivers seem to try to associate using the random SSID, so
do not use this hack on Android.

13 years agowext: Clean up the disconnect BSSID/SSID clearing
Jouni Malinen [Fri, 21 Oct 2011 16:09:25 +0000 (19:09 +0300)] 
wext: Clean up the disconnect BSSID/SSID clearing

13 years agoPrevent ap_scan change during association
Dmitry Shmidt [Tue, 16 Aug 2011 18:52:06 +0000 (11:52 -0700)] 
Prevent ap_scan change during association

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
13 years agoSet ANDROID_LOG_NAME depending on application
Dmitry Shmidt [Fri, 21 Oct 2011 14:26:35 +0000 (17:26 +0300)] 
Set ANDROID_LOG_NAME depending on application

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
13 years agoAdd blacklist command
Dmitry Shmidt [Tue, 18 Oct 2011 17:11:52 +0000 (20:11 +0300)] 
Add blacklist command

This command allows an external program manage the BSS blacklist
and display its current contents.

Note: The blacklist is considered to be internal mechanism within
wpa_supplicant and changing it can have unexpected results.

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
13 years agowext: Remove trailing whitespace
Jouni Malinen [Fri, 21 Oct 2011 15:58:01 +0000 (18:58 +0300)] 
wext: Remove trailing whitespace

13 years agoInterworking: Allow ANT to be configured for Probe Request frames
Jouni Malinen [Fri, 21 Oct 2011 09:44:29 +0000 (12:44 +0300)] 
Interworking: Allow ANT to be configured for Probe Request frames

Access Network Type can now be configured (default: 15 = wildcard) to
limit which APs reply to the scan.

13 years agoInterworking: Filter Probe Request frames based on HESSID and ANT
Jouni Malinen [Fri, 21 Oct 2011 09:43:53 +0000 (12:43 +0300)] 
Interworking: Filter Probe Request frames based on HESSID and ANT

Do not reply to Interworking-enabled Probe Request frames if they
request mismatching HESSID or ANT.

13 years agoInterworking: Add Interworking element to IE parser
Jouni Malinen [Fri, 21 Oct 2011 09:43:24 +0000 (12:43 +0300)] 
Interworking: Add Interworking element to IE parser

13 years agoInterworking: Include Access Network Type in set_ap() driver_ops
Jouni Malinen [Fri, 21 Oct 2011 09:12:36 +0000 (12:12 +0300)] 
Interworking: Include Access Network Type in set_ap() driver_ops

This may be needed for drivers that process Probe Request frames
internally.

13 years agonl80211: Clean up capability querying
Johannes Berg [Thu, 20 Oct 2011 18:57:32 +0000 (21:57 +0300)] 
nl80211: Clean up capability querying

There's no need to store everything once and then copy it. Just fill the
capa struct directly in the function that parses the info from nl80211.

13 years agoAP: Pass only bssid/addr/wds to EVENT_RX_FROM_UNKNOWN
Johannes Berg [Thu, 20 Oct 2011 18:51:32 +0000 (21:51 +0300)] 
AP: Pass only bssid/addr/wds to EVENT_RX_FROM_UNKNOWN

13 years agoMove get_hdr_bssid() to make it easier to share for other uses
Johannes Berg [Thu, 20 Oct 2011 18:50:23 +0000 (21:50 +0300)] 
Move get_hdr_bssid() to make it easier to share for other uses

13 years agonl80211: Stop more quickly on initialization errors
Jouni Malinen [Thu, 20 Oct 2011 18:36:36 +0000 (21:36 +0300)] 
nl80211: Stop more quickly on initialization errors

Stop on fatal errors like an attempt to use a non-existing interface or
not have root privileges to avoid producing confusing error messages.

13 years agoFix segfault on error path if driver initialization fails
Jouni Malinen [Thu, 20 Oct 2011 18:10:22 +0000 (21:10 +0300)] 
Fix segfault on error path if driver initialization fails

wpa_s->wpa is NULL in this case and we better not call WPA state
machine functions.

13 years agonl80211: Compat code for genl_ctrl_alloc_cache
Johannes Berg [Thu, 20 Oct 2011 18:08:26 +0000 (21:08 +0300)] 
nl80211: Compat code for genl_ctrl_alloc_cache

It's really a waste of bits to duplicate the code for
genl_ctrl_alloc_cache() again and again -- just add a
wrapper like in iw.

13 years agoAP: Do station poll in driver wrapper
Johannes Berg [Thu, 20 Oct 2011 18:03:08 +0000 (21:03 +0300)] 
AP: Do station poll in driver wrapper

This offloads the station polling to driver wrappers, which may offload
it again to the driver. The hostap driver wrapper uses "real" data
frames while nl80211 uses null data frames.

Also add a specific event to indicate that a poll was successful for
future use with the nl80211 driver.

13 years agoInterworking: Use unsigned integer for bitfield
Jouni Malinen [Thu, 20 Oct 2011 17:49:21 +0000 (20:49 +0300)] 
Interworking: Use unsigned integer for bitfield

Signed integer with one-bit value does not make much sense, so clean
this up by using an unsigned integer instead.

13 years agowext: Increase scan timeout from 5 to 10 seconds
Jouni Malinen [Tue, 18 Oct 2011 20:04:36 +0000 (23:04 +0300)] 
wext: Increase scan timeout from 5 to 10 seconds

Some dualband cards can use more than five seconds to run through
a full scan, so increase the timeout to avoid hitting the missing
scan completed event workaround.

13 years agoAdd log_level command
Dmitry Shmidt [Tue, 18 Oct 2011 17:16:38 +0000 (20:16 +0300)] 
Add log_level command

This can be used to display the current debugging level and to change
the log level during run time.

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
13 years agoEAP: Clear ClientTimeout back to default value in INITIALIZE
Jouni Malinen [Tue, 18 Oct 2011 15:44:35 +0000 (18:44 +0300)] 
EAP: Clear ClientTimeout back to default value in INITIALIZE

This fixes an issue where WPS run leaves a small ClientTimeout
value (2) configured and the next EAPOL authentication is started
with that small value even for Identity exchange. This can cause
problems when an EAPOL packet gets dropped immediately after
association and a retry of that packet is needed (which may take
more than two seconds).

13 years agoAndroid: Add wpa_ctrl_cleanup()
Dmitry Shmidt [Tue, 18 Oct 2011 14:27:53 +0000 (17:27 +0300)] 
Android: Add wpa_ctrl_cleanup()

This function can be used to clean up local UNIX domain socket files
that may be left over from clients that were previously connected to
wpa_supplicant. At least for now, this is only available for Android
builds.

13 years agoAndroid: Sync Android.mk with recent Makefile changes
Jouni Malinen [Tue, 18 Oct 2011 14:15:36 +0000 (17:15 +0300)] 
Android: Sync Android.mk with recent Makefile changes

13 years agonetlink: Do not use void pointer for pointer arithmetic
Jouni Malinen [Tue, 18 Oct 2011 14:00:08 +0000 (17:00 +0300)] 
netlink: Do not use void pointer for pointer arithmetic

This is a non-standard extension in gcc, so better not depend on it.

13 years agoAdd support for Time Advertisement
Jouni Malinen [Mon, 17 Oct 2011 21:24:16 +0000 (00:24 +0300)] 
Add support for Time Advertisement

This adds preliminary support for IEEE 802.11v Time Advertisement
mechanism with UTC TSF offset.

13 years agoAdd os_gmtime() as wrapper for gmtime()
Jouni Malinen [Mon, 17 Oct 2011 21:23:42 +0000 (00:23 +0300)] 
Add os_gmtime() as wrapper for gmtime()

13 years agoInterworking: Add support for configuring Roaming Consortium List
Jouni Malinen [Mon, 17 Oct 2011 20:55:50 +0000 (23:55 +0300)] 
Interworking: Add support for configuring Roaming Consortium List

13 years agoInterworking: Add Advertisement Protocol element
Jouni Malinen [Mon, 17 Oct 2011 20:19:52 +0000 (23:19 +0300)] 
Interworking: Add Advertisement Protocol element

For now, assume that ANQP will always be enabled with Interworking.
This may be made separately configurable in the future.

13 years agoRemove set_intra_bss() driver_ops
Jouni Malinen [Mon, 17 Oct 2011 20:04:27 +0000 (23:04 +0300)] 
Remove set_intra_bss() driver_ops

This has been replaced by the isolate parameter available through
set_ap() calls.

13 years agoatheros: Add a placeholder function for set_ap() driver_ops
Jouni Malinen [Mon, 17 Oct 2011 18:36:28 +0000 (21:36 +0300)] 
atheros: Add a placeholder function for set_ap() driver_ops

13 years agoAdd Interworking configuration in set_ap() driver_ops
Jouni Malinen [Mon, 17 Oct 2011 18:35:41 +0000 (21:35 +0300)] 
Add Interworking configuration in set_ap() driver_ops

Drivers that implement SME/MLME may find it easier to use separated
information to configure Interworking related parameters.

13 years agoAdd Ext Capab and Interworking elements to extra IEs
Jouni Malinen [Mon, 17 Oct 2011 18:30:44 +0000 (21:30 +0300)] 
Add Ext Capab and Interworking elements to extra IEs

These need to be provided to drivers that implement SME/MLME.

13 years agoMove Ext Capab and Interworking element construction into shared file
Jouni Malinen [Mon, 17 Oct 2011 18:03:52 +0000 (21:03 +0300)] 
Move Ext Capab and Interworking element construction into shared file

These needs to be available for drivers that implement SME/MLME.

13 years agoClean up AP mode extra IE construction
Jouni Malinen [Mon, 17 Oct 2011 17:55:06 +0000 (20:55 +0300)] 
Clean up AP mode extra IE construction

Make it easier to add more IEs into the buffers.

13 years agoRemove unused function argument
Jouni Malinen [Mon, 17 Oct 2011 17:10:07 +0000 (20:10 +0300)] 
Remove unused function argument

13 years agoMove AP BSS configuration parameters into set_ap()
Jouni Malinen [Mon, 17 Oct 2011 16:31:33 +0000 (19:31 +0300)] 
Move AP BSS configuration parameters into set_ap()

Remove the separate driver_ops functions set_cts_protect(),
set_preamble(), set_short_slot_time(), and set_ht_params(). These
belong into same set of operations as set_ap(), so there is no need
to maintain separate functions that just make the driver wrapper
more complex.

Since these have only been used with driver_nl80211.c, the driver_ops
can be removed immediately instead of maintaining backwards
compatibility period with the old functions.

13 years agoDeprecate set_intra_bss() driver_ops
Jouni Malinen [Mon, 17 Oct 2011 15:58:46 +0000 (18:58 +0300)] 
Deprecate set_intra_bss() driver_ops

The AP client isolation parameter is now available through set_ap().
driver_nl80211.c was the only driver wrapper using the set_intra_bss()
call in hostap.git, but some external trees may have used this. Once
those are cleared, the set_infra_bss() driver_ops can be removed
completely. The only remaining use case for it currently is in P2P
GO mode with wpa_supplicant.

13 years agoRemove unused P2P device discovery hack from Beacon configuration
Jouni Malinen [Mon, 17 Oct 2011 15:39:31 +0000 (18:39 +0300)] 
Remove unused P2P device discovery hack from Beacon configuration

AP mode operations were used for P2P device discovery Listen state
only during early experiments. This has now been cleaned up and
ieee802_11_set_beacon() is not called for P2P device discovery.
As such, this hack to skip Beacon configuration can be removed.

13 years agoStart deprecating various AP mode driver_ops
Jouni Malinen [Mon, 17 Oct 2011 15:35:25 +0000 (18:35 +0300)] 
Start deprecating various AP mode driver_ops

The preferred way of configuring AP mode will be to use set_ap() instead
of number of separate operations hostapd has collected over the years.

13 years agoatheros: Add debug hexdumps for IE configuration
Jouni Malinen [Mon, 17 Oct 2011 14:56:59 +0000 (17:56 +0300)] 
atheros: Add debug hexdumps for IE configuration

13 years agoMove SA Query mechanism into a file that can be shared more easily
Mahesh Palivela [Mon, 17 Oct 2011 14:30:43 +0000 (17:30 +0300)] 
Move SA Query mechanism into a file that can be shared more easily

This is the first step in allowing SA Query mechanism in hostapd to be
used with drivers that implement authentication and association MLME/SME
(i.e., do not use ieee802_11.c).

13 years agoInterworking: Document network selection parameters
Jouni Malinen [Sun, 16 Oct 2011 19:44:28 +0000 (22:44 +0300)] 
Interworking: Document network selection parameters

13 years agoInterworking: Support for using EAP-SIM credentials in network selection
Jouni Malinen [Thu, 6 Oct 2011 19:26:33 +0000 (22:26 +0300)] 
Interworking: Support for using EAP-SIM credentials in network selection

New configuration parameters home_imsi and home_milenage can be used
to configure SIM/USIM simulator parameters for network selection based
on SIM/USIM credentials.

home_imsi=(MCC | MNC | '-' | rest of IMSI)
home_milenage=(Ki):(OPc):(SQN)

For example:
home_imsi=310026-000000000
home_milenage=90dca4eda45b53cf0f12d7c9c3bc6a89:cb9cccc4b9258e6dca4760379fb82581:000000000123

13 years agoInterworking: Support username/password based network selection
Jouni Malinen [Wed, 5 Oct 2011 14:08:18 +0000 (17:08 +0300)] 
Interworking: Support username/password based network selection

Add support for network selection for username/password credentials with
EAP-TTLS and EAP-PEAP. The new global configuration parameters
home_username, home_password, and home_ca_cert can be used to specify
credentials for network selection.

13 years agoInterworking: Parse NAI Realms and match against home realm
Jouni Malinen [Wed, 5 Oct 2011 11:38:13 +0000 (14:38 +0300)] 
Interworking: Parse NAI Realms and match against home realm

13 years agoInterworking: Add commands for network selection
Jouni Malinen [Tue, 4 Oct 2011 19:13:22 +0000 (22:13 +0300)] 
Interworking: Add commands for network selection

This adds the basic mechanism for running through network selection:
scan, ANQP fetch, network selection, and connection. Actual rules for
network selection and the creation of the network block are still
missing, but will be added in separate commits.

13 years agoInterworking: Add ANQP query requests
Jouni Malinen [Sun, 16 Oct 2011 19:44:28 +0000 (22:44 +0300)] 
Interworking: Add ANQP query requests

Add mechanism for using GAS/ANQP to query Interworking related
information from APs. The received information is stored in the BSS
table and can be viewed with ctrl_iface BSS command.

New ctrl_iface command ANQP_GET can be used to fetch ANQP elements from
a specific AP. Additional commands FETCH_ANQP and STOP_FETCH_ANQP can be
used to initiate and stop an iteration through all APs in the BSS table
that indicate support Interworking to fetch ANQP elements from them.

13 years agowpa_cli: Make second argument to set command optional
Jouni Malinen [Wed, 5 Oct 2011 14:29:51 +0000 (17:29 +0300)] 
wpa_cli: Make second argument to set command optional

This can be used to indicate zero length value.