From 00340cb25378f4ebd30f87298056369c64aee14a Mon Sep 17 00:00:00 2001 From: peteruithoven Date: Thu, 27 Feb 2014 15:14:30 +0100 Subject: [PATCH] Not specifying bssid in wireless config and removing previous configs with same ssid --- src/network/wlanconfig.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/network/wlanconfig.lua b/src/network/wlanconfig.lua index 2f2e2c1..4087a9d 100644 --- a/src/network/wlanconfig.lua +++ b/src/network/wlanconfig.lua @@ -228,7 +228,7 @@ function M.createConfigFromScanInfo(info, passphrase, disabled) network = M.NET, device = 'radio0', ssid = info.ssid, - bssid = info.bssid, + --bssid = info.bssid, encryption = M.mapEncryptionType(info.encryption), mode = mode, } @@ -236,8 +236,9 @@ function M.createConfigFromScanInfo(info, passphrase, disabled) apconfig.disabled = disabled ~= nil and disabled and 1 or 0 uci:foreach('wireless', 'wifi-iface', function(s) - if s.bssid == info.bssid then - log:debug("removing old wireless config for net '" .. s.ssid .. "(bssid: " .. s.bssid .. ")'") + --if s.bssid == info.bssid then + if s.ssid == info.ssid then + log:debug("removing old wireless config for net '" .. s.ssid .. "'") uci:delete('wireless', s['.name']) -- return false --keep looking, just in case multiple entries with this bssid exist end