Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp5707624ybl; Sun, 22 Dec 2019 12:20:50 -0800 (PST) X-Google-Smtp-Source: APXvYqxRIj6zpkdgPjtdxU3MQUyVv9KaKVPsXKSdEmvdAEN3ZKRGXE6vzaFKMvghBS3CFyFtt96g X-Received: by 2002:a9d:784b:: with SMTP id c11mr27140766otm.246.1577046050403; Sun, 22 Dec 2019 12:20:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577046050; cv=none; d=google.com; s=arc-20160816; b=b6cBhG3hzFTqBrN2KJrtrI9qQOSy8pNqF2bfTa8ZGQZuF7je5lo0nxqPjEkeAwnF/j lseSwkIbRkNe3a8sfYrt3SJdlKXFZhvxdwMI496hd1HkGSxHpwDJNOhlETYKhSOh7NRq SA17WV1ULjo/vthaa5gZS9lFRolruWfK9CVYSYhRGqLqF2occiabNbDjq3hTlnhxnhZH eE189hj3fYVwtvRoJm4FmsZEW/RkNLtu9K+soGx1omJgLmp523OP8RZeJM1E34EFmsIq oF4+VfsUUP/SO6uIue8dol4W/BhXeLHeyZpqBdYZwLJAXAsAJHqCCqbIqOw9/QDjI1G8 dulQ== 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=snNLFpI6iD8KtzouGrFPprybGRM2xQ+mm0t3hSBGidE=; b=gMVJFzF8ijbeNSzVC2g10u5m8ynYHdyPqfkIVDlt+fwGnvyMa+BSvn86JO2BBhfxgJ CcfYRScgNJLBs7IZ4ic3zc2nePNjVcRKOerwpdbXQk2MH/I3Va8Ym9Blm5DB04SPndw0 4jJN4ywIu1iZCAJmhpCihqIeMtElni58xcFrkOs2AWYvwgTqMWvXLQ/Zp7Wtlew/alxp nuV8Nt6i0XFCvuceZEqNt6hOt31AUE0Bn/cIm28rF/NJzmTWK8N7mYIxG0Ct1nCyj00T 7uYTFxib0ReCtwNp/qHyvr5Tl4BjDZ5KZgxD4Lkwtp99+fRP9TcXm6KCejsJKuOdBDZM Uz5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=i2+Bb54o; 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 n1si7709519oic.225.2019.12.22.12.20.40; Sun, 22 Dec 2019 12:20:50 -0800 (PST) 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=i2+Bb54o; 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 S1726764AbfLVULz (ORCPT + 99 others); Sun, 22 Dec 2019 15:11:55 -0500 Received: from mailgw02.mediatek.com ([210.61.82.184]:48471 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725951AbfLVULz (ORCPT ); Sun, 22 Dec 2019 15:11:55 -0500 X-UUID: a72950ab0d3f4d32b3219b6bd3bea13e-20191223 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=snNLFpI6iD8KtzouGrFPprybGRM2xQ+mm0t3hSBGidE=; b=i2+Bb54ojTGwYYLziYsEEQ7jKyUOoN5k1KZU2T8nMysfls3UjEDX3n5xjtwWqPR2+61FmJEjWd4N/dMjwlbEzijmo7kEyZb2Oqkghz1bb6BbvG6qn20hxiBr7w3PLbMJGM68qWsB/jlOF2M+GpCeEnotIY8MohTA2we8qFbLZic=; X-UUID: a72950ab0d3f4d32b3219b6bd3bea13e-20191223 Received: from mtkexhb01.mediatek.inc [(172.21.101.102)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 2087857733; Mon, 23 Dec 2019 04:11:43 +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.1395.4; Mon, 23 Dec 2019 04:11:16 +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.1395.4 via Frontend Transport; Mon, 23 Dec 2019 04:10:50 +0800 From: Ryder Lee To: Felix Fietkau , Lorenzo Bianconi CC: , , , Ryder Lee Subject: [PATCH v1 1/2] mt76: mt7615: rework set_channel function Date: Mon, 23 Dec 2019 04:11:38 +0800 Message-ID: <9a37e1340cc8c546587d7cf99d6c4d92e12e1a7d.1577044827.git.ryder.lee@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: 61A9F353F740679A2FA70EC917627447E2E9DB04B5870975D8AE200DC81804D42000: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 Tm8gbmVlZCB0byBzZW5kIGJvdGggTUNVX0VYVF9DTURfU0VUX1JYX1BBVEggYW5kIE1DVV9FWFRf Q01EX0NIQU5ORUxfU1dJVENIDQp0b2dldGhlciB0byBNQ1UuDQoNClNwbGl0IHRoZW0gb3V0IGJ5 IHBhc3NpbmcgdGhlIHByb3BlciBjb21tYW5kIGluIH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