Revisió f63e44fa
Afegit per Simó Albert i Beltran fa més de 10 anys
scripts/files/luci_wifi_join.htm.patch | ||
---|---|---|
--- feeds/luci/modules/admin-full/luasrc/view/admin_network/wifi_join.htm.orig 2014-04-21 21:47:03.005709811 +0200
|
||
+++ feeds/luci/modules/admin-full/luasrc/view/admin_network/wifi_join.htm 2014-04-26 17:38:51.467465013 +0200
|
||
@@ -77,15 +77,28 @@
|
||
|
||
|
||
function scanlist(times)
|
||
- local i, k, v
|
||
+ local i, k, v, old
|
||
local l = { }
|
||
- local s = { }
|
||
+ local new = { }
|
||
+ local networks = { }
|
||
+ local found = false
|
||
|
||
for i = 1, times do
|
||
for k, v in ipairs(iw.scanlist or { }) do
|
||
- if not s[v.bssid] then
|
||
+ new['bssid'] = v.bssid
|
||
+ new['channel'] = v.channel
|
||
+ found = false
|
||
+ for _, old in ipairs(networks) do
|
||
+ if old.bssid == new.bssid and old.channel == new.channel then
|
||
+ found = true
|
||
+ break
|
||
+ end
|
||
+ end
|
||
+ if not found then
|
||
l[#l+1] = v
|
||
- s[v.bssid] = true
|
||
+ networks[#networks+1] = { }
|
||
+ networks[#networks]['bssid'] = new.bssid
|
||
+ networks[#networks]['channel'] = new.channel
|
||
end
|
||
end
|
||
end
|
scripts/luci_wifi_join.script | ||
---|---|---|
#!/bin/sh
|
||
[ "$1" != "PRE_BUILD" ] && exit 0
|
||
shift
|
||
TBUILD="$1"
|
||
|
||
[ -z "$TBUILD" ] || [ ! -d "build/$TBUILD" ] && exit 1
|
||
patch -p0 -d build/$TBUILD/ < scripts/files/luci_wifi_join.htm.patch > /dev/null
|
També disponible a: Unified diff
Add patch to fix LuCI wifi_join.htm to show differents channels for the same BSSID when scan networks