From patchwork Wed Jan 28 10:31:32 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helmut Schaa X-Patchwork-Id: 5727801 Return-Path: X-Original-To: patchwork-ath10k@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 839D59F163 for ; Wed, 28 Jan 2015 10:32:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5DB3C20256 for ; Wed, 28 Jan 2015 10:32:20 +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 005FA20103 for ; Wed, 28 Jan 2015 10:32:18 +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 1YGPut-0000nd-Jg; Wed, 28 Jan 2015 10:32:11 +0000 Received: from mail-qa0-x22b.google.com ([2607:f8b0:400d:c00::22b]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YGPun-0000lA-Vu for ath10k@lists.infradead.org; Wed, 28 Jan 2015 10:32:06 +0000 Received: by mail-qa0-f43.google.com with SMTP id v10so15562903qac.2 for ; Wed, 28 Jan 2015 02:31:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=YO0M6FAUvj730Yqf67F3z+S/ciE1lOOcJVWind1J5jM=; b=WzrC1nPgUb8ff4Vfyiq/XSKY1tmgETk9iDew2sR3BYwA/5qSI6sIkJfi+ASj3rhoQl 4qkdof11AVcoOl2p82j5qYDUDXm64/N7sfSnvn/4PB2xd6RRuDHQSodTP+AYKE3dKLMk pUOz3FhTUBefblCyOKlPTR6Z1piKYLjkHA4A1B307YoUR+w2x/4AjQgQeCCiAuHxcLCV fvfXf2YpPc1lTr3c4C2+kf97SikVuGHA3uD3Vs38Fp0rOiOrEE9Mc7v6cOjHYYMc36N/ EzHiihI8nn9OXA0lI0bI0UtxdOeqz9XL4PTt7Ayrq98geCMxo/Tzja21DuwZSl/O3ggV 7U7g== X-Received: by 10.224.37.138 with SMTP id x10mr11906489qad.4.1422441104128; Wed, 28 Jan 2015 02:31:44 -0800 (PST) Received: from hschaa-desktop.site (HSI-KBW-217-008-059-040.hsi.kabelbw.de. [217.8.59.40]) by mx.google.com with ESMTPSA id i48sm3625073qge.34.2015.01.28.02.31.42 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 Jan 2015 02:31:43 -0800 (PST) From: Helmut Schaa To: ath10k@lists.infradead.org Subject: [PATCH] ath10k: Use TX cksum offload only for CHECKSUM_PARTIAL Date: Wed, 28 Jan 2015 11:31:32 +0100 Message-Id: <1422441092-29243-1-git-send-email-helmut.schaa@googlemail.com> X-Mailer: git-send-email 1.8.4.5 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150128_023206_114429_A8B5ABC7 X-CRM114-Status: UNSURE ( 7.20 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.8 (/) Cc: Kalle Valo , Michal Kazior , Helmut Schaa 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=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 Otherwise ath10k will just checksum everything even if it did not go through the TCP/IP stack (for example bridged frames). In the worst case this could mean recreating the checksum for incorrect data. Signed-off-by: Helmut Schaa --- drivers/net/wireless/ath/ath10k/htt_tx.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/htt_tx.c b/drivers/net/wireless/ath/ath10k/htt_tx.c index a1bda41..e142502 100644 --- a/drivers/net/wireless/ath/ath10k/htt_tx.c +++ b/drivers/net/wireless/ath/ath10k/htt_tx.c @@ -534,8 +534,10 @@ int ath10k_htt_tx(struct ath10k_htt *htt, struct sk_buff *msdu) flags1 |= SM((u16)vdev_id, HTT_DATA_TX_DESC_FLAGS1_VDEV_ID); flags1 |= SM((u16)tid, HTT_DATA_TX_DESC_FLAGS1_EXT_TID); - flags1 |= HTT_DATA_TX_DESC_FLAGS1_CKSUM_L3_OFFLOAD; - flags1 |= HTT_DATA_TX_DESC_FLAGS1_CKSUM_L4_OFFLOAD; + if (msdu->ip_summed == CHECKSUM_PARTIAL) { + flags1 |= HTT_DATA_TX_DESC_FLAGS1_CKSUM_L3_OFFLOAD; + flags1 |= HTT_DATA_TX_DESC_FLAGS1_CKSUM_L4_OFFLOAD; + } /* Prevent firmware from sending up tx inspection requests. There's * nothing ath10k can do with frames requested for inspection so force