Assign QCA vendor specific nl80211 command id 52 for APFIND

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
hostapd: Change drv_flags from unsigned int to u64

Some flag already using a bit larger than 32, so extend the hostapd
drv_flags type similarly to the earlier wpa_supplicant change to get the
full flag content.

Signed-off-by: Yanbo Li <yanbol@qti.qualcomm.com>
tests: PMF required with SHA1-based AKM

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Work around AP misbehavior on EAPOL-Key descriptor version

It looks like some APs are incorrectly selecting descriptor version 3
(AES-128-CMAC) for EAPOL-Key frames when version 2 (HMAC-SHA1) was
expected to be used. This is likely triggered by an attempt to negotiate
PMF with SHA1-based AKM.

Since AES-128-CMAC is considered stronger than HMAC-SHA1, allow the
incorrect, but stronger, option to be used in these cases to avoid
interoperability issues with deployed APs.

This issue shows up with "WPA: CCMP is used, but EAPOL-Key descriptor
version (3) is not 2" in debug log. With the new workaround, this issue
is ignored and "WPA: Interoperability workaround: allow incorrect
(should have been HMAC-SHA1), but stronger (is AES-128-CMAC), descriptor
version to be used" is written to the log.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.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>
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-off-by: 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).

Signed-off-by: Ben Greear <greearb@candelatech.com>
supplicant:  Update HS20 readme.

Mention dependencies needed to properly implement HS20.

Signed-off-by: Ben Greear <greearb@candelatech.com>
supplicant/interworking:  Convert wpa_printf to wpa_msg.

Also adds a few messages that helped me track down why things
were not working as expected.

Signed-off-by: Ben Greear <greearb@candelatech.com>
supplicant:  Allow user-defined defaults for Interworking network blocks.

This way users can still configure the HT over-rides and some other
constraints that Interworking has no interest or ability to configure.

Example config file (to disable HT-40 on an Interworking/HS20 interface):

ctrl_interface=/var/run/wpa_supplicant
fast_reauth=1

interworking=1
auto_interworking=1
access_network_type=0

hs20=1

bss_max_count=2000
network={
    interworking_defaults=1
    disable_ht=0
    disable_ht40=1
    disable_sgi=0
    ht_mcs=""
    disable_max_amsdu=-1
    ampdu_factor=-1
    ampdu_density=-1

}

cred={
    username="client2"
    password="lanforge"
    ca_cert="/home/lanforge/ca.pem"
    private_key="/home/lanforge/client.p12"
    private_key_passwd="lanforge"
    realm="lanforge.org"
    domain="lanforge.org"
    eap=TLS

}

Signed-off-by: Ben Greear <greearb@candelatech.com>
rsn:  Add debug code for pmksa cache.

Dodgy radius server was causing failures.  This code was added
to debug the problem, but was never used as user figured out RADIUS
problem first.

Signed-hostap: Ben Greear <greearb@candelatech.com>
hostap:  Debug messages for dodgy RADIUS servers.

These were helpful when tracking down why hostapd did not work
properly with a RADIUS server.

Signed-hostap: Ben Greear <greearb@candelatech.com>
Add some documentation relating to EAP-AKA.

Signed-hostapd: Ben Greear <greearb@candelatech.com>
interworking:  Add logging to track nai_realm_find_eap failures.

There are lots of reasons we can fail to match an EAP, so add
logging to help determine why it is happening in various cases.

Signed-off-by: Ben Greear <greearb@candelatech.com>
interworking:  More debug messages.

And convert some wpa_printf to wpa_msg.

Signed-off-by: Ben Greear <greearb@candelatech.com>
supplicant:  Add state transition timestamps.

Helps with understanding how long it takes to do various
tasks.

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:  Use high-priority queue for management packets.

Without this patch, wpa_supplicant EAPOL packets (at least)
are sent on normal best-effort TX queue.  I believe they
should be on the VO high-priority queue instead.

Signed-hostap: Ben Greear <greearb@candelatech.com>
hostapd:  Use high-priority queue for management packets.

Without this patch, wpa_supplicant EAPOL packets (at least)
are sent on normal best-effort TX queue when using the new
Linux tx-status-completion API.  I believe they should be on
the VO high-priority queue instead.

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