From patchwork Mon Apr 30 06:26:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sriram R X-Patchwork-Id: 10370863 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 644AD6053E for ; Mon, 30 Apr 2018 06:27:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 545F02870C for ; Mon, 30 Apr 2018 06:27:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 48E7928731; Mon, 30 Apr 2018 06:27:53 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8AB742870C for ; Mon, 30 Apr 2018 06:27:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=GF/FR++OhWnvOj1iyGg+0nlCE1uTV23QrLIAZSIqjss=; b=QNHuq7faGn4BaMpKn8/PETKHVO smEmVbyre1LDnyZV7bJ5lxcHn2pCUFKeQGEJ7cQU62ikjTNlm2blzBVIAKKslyLi/jJxYuFWHVoPs MM+wxuLhE72yLXxdt8cA5lnyZIYrLcTTx+Rajz50cgHFaNGKyU8MZg8hQDncetdmtoRm/MkotNlsa Y+tdTr3p3Z/PZ6FGK/LC7LQUK/p3RedjxSR2WMr8aUaOkIU/Jg+SOgbsxn4h9Pc4Hfhi4uIWbE85y DrjMRyvx4WshVJP4EylZz+Li6hKHJLmm0XHGFPJbDaoZD9ThquT4ayquZkPAr4BMooWBA9O+ocolz xUGSYzQA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fD2Hq-0003sm-Oj; Mon, 30 Apr 2018 06:27:46 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fD2Ho-0003ny-6Q for ath10k@lists.infradead.org; Mon, 30 Apr 2018 06:27:45 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id A001460767; Mon, 30 Apr 2018 06:27:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1525069653; bh=GfZPhSqb4mY1OuNEQjvYFvJxyZzkQ7LTFhmgZ/HlreQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ojTdD7HZ4NqTQYSNsimaWqXuESNDXDswxciiP23XrOB2HAcePOokPulh0Jl5R9JSw CqH3C3WwZBKNBwNuHl7CGQpRBzcMgR/ptBH4sPDhtGEnWpd6dBPcvA4aojnXf/VqR+ pw8VUZDapRw9PXXC6BUJDR1Bf9p5M2Vdd/q/wBz8= Received: from localhost (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: srirrama@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 6B260601A1; Mon, 30 Apr 2018 06:27:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1525069653; bh=GfZPhSqb4mY1OuNEQjvYFvJxyZzkQ7LTFhmgZ/HlreQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ojTdD7HZ4NqTQYSNsimaWqXuESNDXDswxciiP23XrOB2HAcePOokPulh0Jl5R9JSw CqH3C3WwZBKNBwNuHl7CGQpRBzcMgR/ptBH4sPDhtGEnWpd6dBPcvA4aojnXf/VqR+ pw8VUZDapRw9PXXC6BUJDR1Bf9p5M2Vdd/q/wBz8= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 6B260601A1 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=srirrama@codeaurora.org From: Sriram R To: stable@vger.kernel.org Subject: [PATCH 1/2 linux-stable-4.4] ath10k: Add new hw param to identify alignment for different chipsets Date: Mon, 30 Apr 2018 11:56:26 +0530 Message-Id: <1525069587-19281-2-git-send-email-srirrama@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1525069587-19281-1-git-send-email-srirrama@codeaurora.org> References: <1525069587-19281-1-git-send-email-srirrama@codeaurora.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180429_232744_286685_B2EC1A33 X-CRM114-Status: GOOD ( 10.41 ) X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vasanthkumar Thiagarajan , linux-wireless@vger.kernel.org, Sriram R , ath10k@lists.infradead.org MIME-Version: 1.0 Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Chipset QCA99X0 doesnot have rx_hdr_status padded to align in 4-byte boundary.Hence define a new hw_params field to handle different alignment behaviour between different chipsets. [Upstream commit : 2f38c3c01de945234d23dd163e3528ccb413066d] Signed-off-by: Vasanthkumar Thiagarajan Signed-off-by: Sriram R --- drivers/net/wireless/ath/ath10k/core.c | 8 ++++++++ drivers/net/wireless/ath/ath10k/core.h | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c index ee638cb..0c23768 100644 --- a/drivers/net/wireless/ath/ath10k/core.c +++ b/drivers/net/wireless/ath/ath10k/core.c @@ -67,6 +67,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = { .board_size = QCA988X_BOARD_DATA_SZ, .board_ext_size = QCA988X_BOARD_EXT_DATA_SZ, }, + .decap_align_bytes = 4, }, { .id = QCA6174_HW_2_1_VERSION, @@ -85,6 +86,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = { .board_size = QCA6174_BOARD_DATA_SZ, .board_ext_size = QCA6174_BOARD_EXT_DATA_SZ, }, + .decap_align_bytes = 4, }, { .id = QCA6174_HW_2_1_VERSION, @@ -103,6 +105,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = { .board_size = QCA6174_BOARD_DATA_SZ, .board_ext_size = QCA6174_BOARD_EXT_DATA_SZ, }, + .decap_align_bytes = 4, }, { .id = QCA6174_HW_3_0_VERSION, @@ -121,6 +124,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = { .board_size = QCA6174_BOARD_DATA_SZ, .board_ext_size = QCA6174_BOARD_EXT_DATA_SZ, }, + .decap_align_bytes = 4, }, { .id = QCA6174_HW_3_2_VERSION, @@ -140,6 +144,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = { .board_size = QCA6174_BOARD_DATA_SZ, .board_ext_size = QCA6174_BOARD_EXT_DATA_SZ, }, + .decap_align_bytes = 4, }, { .id = QCA99X0_HW_2_0_DEV_VERSION, @@ -159,6 +164,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = { .board_size = QCA99X0_BOARD_DATA_SZ, .board_ext_size = QCA99X0_BOARD_EXT_DATA_SZ, }, + .decap_align_bytes = 1, }, { .id = QCA9377_HW_1_0_DEV_VERSION, @@ -177,6 +183,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = { .board_size = QCA9377_BOARD_DATA_SZ, .board_ext_size = QCA9377_BOARD_EXT_DATA_SZ, }, + .decap_align_bytes = 4, }, { .id = QCA9377_HW_1_1_DEV_VERSION, @@ -195,6 +202,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = { .board_size = QCA9377_BOARD_DATA_SZ, .board_ext_size = QCA9377_BOARD_EXT_DATA_SZ, }, + .decap_align_bytes = 4, }, }; diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h index 858d75f..e4e3b41 100644 --- a/drivers/net/wireless/ath/ath10k/core.h +++ b/drivers/net/wireless/ath/ath10k/core.h @@ -670,6 +670,10 @@ struct ath10k { size_t board_size; size_t board_ext_size; } fw; + + /* Number of bytes used for alignment in rx_hdr_status */ + int decap_align_bytes; + } hw_params; const struct firmware *board;