Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp3110648ybi; Sun, 2 Jun 2019 07:39:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqxHHmg5VMKUYCnItZr3G1o99jHIBX7CrjaQLxpt5GeWr7v/JKtxtz2CkoDZIl2SR4d2+M+z X-Received: by 2002:a63:788a:: with SMTP id t132mr22730619pgc.52.1559486367808; Sun, 02 Jun 2019 07:39:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559486367; cv=none; d=google.com; s=arc-20160816; b=KOXJCf+mv/p6VrjbHOyVE5X/5KE2jVmEaHgU4+J4zRG74gbgLTOGRuVBpdx42tow48 kAAAV7gM7Io3vudaKwD7og0ujHjcnJan0WxpOWAJQqt3NIkRHJjXypsz2p5pyEAipf5O f/WufrWtEpGbGSYKQkFiCNhnlsJ7la092Hp1epOMYkXmxR06yXqyVMIiRfGsFswDR7Yr WlQpH5/PXCQkuvyF/WJyGd/2SQuViXWiauyf4c88tU13hTL0UOWQCUJxH9DExmikKxfF J6IIFChuvvClWzGcRzNwC+5fiPDI28iwmpwqG6PGXJVg+XXyukN4WKbVddJwa+z96k6C cQKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :references:in-reply-to:date:cc:to:from:subject:message-id; bh=+x3JuhvyGbucbLWR99GW+vtUGilOZYXdmnVruh/6jUg=; b=CUMCuucL5vV+s+TrbCBZyjjL0lu1IgHAh0dt2/lX/2fp+LsJj+fbfAQKj7diKtinDK ZB78qcmiB2UK204tir1Req0HY1O9Go7K9EhLR/dGFVvwMMnLoXwZNkS1v+gyqMCBLvvE FwIRkozVk/6PUhuGaZNVQVsiR1K1RJc5sdIgz7mNSJzX+YZ0UM4w+eBhD0mAyUe7LCQ9 o5EN5hGu0hKqAlpx2t1yNs9/SwE8BvImIC0lFHwav7QkU+jWuTwyY5qhpYztYLtFHpMI SL0GpBQ44FyhMww/fIexoHmw7MXvsVElhdqVsdCrdkXTDb7XeFRi6f+xvrWjd3s8gTR1 PCWw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a5si15592130pff.97.2019.06.02.07.39.12; Sun, 02 Jun 2019 07:39:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726773AbfFBOgt (ORCPT + 99 others); Sun, 2 Jun 2019 10:36:49 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:55696 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726084AbfFBOgs (ORCPT ); Sun, 2 Jun 2019 10:36:48 -0400 X-UUID: 6a1c0736c5ba410e8098854fab9cdcb0-20190602 X-UUID: 6a1c0736c5ba410e8098854fab9cdcb0-20190602 Received: from mtkexhb02.mediatek.inc [(172.21.101.103)] by mailgw02.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 730077780; Sun, 02 Jun 2019 22:36:42 +0800 Received: from mtkcas09.mediatek.inc (172.21.101.178) by mtkmbs07n2.mediatek.inc (172.21.101.141) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Sun, 2 Jun 2019 22:36:41 +0800 Received: from [172.21.77.33] (172.21.77.33) by mtkcas09.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Sun, 2 Jun 2019 22:36:41 +0800 Message-ID: <1559486201.2086.4.camel@mtkswgap22> Subject: Re: [PATCH v2 1/2] mt76: mt7615: enable support for mesh From: Ryder Lee To: Felix Fietkau CC: Lorenzo Bianconi , Roy Luo , YF Luo , Yiwei Chung , Sean Wang , "Chih-Min Chen" , , , Date: Sun, 2 Jun 2019 22:36:41 +0800 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.3-0ubuntu6 Content-Transfer-Encoding: 7bit MIME-Version: 1.0 X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2019-05-31 at 22:09 +0800, Ryder Lee wrote: > Enable NL80211_IFTYPE_MESH_POINT and update its path. > > Signed-off-by: Ryder Lee > --- > Changes since v2 - remove unused definitions > --- > drivers/net/wireless/mediatek/mt76/mt7615/init.c | 6 ++++++ > drivers/net/wireless/mediatek/mt76/mt7615/main.c | 1 + > drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 5 ++++- > drivers/net/wireless/mediatek/mt76/mt7615/mcu.h | 6 ------ > 4 files changed, 11 insertions(+), 7 deletions(-) > > diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/init.c b/drivers/net/wireless/mediatek/mt76/mt7615/init.c > index 59f604f3161f..f860af6a42da 100644 > --- a/drivers/net/wireless/mediatek/mt76/mt7615/init.c > +++ b/drivers/net/wireless/mediatek/mt76/mt7615/init.c > @@ -133,6 +133,9 @@ static const struct ieee80211_iface_limit if_limits[] = { > { > .max = MT7615_MAX_INTERFACES, > .types = BIT(NL80211_IFTYPE_AP) | > +#ifdef CONFIG_MAC80211_MESH > + BIT(NL80211_IFTYPE_MESH_POINT) | > +#endif > BIT(NL80211_IFTYPE_STATION) > } > }; > @@ -195,6 +198,9 @@ int mt7615_register_device(struct mt7615_dev *dev) > dev->mt76.antenna_mask = 0xf; > > wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) | > +#ifdef CONFIG_MAC80211_MESH > + BIT(NL80211_IFTYPE_MESH_POINT) | > +#endif > BIT(NL80211_IFTYPE_AP); > > ret = mt76_register_device(&dev->mt76, true, mt7615_rates, > diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/main.c b/drivers/net/wireless/mediatek/mt76/mt7615/main.c > index b0bb7cc12385..585e67fa2728 100644 > --- a/drivers/net/wireless/mediatek/mt76/mt7615/main.c > +++ b/drivers/net/wireless/mediatek/mt76/mt7615/main.c > @@ -37,6 +37,7 @@ static int get_omac_idx(enum nl80211_iftype type, u32 mask) > > switch (type) { > case NL80211_IFTYPE_AP: > + case NL80211_IFTYPE_MESH_POINT: > /* ap use hw bssid 0 and ext bssid */ > if (~mask & BIT(HW_BSSID_0)) > return HW_BSSID_0; > diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c > index 43f70195244c..8b8db526cb16 100644 > --- a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c > +++ b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c > @@ -754,6 +754,7 @@ int mt7615_mcu_set_bss_info(struct mt7615_dev *dev, > > switch (vif->type) { > case NL80211_IFTYPE_AP: > + case NL80211_IFTYPE_MESH_POINT: > tx_wlan_idx = mvif->sta.wcid.idx; > conn_type = CONNECTION_INFRA_AP; > break; > @@ -968,7 +969,8 @@ int mt7615_mcu_add_wtbl(struct mt7615_dev *dev, struct ieee80211_vif *vif, > .rx_wtbl = { > .tag = cpu_to_le16(WTBL_RX), > .len = cpu_to_le16(sizeof(struct wtbl_rx)), > - .rca1 = vif->type != NL80211_IFTYPE_AP, > + .rca1 = vif->type != (NL80211_IFTYPE_AP || > + NL80211_IFTYPE_MESH_POINT), Oops, this expression is wrong. I will fix it in v3. Sorry for the inconvenience. Ryder