Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2419376ybt; Tue, 16 Jun 2020 05:48:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyKV1D0zaB9kGdoisZOkgqmH1z0wsboQ7tLG9Qs6gyEC34sjWkqLV+L9MBsWLElG43x2LoZ X-Received: by 2002:aa7:df96:: with SMTP id b22mr2425114edy.348.1592311681826; Tue, 16 Jun 2020 05:48:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592311681; cv=none; d=google.com; s=arc-20160816; b=mP34fXdRH7KHx9Cf3ufrDX7+NLbbB6UibBXCmzj+hsBLrMmQT6HqAkjyTflXlMXbjQ AJG/lzoEuNyXw5ZosAt2xcyueTxz+P8m1Ly/ciINsum1u/rxIuhvFTwlqQmcyIbN8n00 6yP99wbeUsb8HF1WnMC6C0H9Ba4ub59PhDijVRV8mxKNEH53ZXn1rE5QkoXCGEVw4t5F 1UcFh6yDTxDzr74+BLCokbcFkd1ayyM5gOYz6WSI+E97hpvotx0GPk8pix5LLv+39mgi 0XyOPd6JP85ikuTIQGuuIYEij73KqZOJ+oAzJkUZUjdlY2P+5m08+vhXJiGvMkO+r4yJ wVvQ== 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=EHgc6usT4G4/hgz5NXvICcMpwnoY3iXu64idsp5U1Jk=; b=rCFMkItt2fnh8D60+ASGljnS8kS2lwhtnk8mCb5OhQjyNAgETLFJNOkWOeHpg3ivU2 RPgH215zMVgirvZnkfGnb/oCr0QLvxDC1FqNJIYd5KBtOQ4BbiifxMUsZz/twDxE8+qv 5VsCA4rO16Y0t7lGq/ye2PDJRDU9EaB33Bg2ouixpBWfrzgsg6tJXAUL7Vn1yo2wpnTw IjLGV4vSeP4FNnbR2k10dn4o8oiopvy1z1/qUsThmvCncPaK0vhpz/iK00RJMuN16jsc yemPjPtDIf6FMF4CiTI1qVBybgf0DOJmf/secGCdOB1s6jo58ih47cOTrY98b7VrCn8f 1VFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=bFfmgrL9; 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 u20si10141915edq.15.2020.06.16.05.47.29; Tue, 16 Jun 2020 05:48:01 -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=bFfmgrL9; 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 S1728271AbgFPMrK (ORCPT + 99 others); Tue, 16 Jun 2020 08:47:10 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:38020 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725901AbgFPMrK (ORCPT ); Tue, 16 Jun 2020 08:47:10 -0400 X-UUID: 22fa8ade47ad4d9d93accefb4df73746-20200616 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=EHgc6usT4G4/hgz5NXvICcMpwnoY3iXu64idsp5U1Jk=; b=bFfmgrL9h50b1IAUQmp80u69FpIF88j8AspvEpXpIr1zCTAimuBkyjlNe9i1vqAyRG1egmS8Wrfw4PM0RmKPbmL6UbLBZw/Aouy4/WLCgaOqM6Z5qmgeXRj3NgUFHg4LZhCts339BiVNr/QtGqUd5bTeQAKGWnvJHMu5Ndvm2aE=; X-UUID: 22fa8ade47ad4d9d93accefb4df73746-20200616 Received: from mtkcas06.mediatek.inc [(172.21.101.30)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 1979095913; Tue, 16 Jun 2020 20:47:07 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs02n2.mediatek.inc (172.21.101.101) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 16 Jun 2020 20:46:59 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Tue, 16 Jun 2020 20:46:58 +0800 From: Shayne Chen To: Felix Fietkau CC: linux-wireless , Lorenzo Bianconi , Ryder Lee , Evelyn Tsai , linux-mediatek , Shayne Chen Subject: [PATCH 3/4] mt76: mt7915: add support for DT rate power limits Date: Tue, 16 Jun 2020 20:46:12 +0800 Message-ID: <279b29408c742c4b043e7af11217dcd5eeb7b8c2.1592276165.git.ryder.lee@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <9ae2b6233284b60206e3513f7bf2eb03d2fbd724.1592276165.git.ryder.lee@mediatek.com> References: <9ae2b6233284b60206e3513f7bf2eb03d2fbd724.1592276165.git.ryder.lee@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: 24678ACB82BEA57D358342FF229A7D0922D92586A8DF5F8F21FBBA311760836D2000: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 QWRkIHN1cHBvcnQgdG8gbGltaXQgcGVyLXJhdGUg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