Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3437468imu; Sun, 11 Nov 2018 15:05:15 -0800 (PST) X-Google-Smtp-Source: AJdET5d1Zu/g6ybjAgTVoyudOVdLJz1cqU79/AgJ2DdQLBZ3oPgwD0QCgBJNkZ5ABkxXEI8AkI7a X-Received: by 2002:a63:c0f:: with SMTP id b15mr15523543pgl.314.1541977515862; Sun, 11 Nov 2018 15:05:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541977515; cv=none; d=google.com; s=arc-20160816; b=S+FKRl3SzI+B7PQDWWXvpvWfNDtAA9nQjj4vim6x3JqZkAvdiG0K2JQttz3A9xi16/ FQq5pKWXLhw6pIH3k1wnyV8RrnjVP/GscunteqUFj9bxc86uWCSN7cLAzg1yRDTqNwPu V/BuvsmoaGY0Dc5RMyL7eeOgawtwYUthjim4+ErLY4tGyyr4kaOcPOb+bTS1udFCl26r TTRrWVWZeUJOet1f3KTQd+zUVyZxi59ujC+ny1HhGEX5yReUgUcpT0PWbn6iKmMDFryN krc1pNGhb7EPsxnJ1srh10zyU8BAs8ZiddwbBQEjSawrEKtPSyRxw33CqIhDYUDeXJ/i LlhA== 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=d3o4iZ6q7HIFJqY/k3ErPODuqYw+DfRhLnZc3soPp4A=; b=XhAu6sgN2Hnt5RJ+ymJs5m8LnL0ZxJc5chTRedPItxHHNMoXkq3rezxUs6uB3VLbTf DV+hOqQ/oLpxONVXbJlgfcyiVRFs/EOsa2KtFpbikOOr6WG4KChtmlI3OCNxTJDxMD1I oQf1iAfm3sTrSJ4aDEjs0hx8rGHBf67Fs8S73mXQ3+175/aUHoiqFW0OXkM5AAjXGkqa S0XTwh2xNwT7lMGI7Egn9o0C8G276BOUxu8+2efkwa1mu7N2+f48CM0l/DcSfqhim42U vHVqYSK/84f4eQ/MujF2w0K/RARPnz8SzI4RA0i/x63fUFLC4/e/XsnicfzZ9PjRd654 WaBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=i6PLAvTn; 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 o6-v6si15773133plh.197.2018.11.11.15.05.00; Sun, 11 Nov 2018 15:05:15 -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=i6PLAvTn; 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 S2390606AbeKLIyl (ORCPT + 99 others); Mon, 12 Nov 2018 03:54:41 -0500 Received: from mail.kernel.org ([198.145.29.99]:51200 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390509AbeKLIWU (ORCPT ); Mon, 12 Nov 2018 03:22:20 -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 B355C21508; Sun, 11 Nov 2018 22:32:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541975543; bh=+X7RWM1Cmnb+SLlD1e/pXlCKt7PdEKBi7lfqFwXCaZE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=i6PLAvTn312WLuN/0dT+F47NP8n5gXG38HF4IrsH+Oq43OnLGpVanMiX1+igW1MRD Wup+/Y9OAc8pE1ukSq3nbwqlOjdZK8HIfu7qTFwmNEG6yewZiL5ynJwRTXxivN+CKT QnM0zkf+ma1kDJs5Nex75rcVVZL1yw+fUb9BiUCE= 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.14 072/222] iwlwifi: mvm: fix BAR seq ctrl reporting Date: Sun, 11 Nov 2018 14:22:49 -0800 Message-Id: <20181111221654.560011628@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181111221647.665769131@linuxfoundation.org> References: <20181111221647.665769131@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.14-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 @@ -1345,6 +1345,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++; @@ -1389,11 +1390,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;