Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp178048ybz; Wed, 15 Apr 2020 06:46:02 -0700 (PDT) X-Google-Smtp-Source: APiQypJw4cZYtMvPIAKqkjhLSAyGUXxeqiI6eWffN6tMyoSaj5GYNu6b4OQmKXIeoH94QMjhwyr3 X-Received: by 2002:a50:fa87:: with SMTP id w7mr2022215edr.0.1586958362283; Wed, 15 Apr 2020 06:46:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586958362; cv=none; d=google.com; s=arc-20160816; b=Igc4y9SRZpJAvQLf9/mK5Wbuut0J8/a+VWTavYwa49I/MOSsBJdCgeRaweMUpwJLcY /UQiWW75JkPgJeG/J0ogDRPEkgOektOVH7ukEL30hQ56XBc/ww3nVLX+Y/P2YGiHhazb 28+m45zmPZc2z1z3397z5PqpWG7aQXhwPxIi1INprF4fvCAmLWMeS2I7bv0Jv+689Z6L XqetwNW2UCEwC7eGqwil893bmxrqd2+FDpPIaEPFzIdhr2VlRuGa9ZhZEXs8/OFZPpTp gaO1ZOqXgawCEAxrCvhhutDmuvL9W/r0Fs5BhsQ4E+Y0nQMqiWWrnaSHZWQ3xh3lbtLL ovbw== 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=k6fjzf105fWosg5DgomFcxjxRaoxLb88SqarVCvmspw=; b=qdx/lQkHHYQbe55hjVUe20NErVm2tbPwItyjlUQaCkq0kGCmjSvCy4AaDoThxfYqIm ZPPUSEI3mkNpPpezX3B1B7nwB8vM2dq3TbiVgv5FWj6bg0UGT913CIJo4UcgvsFEQycL ZFAcTz8ZChLwjf5ATNPGzdapZ9r21gI1xJtMY+SlSC9XVZ0mRdq1wIP951OVHJ2VtqW9 R6AB0Xi0rEtQWs2jj0a3HC6sjtysoTqJP1fxYHGjPXbdkeCUeX+k+9+Iso22kuB1thHr Tng7vF867FzgoS37D4KMWanu8yWzoOIkkdPpc+eXl8CZQZiOl6N8alNxHB88jmcf2mc4 UQNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=e7zYM8Sr; spf=pass (google.com: best guess record for 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 f8si10036639ejt.461.2020.04.15.06.45.38; Wed, 15 Apr 2020 06:46:02 -0700 (PDT) Received-SPF: pass (google.com: best guess record for 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=e7zYM8Sr; spf=pass (google.com: best guess record for 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 S2633566AbgDNVFq (ORCPT + 99 others); Tue, 14 Apr 2020 17:05:46 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:3408 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S2633565AbgDNVBu (ORCPT ); Tue, 14 Apr 2020 17:01:50 -0400 X-UUID: 0761aaedce03436681ab092e25e58108-20200415 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=k6fjzf105fWosg5DgomFcxjxRaoxLb88SqarVCvmspw=; b=e7zYM8SrNxPsBJq1FHULZCurXz+Gz3uKjjivHAMRobzfAzsnGX7BnFEHJ69Qio18ZD3mGgXeXCBfkQW1DlBcen4vjTBi75Pqdq0QcVZZfNho0XztQAe7lDhPEU/NMt2XabSgqlw7aUzPQW876w6n8B2hS+Sl0qvFPxJmItVchKs=; X-UUID: 0761aaedce03436681ab092e25e58108-20200415 Received: from mtkcas07.mediatek.inc [(172.21.101.84)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 51945106; Wed, 15 Apr 2020 05:01:32 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs02n1.mediatek.inc (172.21.101.77) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 15 Apr 2020 05:01: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; Wed, 15 Apr 2020 05:01:29 +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 v2 10/18] mt76: mt7915: add HE bss_conf support for interfaces Date: Wed, 15 Apr 2020 05:01:08 +0800 Message-ID: <07a67d83660b21f225c085f031ef413626b013a1.1586895593.git.ryder.lee@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain 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 cy4NCihpLmUuIEJTUyBjb2xvciwgVFdULCBzcGF0a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