Bug 868913 - Part 2: Fix the wifi initial start problem. r=mrbkap
authorVincent Chang <vchang@mozilla.com>
Mon, 17 Jun 2013 12:20:39 +0800
changeset 147095 2f49ab9a4da4390ed068527bb37a368065eb001f
parent 147094 dd48a19a10feed81abacd5d952be7ff0bdfc5c2f
child 147096 14fc0edd9f8f5a27bfbcbcd5782cf50bdbdb9050
push id2697
push userbbajaj@mozilla.com
push dateMon, 05 Aug 2013 18:49:53 +0000
treeherdermozilla-beta@dfec938c7b63 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmrbkap
bugs868913
milestone24.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 868913 - Part 2: Fix the wifi initial start problem. r=mrbkap
dom/wifi/WifiWorker.js
--- a/dom/wifi/WifiWorker.js
+++ b/dom/wifi/WifiWorker.js
@@ -1693,17 +1693,17 @@ function WifiWorker() {
 
   this.currentNetwork = null;
   this.ipAddress = "";
 
   this._lastConnectionInfo = null;
   this._connectionInfoTimer = null;
   this._reconnectOnDisconnect = false;
 
-  // Users of instances of nsITimer should keep a reference to the timer until 
+  // Users of instances of nsITimer should keep a reference to the timer until
   // it is no longer needed in order to assure the timer is fired.
   this._callbackTimer = null;
 
   // XXX On some phones (Otoro and Unagi) the wifi driver doesn't play nicely
   // with the automatic scans that wpa_supplicant does (it appears that the
   // driver forgets that it's returned scan results and then refuses to try to
   // rescan. In order to detect this case we start a timer when we enter the
   // SCANNING state and reset it whenever we either get scan results or leave
@@ -2253,17 +2253,17 @@ WifiWorker.prototype = {
 
   _wifiTetheringSettingsToRead: [],
 
   _oldWifiTetheringEnabledState: null,
 
   tetheringSettings: {},
 
   initTetheringSettings: function initTetheringSettings() {
-    this.tetheringSettings[SETTINGS_WIFI_ENABLED] = false;
+    this.tetheringSettings[SETTINGS_WIFI_TETHERING_ENABLED] = null;
     this.tetheringSettings[SETTINGS_WIFI_SSID] = DEFAULT_WIFI_SSID;
     this.tetheringSettings[SETTINGS_WIFI_SECURITY_TYPE] = DEFAULT_WIFI_SECURITY_TYPE;
     this.tetheringSettings[SETTINGS_WIFI_SECURITY_PASSWORD] = DEFAULT_WIFI_SECURITY_PASSWORD;
     this.tetheringSettings[SETTINGS_WIFI_IP] = DEFAULT_WIFI_IP;
     this.tetheringSettings[SETTINGS_WIFI_PREFIX] = DEFAULT_WIFI_PREFIX;
     this.tetheringSettings[SETTINGS_WIFI_DHCPSERVER_STARTIP] = DEFAULT_WIFI_DHCPSERVER_STARTIP;
     this.tetheringSettings[SETTINGS_WIFI_DHCPSERVER_ENDIP] = DEFAULT_WIFI_DHCPSERVER_ENDIP;
     this.tetheringSettings[SETTINGS_WIFI_DNS1] = DEFAULT_DNS1;