Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp6021850ybc; Wed, 27 Nov 2019 13:33:16 -0800 (PST) X-Google-Smtp-Source: APXvYqyj5Hi0Ciphrk3BmW4ERQyyzNP4wnO3Oyi4FQDguKTGHs24YA9uG+YwN0DPxtQ57zoKR2gG X-Received: by 2002:aa7:c756:: with SMTP id c22mr34045879eds.25.1574890396714; Wed, 27 Nov 2019 13:33:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574890396; cv=none; d=google.com; s=arc-20160816; b=mEqym3Jqp/oEEuqm4lg6VNzPC2wAb0++XN9s661Lqijs/OBo5T3cbgLxU/ZGw2RwBU qh7XlFMNr6+ZvLb+QIg23BFgx0N/jiowUomZf8LCGliBZ0dC3j6KWoJ8wWiDl6y8RFFq 9odvnwcwV0iUxyS6rzk7I7ajV995M2gmSKWW0yMWUbohtgn/QL4yESD6yY0TzEzoxzqC jDJ7VdtzrkNWQK0PfVbp2WI/GMObkzBaVAbKXAA3cLjmq2b3m8rs8Ysj0AebppHhLc84 BrqjS9oMvUrsMGc5qxjO5aV4otJGE0qQdjgh6RYaIdae+zTlECPao6RWNj++iTUI04xz DJww== 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=T6JFN4EcsqzQurOTHZLNdWpcfTCC3EQfpnghX0lIJgY=; b=nBAZ4r+GcSgCKmlN26D51dGVH8SYTmYLBDhyV/cWCarFU9+8z9RIJz9PdhILQ1BZaw edch+za3BvXvo1QK2IXzzaFTqI+I9LgG/2E8O6gflLyot5xdG+7zx4PJ6d7bX9GIFZ7g e/nSGGtU0pCeeSY1TD1BLBYd/aguhwIiIMNAtc2S02DzkfSTDk5RdMU1wLsV34zQQE4X 3MJ4Ug3YcWE1E+/9eZa0teWCKvW3M61KUT/xj5Okr5jua4SyorrjvoDXkfm1n8bNVsBo TCMYNUCInvMBH3aiRRbZhIMk3QFbB1+PyTP7lHyJ7BQGghWu1VSJAHEFPKiAyECxl0ey EMHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=P+bmam0a; 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 o2si986897ejn.366.2019.11.27.13.32.53; Wed, 27 Nov 2019 13:33:16 -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=P+bmam0a; 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 S1731066AbfK0U4a (ORCPT + 99 others); Wed, 27 Nov 2019 15:56:30 -0500 Received: from mail.kernel.org ([198.145.29.99]:47342 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731059AbfK0U43 (ORCPT ); Wed, 27 Nov 2019 15:56:29 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 860AF2068E; Wed, 27 Nov 2019 20:56:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574888188; bh=Sf3cIY4FBXZRehIUMul+h13jBBMHJUAoQ3mb0dOaB0A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=P+bmam0a9iKthI+JGrSHl5mKGmoyjDq8p9KuIsRyK0RAJH29Lqw50h9LnyBdon5Mg nENcmZDZ8Q/o37i5TY+ziQid3d/TaQpuDevqpUF1mYFcU3mNaU5YgmXPYbxxETIxWb mjFZAFhD0uwysZT9DNwk89EbaHkfO81mIS88yVYI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Felix Fietkau , Sasha Levin Subject: [PATCH 4.19 037/306] mt76: do not store aggregation sequence number for null-data frames Date: Wed, 27 Nov 2019 21:28:07 +0100 Message-Id: <20191127203117.566587432@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191127203114.766709977@linuxfoundation.org> References: <20191127203114.766709977@linuxfoundation.org> User-Agent: quilt/0.66 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 From: Felix Fietkau [ Upstream commit 5155938d8a0fe0e0251435cae02539e81fb8e407 ] Fixes a rare corner case where a BlockAckReq might get the wrong sequence number. Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin --- drivers/net/wireless/mediatek/mt76/tx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/mediatek/mt76/tx.c b/drivers/net/wireless/mediatek/mt76/tx.c index 20447fdce4c33..227e5ebfe3dc2 100644 --- a/drivers/net/wireless/mediatek/mt76/tx.c +++ b/drivers/net/wireless/mediatek/mt76/tx.c @@ -148,7 +148,8 @@ mt76_check_agg_ssn(struct mt76_txq *mtxq, struct sk_buff *skb) { struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; - if (!ieee80211_is_data_qos(hdr->frame_control)) + if (!ieee80211_is_data_qos(hdr->frame_control) || + !ieee80211_is_data_present(hdr->frame_control)) return; mtxq->agg_ssn = le16_to_cpu(hdr->seq_ctrl) + 0x10; -- 2.20.1