hostapd: Do not allow HT in 11b mode

When the HW mode has been configured as 11b, disable HT
operations.

Signed-hostap: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Change reason code for AP mode BSS termination to 3

Use reason code 3 (Deauthenticated because sending STA is leaving)
instead of reason code 2 (Previous authentication ot valid) in the
Deauthentication frame sent at the time a BSS is terminated. This is
more accurate reason for the message and allows the stations to get
better understand on why they were disconnected. This can be useful
especially for P2P clients that can use this as a signal that the
P2P group session was ended per P2P specification section 3.2.9.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
P2P: Remove client group on Deauthentication reason code 3

The GO can indicate that the P2P Group session is ending by sending a
Deauthentication frame with reason code 3 (Deauthenticated because
sending STA is leaving) based on P2P specification section 3.2.9. Use
this reason code to remove the P2P client group without waiting for the
group idle timeout.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
nl80211: Indicate disconnect event as deauthentication

This was previously indicated as disassociation, but the P2P group
session ending case expect a deauthentication notification. Since the
cfg80211 disconnection event does not really indicate which frame was
used, the easiest approach for now seems to be to just indicate these
as deauthentication events.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
WPS: Allow vendor specific attribute to be added into M1

wps_vendor_ext_m1 configuration parameter can now be used to add a
vendor specific attribute into the WPS M1 message, e.g., for
Windows Vertical Pairing.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
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>
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>
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>
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>
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>
Make bind failure messages unique.

This helps someone know which part of the code is complaining.

Signed-hostap: Ben Greear <greearb@candelatech.com>
Better wpa_cli error messages when connect fails.

Signed-hostap: Ben Greear <greearb@candelatech.com>
eloop/poll:  Handle POLLER | POLLHUP in read logic.

Without this, we can get into a tight loop because the
code in general doesn't add eloop exception handlers,
so socket reporting the POLLERR would never be read.

With this change, any socket with POLLERR or POLLHUP
asserted will be handled by the read logic.

Signed-off-by: Ben Greear <greearb@candelatech.com>
hostap:  Add fuzz to idle-timer calculations.

This should keep us from getting into a state where we bounce
large numbers of interfaces all at once.  Spreading out the
bounce should cause less stress on the network as the idle
stations won't all be trying to reconnect at once.

Signed-hostap: Ben Greear <greearb@candelatech.com>
wpa_supplicant:  Print initialization information on startup.

This lets someone know if they have a log file that properly
starts at the beginning.

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