diff options
author | Andrew Lunn <andrew@lunn.ch> | 2019-07-21 19:50:08 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-07-21 21:51:50 +0300 |
commit | 0cea0e1148fe134a4a3aaf0b1496f09241fb943a (patch) | |
tree | 7afeb1162301bd9cd936c27f6f75ae92f23625ae /net/bridge | |
parent | 503d81d428bd598430f7f9d02021634e1a8139a0 (diff) | |
download | linux-0cea0e1148fe134a4a3aaf0b1496f09241fb943a.tar.xz |
net: phy: sfp: hwmon: Fix scaling of RX power
The RX power read from the SFP uses units of 0.1uW. This must be
scaled to units of uW for HWMON. This requires a divide by 10, not the
current 100.
With this change in place, sensors(1) and ethtool -m agree:
sff2-isa-0000
Adapter: ISA adapter
in0: +3.23 V
temp1: +33.1 C
power1: 270.00 uW
power2: 200.00 uW
curr1: +0.01 A
Laser output power : 0.2743 mW / -5.62 dBm
Receiver signal average optical power : 0.2014 mW / -6.96 dBm
Reported-by: chris.healy@zii.aero
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Fixes: 1323061a018a ("net: phy: sfp: Add HWMON support for module sensors")
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge')
0 files changed, 0 insertions, 0 deletions