summaryrefslogtreecommitdiffstats
path: root/wifi
diff options
context:
space:
mode:
authorIrfan Sheriff <isheriff@google.com>2010-09-02 15:39:16 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-09-02 15:39:16 -0700
commitee923072eb65cbf4f007458450e182a1289c2b7b (patch)
tree7be058cbc25a28f7595f88cd1acd5aab12269487 /wifi
parent572031747f5fd80109e9c574927ded06fcf23e6f (diff)
parent25c9bf2396ceb48fc5cfd5c1dd58aa4d4750d056 (diff)
downloadframeworks_base-ee923072eb65cbf4f007458450e182a1289c2b7b.zip
frameworks_base-ee923072eb65cbf4f007458450e182a1289c2b7b.tar.gz
frameworks_base-ee923072eb65cbf4f007458450e182a1289c2b7b.tar.bz2
Merge "Add set/get band in WifiNative"
Diffstat (limited to 'wifi')
-rw-r--r--wifi/java/android/net/wifi/WifiNative.java4
-rw-r--r--wifi/java/android/net/wifi/WifiStateMachine.java15
2 files changed, 19 insertions, 0 deletions
diff --git a/wifi/java/android/net/wifi/WifiNative.java b/wifi/java/android/net/wifi/WifiNative.java
index 47f8813..862a61b 100644
--- a/wifi/java/android/net/wifi/WifiNative.java
+++ b/wifi/java/android/net/wifi/WifiNative.java
@@ -111,6 +111,10 @@ public class WifiNative {
public native static boolean setPowerModeCommand(int mode);
+ public native static int getBandCommand();
+
+ public native static boolean setBandCommand(int band);
+
public native static int getPowerModeCommand();
public native static boolean setNumAllowedChannelsCommand(int numChannels);
diff --git a/wifi/java/android/net/wifi/WifiStateMachine.java b/wifi/java/android/net/wifi/WifiStateMachine.java
index 6016526..e1cbf5b 100644
--- a/wifi/java/android/net/wifi/WifiStateMachine.java
+++ b/wifi/java/android/net/wifi/WifiStateMachine.java
@@ -320,6 +320,13 @@ public class WifiStateMachine extends HierarchicalStateMachine {
private static final int SCAN_ACTIVE = 1;
private static final int SCAN_PASSIVE = 2;
+ /* Auto allows 802.11A/B/G operation */
+ private static final int BAND_AUTO = 0;
+ /* 5GHz allows 802.11A operation */
+ private static final int BAND_5G = 1;
+ /* 2.4GHz allows 802.11B/G operation */
+ private static final int BAND_2G = 2;
+
/**
* The maximum number of times we will retry a connection to an access point
* for which we have failed in acquiring an IP address from DHCP. A value of
@@ -2179,6 +2186,14 @@ public class WifiStateMachine extends HierarchicalStateMachine {
/* Initialize channel count */
setNumAllowedChannels();
+ /*
+ * STOPSHIP
+ * TODO: We are having 11A issues that Broadcom is looking
+ * to resolve, this is a temporary fix to allow only 11B/G
+ * and help improve GoogleGuest connectivity
+ * We also need to add the UI for band control
+ */
+ WifiNative.setBandCommand(BAND_2G);
if (mIsScanMode) {
WifiNative.setScanResultHandlingCommand(SCAN_ONLY_MODE);