diff --git a/package/lean/luci-app-mtwifi/luasrc/controller/mtkwifi.lua b/package/lean/luci-app-mtwifi/luasrc/controller/mtkwifi.lua index e39dcc2c26..4f66f9b914 100644 --- a/package/lean/luci-app-mtwifi/luasrc/controller/mtkwifi.lua +++ b/package/lean/luci-app-mtwifi/luasrc/controller/mtkwifi.lua @@ -769,14 +769,14 @@ function apcli_connect(dev, vif) mtkwifi.save_profile(cfgs, profiles[devname]) os.execute("ifconfig "..vifname.." up") - local brvifs = mtkwifi.__trim(mtkwifi.read_pipe("uci get network.lan.ifname")) - if not string.match(brvifs, vifname) then - brvifs = brvifs.." "..vifname - nixio.syslog("debug", "add "..vifname.." into lan") - os.execute("uci set network.lan.ifname=\""..brvifs.."\"") - os.execute("uci commit") - os.execute("ubus call network.interface.lan add_device \"{\\\"name\\\":\\\""..vifname.."\\\"}\"") - end +-- local brvifs = mtkwifi.__trim(mtkwifi.read_pipe("uci get network.lan.ifname")) +-- if not string.match(brvifs, vifname) then +-- brvifs = brvifs.." "..vifname +-- nixio.syslog("debug", "add "..vifname.." into lan") +-- os.execute("uci set network.lan.ifname=\""..brvifs.."\"") +-- os.execute("uci commit") +-- os.execute("ubus call network.interface.lan add_device \"{\\\"name\\\":\\\""..vifname.."\\\"}\"") +-- end os.execute("iwpriv "..vifname.." set MACRepeaterEn="..cfgs.MACRepeaterEn) os.execute("iwpriv "..vifname.." set ApCliEnable=0") @@ -815,14 +815,14 @@ function apcli_disconnect(dev, vif) os.execute("iwpriv "..vifname.." set ApCliEnable=0") - local brvifs = mtkwifi.__trim(mtkwifi.read_pipe("uci get network.lan.ifname")) - if string.match(brvifs, vifname) then - brvifs = mtkwifi.__trim(string.gsub(brvifs, vifname, "")) - nixio.syslog("debug", "add "..vifname.." into lan") - os.execute("uci set network.lan.ifname=\""..brvifs.."\"") - os.execute("uci commit") - os.execute("ubus call network.interface.lan remove_device \"{\\\"name\\\":\\\""..vifname.."\\\"}\"") - end +-- local brvifs = mtkwifi.__trim(mtkwifi.read_pipe("uci get network.lan.ifname")) +-- if string.match(brvifs, vifname) then +-- brvifs = mtkwifi.__trim(string.gsub(brvifs, vifname, "")) +-- nixio.syslog("debug", "add "..vifname.." into lan") +-- os.execute("uci set network.lan.ifname=\""..brvifs.."\"") +-- os.execute("uci commit") +-- os.execute("ubus call network.interface.lan remove_device \"{\\\"name\\\":\\\""..vifname.."\\\"}\"") +-- end os.execute("ifconfig "..vifname.." down") luci.http.redirect(luci.dispatcher.build_url("admin", "network", "wifi")) diff --git a/package/lean/luci-app-mtwifi/luasrc/view/admin_mtk/mtk_wifi_overview.htm b/package/lean/luci-app-mtwifi/luasrc/view/admin_mtk/mtk_wifi_overview.htm index f9b21125ad..11e29ff7c5 100644 --- a/package/lean/luci-app-mtwifi/luasrc/view/admin_mtk/mtk_wifi_overview.htm +++ b/package/lean/luci-app-mtwifi/luasrc/view/admin_mtk/mtk_wifi_overview.htm @@ -81,8 +81,10 @@ local devs = mtkwifi.get_all_devs() '" /> <% end %> '" /> - <% if dev.apcli.state == "down" then %> - '" /> + <% if dev.apcli then %> + <% if dev.apcli.state == "down" then %> + '" /> + <% end %> <% end %> '" /> diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index 1f125f303f..bec922f06b 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -1054,8 +1054,8 @@ define Device/xiaomi_mir3g DEVICE_MODEL := Mi Router 3G SUPPORTED_DEVICES += R3G SUPPORTED_DEVICES += mir3g - DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \ - kmod-usb-ledtrig-usbport wpad-basic uboot-envtools + DEVICE_PACKAGES := kmod-mt7603e kmod-mt76x2e kmod-usb3 \ + kmod-usb-ledtrig-usbport luci-app-mtwifi uboot-envtools endef TARGET_DEVICES += xiaomi_mir3g @@ -1068,7 +1068,7 @@ define Device/xiaomi_mir3g-v2 DEVICE_ALT0_VENDOR := Xiaomi DEVICE_ALT0_MODEL := Mi Router 4A DEVICE_ALT0_VARIANT := Gigabit Edition - DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 wpad-basic + DEVICE_PACKAGES := kmod-mt7603e kmod-mt76x2e luci-app-mtwifi endef TARGET_DEVICES += xiaomi_mir3g-v2