wpadebug: Add a Wi-Fi debugging app for Android

This tool can be used to debug Wi-Fi functionality on Android both
through the Android framework and through direct access to
wpa_supplicant.

Signed-hostap: Jouni Malinen <j@w1.fi>
P2P: Clone beacon_int when initializing new group interface

Signed-hostap: Ilan Peer <ilan.peer@intel.com>
nl80211: Fix max_remain_on_chan capability reading

In case that NL80211_PROTOCOL_FEATURE_SPLIT_WIPHY_DUMP is supported,
wiphy_info_handler() is called several times, where
NL80211_ATTR_MAX_REMAIN_ON_CHANNEL_DURATION is present only in one
of these calls. Thus capa->max_remain_on_chan is overridden in
all other calls.

Fix it so the default value is set only after all the wiphy info was
received.

Signed-hostap: Ilan Peer <ilan.peer@intel.com>
wlantest: Fix the injection of protected broadcast frames

Injecting protected broadcast frames fails because of the unnecessary
null check for sta. In case of broadcast frames sta can be null, so
remove the check.

Reported-by: Janardhan R <janardhanr@posedge.com>
Signed-hostap: Chaitanya T K <chaitanyatk@posedge.com>
hostapd: Add Key MIC in group EAPOL-Key frames corruption test option

For some testing it can be useful to force the Key MIC in group
EAPOL-Key frames to be corrupt. Add an option to allow setting a
probability for corrupting the Key MIC and use it in the WPA code,
increasing the first byte of the MIC by one to corrupt it if desired.

Signed-hostap: Johannes Berg <johannes.berg@intel.com>
WPA: Print pairwise EAPOL-Key flag as a bool

Since "pairwise" is defined as an integer, the current assignment leads
to it having the value 0 or 8, which is a bit strange in debug output:

WPA: Send EAPOL(version=2 secure=1 mic=1 ack=1 install=1 pairwise=8
kde_len=46 keyidx=2 encr=1)

Use !!(...) to normalize it to 0 or 1.

Signed-hostap: Johannes Berg <johannes.berg@intel.com>
HS 2.0: Move Probe Request Indication IE addition to proper place

This needs to be in wpa_supplicant_extra_ies() to get consistent
behavior for both scan and sched_scan cases.

Signed-hostap: Jouni Malinen <j@w1.fi>
wpadebug: Add WSC request through Android beam

Signed-hostap: Jouni Malinen <j@w1.fi>
Revert "nl80211: Add nla_put_u32() wrapper for Android"

This reverts commit df2f9ec6b2578def21fc26c88e661b5d28f0fbbf.

The current AOSP snapshot for JB includes nla_put_u32(), so this is not
needed anymore and is also causing linking issues due to duplicated
definition.

Signed-hostap: Jouni Malinen <j@w1.fi>
WPS: Do not use void* in arithmetic

This is a C compiler extension and not needed, so replace with standard
compliant way of calculating the pointer.

Signed-hostap: Jouni Malinen <j@w1.fi>
Android: Enable WPS ER and NFC support in the build

Signed-hostap: Jouni Malinen <j@w1.fi>
Synchronize build config comments for wpa_supplicant

This updates number of comments in android.config to match the latest
version in defconfig and adds some of the entries that were previously
present only in android.config into defconfig.

Signed-hostap: Jouni Malinen <j@w1.fi>
wpadebug: Move NFC intent activity into a separate class

This simplifies both activities by making the DisplayMessageActity
simple text message displaying operation and the NFC activity as
something that is started only through NFC intent triggers.

Signed-hostap: Jouni Malinen <j@w1.fi>
wpadebug: Report WSC NFC tag read to wpa_supplicant

Signed-hostap: Jouni Malinen <j@w1.fi>
wpadebug: Add generic shell command mechanism

Signed-hostap: Jouni Malinen <j@w1.fi>
wpadebug: Add generic control interface command mechanism

Signed-hostap: Jouni Malinen <j@w1.fi>
wpa_supplicant: Allow global scan frequencies configuration

This allows one to limit the channels that wpa_supplicant will
scan. This is a useful addition to the freq_list configurable
in the network {} section.

Signed-hostap: Ben Greear <greearb@candelatech.com>
wpa_cli: Allow space in the set command value

Previously, interactive mode could not be used to enter space-separated
lists with the set command. This removes that restriction and allows
such commands to be encoded properly.

Signed-hostap: Jouni Malinen <j@w1.fi>
wpa_cli: Replace set command help with completion routine

The old help text did not include most of the parameters and as such,
was not really helpful. Replace it with tab completion function that
includes more or less all available parameters.

Signed-hostap: Jouni Malinen <j@w1.fi>
wpa_cli: Add BSSID tab completion for set bssid_filter

Signed-hostap: Jouni Malinen <j@w1.fi>