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: 10370859 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 DAB6260234 for ; Mon, 30 Apr 2018 06:27:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CC360285DD for ; Mon, 30 Apr 2018 06:27:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C1253286B7; Mon, 30 Apr 2018 06:27:37 +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=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID 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 337B5285DD for ; Mon, 30 Apr 2018 06:27:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751729AbeD3G1f (ORCPT ); Mon, 30 Apr 2018 02:27:35 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:47990 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751698AbeD3G1e (ORCPT ); Mon, 30 Apr 2018 02:27:34 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id B0CD960556; 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 Cc: linux-wireless@vger.kernel.org, ath10k@lists.infradead.org, Sriram R , Vasanthkumar Thiagarajan 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> 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 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;