--- /usr/share/gnome-shell/js/ui/status/network.js.orig	2011-06-25 23:20:26.000000000 +0800
+++ /usr/share/gnome-shell/js/ui/status/network.js	2011-09-03 00:00:30.785037143 +0800
@@ -1013,6 +1013,16 @@
         for (let i = 0; i < accessPoints.length; i++) {
             // Access points are grouped by network
             let ap = accessPoints[i];
+
+            if (ap.get_ssid() == null) {
+                // hidden access point cannot be added, we need to know
+                // the SSID and security details to connect
+                // nevertheless, the access point can acquire a SSID when
+                // NetworkManager connects to it (via nmcli or the control-center)
+                ap._notifySsidId = ap.connect('notify::ssid', Lang.bind(this, this._notifySsidCb));
+                continue;
+            }
+
             let pos = this._findNetwork(ap);
             let obj;
             if (pos != -1) {
@@ -1112,6 +1122,14 @@
         }
     },
 
+    _notifySsidCb: function(accessPoint) {
+        if (accessPoint.get_ssid() != null) {
+            accessPoint.disconnect(accessPoint._notifySsidId);
+            accessPoint._notifySsidId = 0;
+            this._accessPointAdded(this.device, accessPoint);
+        }
+    },
+
     _getApSecurityType: function(accessPoint) {
         if (accessPoint._secType)
             return accessPoint._secType;
@@ -1155,6 +1173,10 @@
     },
 
     _findNetwork: function(accessPoint) {
+        if (accessPoint == null)
+            return -1;
+        if (accessPoint.get_ssid() == null)
+            return -1;
         for (let i = 0; i < this._networks.length; i++) {
             if (this._networkCompare(this._networks[i], accessPoint))
                 return i;
@@ -1163,6 +1185,13 @@
     },
 
     _accessPointAdded: function(device, accessPoint) {
+        if (accessPoint.get_ssid() == null) {
+            // This access point is not visible yet
+            // Wait for it to get a ssid
+            accessPoint._notifySsidId = accessPoint.connect('notify::ssid', Lang.bind(this, this._notifySsidCb));
+            return;
+        }
+
         let pos = this._findNetwork(accessPoint);
         let apObj;
         if (pos != -1) {
@@ -1356,6 +1385,10 @@
 
     _createActiveConnectionItem: function() {
         let activeAp = this.device.active_access_point;
+        let networkPos = this._findNetwork(this.device.active_access_point);
+        if (networkPos == -1) // the connected access point is invisible
+            activeAp = null;
+
         let icon, title;
         if (this._activeConnection._connection) {
             let connection = this._activeConnection._connection;
