From fd130ead814c4137798b61f4114c64320c592925 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Mon, 5 Dec 2011 18:34:22 +0000 Subject: libs/core: expose txpower offset values in network model --- libs/core/luasrc/model/network.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'libs') 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) -- cgit v1.2.3