From fd130ead814c4137798b61f4114c64320c592925 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Mon, 5 Dec 2011 18:34:22 +0000 Subject: [PATCH] libs/core: expose txpower offset values in network model --- libs/core/luasrc/model/network.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libs/core/luasrc/model/network.lua b/libs/core/luasrc/model/network.lua index 61da9dfd04..aaa39086ae 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) -- 2.30.2