Return-path: Received: from mail-ob0-f174.google.com ([209.85.214.174]:35333 "EHLO mail-ob0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751102Ab2GGKOX (ORCPT ); Sat, 7 Jul 2012 06:14:23 -0400 Received: by obbuo13 with SMTP id uo13so16601130obb.19 for ; Sat, 07 Jul 2012 03:14:22 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <20120706125043.GA23189@pandem0nium> <5244861.J1Tyef1FCX@bentobox> <4991617.K7XqcvhjBY@bentobox> Date: Sat, 7 Jul 2012 15:44:22 +0530 Message-ID: (sfid-20120707_121427_842494_0B8C34D9) Subject: Re: ath9k: Problems with diversity on AR9330 From: Mohammed Shafi To: Sven Eckelmann Cc: Simon Wunderlich , ath9k-devel@lists.ath9k.org, Mohammed Shafi Shajakhan , Adrian Chadd , Marek Lindner , linux-wireless@vger.kernel.org, Gabor Juhos Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-wireless-owner@vger.kernel.org List-ID: On Sat, Jul 7, 2012 at 3:28 PM, Mohammed Shafi wrote: > Hi Sven, > > On Fri, Jul 6, 2012 at 10:05 PM, Sven Eckelmann wrote: >> On Friday 06 July 2012 17:13:42 Sven Eckelmann wrote: >> [...] >>> > I just also observer the chain0 is "preferred" unless the RSSI is so >>> > poor in it so chain1 is taken. >>> > Please check if this work out for your case too. >>> >>> Removing the antenna on chain0 doesn't change the alt_rssi value for us. We >>> only noticed that frames with alt_rssi != -128 have the value rx_ant_conf >>> == 1 (LNA2) when only chain1 is attached and rx_ant_conf == 2 (LNA1) when >>> both/chain0-only are attached. Still most of the packets had alt_rssi == >>> -128 and we saw changes in curr_main_set and curr_alt_set (after lot of >>> data was sent). >> >> Here are some logs. We added some debug printk before first check in >> ath_ant_comb_scan ("if (main_rssi > 0 && alt_rssi > 0) {"). We can see a >> difference in the output after (a more or less long time) both antennas were >> unplugged. The output looks extreme different when at least one antenna is >> attached. > > thanks, i saw the logs. i could do some analysis with AR9485/AR9285. > as you had said before > alt_rssi is -128 when one antenna is unplugged, while having both out > seems to bring some > +tive value for alt_rssi. > >> >> alt_ant_conf is calculated using >> "alt_ant_conf = (rs->rs_rssi_ctl[2]) & ATH_ANT_RX_MASK;" and could be wrong. >> curr_alt_set and curr_main_set come from div_ant_conf queried using >> ath9k_hw_antdiv_comb_conf_get. > > thanks i would check this out. As the algorithm itself is bit > complex, i would just revisit > and check it out. If i remember correctly Fast antenna diversity was > working fine with AR9485. further i check with the CCK/DETECT and MC_GAIN_CTRL in ar9485, it seems to be ar9003_hw_ant_ctrl_apply CCK_DETECT 80be6788 ar9003_hw_ant_ctrl_apply MC_GAIN_CTRLL 13ef0200 will check it out whats the one bit difference in CCK_DETECT > >> >> Kind regards >> Sven > > > > -- > thanks, > shafi -- thanks, shafi