summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2011-12-05 18:34:22 +0000
committerJo-Philipp Wich <jow@openwrt.org>2011-12-05 18:34:22 +0000
commitfd130ead814c4137798b61f4114c64320c592925 (patch)
tree8319fbe9935c69b1542e8c1db33ec55b2f3a2d8f
parentc47e0596dd078cf9c709338d2bf8e53d83b2cc73 (diff)
libs/core: expose txpower offset values in network model
-rw-r--r--libs/core/luasrc/model/network.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/libs/core/luasrc/model/network.lua b/libs/core/luasrc/model/network.lua
index 61da9dfd0..aaa39086a 100644
--- 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)