cross-compilation patches

use arm, LIBNL_PATH, OPENSSL_PATH if given.
(& hardcode LIBNL2 use)

Signed-off-by: Eliad Peller <eliad@wizery.com>
add copy of testmode.h

Use a copy in order to sync testmode commands with the kernel

Signed-off-by: Eliad Peller <eliad@wizery.com>
driver_nl80211: define driver_cmd callback for non-android builds as well

call the original android implementation if ANDROID is defined,
otherwise, return -1.

we'll later extend this function to support testmode commands as well.

Signed-off-by: Eliad Peller <eliad@wizery.com>
driver_nl80211: add testmode_cmd function

Signed-off-by: Eliad Peller <eliad@wizery.com>
events: add smart config events

On EVENT_SMART_CONFIG_SYNC event, start ROCing forever, until
the info is decoded successfully.
scan.c: force passive scan when in smart_config mode

Otherwise, an acrive scan with wildcard ssid is used,
even though there are no enabled networks.

Signed-off-by: Eliad Peller <eliad@wizery.com>
driver_nl80211: handle testmode events

Signed-off-by: Eliad Peller <eliad@wizery.com>
driver_nl80211: register for testmode events

testmode events are used for smart_config

Signed-off-by: Eliad Peller <eliad@wizery.com>
wpa_supplicant: handle smart_config_start/stop

handle smart_config start/stop commands

Signed-off-by: Eliad Peller <eliad@wizery.com>
wpa_cli/ctrl_iface: handle SMART_CONFIG/STOP_SMART_CONFIG commands

simply call the respective wpa_supplicant_smart_config_start/stop
command.

Signed-off-by: Eliad Peller <eliad@wizery.com>
events: add new network on decode

On successfull smart config decode, add a new enabled network,
and save it (if update_config=1).

Signed-off-by: Eliad Peller <eliad@wizery.com>
events: reuse wpa_supplicant_smart_config_stop

on SMART_CONFIG_DECODE event, reuse wpa_supplicant_smart_config_stop
instead of duplicating its actions.

Signed-off-by: Eliad Peller <eliad@wizery.com>
events: add another network entry for smart_config WEP keys

in case of hex keys with len=10/26, add another network
block with wep encryption.

Signed-off-by: Eliad Peller <eliad@wizery.com>
wpa_ctrl: add smart_config events

Add events for SYNC completion and DECODE completion.

Signed-off-by: Eliad Peller <eliad@wizery.com>
events: sleep a bit after canceling scans

After canceling scans, sleep a bit before requesting
to ROC, so they won't collide.

Signed-off-by: Eliad Peller <eliad@wizery.com>
smart_config: request sched_scan instead of standard scan

Signed-off-by: Eliad Peller <eliad@wizery.com>
smart_config: start ROCing only on sched scan completion event

Signed-off-by: Eliad Peller <eliad@wizery.com>
events: ignore EVENT_SMART_CONFIG_SYNC when not in sync stage (squash)

this cause issues when working with multiple interfaces
events: change debug prints a bit (squash)
dump smart_config event only in events.c (squash)