More kite diversity related changes.
* add a diversity flag to the HAL debugging section * add a check to make sure the kite diversity code doesn't run on boards that don't require it, as not all Kite chips will implement it. * add some debug statements when the diversity code makes changes to the antenna diversity/combining setup.
This commit is contained in:
parent
ac27b8ff27
commit
1171c869d7
@ -44,6 +44,7 @@ enum {
|
||||
HAL_DEBUG_POWER = 0x00020000, /* power management */
|
||||
HAL_DEBUG_GPIO = 0x00040000, /* GPIO debugging */
|
||||
HAL_DEBUG_INTERRUPT = 0x00080000, /* interrupt handling */
|
||||
HAL_DEBUG_DIVERSITY = 0x00100000, /* diversity debugging */
|
||||
|
||||
HAL_DEBUG_ANY = 0xffffffff
|
||||
};
|
||||
|
@ -371,6 +371,9 @@ ar9285_ant_comb_scan(struct ath_hal *ah, struct ath_rx_status *rs,
|
||||
int rx_ant_conf, main_ant_conf;
|
||||
HAL_BOOL short_scan = AH_FALSE;
|
||||
|
||||
if (! ar9285_check_div_comb(ah))
|
||||
return;
|
||||
|
||||
rx_ant_conf = (rs->rs_rssi_ctl[2] >> ATH_ANT_RX_CURRENT_SHIFT) &
|
||||
ATH_ANT_RX_MASK;
|
||||
main_ant_conf = (rs->rs_rssi_ctl[2] >> ATH_ANT_RX_MAIN_SHIFT) &
|
||||
@ -415,7 +418,6 @@ ar9285_ant_comb_scan(struct ath_hal *ah, struct ath_rx_status *rs,
|
||||
antcomb->total_pkt_count);
|
||||
}
|
||||
|
||||
|
||||
ar9285_antdiv_comb_conf_get(ah, &div_ant_conf);
|
||||
curr_alt_set = div_ant_conf.alt_lna_conf;
|
||||
curr_main_set = div_ant_conf.main_lna_conf;
|
||||
@ -585,6 +587,16 @@ ar9285_ant_comb_scan(struct ath_hal *ah, struct ath_rx_status *rs,
|
||||
|
||||
ar9285_antdiv_comb_conf_set(ah, &div_ant_conf);
|
||||
|
||||
if (curr_alt_set != div_ant_conf.alt_lna_conf)
|
||||
HALDEBUG(ah, HAL_DEBUG_DIVERSITY, "%s: lna_conf: %x -> %x\n",
|
||||
__func__, curr_alt_set, div_ant_conf.alt_lna_conf);
|
||||
if (curr_main_set != div_ant_conf.main_lna_conf)
|
||||
HALDEBUG(ah, HAL_DEBUG_DIVERSITY, "%s: main_lna_conf: %x -> %x\n",
|
||||
__func__, curr_main_set, div_ant_conf.main_lna_conf);
|
||||
if (curr_bias != div_ant_conf.fast_div_bias)
|
||||
HALDEBUG(ah, HAL_DEBUG_DIVERSITY, "%s: fast_div_bias: %x -> %x\n",
|
||||
__func__, curr_bias, div_ant_conf.fast_div_bias);
|
||||
|
||||
antcomb->scan_start_time = ticks;
|
||||
antcomb->total_pkt_count = 0;
|
||||
antcomb->main_total_rssi = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user