Bug 949861 - Wifi does not work on Galaxy S2 device (SGS2) after flashing Gecko. r=chucklee
authorVincent Chang <vchang@mozilla.com>
Thu, 19 Dec 2013 14:22:10 +0800
changeset 162246 ed5f2b83ef5ea9c1414a998a28f4f3a5f6e4a0e2
parent 162245 505a4fa8f55165472dd123b8ccb666d95b977b87
child 162247 3a37244033093d342ff83a7cdc1e85b8b732eff3
push idunknown
push userunknown
push dateunknown
reviewerschucklee
bugs949861
milestone29.0a1
Bug 949861 - Wifi does not work on Galaxy S2 device (SGS2) after flashing Gecko. r=chucklee
dom/wifi/WifiWorker.js
--- a/dom/wifi/WifiWorker.js
+++ b/dom/wifi/WifiWorker.js
@@ -864,25 +864,22 @@ var WifiManager = (function() {
                                    null);
       prepareForStartup(function() {
         loadDriver(function (status) {
           if (status < 0) {
             callback(status);
             manager.state = "UNINITIALIZED";
             return;
           }
+          // This command is mandatory for Nexus 4. But some devices like
+          // Galaxy S2 don't support it. Continue to start wpa_supplicant
+          // even if we fail to set wifi operation mode to station.
           gNetworkService.setWifiOperationMode(manager.ifname,
                                                WIFI_FIRMWARE_STATION,
                                                function (status) {
-            if (status) {
-              callback(status);
-              manager.state = "UNINITIALIZED";
-              return;
-            }
-
             function doStartSupplicant() {
               cancelWaitForDriverReadyTimer();
               wifiCommand.startSupplicant(function (status) {
                 if (status < 0) {
                   unloadDriver(function() {
                     callback(status);
                   });
                   manager.state = "UNINITIALIZED";