network: Let NetworkManager figure out the best AP for the connection

According to dcbw, this can be handled by NetworkManager now.
This commit is contained in:
Jasper St. Pierre 2014-01-23 14:35:10 -05:00
parent a739455414
commit 4faf421d5a

View File

@ -733,16 +733,11 @@ const NMWirelessDialog = new Lang.Class({
_connect: function() {
let network = this._selectedNetwork;
let accessPoints = network.accessPoints;
if (network.connections.length > 0) {
let connection = network.connections[0];
for (let i = 0; i < accessPoints.length; i++) {
if (accessPoints[i].connection_valid(connection)) {
this._client.activate_connection(connection, this._device, accessPoints[i].dbus_path, null);
break;
}
}
this._client.activate_connection(connection, this._device, null, null);
} else {
let accessPoints = network.accessPoints;
if ((accessPoints[0]._secType == NMAccessPointSecurity.WPA2_ENT)
|| (accessPoints[0]._secType == NMAccessPointSecurity.WPA_ENT)) {
// 802.1x-enabled APs require further configuration, so they're