This function converts a TSSI value to dBm (in Q5.2).
A PHYs
- Take the idle TSSI target, add the TSSI value, and then subtract the saved value of the power control register value
Add 0x80 to that value and clamp between 0 and 0xFF and use this as an index into the TSSI to DBM Table
Find the power out value for the current channel (based on what? It's a magic number here ... FIXME) and add that to the retrieved value
- Return the result
B/G PHYs
- Take the idle TSSI target, add the TSSI value, and then subtract the saved value of the power control register value
Clamp this value between 0 and 0x3F and use this as an index into the TSSI to DBM Table
- Return the retrieved value, a dBm value in Q5.2