Commit fd7f8387 authored by Sujith Manoharan's avatar Sujith Manoharan Committed by John W. Linville

ath9k: Add information about antenna diversity

Signed-off-by: default avatarSujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 1f807827
...@@ -16,6 +16,58 @@ ...@@ -16,6 +16,58 @@
#include "ath9k.h" #include "ath9k.h"
/*
* AR9285
* ======
*
* EEPROM has 2 4-bit fields containing the card configuration.
*
* antdiv_ctl1:
* ------------
* bb_enable_ant_div_lnadiv : 1
* bb_ant_div_alt_gaintb : 1
* bb_ant_div_main_gaintb : 1
* bb_enable_ant_fast_div : 1
*
* antdiv_ctl2:
* -----------
* bb_ant_div_alt_lnaconf : 2
* bb_ant_div_main_lnaconf : 2
*
* The EEPROM bits are used as follows:
* ------------------------------------
*
* bb_enable_ant_div_lnadiv - Enable LNA path rx antenna diversity/combining.
* Set in AR_PHY_MULTICHAIN_GAIN_CTL.
*
* bb_ant_div_[alt/main]_gaintb - 0 -> Antenna config Alt/Main uses gaintable 0
* 1 -> Antenna config Alt/Main uses gaintable 1
* Set in AR_PHY_MULTICHAIN_GAIN_CTL.
*
* bb_enable_ant_fast_div - Enable fast antenna diversity.
* Set in AR_PHY_CCK_DETECT.
*
* bb_ant_div_[alt/main]_lnaconf - Alt/Main LNA diversity/combining input config.
* Set in AR_PHY_MULTICHAIN_GAIN_CTL.
* 10=LNA1
* 01=LNA2
* 11=LNA1+LNA2
* 00=LNA1-LNA2
*
* AR9485 / AR9565 / AR9331
* ========================
*
* The same bits are present in the EEPROM, but the location in the
* EEPROM is different (ant_div_control in ar9300_BaseExtension_1).
*
* ant_div_alt_lnaconf ==> bit 0~1
* ant_div_main_lnaconf ==> bit 2~3
* ant_div_alt_gaintb ==> bit 4
* ant_div_main_gaintb ==> bit 5
* enable_ant_div_lnadiv ==> bit 6
* enable_ant_fast_div ==> bit 7
*/
static inline bool ath_is_alt_ant_ratio_better(int alt_ratio, int maxdelta, static inline bool ath_is_alt_ant_ratio_better(int alt_ratio, int maxdelta,
int mindelta, int main_rssi_avg, int mindelta, int main_rssi_avg,
int alt_rssi_avg, int pkt_count) int alt_rssi_avg, int pkt_count)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment