From patchwork Thu Oct 25 11:46:53 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Manoharan, Rajkumar" X-Patchwork-Id: 1643511 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 9954ADF2AB for ; Thu, 25 Oct 2012 11:53:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755035Ab2JYLx0 (ORCPT ); Thu, 25 Oct 2012 07:53:26 -0400 Received: from sabertooth01.qualcomm.com ([65.197.215.72]:3642 "EHLO sabertooth01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752803Ab2JYLx0 (ORCPT ); Thu, 25 Oct 2012 07:53:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qca.qualcomm.com; i=@qca.qualcomm.com; q=dns/txt; s=qcdkim; t=1351165180; x=1382701180; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=1QIT0N1FYZIfQipqnx3iPEYvCe+fVtI5/y87babuGoE=; b=Ls2uLHn1ZQQ1YJ5VJTjC2AZeKCCgDGDo0qK14Jt/M+1UCvVbXRytUhcz YtNPSQ98Q54XyWkVgUoCROhFQ9yvFMv6X/Z2pseCrXcfWWuLMwUjeuehy 6q5uqcFWXvjdlbRZPVQrRhS5j9DLD0VncPD6gSucrNL9NruseJ7mF6llt c=; X-IronPort-AV: E=McAfee;i="5400,1158,6875"; a="1940144" Received: from ironmsg03-r.qualcomm.com ([172.30.46.17]) by sabertooth01.qualcomm.com with ESMTP; 25 Oct 2012 04:33:32 -0700 X-IronPort-AV: E=Sophos;i="4.80,646,1344236400"; d="scan'208";a="357608889" Received: from nasanexhc08.na.qualcomm.com ([172.30.39.7]) by Ironmsg03-R.qualcomm.com with ESMTP/TLS/RC4-SHA; 25 Oct 2012 04:47:17 -0700 Received: from qcmail1.qualcomm.com (172.30.39.5) by qcmail1.qualcomm.com (172.30.39.7) with Microsoft SMTP Server (TLS) id 14.2.318.1; Thu, 25 Oct 2012 04:47:14 -0700 Received: by qcmail1.qualcomm.com (sSMTP sendmail emulation); Thu, 25 Oct 2012 17:17:20 +0530 From: Rajkumar Manoharan To: CC: , Rajkumar Manoharan Subject: [PATCH 3/4] ath9k_hw: validate MCI stuck after RTC wakeup Date: Thu, 25 Oct 2012 17:16:53 +0530 Message-ID: <1351165614-12691-3-git-send-email-rmanohar@qca.qualcomm.com> X-Mailer: git-send-email 1.8.0 In-Reply-To: <1351165614-12691-1-git-send-email-rmanohar@qca.qualcomm.com> References: <1351165614-12691-1-git-send-email-rmanohar@qca.qualcomm.com> MIME-Version: 1.0 X-Originating-IP: [172.30.39.5] Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Signed-off-by: Rajkumar Manoharan --- drivers/net/wireless/ath/ath9k/hw.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index 8e1559a..71cd9f0 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c @@ -2153,9 +2153,6 @@ static bool ath9k_hw_set_power_awake(struct ath_hw *ah) AR_RTC_FORCE_WAKE_EN); udelay(50); - if (ath9k_hw_mci_is_enabled(ah)) - ar9003_mci_set_power_awake(ah); - for (i = POWER_UP_TIME / 50; i > 0; i--) { val = REG_READ(ah, AR_RTC_STATUS) & AR_RTC_STATUS_M; if (val == AR_RTC_STATUS_ON) @@ -2171,6 +2168,9 @@ static bool ath9k_hw_set_power_awake(struct ath_hw *ah) return false; } + if (ath9k_hw_mci_is_enabled(ah)) + ar9003_mci_set_power_awake(ah); + REG_CLR_BIT(ah, AR_STA_ID1, AR_STA_ID1_PWR_SAV); return true;