Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp382229ybb; Fri, 10 Apr 2020 01:57:31 -0700 (PDT) X-Google-Smtp-Source: APiQypKwvx3m+beIORvwXHmG2VwxfO9ZdNukPvBF6l3kGsAUotg3LuWS9y1d+RYpB9dJ4bFy1E8m X-Received: by 2002:ac8:7609:: with SMTP id t9mr3406784qtq.155.1586509051615; Fri, 10 Apr 2020 01:57:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586509051; cv=none; d=google.com; s=arc-20160816; b=Ce84HqWnHwkbp67DNNDS+o/v3AoasCNuGBBQlcjMuXRb1ZsMcut6RMC2lDUZdvY7fJ /Ry7Rhl0SNi7apqQBFGswbAYniNg9fIFGOB7yN2qKbQk54tLF9cLP2fXz7atMjMUdlHW QdKHV9GGdjhEYW+D+Q8t80axIEasRt7kULBZtR8q9QdYfrfH6jXMkjUG1p5vA//m8I81 KtZWdz2O8EEY7itTnAP9kGPmii7V2UrhDQADGzUhwMb0lSlJLLZHin4HTxcpA/qRcQFd xJJ8KRTigtYKElSlfBCS/8VTwhhcfeHNoY0W6ca8CK9gMzALlwT7hPTAAOxKoeUTH83C Vtgg== 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=xOlU6VdznVucL1mywYQ9+8wuo3RW1AC51OdMIdF3LvTDd+xfu+x7tY7kD4s7ZY6JOx /QtU/9ytIPfl4mxQlxK9Do9GDEPUDOJITQoDzZXH7MMo/wNogpMx7XIMnyVxMdhyhQuV CAagLgwzxdyvXFJMyIGzZjgQidy1XOBesm9U2z3Nv906tKKvyDegZrJWJ9LUbU/HScqb hUL0uP1hUM+ekm1+zxzUoe8AenSSH8aZTkYJJKWB7Q4IGe/4zOIa2sSvsOTjI+iL8BrV 2OhyJGukP3q4UCOKnK87Z5IoYlQu57kQWYugv5nT/SU44LcBOm+0T0u2fhdEY6AEfwVY 5LEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b="mCL/Z9uo"; 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 f14si1011179qkg.143.2020.04.10.01.57.17; Fri, 10 Apr 2020 01:57:31 -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="mCL/Z9uo"; 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 S1725913AbgDJIy6 (ORCPT + 99 others); Fri, 10 Apr 2020 04:54:58 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:48806 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725858AbgDJIy6 (ORCPT ); Fri, 10 Apr 2020 04:54:58 -0400 X-UUID: ea57044bcd3e46b197d4ff8d22c73e06-20200410 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=mCL/Z9uoxozs2pt+ejawMVweJIJvNmm9CAKVt+/wTNY2gfG8MFmvXQ7dJ4CBxdsbuzZ/jNkFH+KtaCKffLkfHo73ot/4LsuX664Lchzw7Rex98vZBohPN1UgzeHTv4PM00fisVaciyJrqh6QXknPz2AgzYHHDQ+NA4Fv98PH+fs=; X-UUID: ea57044bcd3e46b197d4ff8d22c73e06-20200410 Received: from mtkcas11.mediatek.inc [(172.21.101.40)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 180451673; Fri, 10 Apr 2020 16:54:56 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs02n1.mediatek.inc (172.21.101.77) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 10 Apr 2020 16:54:52 +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; Fri, 10 Apr 2020 16:54:52 +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 01/16] mt76: avoid rx reorder buffer overflow Date: Fri, 10 Apr 2020 16:54:38 +0800 Message-ID: <749e0b262ffe77a854d9d78b6eb833db77c96541.1586507878.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 ay5jb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