POWER TO PCDAC TABLE FUNCTIONS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– Power to PCDAC table functions πŸ’–

Okay so bestie, this is the Power to PCDAC table functions(9) page from the Kernel API Manual β€” yes, the header is a little truncated (Power to PCD...le functions(9)), but we move. It’s giving deeply specific radio-table magic, and we’re gonna read it together πŸ’…

For RF5111 we have an XPD -eXternal Power Detector- curve for each calibrated channel. Each curve has 0,5dB Power steps on x axis and PCDAC steps (offsets) on y axis and looks like an exponential function. To recreate the curve we read 11 points from eeprom (eeprom.c) and interpolate here.

For RF5112 we have 4 XPD -eXternal Power Detector- curves for each calibrated channel on 0, -6, -12 and -18dBm but we only use the higher (3) and the lower (0) curves. Each curve again has 0.5dB power steps on x axis and PCDAC steps on y axis and looks like a linear function. To recreate the curve and pass the power values on hw, we get 4 points for xpd 0 (lower gain -> max power) and 3 points for xpd 3 (higher gain -> lower power) from eeprom (eeprom.c) and interpolate here.

For a given channel we get the calibrated points (piers) for it or -if we don't have calibration data for this specific channel- from the available surrounding channels we have calibration data for, after we do a linear interpolation between them. Then since we have our calibrated points for this channel, we do again a linear interpolation between them to get the whole curve.

We finally write the Y values of the curve(s) (the PCDAC values) on hw.


🌈 SEE ALSO 🌈

Vibe check the cross-refs, periodt:

This gem lives at ./drivers/net/wireless/ath/ath5k, dated October 2026 β€” bye bestie, mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from