From patchwork Fri Mar 15 18:34:33 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Chamberlain X-Patchwork-Id: 2280101 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id ED5874020C for ; Fri, 15 Mar 2013 18:34:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755037Ab3COSem (ORCPT ); Fri, 15 Mar 2013 14:34:42 -0400 Received: from 173-166-109-252-newengland.hfc.comcastbusiness.net ([173.166.109.252]:36449 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754965Ab3COSeh (ORCPT ); Fri, 15 Mar 2013 14:34:37 -0400 Received: from mcgrof by bombadil.infradead.org with local (Exim 4.80.1 #2 (Red Hat Linux)) id 1UGZSb-0000im-7S; Fri, 15 Mar 2013 18:34:33 +0000 Date: Fri, 15 Mar 2013 14:34:33 -0400 From: "Luis R. Rodriguez" To: Felix Fietkau Cc: linux-wireless@vger.kernel.org, linville@tuxdriver.com, Wojciech.Dubowik@neratec.com, mcgrof@qca.qualcomm.com Subject: Re: [PATCH 3.9] ath9k_hw: revert chainmask to user configuration after calibration Message-ID: <20130315183433.GA2676@bombadil.infradead.org> References: <1363355611-10426-1-git-send-email-nbd@openwrt.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1363355611-10426-1-git-send-email-nbd@openwrt.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Fri, Mar 15, 2013 at 02:53:31PM +0100, Felix Fietkau wrote: > The commit 'ath9k_hw: fix calibration issues on chainmask that don't > include chain 0' changed the hardware chainmask to the chip chainmask > for the duration of the calibration, but the revert to user > configuration in the reset path runs too early. > > That causes some issues with limiting the number of antennas (including > spurious failure in hardware-generated packets). > > Fix this by reverting the chainmask after the essential parts of the > calibration that need the workaround, and before NF calibration is run. > > Signed-off-by: Felix Fietkau > Reported-by: Wojciech Dubowik > Tested-by: Wojciech Dubowik > Cc: stable@vger.kernel.org This applies to v3.8 as well with the following changes, do you want it there as well? --- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/net/wireless/ath/ath9k/ar9003_calib.c b/drivers/net/wireless/ath/ath9k/ar9003_calib.c index 56317b0..e99f481 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_calib.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_calib.c @@ -976,6 +976,7 @@ static bool ar9003_hw_init_cal(struct ath_hw *ah, AR_PHY_CL_TAB_1, AR_PHY_CL_TAB_2 }; + /* Use chip chainmask only for calibration */ ar9003_hw_set_chain_masks(ah, ah->caps.rx_chainmask, ah->caps.tx_chainmask); if (rtt) { @@ -1131,6 +1132,9 @@ skip_tx_iqcal: ar9003_hw_rtt_disable(ah); } + /* Revert chainmask to runtime parameters */ + ar9003_hw_set_chain_masks(ah, ah->rxchainmask, ah->txchainmask); + /* Initialize list pointers */ ah->cal_list = ah->cal_list_last = ah->cal_list_curr = NULL; ah->supp_cals = IQ_MISMATCH_CAL;