Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1040705ybb; Fri, 10 Apr 2020 15:52:41 -0700 (PDT) X-Google-Smtp-Source: APiQypL22y8wLmupv5eOno5T3T6fJh8nHFlOpLTEAW+Kf2QhpnbvSH/vnzsBwMOJjJvwpn6TaxlV X-Received: by 2002:ac8:646:: with SMTP id e6mr1377787qth.191.1586559161774; Fri, 10 Apr 2020 15:52:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586559161; cv=none; d=google.com; s=arc-20160816; b=YrB/VV2N1/MPycrzLiHk0mFZsaI8knaVTugmvwqHCRYBuDfWkUfYs91xIBfD+6mFgn Imge1wDI1jzcZMOyWvfiFmI+odKYuhrzpbAcL5nYwC9ozZUeCkJSrQqlSx5RPFWm+l1j YhKXYU7SZiW6kMqD7yaEdDz0sVWY5MjDSwdcLZ6OQ/PKjT2HInOPLddJdY8mwZ9ZvrHt LZn66D148z/SanFP7gdE4yTevkCZMitGnxYiViHC6W3uKedW99CKCRcbAKXrgIQ+BcKd rxxMQAF5c67jPkgr5nBmMu+tRf2QTHqnaXxENCNtPtClbTRr6OKw+y3Sc0ot9Ve6/TR+ RJow== 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=w7xtRv8vlqO5EQ+J2L0Cx4x5jxri0BXKTgW3PSYCHdw=; b=o5nN56Kdu0M/BUoSjZ9PC7qWqMiUNUMb7le2a7q7JwruJcEYjtTg2iQ7duljOO8soZ PLvGrYc0xypMJysyuu74+7Lz8yMDB6QezFhfzt8awlhfBigpg5eiWsF7xol3ha3avPfi 9QYh7pLQYA93xE+1mQVrOYmh0NdMxfR8sc3GMS8o9AoBctir6tYxh6DAlq79pYChXmps KoDSNdluG8JX266D1fb12MjKugtdLepBw394ZS4Hehyd8AJpFsujEkF9A/gysAsNE5sF QowKtD6RGkv47IGTkl2WDbSNxfsIiYqKTNI+DQYrCLOCVRCxc9lAG8/xhOvxs0yR67DO woNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=E3sznkPm; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id z12si2124761qkf.199.2020.04.10.15.52.06; Fri, 10 Apr 2020 15:52:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-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=@mediatek.com header.s=dk header.b=E3sznkPm; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 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 S1726671AbgDJWvn (ORCPT + 99 others); Fri, 10 Apr 2020 18:51:43 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:60448 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726654AbgDJWvn (ORCPT ); Fri, 10 Apr 2020 18:51:43 -0400 X-UUID: 9ec4d01da9c8455681ee5c3dfd62f718-20200411 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=w7xtRv8vlqO5EQ+J2L0Cx4x5jxri0BXKTgW3PSYCHdw=; b=E3sznkPmXmnSKHBRPazF2MA0BkReNyI9U83T9aswNJbhMrVeXUCEfl3dZ52r6i+D+gW4eY7da36wRD0UnU7G/Q5QNcSQQzHgQF1ia+E0dBY2473gdGOTrvmXb/hnOhGGSJVGXFYCe/O+3umAJIJN7RbQ7B7u0lM8YzHIF4Xtdo8=; X-UUID: 9ec4d01da9c8455681ee5c3dfd62f718-20200411 Received: from mtkexhb02.mediatek.inc [(172.21.101.103)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 1448111427; Sat, 11 Apr 2020 06:51:39 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs06n1.mediatek.inc (172.21.101.129) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sat, 11 Apr 2020 06:51:37 +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, 11 Apr 2020 06:51:33 +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 v1 01/16] mt76: avoid rx reorder buffer overflow Date: Sat, 11 Apr 2020 06:51:16 +0800 Message-ID: <749e0b262ffe77a854d9d78b6eb833db77c96541.1586558901.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-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 VSkNCg0KU2lnbmVkLW9mZi1ieTogQ2hpaC1NaW4gQ2hlbiA8Y2hpaC1taW4uY2hlbkBtZWRpYXRl ay5jb20+DQpTaWduZWQtb2Z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