projects
/
project
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c47e059
)
libs/core: expose txpower offset values in network model
author
Jo-Philipp Wich
<jow@openwrt.org>
Mon, 5 Dec 2011 18:34:22 +0000
(18:34 +0000)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Mon, 5 Dec 2011 18:34:22 +0000
(18:34 +0000)
libs/core/luasrc/model/network.lua
patch
|
blob
|
history
diff --git
a/libs/core/luasrc/model/network.lua
b/libs/core/luasrc/model/network.lua
index 61da9dfd0414ebf7af04ca135fe934ca4437b38b..aaa39086ae7cebc1d342a25fdca24ebdfa600331 100644
(file)
--- a/
libs/core/luasrc/model/network.lua
+++ b/
libs/core/luasrc/model/network.lua
@@
-1360,7
+1360,12
@@
function wifinet.country(self)
end
function wifinet.txpower(self)
- return self.iwinfo.txpower or 0
+ local pwr = (self.iwinfo.txpower or 0)
+ return pwr + self:txpower_offset()
+end
+
+function wifinet.txpower_offset(self)
+ return self.iwinfo.txpower_offset or 0
end
function wifinet.signal_level(self, s, n)