From patchwork Fri Aug 14 06:03:36 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vivek Natarajan X-Patchwork-Id: 41349 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n7E63tBb027769 for ; Fri, 14 Aug 2009 06:03:55 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754681AbZHNGDw (ORCPT ); Fri, 14 Aug 2009 02:03:52 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755059AbZHNGDw (ORCPT ); Fri, 14 Aug 2009 02:03:52 -0400 Received: from rv-out-0506.google.com ([209.85.198.225]:62448 "EHLO rv-out-0506.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753737AbZHNGDv (ORCPT ); Fri, 14 Aug 2009 02:03:51 -0400 Received: by rv-out-0506.google.com with SMTP id f6so389721rvb.1 for ; Thu, 13 Aug 2009 23:03:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:mime-version:content-type:content-disposition:user-agent; bh=XEScuLYwoUJ12lNvs1z7Nfo/o1kUil8dDImVVbFHpuE=; b=QzXrEOPnSpDny7rF6ypFdtzrynJcsTJGHRelmLTbiJ1blaPYefIzsOqgU4Xp/g64e/ VKNmI+kh7K5QwrVirkJ1CdvJS8drTGMY3LB34NQUSB2f5eB5d6skRQ6bskuI9CxfH/8i lGcmk6YGC36r03AEWdicRPBQ0S0vbudSQ45LM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; b=nWCq6JgDbfRKYB7ItebmITJVtmCxPwJXKDnawtVCL2YO9PQh7jvV3Q/Xj03C7iQZYL YOD2nxU0AQveptjZaQ2uw6E92rZNvUMd2odOerQMP6HMXOmlGMOdKk/j74oqjpOv1g5j nYwp04PkUZPh7kPVr7R5JKc3/bh40QOmnxFQQ= Received: by 10.140.143.14 with SMTP id q14mr887344rvd.15.1250229833122; Thu, 13 Aug 2009 23:03:53 -0700 (PDT) Received: from myhost.users.atheros.com ([124.30.92.178]) by mx.google.com with ESMTPS id k37sm5022944rvb.37.2009.08.13.23.03.49 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 13 Aug 2009 23:03:52 -0700 (PDT) Date: Fri, 14 Aug 2009 11:33:36 +0530 From: Vivek Natarajan To: linville@tuxdriver.com Cc: linux-wireless@vger.kernel.org Subject: [PATCH 5/5] ath9k: Updates for AR9287_12 version of chipset. Message-ID: <20090814060336.GE3541@myhost.users.atheros.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Enable AsyncFIFO and AGGWEP for AR9287_12 and later revisions only. Signed-off-by: Vivek Natarajan --- drivers/net/wireless/ath/ath9k/hw.c | 6 +++--- drivers/net/wireless/ath/ath9k/reg.h | 9 ++++++++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index 4f58112..9259f71 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c @@ -2392,7 +2392,7 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan, if (AR_SREV_9280_10_OR_LATER(ah)) REG_SET_BIT(ah, AR_GPIO_INPUT_EN_VAL, AR_GPIO_JTAG_DISABLE); - if (AR_SREV_9287_10_OR_LATER(ah)) { + if (AR_SREV_9287_12_OR_LATER(ah)) { /* Enable ASYNC FIFO */ REG_SET_BIT(ah, AR_MAC_PCU_ASYNC_FIFO_REG3, AR_MAC_PCU_ASYNC_FIFO_REG3_DATAPATH_SEL); @@ -2478,7 +2478,7 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan, ath9k_hw_init_user_settings(ah); - if (AR_SREV_9287_10_OR_LATER(ah)) { + if (AR_SREV_9287_12_OR_LATER(ah)) { REG_WRITE(ah, AR_D_GBL_IFS_SIFS, AR_D_GBL_IFS_SIFS_ASYNC_FIFO_DUR); REG_WRITE(ah, AR_D_GBL_IFS_SLOT, @@ -2494,7 +2494,7 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan, REG_RMW_FIELD(ah, AR_AHB_MODE, AR_AHB_CUSTOM_BURST_EN, AR_AHB_CUSTOM_BURST_ASYNC_FIFO_VAL); } - if (AR_SREV_9287_10_OR_LATER(ah)) { + if (AR_SREV_9287_12_OR_LATER(ah)) { REG_SET_BIT(ah, AR_PCU_MISC_MODE2, AR_PCU_MISC_MODE2_ENABLE_AGGWEP); } diff --git a/drivers/net/wireless/ath/ath9k/reg.h b/drivers/net/wireless/ath/ath9k/reg.h index 13fd658..c9e1ac9 100644 --- a/drivers/net/wireless/ath/ath9k/reg.h +++ b/drivers/net/wireless/ath/ath9k/reg.h @@ -744,6 +744,7 @@ #define AR_SREV_VERSION_9287 0x180 #define AR_SREV_REVISION_9287_10 0 #define AR_SREV_REVISION_9287_11 1 +#define AR_SREV_REVISION_9287_12 2 #define AR_SREV_VERSION_9271 0x140 #define AR_SREV_REVISION_9271_10 0 #define AR_SREV_REVISION_9271_11 1 @@ -817,7 +818,13 @@ (((_ah)->hw_version.macVersion > AR_SREV_VERSION_9287) || \ (((_ah)->hw_version.macVersion == AR_SREV_VERSION_9287) && \ ((_ah)->hw_version.macRev >= AR_SREV_REVISION_9287_11))) - +#define AR_SREV_9287_12(_ah) \ + (((_ah)->hw_version.macVersion == AR_SREV_VERSION_9287) && \ + ((_ah)->hw_version.macRev == AR_SREV_REVISION_9287_12)) +#define AR_SREV_9287_12_OR_LATER(_ah) \ + (((_ah)->hw_version.macVersion > AR_SREV_VERSION_9287) || \ + (((_ah)->hw_version.macVersion == AR_SREV_VERSION_9287) && \ + ((_ah)->hw_version.macRev >= AR_SREV_REVISION_9287_12))) #define AR_SREV_9271(_ah) \ (((_ah))->hw_version.macVersion == AR_SREV_VERSION_9271) #define AR_SREV_9271_10(_ah) \