Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp104503ybz; Fri, 24 Apr 2020 12:35:11 -0700 (PDT) X-Google-Smtp-Source: APiQypLbPUAt6SpgQsZy02KdGSERKXnCfZa8Hj67KAo7a47NfS+x/+6mmeVZSrokZuW9qjz9XGgS X-Received: by 2002:a17:907:20ce:: with SMTP id qq14mr8210672ejb.10.1587756911599; Fri, 24 Apr 2020 12:35:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587756911; cv=none; d=google.com; s=arc-20160816; b=o/2i1MHP4izjVjeyteFDUhFID486eEm0J43go0EljwQAtjlOTVQXLKKdP0tocn5hDu 1crJodxV/SM3O3OU/uFpZyx8KA3S6xGLdeyl0VjKTpVTeMAYj0LLSAUEkuh4XtJda70g VGCZJMpvRH/1MMts646UgXh+WKSkxy21z6n+HUBbv+7xaJeMLJsavgqD87lY57tIiNHD kUXtP0+L4XKx0F3z62ghA2pP140Tf0MaKZkMo9AM4Qf+COe0PFCqN1JSAxqvpk1NqOGt Gu+Z7MrNWmcxvE2ijrI2eL9JBcaf8RAA7poEG5FkmHP3ozfIHdpY5T6S00supuyrdCVU gymA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=I+YRhVrLNgwRO1l9UFDd9D9zLrcTC4/loe2w8YLs6NE=; b=DaDVd+C8ycWEW30KPDJiEWQtUtpQZClZ48lBpFmO/cOw/UCCvOYJkUS/4mcQW/QpSx LnFuOkPAz+chq0T5o9uJznQYyO0iWDisODSdS09R+Z6qUthFWVGhGmxUT/8wZSbM5rrZ dUQ9vlCtPtt0mPWwWu4MqZaHzGUhKje+nZWq5rPD7QQyrL+wCpvA4B+Slhl5fGKMaRG+ hX2JmRu+Fquegnx8H1mzF1OpLkrncYzBDRh6Qh1dTRsePc4HKn2ol8oRCURQyZSqI4Cr aXSfSHP7L8uuhySGje5b8QKQ48bQwpAw+BMdZQHNc4E8uDp72l62uz2607RtwT3+m0ed kj+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=qsikLDtR; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o18si3761438ejr.273.2020.04.24.12.34.47; Fri, 24 Apr 2020 12:35:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-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=@mediatek.com header.s=dk header.b=qsikLDtR; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729237AbgDXTcz (ORCPT + 99 others); Fri, 24 Apr 2020 15:32:55 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:5634 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727059AbgDXTcz (ORCPT ); Fri, 24 Apr 2020 15:32:55 -0400 X-UUID: 35f3e4eb94274f4a88959fb7ed8b6389-20200425 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=I+YRhVrLNgwRO1l9UFDd9D9zLrcTC4/loe2w8YLs6NE=; b=qsikLDtROfhpkCfttYg1O8YFzYHZ9g2gmo4WzYjQeAP/2ulEztg6/uLERs3jDA200guBMyXwmDSivHiufTzPV5L5HJoUJzIlZVEA/AR8f+YDpae2PdBl+PP5a2OxlPVi3jI+D60El+gaHSCofqIf6Cf2dTppyJZ0mfOWXYcL454=; X-UUID: 35f3e4eb94274f4a88959fb7ed8b6389-20200425 Received: from mtkexhb01.mediatek.inc [(172.21.101.102)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 717722886; Sat, 25 Apr 2020 03:32:52 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs08n2.mediatek.inc (172.21.101.56) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sat, 25 Apr 2020 03:32:45 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Sat, 25 Apr 2020 03:32:48 +0800 From: Ryder Lee To: Felix Fietkau , Lorenzo Bianconi CC: Shayne Chen , YF Luo , Yiwei Chung , Chih-Min Chen , Evelyn Tsai , Sean Wang , , , Ryder Lee Subject: [PATCH v3 01/18] mt76: avoid rx reorder buffer overflow Date: Sat, 25 Apr 2020 03:32:22 +0800 Message-ID: <8ec4dbd2b0254cd16ac9bdae6666141872c6858c.1587756404.git.ryder.lee@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: 841B23960D011988730A4DE0BB38752B0586DEF0F023820815934341FB2751F32000:8 X-MTK: N Content-Transfer-Encoding: base64 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org RW5sYXJnZSBzbG90IHRvIHN1cHBvcnQgMTFheCAyNTYgQkEgKDI1NiBNUERVcyBpbiBhbiBBTVBE VSkNCg0KU2lnbmVkLW9mZi1ieTogQ2hpaC1NaW4gQ2hlbiA8Y2hpaC1taW4u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