The PHY-N code uses a different format for gain values, so these macros are used for converting to/from and print out values.
bwn_sqrt() is in the PHY-LP code but is also needed by the upcoming PHY-N support. The other two routines are used by the PHY-N code. The next commit will introduce it into the compile and pull bwn_sqrt() out of the PHY-LP source.