Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp257095ybt; Fri, 19 Jun 2020 00:55:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwOzFWaemLOvSesWlwQcZiRGUenYS7OSIoeF+BOOwNwJpBwsY51zJQeqFRbtyIIfzNOq03Z X-Received: by 2002:a17:906:abca:: with SMTP id kq10mr2545287ejb.390.1592553359249; Fri, 19 Jun 2020 00:55:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592553359; cv=none; d=google.com; s=arc-20160816; b=bbyjFEHZd98tSHSrVHLv/IWXyZazHw6wU5Ak67OD86tg0f5rM1VrFdJCHTf5HkJ2/D sFmH+FvBpQ3h4cSwmrIJeovrnyQnZP6VJ+IPaYfCibqdIlO6zot/g2chCSH/t4/u64MK pj09fLzOJ6My7ysKazMsB0OhhiFFlitkb/0hVjXaEcn5WsIi4KFO9f2FmOcp0ONfWupC ZM39FrSSK8q/m8BqWrLX1gBmh0y6Te111w3NdB+v63tTTLFo5oI1WLq+RFSFpqRO7sBR BXec0VCEXrkSlMFrXd2PpUsx0vOiSBqFczZjtKOCwaNHgiWvE5IlgFiVUAsWJgAAXhfl G61w== 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=3ltb5nZixCRRCc99x3WnmbZJW+adF+mROtOvKeMYdTU=; b=T9hI+ZaZD4aJhRFGkwRgopRdbB+Nm1vm9Me7ky2bqHKYPlwOMmunvpdrRGp0KFN7i4 8egh7IwNhTk8gm4rZ+uOWmVNVwpv20MAyXAkxWL133jqgKUEtfxDm47rocHc4n+PLt2H gs3fWG9eryz3J7Gp2DBVgbmjWcw50yhqvLHLXd3O2ubVZc/IFTvHXSRaw8W6fCKBfoh6 WRYuQwy8rDfNsfjXTx2htemCVMGG3ilNpxFIA10xG7VVljM/6NI9dsBCN8p+h8EEYw+S JmT8sdvVNPB4NWgfvtEau5fkuC92kg4rW5+Vri40TqvLJxJ4/tG3eWIOOFNUWG4WKABm IBqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=VKazcRPZ; 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 i2si3348520ejr.278.2020.06.19.00.55.19; Fri, 19 Jun 2020 00:55:59 -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=VKazcRPZ; 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 S1730905AbgFSHyj (ORCPT + 99 others); Fri, 19 Jun 2020 03:54:39 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:8441 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1730880AbgFSHyi (ORCPT ); Fri, 19 Jun 2020 03:54:38 -0400 X-UUID: 6f1163112088486c9cd2fc5b0c68a6d0-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=3ltb5nZixCRRCc99x3WnmbZJW+adF+mROtOvKeMYdTU=; b=VKazcRPZ0f41QhAF97CcS9nhFUfAktB8DoW9iLxUxJ9RtEmKi6D5PX6pO78/Wrm1/MbjKWIiXCDDQP+c5YmfjVlUZEvQQUmqevS6Z5PgEnXyjGL9buGGfvwvyCZDQPzV9tIqQWM+Z1J51bFNVYBfL2HQ83kOirkK1cATWdFWQNQ=; X-UUID: 6f1163112088486c9cd2fc5b0c68a6d0-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 1039615397; Fri, 19 Jun 2020 15:54:35 +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 15:54:31 +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 15:54:33 +0800 From: Shayne Chen To: Felix Fietkau CC: linux-wireless , Lorenzo Bianconi , Ryder Lee , Evelyn Tsai , linux-mediatek , Shayne Chen Subject: [PATCH v2 1/3] mt76: mt7915: add support for DT rate power limits Date: Fri, 19 Jun 2020 15:53:54 +0800 Message-ID: <20200619075356.21998-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: 93753E75486CD0CC19EF944C029F540EC5AF6B68F7BACB2C1D540A680174057C2000: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 IFNoYXluZSBDaGVuIDxzaGF5bmUuY2hlbkBtZ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