Received: by 2002:ac8:3b51:0:b0:3f3:9eb6:4eb6 with SMTP id r17csp2747021qtf; Mon, 12 Jun 2023 09:11:32 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4HSrSnlff1R83nNFcsvEEmzCzxCneiEjDsyZ/WH0y3oeB/tXJ2hxBG9vpHoKDjz/TQ8jOM X-Received: by 2002:a17:907:3da0:b0:982:2278:bcef with SMTP id he32-20020a1709073da000b009822278bcefmr1823232ejc.60.1686586292432; Mon, 12 Jun 2023 09:11:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686586292; cv=none; d=google.com; s=arc-20160816; b=bN02TXwHw3XXJrOjrfWrAgclc7gqo2985/IOfY2dk+Nh+R5zjvpttrLwXJY5gZTwXP +vYkMu55vDEdxPrjDMCni4oHhm7BeISd6hmguZaNol7ZspPTkb98QkbccDH4qRFHa74Y efS7ooEz6gysbdGrMNbar/HNPFbSgpSKbiEBMRwR0o2/ZKgHOXMwKeXouu7tkJIi6kNQ bXbK4jAbPqU57Me9ZN/X0BPa8RlS31+WxA9dglZTwG08dkfbdc70FrJ+znkG+BxprJ7J 1FrphZobE/VbywAxA0Nc5X2UX+RxIyy7nAeMYhQ6GZ4b8LdganEEvHQZQ5fOm8XmcBvC n8FA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=oXgIm+hj7pTrCDEIgLo/tjw4/gkd6u6IJ4KIh8GO7RY=; b=tnYN5Vt23dsNqbQd2vefes1UCTi85lMqnRV9tQ8Rxr/a9S4ugtyKHSSP4RDVyoGtEV fJKR74x0cqfJgaFkMJsjHolZz5VpkdnZ6fgR4RG6JhEJ9mgxbEI/VNHHGXv3/8YDMY61 4TjVs+SGyTyMPJRTbG7KDXXzwntml3V7kldJmWTYc7KB+DZ2ZQHtPiN/9Psq21GIGX4Q dewglzzGr6zm0RaNhV/rNpsnuizo6sUcz4xZhdS4oIRuC5Ucewy/o3VyWCSlgCkhLnWC tezJP6X6hEXFSFb+I9AcfOB51x/froTYPZk/2nHpwAJePcuLnc4cU3n8tztXqf5h+Hvu guKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Yb3Dgh6U; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id au28-20020a170907093c00b00968a1bbec9esi5307366ejc.678.2023.06.12.09.10.49; Mon, 12 Jun 2023 09:11:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Yb3Dgh6U; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237073AbjFLPwV (ORCPT + 61 others); Mon, 12 Jun 2023 11:52:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41746 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232495AbjFLPwU (ORCPT ); Mon, 12 Jun 2023 11:52:20 -0400 Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 182C5E8 for ; Mon, 12 Jun 2023 08:52:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1686585136; x=1718121136; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=yqIBFc0KdyecEZ6YtbTTKhb2WJqiAXIe0ZjoQkmgBV8=; b=Yb3Dgh6UnWqMfhzCPzRUqWgCSU+hfSjmwG4ShmIz2QHvn/fa/x2INs04 7uM5E1wsxyXh5Y7xH1k5DFozpMeOa6/PjYN/DDZ8Ruu1Z9qqBG4gECeOx EmzXX/DsQURGJ/q7e7+Wj5VZxK4VW7vhFPnRCkHLaETRux+Nx0sTQchzv whYzafjnN4vOdOflocS7DHJl+d2t1PqvAb7ju4/7I35PdAt9cOOde7vJi ittBKuMs8ZEIyjMlR+J2Kl2bm0edN1JbQPuBElrXIqmrVzHCAz6/6afdM 2xfig6fSkLjxt3bTViiL3pGcf2dzhVGx4GeOTBZ9o5f6N7LllZE/YfW3q g==; X-IronPort-AV: E=McAfee;i="6600,9927,10739"; a="421674277" X-IronPort-AV: E=Sophos;i="6.00,236,1681196400"; d="scan'208";a="421674277" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jun 2023 08:51:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10739"; a="885499369" X-IronPort-AV: E=Sophos;i="6.00,236,1681196400"; d="scan'208";a="885499369" Received: from azvuluno-mobl2.ger.corp.intel.com (HELO ggreenma-mobl2.lan) ([10.214.202.109]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jun 2023 08:51:52 -0700 From: gregory.greenman@intel.com To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg , Gregory Greenman Subject: [PATCH 11/15] wifi: iwlwifi: mvm: always set MH len in offload_assist Date: Mon, 12 Jun 2023 18:51:12 +0300 Message-Id: <20230612184434.bba713f7495a.Idbc8e3ce313b51af4060326e0191bd338b3163a2@changeid> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230612155116.168000-1-gregory.greenman@intel.com> References: <20230612155116.168000-1-gregory.greenman@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Johannes Berg Some versions of the new hardware don't have a functional version of the new offload method, but still have stricter checks on the MAC header (MH) length in the offload assist word. Include that even if checksumming isn't offloaded to hardware. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman --- drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c index ccd1e41604f3..547694c89ffa 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c @@ -44,9 +44,9 @@ static u16 iwl_mvm_tx_csum_pre_bz(struct iwl_mvm *mvm, struct sk_buff *skb, struct ieee80211_tx_info *info, bool amsdu) { struct ieee80211_hdr *hdr = (void *)skb->data; + u16 mh_len = ieee80211_hdrlen(hdr->frame_control); u16 offload_assist = 0; #if IS_ENABLED(CONFIG_INET) - u16 mh_len = ieee80211_hdrlen(hdr->frame_control); u8 protocol = 0; /* Do not compute checksum if already computed */ @@ -118,6 +118,8 @@ static u16 iwl_mvm_tx_csum_pre_bz(struct iwl_mvm *mvm, struct sk_buff *skb, else udp_hdr(skb)->check = 0; +out: +#endif /* * mac header len should include IV, size is in words unless * the IV is added by the firmware like in WEP. @@ -130,8 +132,6 @@ static u16 iwl_mvm_tx_csum_pre_bz(struct iwl_mvm *mvm, struct sk_buff *skb, mh_len /= 2; offload_assist |= mh_len << TX_CMD_OFFLD_MH_SIZE; -out: -#endif if (amsdu) offload_assist |= BIT(TX_CMD_OFFLD_AMSDU); else if (ieee80211_hdrlen(hdr->frame_control) % 4) -- 2.38.1