[OpenWrt-Devel] [PATCH] Allow editing of AP channel when all client networks are disabled

George Valkov gvalkov at abv.bg
Fri Jul 24 12:09:22 EDT 2015


  From 8523acc47cada5f191ec79e7db1e97a9daccffec Mon Sep 17 00:00:00 2001  From: Georgi Valkov    Date: Fri, 17 Jul 2015 20:03:58 +0300  Subject: [PATCH] When editing an AP wireless network in LuCI, if one or more  
STA networks are also present on the same radio, then the channel is locked  
and cannot be changed for the AP. The case when all STA networks are disabled  
is not considered. This patch fixes the issue. Disabled networks no longer  
apply a lock on the channel.  
  ---  
modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/wifi.lua | 2 +-  
1 file changed, 1 insertion(+), 1 deletion(-)  
  diff --git a/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/wifi.lua b/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/wifi.lua  index 9f6aaa3..afd86f1 100644  --- a/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/wifi.lua  +++ b/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/wifi.lua  @@ -143,7 +143,7 @@ local found_sta = nil  
local _, net  
if wnet:mode() ~= "sta" then  
 	 for _, net in ipairs(wdev:get_wifinets()) do  - 		 if net:mode() == "sta" then  + 		 if net:mode() == "sta" and net:get("disabled") ~= "1" then  
 			 if not found_sta then  
 				 found_sta = {}  
 				 found_sta.channel = net:channel()  --
  1.9.1  
  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150724/7f2b832a/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list