From patchwork Mon Dec 1 07:17:45 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Kazior X-Patchwork-Id: 5410261 Return-Path: X-Original-To: patchwork-ath10k@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id D9925BEEA8 for ; Mon, 1 Dec 2014 07:30:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0C39D20295 for ; Mon, 1 Dec 2014 07:30:38 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3679A2027D for ; Mon, 1 Dec 2014 07:30:37 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XvLRK-0004mR-BN; Mon, 01 Dec 2014 07:30:34 +0000 Received: from mail-wg0-x22b.google.com ([2a00:1450:400c:c00::22b]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XvLRH-0004fR-8E for ath10k@lists.infradead.org; Mon, 01 Dec 2014 07:30:31 +0000 Received: by mail-wg0-f43.google.com with SMTP id l18so13231445wgh.30 for ; Sun, 30 Nov 2014 23:30:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tieto.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=lKBUSwA9htDlE2FBUEn2FdnadnlERT/GaPZDo8BC0oI=; b=uhCjnbOGHbWfOKye0b/ica72c9H8iaReQJ73nIFQg+DfKpAQJelNgduK33z0wRRrZt zRYGP+8WPVa6bjvZb0dHyg0h+j62gcKNAP0rkK+6hEtNyDOCZhkhooMYk/LB6BULG1V1 vfDy91yd3ME3vPzpYNCh20zz8lZzITXFRtXXw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=lKBUSwA9htDlE2FBUEn2FdnadnlERT/GaPZDo8BC0oI=; b=CHH9SV5Tzo/PvqCJTx874OGwkE7hGkShisnofff8QOvnZXZ13lvx8fUi/X0npJXwLz RSuKjg9B3XNpyaiqCba90NorKlqs4sua1SnD42eXjRvzRBr2MLKVpbo/sLU+Uka5WdkJ sb4UfZBa9f41arf0mufK+FP9dMbhSVDZLkZFYUJHlsFqo08cL4D8HdlP/yMdw7ZLTLZ5 1kkEMbQg1NDbbzrdBG5P1xTrwtAYC+5p9Z+QPzS3g4o4B/jW5h7qy+Znsv6Q5d7H31bs AJ2GcPwWVF8UVExQPU1+0qr9p/fUq6WdRyeAbrx0hyuchi7qiJ1bF4sv+3e28kb23e9g Lz0w== X-Gm-Message-State: ALoCoQmXErLCC1H7DlWWbAzdJ4IKfLrIk8+xEnpJKgWzi+z+KcWJwGe6/CiId3ZewbX9wpXSHc3KIo8IftjyTNrQWJrtJq81p6Yy7tUsC05LSwW/dUiL4ehysqQn1GMlr/QUvrzeCwsB8bfnkfGsdeE0wlvP7C/2QT973ZTOD2F5rfOKRScC7gw= X-Received: by 10.180.14.202 with SMTP id r10mr11207584wic.36.1417419007616; Sun, 30 Nov 2014 23:30:07 -0800 (PST) Received: from localhost.localdomain ([91.198.246.8]) by mx.google.com with ESMTPSA id fk12sm6676572wic.6.2014.11.30.23.30.06 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 30 Nov 2014 23:30:07 -0800 (PST) From: Michal Kazior To: ath10k@lists.infradead.org Subject: [PATCH v2 2/3] ath10k: put board size into hw_params Date: Mon, 1 Dec 2014 08:17:45 +0100 Message-Id: <1417418266-21974-2-git-send-email-michal.kazior@tieto.com> X-Mailer: git-send-email 1.8.5.3 In-Reply-To: <1417418266-21974-1-git-send-email-michal.kazior@tieto.com> References: <1416838646-18801-1-git-send-email-michal.kazior@tieto.com> <1417418266-21974-1-git-send-email-michal.kazior@tieto.com> X-DomainID: tieto.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141130_233031_445908_19CCA4C7 X-CRM114-Status: GOOD ( 10.03 ) X-Spam-Score: -0.8 (/) Cc: linux-wireless@vger.kernel.org, Michal Kazior X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_LOW, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This makes it easier to extend the list of supported hardware. Signed-off-by: Michal Kazior --- drivers/net/wireless/ath/ath10k/core.c | 8 +++++--- drivers/net/wireless/ath/ath10k/core.h | 2 ++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c index ece8ab4..8bb1657 100644 --- a/drivers/net/wireless/ath/ath10k/core.c +++ b/drivers/net/wireless/ath/ath10k/core.c @@ -53,6 +53,8 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = { .fw = QCA988X_HW_2_0_FW_FILE, .otp = QCA988X_HW_2_0_OTP_FILE, .board = QCA988X_HW_2_0_BOARD_DATA_FILE, + .board_size = QCA988X_BOARD_DATA_SZ, + .board_ext_size = QCA988X_BOARD_EXT_DATA_SZ, }, }, }; @@ -146,8 +148,8 @@ static const struct firmware *ath10k_fetch_fw_file(struct ath10k *ar, static int ath10k_push_board_ext_data(struct ath10k *ar, const void *data, size_t data_len) { - u32 board_data_size = QCA988X_BOARD_DATA_SZ; - u32 board_ext_data_size = QCA988X_BOARD_EXT_DATA_SZ; + u32 board_data_size = ar->hw_params.fw.board_size; + u32 board_ext_data_size = ar->hw_params.fw.board_ext_size; u32 board_ext_data_addr; int ret; @@ -193,7 +195,7 @@ static int ath10k_push_board_ext_data(struct ath10k *ar, const void *data, static int ath10k_download_board_data(struct ath10k *ar, const void *data, size_t data_len) { - u32 board_data_size = QCA988X_BOARD_DATA_SZ; + u32 board_data_size = ar->hw_params.fw.board_size; u32 address; int ret; diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h index 88e6c74..f1a3edd 100644 --- a/drivers/net/wireless/ath/ath10k/core.h +++ b/drivers/net/wireless/ath/ath10k/core.h @@ -484,6 +484,8 @@ struct ath10k { const char *fw; const char *otp; const char *board; + size_t board_size; + size_t board_ext_size; } fw; } hw_params;