From patchwork Tue Feb 14 19:10:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Lamparter X-Patchwork-Id: 9572541 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7F03360578 for ; Tue, 14 Feb 2017 19:10:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5A02520855 for ; Tue, 14 Feb 2017 19:10:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4ABF12844A; Tue, 14 Feb 2017 19:10:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 854D920855 for ; Tue, 14 Feb 2017 19:10:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753277AbdBNTKf (ORCPT ); Tue, 14 Feb 2017 14:10:35 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:35111 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753218AbdBNTKd (ORCPT ); Tue, 14 Feb 2017 14:10:33 -0500 Received: by mail-wm0-f65.google.com with SMTP id u63so5012573wmu.2; Tue, 14 Feb 2017 11:10:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=8ePz2bDGmoz+7r1nGti5EFsaqaEr233gEatzqk4iueI=; b=bQTLzZLwVvghgRifqXbmO6vjLxvacchDEwAib+p/3S8QrTRuH6Zvn1VbDgFpGM+qe7 NyHvikyGy6OyOG2KjzYc1N7JtAzjVtXSeqWraJylB/cyIhHpIcn+A9gS3jAFApYQKDTZ omGgfRQLRHiOZrxEjoA/ZVJGhPgyRt2BCYUM+2/HApxe2ZKa1uTquFjWCNoUsltp7Xr3 fgjDqsHX5KnLXO6H3ll9fYv+UN/Z17VIh6TMXhMBHULp5Ezi/YHwqFDepw5F3V5Dc4nc HTcO/o1rvGwhcxferfozl6zqnbidrktA1Y/T/RBiyas0Yk0oLLZPsPzifg4eGlldaEUF D43Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=8ePz2bDGmoz+7r1nGti5EFsaqaEr233gEatzqk4iueI=; b=rKVcx1M2U5ARWWmOTbyQOSzxGtHrfcobA4g9LFz/w9Ee/DOIu9kHYHB70dLOg8kO2i R3UjSQU7XvDhjjfiUEL59gQvTnzsMz3lj9nBqjnRX1fycZAQBP53e1DtkIDXvB8040Ez qfbN7J0nLWpz/Jno7KgmYWfwMaqZoWhAjOrtgJRhtYFQCvjf0uUlBaBDU94I5Qk6N1/a uyIeQ5h/G/5356FRI+dVc6+UoUGyfPGQNwohaVZMF/BFM4Xsy7WOix7BfrL/6PhCV0Q3 432aXOmCbSwf8A8L5QpMF34zwxJQaTsaP8vuU4J7rSa0DUXUVAy54ye5EmxRbidChi5O se/A== X-Gm-Message-State: AMke39nNGOoNeDYlaH08edp9CBRGLSHNIZ6lCU2HLWK5uuYbXGyXJ8afo1wSVESx+EsbnQ== X-Received: by 10.28.191.79 with SMTP id p76mr4638897wmf.21.1487099432118; Tue, 14 Feb 2017 11:10:32 -0800 (PST) Received: from debian64.daheim (p5B0D7F93.dip0.t-ipconnect.de. [91.13.127.147]) by smtp.gmail.com with ESMTPSA id o42sm1911659wrb.18.2017.02.14.11.10.31 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 14 Feb 2017 11:10:31 -0800 (PST) Received: from chuck by debian64.daheim with local (Exim 4.89_RC5) (envelope-from ) id 1cdiUg-00085o-LA; Tue, 14 Feb 2017 20:10:30 +0100 From: Christian Lamparter To: linux-wireless@vger.kernel.org Cc: Kalle Valo , QCA ath9k Development , Chris Blake , Gabor Juhos , stable@vger.kernel.org Subject: [PATCH] ath9k: use correct OTP register offsets for the AR9340 and AR9550 Date: Tue, 14 Feb 2017 20:10:30 +0100 Message-Id: <20170214191030.31070-1-chunkeey@googlemail.com> X-Mailer: git-send-email 2.11.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch fixes the OTP register definitions for the AR934x and AR9550 WMAC SoC. Previously, the ath9k driver was unable to initialize the integrated WMAC on an Aerohive AP121: | ath: phy0: timeout (1000 us) on reg 0x30018: 0xbadc0ffe & 0x00000007 != 0x00000004 | ath: phy0: timeout (1000 us) on reg 0x30018: 0xbadc0ffe & 0x00000007 != 0x00000004 | ath: phy0: Unable to initialize hardware; initialization status: -5 | ath9k ar934x_wmac: failed to initialize device | ath9k: probe of ar934x_wmac failed with error -5 It turns out that the AR9300_OTP_STATUS and AR9300_OTP_DATA definitions contain a typo. Cc: Gabor Juhos Cc: stable@vger.kernel.org Fixes: add295a4afbdf5852d0 "ath9k: use correct OTP register offsets for AR9550" Signed-off-by: Christian Lamparter Signed-off-by: Chris Blake --- drivers/net/wireless/ath/ath9k/ar9003_eeprom.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.h b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.h index 7dc7205dc877..bd2269c7de6b 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.h +++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.h @@ -75,13 +75,13 @@ #define AR9300_OTP_BASE \ ((AR_SREV_9340(ah) || AR_SREV_9550(ah)) ? 0x30000 : 0x14000) #define AR9300_OTP_STATUS \ - ((AR_SREV_9340(ah) || AR_SREV_9550(ah)) ? 0x30018 : 0x15f18) + ((AR_SREV_9340(ah) || AR_SREV_9550(ah)) ? 0x31018 : 0x15f18) #define AR9300_OTP_STATUS_TYPE 0x7 #define AR9300_OTP_STATUS_VALID 0x4 #define AR9300_OTP_STATUS_ACCESS_BUSY 0x2 #define AR9300_OTP_STATUS_SM_BUSY 0x1 #define AR9300_OTP_READ_DATA \ - ((AR_SREV_9340(ah) || AR_SREV_9550(ah)) ? 0x3001c : 0x15f1c) + ((AR_SREV_9340(ah) || AR_SREV_9550(ah)) ? 0x3101c : 0x15f1c) enum targetPowerHTRates { HT_TARGET_RATE_0_8_16,