mirror of
https://github.com/hanwckf/immortalwrt-mt798x.git
synced 2025-01-10 03:09:08 +08:00
add check and format 'security' parameter in function scan_app , and function connect_ap add bssid option
* check and format security * apcli add bssid option * updat PKG_RELEASE to 16
This commit is contained in:
parent
2a78eed885
commit
efbdec477a
@ -7,7 +7,7 @@ LUCI_TITLE:=LuCI support for mt wifi driver
|
||||
LUCI_DEPENDS:=@TARGET_ramips +mt_wifi
|
||||
LUCI_PKGARCH:=all
|
||||
PKG_VERSION:=1
|
||||
PKG_RELEASE:=15
|
||||
PKG_RELEASE:=16
|
||||
|
||||
define Package/luci-app-mtwifi/conffiles
|
||||
/etc/wireless/mt7615/
|
||||
|
@ -791,6 +791,9 @@ function apcli_connect(dev, vif)
|
||||
or cfgs.ApCliAuthMode == "WPA1PSKWPA2PSK" then
|
||||
os.execute("iwpriv "..vifname.." set ApCliWPAPSK="..cfgs.ApCliWPAPSK)
|
||||
end
|
||||
if cfgs.ApCliBssid ~= nil then
|
||||
os.execute("iwpriv "..vifname.." set ApCliBssid="..cfgs.ApCliBssid)
|
||||
end
|
||||
os.execute("iwpriv "..vifname.." set ApCliSsid=\""..cfgs.ApCliSsid.."\"")
|
||||
os.execute("iwpriv "..vifname.." set ApCliEnable=1")
|
||||
luci.http.redirect(luci.dispatcher.build_url("admin", "network", "wifi"))
|
||||
|
@ -85,6 +85,13 @@ local debug = 0
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>BSSID</td>
|
||||
<td>
|
||||
<input type="text" name="ApCliBssid" id="ApCliBssid" value="<%=cfgs.ApCliBssid%>"/>
|
||||
</td>
|
||||
<td><span style="color:green;">可选</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>上级无线信道</td>
|
||||
<td>
|
||||
@ -307,6 +314,7 @@ local debug = 0
|
||||
|
||||
function choose_rootap(index) {
|
||||
document.getElementById("ApCliSsid").value=decode_ssid(ap_list[index].ssid);
|
||||
document.getElementById("ApCliBssid").value=ap_list[index].bssid;
|
||||
document.getElementById("Channel").value=ap_list[index].channel;
|
||||
document.getElementById("ApCliAuthMode").value=ap_list[index].authmode;
|
||||
if (ap_list[index].authmode == "WPA2PSK"
|
||||
|
@ -851,6 +851,10 @@ function mtkwifi.scan_ap(vifname)
|
||||
tmp.ssid = mtkwifi.__trim(string.sub(line, xx.SSID[1], xx.SSID[1]+xx.SSID[2]))
|
||||
tmp.bssid = string.upper(mtkwifi.__trim(string.sub(line, xx.BSSID[1], xx.BSSID[1]+xx.BSSID[2])))
|
||||
tmp.security = mtkwifi.__trim(string.sub(line, xx.Security[1], xx.Security[1]+xx.Security[2]))
|
||||
tmp.security = string.gsub(tmp.security, "WPA1PSKWPA2PSK", "WPAPSKWPA2PSK")
|
||||
if (string.find(tmp.security, "/") == nil) then
|
||||
tmp.security = "OPEN" .. "/" .. tmp.security
|
||||
end
|
||||
tmp.authmode = mtkwifi.__trim(string.split(tmp.security, "/")[1])
|
||||
tmp.encrypttype = mtkwifi.__trim(string.split(tmp.security, "/")[2] or "NONE")
|
||||
tmp.rssi = mtkwifi.__trim(string.sub(line, xx.Signal[1], xx.Signal[1]+xx.Signal[2]))
|
||||
|
Loading…
x
Reference in New Issue
Block a user