fix Tethering class for 4.3

Change-Id: I987127604dc3702febc517ee063904244816712a
Wifi: Enable Ad-Hoc (IBSS) network configuration

This adds two public but hidden variables to WifiConfiguration: isIBSS and
frequency. These are used for configuring IBSS mode.

WifiConfigStore is exended to get and set these variables to wpa_supplicant
(via WifiNative).

Change-Id: Iab02c3d738c05c2de036350ea77b78789213e357

Conflicts:
	wifi/java/android/net/wifi/WifiConfiguration.java
Wifi: Get the list of supported channels

Get the list of supported channels/frequencies from wpa_supplicant and provide
them thru WifiManager.getSupportedChannels();

One channel is represented thru the class WifiChannel which includes channel
number, frequency in MHz and a flag if IBSS mode is allowed on this channel.

Like isIbssSupported() we can only expect a result after WIFI_STATE_ENABLED has
been reached.

Change-Id: I9fc34642b9a0047f6871b180a3a7a69d47b7e2ff

Conflicts:
	services/java/com/android/server/WifiService.java
	wifi/java/android/net/wifi/IWifiManager.aidl
	wifi/java/android/net/wifi/WifiManager.java
	wifi/java/android/net/wifi/WifiNative.java
	wifi/java/android/net/wifi/WifiStateMachine.java
wifi: Set the mode at native layer

 * Set normal/AP mode so that the HAL can specify correct module
   arguments when loading the driver.

Change-Id: I6eee2cc53b5f1e70306e252e52c909833f220515

Conflicts:
	wifi/java/android/net/wifi/WifiNative.java
	wifi/java/android/net/wifi/WifiStateMachine.java
wifi: Allow Settings to retrieve country code

This makes getCountryCode behave like getFrequencyBand

This allows Settings to get/set country code like
it can for frequency band.

Change-Id: Id9f00d3a678642c6c142fd1511af820d729507a7

Conflicts:
	services/java/com/android/server/WifiService.java
iron out tethering functions

Change-Id: I4538cabebe92173b6201feeb76557a595bb69425
Revert "Patch Set 1/2: Add an "Automatically Connect" option for WiFi networks"

This commit breaks 3rd party apps like Tasker.  It is being reverted until a better solution can be found.

This reverts commit 19c7d4995a554bc26a17b55f481193c435d30560

Change-Id: Ie279aab8f52bd30dc21dbc70040fb3bd23721e33

Conflicts:
	wifi/java/android/net/wifi/WifiConfiguration.java