Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp333076ybt; Fri, 19 Jun 2020 03:07:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy9WBykQVJGGZq8rx5IR6gMVtJz1DGjabN9Z39sDiWCETUqp8tM452/dW+nunW6kuBporI7 X-Received: by 2002:a17:906:86ca:: with SMTP id j10mr2472936ejy.521.1592561233750; Fri, 19 Jun 2020 03:07:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592561233; cv=none; d=google.com; s=arc-20160816; b=muuVM6LqmuVzljqg0eP6qtXxhN2Z7BrLjRmQaYTLoM/rB88n67bpWHI7qM32FpXJ/5 9AJQxuKqPY7Fv04NQnMRsgUV24Z3JwfnXscm11KGf4oIg1Kku9Vunqv9gAlEbuqdtKnc Z1Gm4G8xhXvlTd+AX+WaTWaF9xnnsg8haExxXUqp4FCWGPTq+OHGLqcZxRRDMxzCk3kY LoLERzIC7aUCmBu33j9NZOSRZj5dFCGZcb3wSUTXidASEA9tyjPI0Tx8uFxCktQ86ClF 5tbvqtjwEktoQIUO9fLJYgwnRTP0xHeVWFqgionFyAecwseU3XP2IgGJHpLOqUbeRk/1 uFgQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=kMusfDarPb/KK+NktRNU53kwkwnAYp5on8NunFNTVkU=; b=GyNQBAtN8ixMxw/Bb8j6dpaTL1MECuv1MkmXZ/FeA7Ux3kQQldXED5yGkQYdIf+J6w 8sv1rUGvPQ72Q+gny85/MVTmEGdiu+akSYfA3QTn8a2UtL45fnPiQNMBaHJgidg3zwDI j9XfC96y1rpiyCmWn0x4dEmH7Rb7yYuMnNAfj7IgHqZq3tLz5uMH3FrbTiWTcNRclDDs R9Q2O4cIvDbWaomDlUb7l7f9yjaz50SMR6NnR1hMKxlmcaLFwEL0pPvWa6xDFbzLrK8n D8Mi/eikM2ArJj5YHb2+dEt6GxvUaHBzEMR37mP1bj01YHJRGU49W68TCbx0ci/UuNi1 C3Dg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=TuZEyFt6; 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 k15si3509742edq.127.2020.06.19.03.06.39; Fri, 19 Jun 2020 03:07:13 -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=TuZEyFt6; 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 S1732329AbgFSKEo (ORCPT + 99 others); Fri, 19 Jun 2020 06:04:44 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:6986 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1731419AbgFSKEn (ORCPT ); Fri, 19 Jun 2020 06:04:43 -0400 X-UUID: 415bf6f00c484cc98a792b306a6f47a9-20200619 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:Message-ID:Date:Subject:CC:To:From; bh=kMusfDarPb/KK+NktRNU53kwkwnAYp5on8NunFNTVkU=; b=TuZEyFt6KHaikNreuGV1lL/UByFMqxpT83YQWh27FN2T6ZKOFq+v0C5c46/VuRwEW+6rlLr/VNjWRVpUIsg+v9C50ice0kg7j8orptG+8AxAi78E5hsrl4/YNWH/miQrvBncadlAbkByrYhtxibnCFsQqylLl+1+rpJp3CRo9SA=; X-UUID: 415bf6f00c484cc98a792b306a6f47a9-20200619 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 1723526728; Fri, 19 Jun 2020 18:04:39 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs08n2.mediatek.inc (172.21.101.56) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 19 Jun 2020 18:04:34 +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; Fri, 19 Jun 2020 18:04:33 +0800 From: Shayne Chen To: Felix Fietkau CC: linux-wireless , Lorenzo Bianconi , Ryder Lee , Evelyn Tsai , linux-mediatek , Shayne Chen Subject: [PATCH v3 1/3] mt76: mt7915: add support for DT rate power limits Date: Fri, 19 Jun 2020 18:04:23 +0800 Message-ID: <20200619100425.26351-1-shayne.chen@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: 2E984BD51C2883AC88FC321FC5804DC03A85E46DDDBCDFC9EEFBB4712C3D74CA2000: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 RW5hYmxlIHRvIGxpbWl0IHBlci1yYXRlIG1heCB0eHBvd2VyIGZyb20gRFQuDQoNClRlc3RlZC1i eTogRXZlbHluIFRzYWkgPGV2ZWx5bi50c2FpQG1lZGlhdGVrLmNvbT4NClNpZ25lZC1vZmYtYnk6 IFNoYXluZSBDaGVuIDxzaGF5bmUuY2hlbkBtZWRpYXRlay5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