Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3485357imu; Sun, 11 Nov 2018 16:10:11 -0800 (PST) X-Google-Smtp-Source: AJdET5cs31JopnT+p0oliE3oYSOjieHZXGvWEEfwqtOeDiUnG5nUezwUVHNXU8Dz23gi2ifcslsD X-Received: by 2002:a62:4e88:: with SMTP id c130-v6mr1128493pfb.141.1541981411206; Sun, 11 Nov 2018 16:10:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541981411; cv=none; d=google.com; s=arc-20160816; b=Rmuep0L/xlGStULOrF2PcYPHNaj7Sxr7fTDbEX/OHFZLTYuIAh4GyjWB9OqRovdoN2 Vqd4xgyCdJKayw0YIqRTynhdNrph6bGC89dUBn449fZEeAH/i2GExO8AesQY8zI/72x8 btZc4vpqoPbn6CZWbvtCad3dCFQ1wV4MjHGDpJVsJSD97/zaIaU8DGWhFiYgfJaDBbu4 q9u2f6nhtd1KnxRzlIOCOMGuirKU54C5NNWfsppmv/6dwczFknRt5pJpW2Yt3Ay2vx93 bPmEyxE8mtP8jrugp007wVNez2C/AHAqru2TVqzGErUW3Y1XH8Wtl9WJ9rnjOrob6253 EM3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=b97kVQ3J8SRl2u6QFSDKzwnOtA62+sQ6MOB2FMRZ2GI=; b=K6qv7Q7x65kmwctzZ+jdKmVTmsub7omQmS2D9UXDQxlSOOEQ+/FV74LEJ7k6i++Bc+ ZPxomMtUrUEvgeUWhAF6hvWyl7vzZDWdmVVGBkX0E5W5Hu9xkYOPxy9LBN/NhMnKwPqe amt5/gjU2qZC/HqeiV/JSXjgw7S5lvXCWsJSa7KY0xQszEru83L183T2jUClppc7GBib xz+HbJluZMqT6zWtT7Ps/XWQC35AXxC2CadeHDO8KG1bpf9ucOLwasPJvBByxuogJn6Q fR4MXiWF2li3KnLwSdV0L6agbnj2UAnZEbaXItH8s0LGHbWGj2ltq8ZAcz6plxw5vkrY 5VFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=eM11B8RR; 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 l20-v6si14126440pgk.65.2018.11.11.16.09.56; Sun, 11 Nov 2018 16:10:11 -0800 (PST) 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=eM11B8RR; 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 S1731978AbeKLJ76 (ORCPT + 99 others); Mon, 12 Nov 2018 04:59:58 -0500 Received: from mail.kernel.org ([198.145.29.99]:60706 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731042AbeKLIR2 (ORCPT ); Mon, 12 Nov 2018 03:17:28 -0500 Received: from localhost (unknown [206.108.79.134]) (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 3AE382154B; Sun, 11 Nov 2018 22:27:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541975253; bh=L/MDf7uArLSmjRMBg9/JzHRjdE4JZGhjjgGeyPYzLM4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eM11B8RRP4B6HMlxBUhthlcMhHNn3FEGACqge3IQaVbHxzlajJeMXElkzoKPmYrU7 3VvLRlGmrJcv/593ll+p23HXTGoOeL8/E7Rrvs1fAX08+w3cbZLu0CE3KP1idUSFqu LUI0I3FO/5/4opaqjwhy+1K/ZQiAVV2tYk85HmI8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sara Sharon , Luca Coelho , Sasha Levin Subject: [PATCH 4.19 121/361] iwlwifi: mvm: fix BAR seq ctrl reporting Date: Sun, 11 Nov 2018 14:17:48 -0800 Message-Id: <20181111221637.022468802@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181111221619.915519183@linuxfoundation.org> References: <20181111221619.915519183@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: Sara Sharon [ Upstream commit 941ab4eb66c10bc5c7234e83a7a858b2806ed151 ] There is a bug in FW where the sequence control may be incorrect, and the driver overrides it with the value of the ieee80211 header. However, in BAR there is no sequence control in the header, which result with arbitrary sequence. This access to an unknown location is bad and it makes the logs very confusing - so fix it. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) --- a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c @@ -1405,6 +1405,7 @@ static void iwl_mvm_rx_tx_cmd_single(str while (!skb_queue_empty(&skbs)) { struct sk_buff *skb = __skb_dequeue(&skbs); struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); + struct ieee80211_hdr *hdr = (void *)skb->data; bool flushed = false; skb_freed++; @@ -1449,11 +1450,11 @@ static void iwl_mvm_rx_tx_cmd_single(str info->flags |= IEEE80211_TX_STAT_AMPDU_NO_BACK; info->flags &= ~IEEE80211_TX_CTL_AMPDU; - /* W/A FW bug: seq_ctl is wrong when the status isn't success */ - if (status != TX_STATUS_SUCCESS) { - struct ieee80211_hdr *hdr = (void *)skb->data; + /* W/A FW bug: seq_ctl is wrong upon failure / BAR frame */ + if (ieee80211_is_back_req(hdr->frame_control)) + seq_ctl = 0; + else if (status != TX_STATUS_SUCCESS) seq_ctl = le16_to_cpu(hdr->seq_ctrl); - } if (unlikely(!seq_ctl)) { struct ieee80211_hdr *hdr = (void *)skb->data;