P2P: Increase GTK rekeying period to 24 hours

Strong ciphers do not need frequent rekeying, so increase the default
GTK rekeying period to 24 hours.

Signed-hostap: Jouni Malinen <j@w1.fi>
Provide TLS alerts to CLI/UI over control interface

Harmonize EAP status events over control interface to provide same
functionality as existing D-Bus callback.

Signed-hostap: Chris Hessing <chris.hessing@cloudpath.net>
wpa_supplicant: Add get_capability freq

Add "get_capability freq" command to print a more verbose list of
channels and frequencies in MHz. The tag "NO_IBSS" is added, if IBSS
mode is not allowed on a channel. This allows userspace programs to get
the frequencies and limitations associated with each channel.

This extends the information already provided in "get_capability
channels" but a new interface is chosen because of backwards
compatibility considerations.

Signed-hostap: Bruno Randolf <br1@einfach.org>
nl80211: Fix nla_nest_start conversion

Dmitry reported that the kernel could no longer parse the
scheduled scan attributes correctly after my patch to use
nla_nest_start/nla_nest_end. The reason is that the wrong
attribute is closed I accidentally made it close the full
scan config instead of just the SSID match set.

Reported-by: Dmitry Shmidt <dimitrysh@google.com>
Signed-hostap: Johannes Berg <johannes.berg@intel.com>
wpa_supplicant: Add option -I for additional config file

This option can be used only for global parameters that are not going
to be changed from settings.

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Signed-off-by: Iliyan Malchev <malchev@google.com>
hostapd: Add some testing options

In order to test clients in scenarios where APs may (randomly)
drop certain management frames, introduce some testing options
into the hostapd configuration that can make it ignore certain
frames. For now, these are probe requests, authentication and
(re)association frames.

Signed-hostap: Johannes Berg <johannes.berg@intel.com>
dbus_new: Add EAP logon/logoff

Add "EAPLogoff" and "EAPLogon" interface DBus commands which
parallel the "logoff" and "logon" wpa_ctrl commands which terminate
and restart EAP authentication.  Slightly enhance the "logon" case
by expiring any running "startWhile" timer.

Signed-hostap: Paul Stewart <pstew@chromium.org>
Move wpa_s freeing into wpa_supplicant_deinit_iface()

All wpa_supplicant_deinit_iface() callers ended up freeing wpa_s
immediately after this call. Move os_free(wpa_s) into the deinit
function to share the same call and make the deinit sequence clearer.

Signed-hostap: Jouni Malinen <j@w1.fi>
RSN: Update preauth scan results only based on new scan results

The fast-connect optimization to skip a new scan did not update how the
RSN preauthentication callback is used. There is no point in trying to
add preauthentication candidates from cases where scan was skipped, so
skip this call, too, in such cases.

Signed-hostap: Jouni Malinen <j@w1.fi>
P2P: Fix after_scan_tx processing during ongoing operations

When Action frame TX is postponed until a pending p2p_scan completes,
there may be additional operations that need to be continued after the
postponed Action frame TX operation completes. Fix this by starting
pending operation (if any) from TX status event for after_scan_tx
frames.

This fixes common errors seen with the test_discovery hwsim test case.

Signed-hostap: Jouni Malinen <j@w1.fi>
nl80211: Reduce debug on Probe Request frames

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
nl80211: Drop frame events that are for foreign address

This avoids duplicate processing of events when multiple BSSes are
configured.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
wpa_supplicant: Support minimum interval between scan attempts.

When running lots of vifs, they can all end up wanting to
scan right after the other.  This leaves too little time for
useful work to happen.  Allow users to configure a minimum
timer interval (in seconds) between scans.  Default is zero,
which is current behaviour.

Signed-off-by: Ben Greear <greearb@candelatech.com>
supplicant:  Allow limiting number of concurrent associations.

When using lots of virtual clients, it may be useful to
limit the number that attempt to connect to the AP at
once.  Limitting the associations per scan response is
an easy way to do this.

Signed-hostap: Ben Greear <greearb@candelatech.com>
hostap:  Ensure netlink recv buf size is large enough.

I was getting this error on wpa_supplicant startup when configured
for 200+ stations:

1333514002.074458: netlink: recvfrom failed: No buffer space available

So, increase rcv buffer size to 1MB so we don't drop netlink
packets.

Signed-hostap: Ben Greear <greearb@candelatech.com>
nl80211:  Increase verbosity for some auth failures.

Makes the logs a bit more useful when running in default
message level (INFO).
Increase EAPOL timers.

This allows 128 stations to associate & authenticate
all at once.  Without this, 4-way handshake doesn't
work right.

From: Bjorn Smedman <bjorn.smedman@venatech.se>

NOTE:  This should probably not be applied upstream as is..but
should be a configuration option in the hostapd.conf file.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Support can-scan-one using -1 for freq.

Signed-off-by: Ben Greear <greearb@candelatech.com>
nl80211: Add identifier to structs

This helps one figure out what type of struct the object is, since they
are usually passed around as void* ctx pointers. Can be used in gdb
currently, but run-time checks could be added later if needed.

Signed-off-by: Ben Greear <greearb@candelatech.com>
nl80211:  Remove MLME retry code that causes trouble.

When testing 130+ virtual stations, using no encryption
(no WPA, etc), some number of them will get into endless
loops of authenticating and de-authenticating.  It appears
that the code that is supposed to ignore the spurious de-auth
event created by this retry logic does not work in all cases.

Removing the retry code as this patch does fixes the problem
for me.

Maybe the entire patch (6d6f4bb8) should be reverted?

Signed-hostap: Ben Greear <greearb@candelatech.com>