Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp616727ybt; Fri, 19 Jun 2020 09:25:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzz8DmixHXHQxp3P9jJv8RAuO+ijNCfz9YAbIz48gvKdCfv8gDep2Ne5/no9dYwJoBe8CJt X-Received: by 2002:aa7:cd16:: with SMTP id b22mr4163494edw.308.1592583953196; Fri, 19 Jun 2020 09:25:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592583953; cv=none; d=google.com; s=arc-20160816; b=ONjNtVD9UqSdVbu3s9IBTeWyNH/FrSZgjGZC4qlYDMruSTqy1zxDrbAtoNB1p60Vnj 9vFSMp8fu6nQq3kKV3ao7k8wOllvCpm2MBtawzeLzXgym/44vdkRDGqxrydAPzHDf6Va l8kuSNyxhtjyLxp9f/3ElBvcfnuoCs4zSCkFo42AxSLW5/1FTpKyLEcQDH0QBfekAYRS OXmFWIGsuIpU3DhaYa/b/g70GLLYcsg+79vV7QQCODZxGYZdRt11IyzzyJQou+ioW3RR 5EXWTt4uu8VcY0hthlnQufd7JwoFvABti4/7QecUHuY4/2F0233jk3s0H139evxEatNb akIw== 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=Z+UOUo+6sL3fNrv4nSuHPWI6+sHeZgaRDX7FGgPEi8c=; b=jtvjv2ZJR4nvawzIClliFnF8MbkGHr3cS5haQhtqZmMJsqYbbtfm48oAkPY8epG9Qg 1yE1wOHO/tcZmiKBN7JzDr3zMl5Ro8X++WxOQrIY/cvTpU1mpq+fEamOeOl74eB6NvfK ywROylepeHuz4gO74avFGPhbq0K105CZcD086XwFtK029XzipQ0SCA5YVh/NGHnbG4pI mL4UYqcMdQbiCHvCCZkHljSwNqb+RyHQXLPSCO8pTNhmxM7RyHaDcebzl6f4LC4vkx1O ANRXl+S9RQAbhS0bAoW8sVXuQo1XuQEQyXw7e7nFafGsnIqJJDbj3aeSy5++axUnUNwT MGBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=PcG5svNm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r11si4254024edw.38.2020.06.19.09.25.31; Fri, 19 Jun 2020 09:25:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=PcG5svNm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404408AbgFSQUs (ORCPT + 99 others); Fri, 19 Jun 2020 12:20:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:57572 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390679AbgFSPBG (ORCPT ); Fri, 19 Jun 2020 11:01:06 -0400 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 B6A4821841; Fri, 19 Jun 2020 15:01:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592578866; bh=p6ZispYrWzk7yr0xIja5r9BTFfXDWbd/vCv6fYO7J7k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PcG5svNmg0C+czYkNzQoMdzMRIyTTfzZwtQm+fziwtgW1Vh9b3NeGd8rUTg6rTi2W 1L2JtWeoKpGeaa8ApanZ8tnSn9wPtx8HeLnzx2GIyqzCUTWle15NfhwhvSYsyzULrZ O6xKF/cIVy3B5fAzWuyqeIdna7D7c1X0KN8mrdHQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Chih-Min Chen , Ryder Lee , Felix Fietkau , Sasha Levin Subject: [PATCH 4.19 157/267] mt76: avoid rx reorder buffer overflow Date: Fri, 19 Jun 2020 16:32:22 +0200 Message-Id: <20200619141656.344416983@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200619141648.840376470@linuxfoundation.org> References: <20200619141648.840376470@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: Ryder Lee [ Upstream commit 7c4f744d6703757be959f521a7a441bf34745d99 ] Enlarge slot to support 11ax 256 BA (256 MPDUs in an AMPDU) Signed-off-by: Chih-Min Chen Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin --- drivers/net/wireless/mediatek/mt76/agg-rx.c | 8 ++++---- drivers/net/wireless/mediatek/mt76/mt76.h | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/agg-rx.c b/drivers/net/wireless/mediatek/mt76/agg-rx.c index 73c8b2805c97..d44d57e6eb27 100644 --- a/drivers/net/wireless/mediatek/mt76/agg-rx.c +++ b/drivers/net/wireless/mediatek/mt76/agg-rx.c @@ -154,8 +154,8 @@ void mt76_rx_aggr_reorder(struct sk_buff *skb, struct sk_buff_head *frames) struct ieee80211_sta *sta; struct mt76_rx_tid *tid; bool sn_less; - u16 seqno, head, size; - u8 ackp, idx; + u16 seqno, head, size, idx; + u8 ackp; __skb_queue_tail(frames, skb); @@ -240,7 +240,7 @@ out: } int mt76_rx_aggr_start(struct mt76_dev *dev, struct mt76_wcid *wcid, u8 tidno, - u16 ssn, u8 size) + u16 ssn, u16 size) { struct mt76_rx_tid *tid; @@ -264,7 +264,7 @@ EXPORT_SYMBOL_GPL(mt76_rx_aggr_start); static void mt76_rx_aggr_shutdown(struct mt76_dev *dev, struct mt76_rx_tid *tid) { - u8 size = tid->size; + u16 size = tid->size; int i; cancel_delayed_work(&tid->reorder_work); diff --git a/drivers/net/wireless/mediatek/mt76/mt76.h b/drivers/net/wireless/mediatek/mt76/mt76.h index 2eab35879163..7b1667ec619e 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76.h +++ b/drivers/net/wireless/mediatek/mt76/mt76.h @@ -193,8 +193,8 @@ struct mt76_rx_tid { struct delayed_work reorder_work; u16 head; - u8 size; - u8 nframes; + u16 size; + u16 nframes; u8 started:1, stopped:1, timer_pending:1; @@ -537,7 +537,7 @@ int mt76_get_survey(struct ieee80211_hw *hw, int idx, void mt76_set_stream_caps(struct mt76_dev *dev, bool vht); int mt76_rx_aggr_start(struct mt76_dev *dev, struct mt76_wcid *wcid, u8 tid, - u16 ssn, u8 size); + u16 ssn, u16 size); void mt76_rx_aggr_stop(struct mt76_dev *dev, struct mt76_wcid *wcid, u8 tid); void mt76_wcid_key_setup(struct mt76_dev *dev, struct mt76_wcid *wcid, -- 2.25.1