Android: driver_nl80211: ignore useless driver commands

These are not used, so just return success to avoid creating spurious
errors in logcat.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Initiate a periodic normal scan in addition to sched scan (ANDROID)

Android assumes wpa_s performs periodic broadcast scans whenever there are
saved networks. It relies on these scans for the "open networks detection"
feature. Whenever there aren't any saved networks the framework will initiate
these periodic scans on its own. Switching to using sched scan in wpa_s
effectively disabled these periodic broadcast scans as no results are returned
from the sched scan until a saved network is seen.
Fix this by initiating a normal scan every scan interval following no match
when handling scan results.

Signed-off-by: Eyal Shapira <eyal@wizery.com>
hostapd: add hostapd.conf param to force AP channel sync

When ap_channel_sync=1 the 40Mhz operating channel of an AP will be
set to the channel of an existing AP operating on the same PHY (NIC).

Signed-off-by: Arik Nemtsov <arik@wizery.com>
hostapd: use new op to sync AP channels

A new op will be used to get the operational frequency and secondary
channel of any existing APs, even if operating in different processes.

Use this op to select the channel for the current AP, if dictated by
the ap_channel_sync config parameter.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
driver_nl80211: implement shared AP channel op

Dump all AP interfaces using NL80211_CMD_GET_INTERFACE and make sure
the wiphy matches ours.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Android: SQUASH with patch introducing wpa_driver_nl80211_driver_cmd

Signed-off-by: Arik Nemtsov <arik@wizery.com>
wpa_s: make SETBAND take immediate effect

Make SETBAND disconnect from the current AP if it's not
in the correct band. Also expire APs which aren't in the correct
band so scan results will immediately reflect the band change.

[Eyal - ammended commit description]

Signed-off-by: Panduranga Mallireddy <panduranga_mallireddy@ti.com>
Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Don't disable and select new network if SETBAND didn't change (ANDROID)

Current SETBAND would trigger network selection and as part of this
a scan attempt. This is not required in case SETBAND didn't change the
existing setting.

In Android which sends SETBAND immediately after WiFi startup this
would trigger needless scan attempts which would usually fail with -EBUSY
as another framework triggers scan was already going on.
The retry mechanism would then attempt further scans every 1 sec.

Signed-off-by: Eyal Shapira <eyal@wizery.com>