ath5k: Update gain_F calibration code and add documentation

 * Update and cleanup rf gain optimization code

 * Add comments and refferences to docs and use sane function names

 * Use only step index on ath5k_gain, no need to have a pointer to
   the current step since we can determine te step from it's index,
   this also allows us to put all other structs on rfgain.h and cleanup
   ath5k.h a little

 * No need for ah_rfgain variable, we use ah_gain.g_state for everything

 * Tested on RF2112B chip but gain_F calibration is not yet done
   (we will finish this on the next patch where we'll rewrite rf-buffer
   handling)

 * Use initial rf gain settings for 2316 and 2317 SoCs introduced on a previous patch

 It seems big but it's mostly cleanup, very few functional changes have been made on phy.c

  Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>

Signed-off-by: John W. Linville <linville@tuxdriver.com>
diff --git a/drivers/net/wireless/ath5k/rfbuffer.h b/drivers/net/wireless/ath5k/rfbuffer.h
index 526cf6c..28b3016 100644
--- a/drivers/net/wireless/ath5k/rfbuffer.h
+++ b/drivers/net/wireless/ath5k/rfbuffer.h
@@ -111,6 +111,7 @@
 #define	AR5K_RF5111_GAIN_I		{ 6, 29,  0 }
 #define	AR5K_RF5111_PLO_SEL		{ 1, 4,   0 }
 #define	AR5K_RF5111_RFGAIN_SEL		{ 1, 36,  0 }
+#define AR5K_RF5111_RFGAIN_STEP		{ 6, 37,  0 }
 /* Only on AR5212 BaseBand and up */
 #define	AR5K_RF5111_WAIT_S		{ 5, 19,  0 }
 #define	AR5K_RF5111_WAIT_I		{ 5, 24,  0 }
@@ -235,7 +236,9 @@
 
 /* BANK 7 (Common)			len  pos col */
 #define	AR5K_RF5112X_GAIN_I		{ 6, 14,  0 }
+#define	AR5K_RF5112X_MIXVGA_OVR		{ 1, 36,  0 }
 #define	AR5K_RF5112X_MIXGAIN_OVR	{ 2, 37,  0 }
+#define AR5K_RF5112X_MIXGAIN_STEP	{ 4, 32,  0 }
 #define	AR5K_RF5112X_PD_DELAY_A		{ 4, 58,  0 }
 #define	AR5K_RF5112X_PD_DELAY_B		{ 4, 62,  0 }
 #define	AR5K_RF5112X_PD_DELAY_XR	{ 4, 66,  0 }