Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp3997935imm; Mon, 14 May 2018 00:42:10 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrEdSnZFwtf/rVgl9dgdDisOKogmN8kmOmi67iC41SMlhCObNZiRt2fkIgiVJXnxCy5uO/X X-Received: by 2002:a63:9846:: with SMTP id l6-v6mr7485566pgo.217.1526283730583; Mon, 14 May 2018 00:42:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526283730; cv=none; d=google.com; s=arc-20160816; b=hwXpLgk15aLeepP9zj9ofOjpc6uco8RUzGyg4nYaagoDdTuQRpy7+rPNbXCGmXrke5 fMcQhz3YiT8d47ylqnApUv9V5JINn7dsmldvJogngIbxAnvft811Co+6qCg1ON/jYIlJ Juqc6YwTcpDEMRBNj5Zw7pDN0iStdq6zbCcbq49+xD3lmFudNqexPGZXrPEk9znzbgT2 tXhOHYW7nXpon7xCDGmgCjSu9J3hZQ1PFX7x6JcihLF0lAGK6/tCdrqMfmB+oJeZu2TD o36XfPb4W10XFlTBG3rdyHYVKZSCeKM2WtVIUf6AQ1ienfESFhdpCT1Cv7bNCbK8moc7 Acsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=yGVtmGeITtZGYBU53grf+pNBuqj+sZGg6Vzzg0u+Ky8=; b=gsI1siuYzLG/Es8CJqsPhXg6qhBeG9o8CK+373DTD+mPSdpgzpMkSta7JWIDXAnnqR psLsP7TU+jAwnzBkxeW1bgCU3E9G3XPjt4Z91rp3W3HjD0ikAP/4GR04SJw4q4Z8VC/M 6cgP+m4zCFx8yH0Td0N6rL+ykweR+JHuWldTzsF/+K0qWhBcMdbW/mZcNqJC57KxYO56 ZPtz1mQOKHzJPkRuXF19i1INxX/oEqcTMLzMuEUxt4wN4s8jvUD4yetOTuvskTfOVigW Sc4gM8Gu3Od2F8AQ2tJPfUAZaff/sVkGBM8Mfq9JCLgO28VBBWhWNaZzWYLtN4vpvZkk Rthw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=kU3Zi9V3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b19-v6si8952544pfh.358.2018.05.14.00.41.56; Mon, 14 May 2018 00:42:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=kU3Zi9V3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752790AbeENHlq (ORCPT + 99 others); Mon, 14 May 2018 03:41:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:58570 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752609AbeENGwF (ORCPT ); Mon, 14 May 2018 02:52:05 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 536BE21738; Mon, 14 May 2018 06:52:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1526280725; bh=2QSsKoYoeLSnXxHsznHOyQDB22qXGlDvqaZKcHVtB9E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kU3Zi9V3ZDWv2F8C7eRyJaXx8uW2dZk7MuPNTt0JZqkPiTjxP8DmZ6eHqEupp4eHT vGUh5x/2Vt7dPqq3BIP1ZsrRWd8iqcp4G7m7KqK28CQDs6vH66ndKe+RX1XEft3/yN MJHO5tcWsgqYna5DeS78LsBJYchbNmI6/G+sXqm8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Vasanthakumar Thiagarajan , Kalle Valo , Sriram R Subject: [PATCH 4.4 08/56] ath10k: fix rfc1042 header retrieval in QCA4019 with eth decap mode Date: Mon, 14 May 2018 08:48:13 +0200 Message-Id: <20180514064755.718467503@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180514064754.853201981@linuxfoundation.org> References: <20180514064754.853201981@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Vasanthakumar Thiagarajan commit 2f38c3c01de945234d23dd163e3528ccb413066d upstream. Chipset from QCA99X0 onwards (QCA99X0, QCA9984, QCA4019 & future) rx_hdr_status is not padded to align in 4-byte boundary. Define a new hw_params field to handle different alignment behaviour between different hw. This patch fixes improper retrieval of rfc1042 header with QCA4019. This patch along with "ath10k: Properly remove padding from the start of rx payload" will fix traffic failure in ethernet decap mode for QCA4019. Signed-off-by: Vasanthakumar Thiagarajan Signed-off-by: Kalle Valo Signed-off-by: Sriram R Signed-off-by: Greg Kroah-Hartman --- drivers/net/wireless/ath/ath10k/core.c | 8 ++++++++ drivers/net/wireless/ath/ath10k/core.h | 4 ++++ 2 files changed, 12 insertions(+) --- 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 ath .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 ath .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 ath .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 ath .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 ath .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 ath .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 ath .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 ath .board_size = QCA9377_BOARD_DATA_SZ, .board_ext_size = QCA9377_BOARD_EXT_DATA_SZ, }, + .decap_align_bytes = 4, }, }; --- 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;