OpenSSL: Add support for HMAC functions with 0.9.8 and older

Commit d9cc4646eb0255be31f11d8a8edad857431fdf49 added
crypto_hash_{init,update,finish}() wrappers for OpenSSL, but it
assumed the current HMAC API in OpenSSL. This was changed in 0.9.9
to return error codes from the functions while older versions used
void functions. Add support for the older versions, too.

Signed-hostap: Jouni Malinen <j@w1.fi>
Add OpenSSL 0.9.8x patch for EAP-FAST

The older patch for 0.9.8i does not apply cleanly, so add an updated
version that can be used with the current OpenSSL 0.9.8 release.

Signed-hostap: Jouni Malinen <j@w1.fi>
Fix AP build without NEED_AP_MLME

Commit 1b487b8b1e95e1fbd9e00d52d883ba0ac4c2e4bf added CH_SWITCH
event for nl80211, but ended up using hostapd_hw_get_channel()
regardless of build configuration for driver interfaces. This
function is not always available, so make its use conditional
on NEED_AP_MLME.

Signed-hostap: Jouni Malinen <j@w1.fi>
WPS UDF: Fix fd leak on error path

Signed-hostap: Jouni Malinen <j@w1.fi>
WPS SSDP: Fix socket leaks on error paths

Signed-hostap: Jouni Malinen <j@w1.fi>
supplicant: Make unix socket non-blocking.

This keeps wpa_cli from hanging forever if the other end of the
socket dies.

Signed-hostap: Ben Greear <greearb@candelatech.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>
wpa-config:  Add some debug info for config file error cases.

It didn't alway spit out useful stuff when reading config failed.

Signed-off-by: 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>
hostap:  Better logging for ioctl set flags failure.

Let user know if the call failed setting interface up v/s
down.

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>
wpa_supplicant:  Allow user to disable short guard interval (SGI).

Requires kernel patch to make the SGI-20 properly disabled...SGI-40
will already work since kernel 3.4 or so.

Signed-hostap: Ben Greear <greearb@candelatech.com>
wpa_supplicant:  Document ht-caps over-rides.

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