From patchwork Tue Sep 11 05:16:24 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sujith Manoharan X-Patchwork-Id: 1434971 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 6BDB94025E for ; Tue, 11 Sep 2012 05:17:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751572Ab2IKFRW (ORCPT ); Tue, 11 Sep 2012 01:17:22 -0400 Received: from wolverine02.qualcomm.com ([199.106.114.251]:60266 "EHLO wolverine02.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750978Ab2IKFRW (ORCPT ); Tue, 11 Sep 2012 01:17:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qualcomm.com; i=@qualcomm.com; q=dns/txt; s=qcdkim; t=1347340642; x=1378876642; h=from:mime-version:content-type:content-transfer-encoding: message-id:date:to:x-mailer:cc:subject:x-originating-ip; bh=sDg961KZusTNNQmB74/jVRBBlVD8uwRm705cpGD2tl8=; b=znX+rRbavb6bJ9e0/VbC1qVWDztodtHnekCOrtznPHJmeapk0qpzwvou Pm6R5kPnCmzuPy/BPxYU8ZwA5U0QHIO5V1030PNYBWSdTVGrJPM3RE0YQ EuptfjmtdHiha+kkCb0QSKLrGfRn5JKbdQPT65Of5V8rYm2UKKTG+YRy8 o=; X-IronPort-AV: E=McAfee;i="5400,1158,6831"; a="232861611" Received: from ironmsg04-l.qualcomm.com ([172.30.48.19]) by wolverine02.qualcomm.com with ESMTP; 10 Sep 2012 22:17:21 -0700 From: Sujith Manoharan X-IronPort-AV: E=Sophos;i="4.80,401,1344236400"; d="scan'208";a="298420291" Received: from nasanexhc04.na.qualcomm.com ([172.30.48.17]) by Ironmsg04-L.qualcomm.com with ESMTP/TLS/RC4-SHA; 10 Sep 2012 22:17:21 -0700 Received: from nako (172.30.48.1) by qcmail1.qualcomm.com (172.30.48.17) with Microsoft SMTP Server (TLS) id 14.2.318.1; Mon, 10 Sep 2012 22:17:20 -0700 MIME-Version: 1.0 Message-ID: <20558.51496.575142.581841@gargle.gargle.HOWL> Date: Tue, 11 Sep 2012 10:46:24 +0530 To: X-Mailer: VM 8.2.0b under 24.2.1 (x86_64-unknown-linux-gnu) CC: Subject: [PATCH 1/2] ath9k_hw: Handle gentimer termination properly X-Originating-IP: [172.30.48.1] Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Signed-off-by: Sujith Manoharan --- drivers/net/wireless/ath/ath9k/hw.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index cb90321..40f57aa 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c @@ -3080,6 +3080,16 @@ void ath9k_hw_gen_timer_stop(struct ath_hw *ah, struct ath_gen_timer *timer) REG_CLR_BIT(ah, gen_tmr_configuration[timer->index].mode_addr, gen_tmr_configuration[timer->index].mode_mask); + if (AR_SREV_9462(ah) || AR_SREV_9565(ah)) { + /* + * Need to switch back to TSF if it was using TSF2. + */ + if ((timer->index >= AR_GEN_TIMER_BANK_1_LEN)) { + REG_CLR_BIT(ah, AR_MAC_PCU_GEN_TIMER_TSF_SEL, + (1 << timer->index)); + } + } + /* Disable both trigger and thresh interrupt masks */ REG_CLR_BIT(ah, AR_IMR_S5, (SM(AR_GENTMR_BIT(timer->index), AR_IMR_S5_GENTIMER_THRESH) |