Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp5403676pxu; Thu, 22 Oct 2020 01:02:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxmQ5dSlvzoer2DxmvKFp820fQUnucFCxHJKf+i+Kaz+0MDBpZ5UaUrfXFhcjMf1zIkwkLj X-Received: by 2002:a17:906:399b:: with SMTP id h27mr1094364eje.105.1603353738019; Thu, 22 Oct 2020 01:02:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603353738; cv=none; d=google.com; s=arc-20160816; b=QW8mGQOKml4vOZQZP027bOHgIaZhIZJuwAhMAfl99AsxDc+7X8JfDpNkr1p6ZYp/iK gP7ac1bqiy4Gwew54rz8iOjimAf52hnNmcTYjK+7G9679/1qZT66vN/v24Rx/CXqq1nE CNtoauDYEmEe/1/UmeSu5s96gpGmwwDAaOymaFQ41mo/3QG0L+FvhDjnPHtEscdamSn/ Am83D784bjlMrxLklRS5HT3bqEqFzQn1jm91VjosivYxMPwxaIBJ6rjz66LylfOdqfl9 hRNC5Ck+t8B6h39tmtQ0ySAZcLuU15a2wGFWThxvRoptAN+MuivAtsWAvNTd2pArcV+K xNIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=6DIi4jrF0FTlHlkYs7ELtzBT+M4M01UmW2wYqgK+a7s=; b=l4qnp/yCTowSLiPmH7BEAwsEncW94FMewzO9HjfXbbG4QmH58U6L0WV6lscOenVn3W mlkaTs/wXLe9BTQALlvH/+vPTJkI81JpWFBA7ece8RdsyvC2QUVrY0i8/U+3tbcozgx4 hs5zndhZfly33wFDxV5vPxHqraUyu1dtwBID2SZuQhgA6Cj7/YsySgFbA5n8otRJ1sDv FwHTBs8HWWHU40SxTswpBp3hbJn1sckZqJPOliRJVjhdY1Vdzuoee+N5agvZX3KLn/pz YQQOBb4Pghn9efqGu8BePdWOhj9VRxlOYedS8G8isr9/CCpPZccpUoTIOT2yoDv5jhDO Zw4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=PXcuiwA1; 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 ng3si390055ejb.345.2020.10.22.01.01.54; Thu, 22 Oct 2020 01:02:17 -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=PXcuiwA1; 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 S2895057AbgJVC2u (ORCPT + 99 others); Wed, 21 Oct 2020 22:28:50 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:43007 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S2895039AbgJVC2s (ORCPT ); Wed, 21 Oct 2020 22:28:48 -0400 X-UUID: 58de92658bc44d2c86b03a43704682ad-20201022 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=6DIi4jrF0FTlHlkYs7ELtzBT+M4M01UmW2wYqgK+a7s=; b=PXcuiwA1uwc9PLkyMqNW83fiatYgiaZLtrrOHb+s6jUUlMrXMYXB+WzSlYPcXzd9AKY2SreAneVSggYIk276vcdYv/Yf3IlZo26FtOIFFGfhrJPfjZUnNz83eEysqDSbDXYgMURTK94nsJYxO8N5Ww7rTpoXmAkop2BBeAscaEM=; X-UUID: 58de92658bc44d2c86b03a43704682ad-20201022 Received: from mtkcas08.mediatek.inc [(172.21.101.126)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.14 Build 0819 with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 534814301; Thu, 22 Oct 2020 10:28:41 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs06n1.mediatek.inc (172.21.101.129) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 22 Oct 2020 10:28:40 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 22 Oct 2020 10:28:39 +0800 From: Shayne Chen To: Felix Fietkau CC: linux-wireless , Lorenzo Bianconi , Ryder Lee , Evelyn Tsai , linux-mediatek , Shayne Chen Subject: [PATCH v4 08/10] mt76: mt7915: implement testmode rx support Date: Thu, 22 Oct 2020 10:28:18 +0800 Message-ID: <20201022022820.3077-8-shayne.chen@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20201022022820.3077-1-shayne.chen@mediatek.com> References: <20201022022820.3077-1-shayne.chen@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Content-Transfer-Encoding: base64 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org U3VwcG9ydCB0ZXN0bW9kZSByeCBhbmQgZGlzcGxheSByeCBzdGF0aXN0aWMgYnkgcGFyc2luZyBS WFYgcGFja2V0DQp0eXBlLCB3aGljaCBpcyBjdXJyZW50bHkgb25seSBlbmFibGVkIGluIHRlc3Rt b2RlLg0KDQpSZXZpZXdlZC1ieTogUnlkZXIgTGVlIDxyeWRlci5sZ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