Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp103299ybz; Fri, 24 Apr 2020 12:33:53 -0700 (PDT) X-Google-Smtp-Source: APiQypIKUhhwfPy6FOREEeiclLeltgieyChrTekMLp9R/gkWrBq575jYu4PjyuqLuFOo3ZvlLJl0 X-Received: by 2002:a17:906:4048:: with SMTP id y8mr8552131ejj.258.1587756832906; Fri, 24 Apr 2020 12:33:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587756832; cv=none; d=google.com; s=arc-20160816; b=R5bNt7jkJ155USbyfU8hWC9ZCnzGFq9vS+u3FY1XjiCypLqqOaL0FdWPqn5I4EXAPR 7/F5pJE3nQjyHV3LMCNSDsw6bqBzcK5fwIAand2hYf9pe7KNmt0dlWcUeK2melczH4Il I31hdBG32kYm5MQ/mpKn7I7OvU2aeFeMMU34GhKErtji+GN2Rr3ZWTF3rixS1tjLUyQ1 dJzUSVua240qA08Zw0GhiAwQfYqWdg550wCQ6zcz/sfgCYKCSdhWsxSyNF5TXt7NnEr/ ZeZl/ydimINsuEPOcshkMSC8aCQzJncdZry3Jq1R+b5kBL72B771RMJ6qXLH1IujYdrC JBSQ== 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=chXuOrwHh5hYrsCOMs+Oan8lRNozBmmkY4JoEsM4Cmg=; b=r3JT04lKrPUKZ5E9Yobphko45rb2RUYX6uOAXPLxU7KF9iHeDPzo7WZGqel4XOgrQe MQxS6ec5Ldbfn18Q4Ddx+xyxA/6mGYmMAwOhvSWanPlIQ67YIcpzvWHCk9XsTzWXAcHR r/+6ylLs7l8ZAKUwXSEJHTqENs8H+zNEgNZ12TOJ8qVDHu1iLRB0E8xvFrYT8QRRNLhS w89CgovVAG/OVAI0TpSOmXKwpoEeu6FiNLiBL6/KBUFDbaUwBxVngulW0ixhQyLeC147 FSasrwP/pSXlM7U92httfSSP2z2/GGNs51IvA0zZ9xOBYubdEYSHsqZZ2TN2jaLN4GeH wp/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=tve00Wv5; 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 f9si3462512edq.572.2020.04.24.12.33.29; Fri, 24 Apr 2020 12:33:52 -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=tve00Wv5; 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 S1729382AbgDXTdB (ORCPT + 99 others); Fri, 24 Apr 2020 15:33:01 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:11153 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1729356AbgDXTc7 (ORCPT ); Fri, 24 Apr 2020 15:32:59 -0400 X-UUID: 40239582701d4dcc8179287d67ea04b8-20200425 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=chXuOrwHh5hYrsCOMs+Oan8lRNozBmmkY4JoEsM4Cmg=; b=tve00Wv5/kL7ccbLz3qjK5OZoPEo/O0nN/r9nBcEZyXdY2EiIuYj3Xf4DyHizVgo1+I2tdjJGdhyGldhYdr8NPM5KM7k/c4LBKlBsmCNBzic7ruUwQk/25jwfo2IamuVmMw1cqSUQ4+gSRj/zi5DeNfw637UrXq93PGkfq/EKME=; X-UUID: 40239582701d4dcc8179287d67ea04b8-20200425 Received: from mtkcas11.mediatek.inc [(172.21.101.40)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 1622624638; Sat, 25 Apr 2020 03:32:55 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs06n2.mediatek.inc (172.21.101.130) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sat, 25 Apr 2020 03:32:53 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Sat, 25 Apr 2020 03:32:52 +0800 From: Ryder Lee To: Felix Fietkau , Lorenzo Bianconi CC: Shayne Chen , YF Luo , Yiwei Chung , Chih-Min Chen , Evelyn Tsai , Sean Wang , , , Ryder Lee Subject: [PATCH v3 10/18] mt76: mt7915: add HE bss_conf support for interfaces Date: Sat, 25 Apr 2020 03:32:31 +0800 Message-ID: X-Mailer: git-send-email 2.18.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: 6BC6014C5866F70415E6ED55340AF1DD1B7BDE26DDB44987FC4D0214266596552000: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 QWRkIGJhc2ljIEhFIEJTUydzIGluZm8gZm9yIGludGVyZmFjZXMuIEFzIGZvciB0aGUgYWR2YW5j ZWQgZmVhdHVyZXMNCndpbGwgYmUgYWRkZWQgZ3JhZHVhbGx5IGluIHRoZSBmdXR1cmUgcGF0Y2hl cy4NCihpLmUuIEJTUyBjb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