From patchwork Wed Jan 24 08:02:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wojciech Dubowik X-Patchwork-Id: 10181889 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 2438A60233 for ; Wed, 24 Jan 2018 08:02:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 16D062885D for ; Wed, 24 Jan 2018 08:02:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0B79B2885F; Wed, 24 Jan 2018 08:02:31 +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.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI 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 D3F332885D for ; Wed, 24 Jan 2018 08:02:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932260AbeAXIC2 (ORCPT ); Wed, 24 Jan 2018 03:02:28 -0500 Received: from mail.neratec.com ([46.140.151.2]:57492 "EHLO mail.neratec.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932147AbeAXIC0 (ORCPT ); Wed, 24 Jan 2018 03:02:26 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.neratec.com (Postfix) with ESMTP id 98942CE0456; Wed, 24 Jan 2018 09:02:25 +0100 (CET) Received: from mail.neratec.com ([127.0.0.1]) by localhost (mail.neratec.com [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id N5V4X_5i5Ngd; Wed, 24 Jan 2018 09:02:25 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail.neratec.com (Postfix) with ESMTP id 718CBCE0462; Wed, 24 Jan 2018 09:02:25 +0100 (CET) X-Virus-Scanned: amavisd-new at neratec.com Received: from mail.neratec.com ([127.0.0.1]) by localhost (mail.neratec.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 9svUCug4Zprt; Wed, 24 Jan 2018 09:02:25 +0100 (CET) Received: from wlanTS2.lan.neratec.com (wlanTS2.lan.neratec.com [192.168.11.95]) by mail.neratec.com (Postfix) with ESMTPSA id 4B4A9CE0454; Wed, 24 Jan 2018 09:02:25 +0100 (CET) From: Wojciech Dubowik To: linux-wireless@vger.kernel.org Cc: kvalo@codeaurora.org, ath9k-devel@qca.qualcomm.com, Wojciech Dubowik Subject: [PATCH v2 1/4] ath9k: Alternative EEPROM size for AR9003 Date: Wed, 24 Jan 2018 09:02:16 +0100 Message-Id: <1516780939-7176-2-git-send-email-Wojciech.Dubowik@neratec.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516780939-7176-1-git-send-email-Wojciech.Dubowik@neratec.com> References: <1516780939-7176-1-git-send-email-Wojciech.Dubowik@neratec.com> 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 AR9003 factory calibration allows to use bigger EEPROM than standard 1k without changing the default layout. Allow probing of EEPROM at alternative address if initial check for default fails. The original ar9003 eeprom ops are still be used. Signed-off-by: Wojciech Dubowik --- drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c index c2e210c..23bb677 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c @@ -3310,6 +3310,12 @@ static int ar9300_eeprom_restore_internal(struct ath_hw *ah, if (ar9300_check_eeprom_header(ah, read, cptr)) goto found; + cptr = AR9300_BASE_ADDR_4K; + ath_dbg(common, EEPROM, "Trying EEPROM access at Address 0x%04x\n", + cptr); + if (ar9300_check_eeprom_header(ah, read, cptr)) + goto found; + cptr = AR9300_BASE_ADDR_512; ath_dbg(common, EEPROM, "Trying EEPROM access at Address 0x%04x\n", cptr);