Date: Wed, 13 Apr 2011 15:08:51 +0000 (UTC) From: Adrian Chadd <adrian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r220599 - in head/sys/dev/ath/ath_hal: . ar9002 Message-ID: <201104131508.p3DF8pFw096162@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: adrian Date: Wed Apr 13 15:08:51 2011 New Revision: 220599 URL: http://svn.freebsd.org/changeset/base/220599 Log: 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. Modified: head/sys/dev/ath/ath_hal/ah_debug.h head/sys/dev/ath/ath_hal/ar9002/ar9285_diversity.c Modified: head/sys/dev/ath/ath_hal/ah_debug.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_debug.h Wed Apr 13 14:51:07 2011 (r220598) +++ head/sys/dev/ath/ath_hal/ah_debug.h Wed Apr 13 15:08:51 2011 (r220599) @@ -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 }; Modified: head/sys/dev/ath/ath_hal/ar9002/ar9285_diversity.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar9002/ar9285_diversity.c Wed Apr 13 14:51:07 2011 (r220598) +++ head/sys/dev/ath/ath_hal/ar9002/ar9285_diversity.c Wed Apr 13 15:08:51 2011 (r220599) @@ -371,6 +371,9 @@ ar9285_ant_comb_scan(struct ath_hal *ah, 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, 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 @@ div_comb_done: 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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201104131508.p3DF8pFw096162>