Bug 1088490 - Default network mode to ESS. r=vchang
authorChuck Lee <chulee@mozilla.com>
Mon, 27 Oct 2014 16:23:43 +0800
changeset 212880 8f637cec5c5f4aadd9103563c2f5bc9db7104e73
parent 212879 10333db03e198d1e608b4a66f072d0c1a22e74d7
child 212881 3c2383fdacf37b466ab69e7f79059e8d4a5ba7f5
push id27734
push userryanvm@gmail.com
push dateWed, 29 Oct 2014 20:15:52 +0000
treeherdermozilla-central@8345ae427a3f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersvchang
bugs1088490
milestone36.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 1088490 - Default network mode to ESS. r=vchang
dom/wifi/WifiWorker.js
--- a/dom/wifi/WifiWorker.js
+++ b/dom/wifi/WifiWorker.js
@@ -1586,25 +1586,20 @@ function getNetworkKey(network)
   // ssid here must be dequoted, and it's safer to esacpe it.
   // encryption won't be empty and always be assigned one of the followings :
   // "OPEN"/"WEP"/"WPA-PSK"/"WPA-EAP".
   // So for a invalid network object, the returned key will be "OPEN".
   return escape(ssid) + encryption;
 }
 
 function getMode(flags) {
-  if (!flags)
-    return -1;
-
-  if (/\[ESS/.test(flags))
-    return MODE_ESS;
   if (/\[IBSS/.test(flags))
     return MODE_IBSS;
 
-  return -1;
+  return MODE_ESS;
 }
 
 function getKeyManagement(flags) {
   var types = [];
   if (!flags)
     return types;
 
   if (/\[WPA2?-PSK/.test(flags))