LP PHY Get TX Gain ( struct lpphy_txgains *gains)
Read PHY Register 0x439, mask with 0x380, right shift by 7, and store in gains->dac_gain
If PHY revision < 2
Read PHY Register 0x4B5, mask with 0x7FF and save as tmp1
Mask tmp1 with 0x7 and store in gains->gm_gain
Mask tmp1 with 0x78, right shift by 3, and store in gains->pga_gain
Mask tmp1 with 0x780, right shift by 7 and store in gains->pad_gain
- Otherwise
Read PHY Register 0x4B5, mask with 0xFFFF (Is this not a u16?) and save as tmp1
Read PHY Register 0x4FB, mask with 0x00FF and store in gains->pad_gain
Mask tmp1 with 0xFF and store in gains->gm_gain
Right shift tmp1 by 8, mask with 0xFF, and store in gains->pga_gain