Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp775087pxu; Fri, 4 Dec 2020 15:39:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJyNJ9wZtyKiuzZmWdI3YJcwNtElHst7JDVccDWocvI85c0mtWkDJid7uc6qx7CyqWg0ed23 X-Received: by 2002:a17:907:210b:: with SMTP id qn11mr9708832ejb.41.1607125143081; Fri, 04 Dec 2020 15:39:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607125143; cv=none; d=google.com; s=arc-20160816; b=sN2xIn1XBOCJ4aucIduyfBW1aR5F9c4J3L+SaJ763KtoqMSjluKGu7+jrB9b0DhjXf w3E16kPx9Ni3Evs/vQPmD6fbSkRr5HFXG0eljxRusRLu1/smi10m59/4JauWjyzswGTG tG1OGOnCBatX+QrD/laKKWlvVdfZSpGsdZxx2GEy5HAvd5/J+ZCsciHXXjlG9hE2DCso X489ax+PPIhXKhohWZ7rBSFkjaLG5HtBbNZzylbauPSPPvwp5s/EiKaEKMXivb0khYg/ FfJoY+83RmyNWJWu9bm1qmMpBoMhctZydEDdkB1BN0PTuS2rV33GNTviJzMo5+xJC7XT vXgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=2CyQL+DbP3ERR3Jn1cWXt7acpXDKSUmqebS1Ko3diA0=; b=qDbhB8C/TouJ4eTEuYhSqRWLwIGfaeQ6ZgEFfKop/PRPQSc5G1DZfgWZgyDB/ybwtG B7euj6OaeH8oGWOFA22EfwYblAGY5gmGExQ6IV+ceoKTw4yqGwEd26oLOqdFNKDaFHvP 2wYzLEmxaSu8gT4YbGpW4IXFsaFME+nthIRdx5A8YxpDd/PIqoo6xwetY2tiy7J2hSQb 02ZL9ldzK/8exvUmyE1MwkEmb2bsWzycZN+zkGW+n363ujl33+2tPO6qOlrj4YaOjpMk WvN+8xoNBuO0Uo0IjRPjATbicdLzqmcCnvEVx+yP66a1/i3biGoyNLblw3jjMGADICHZ 6l7Q== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (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 u19si2361306ejo.278.2020.12.04.15.38.28; Fri, 04 Dec 2020 15:39:03 -0800 (PST) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726777AbgLDXiG (ORCPT + 99 others); Fri, 4 Dec 2020 18:38:06 -0500 Received: from mailgw02.mediatek.com ([210.61.82.184]:45926 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726061AbgLDXiG (ORCPT ); Fri, 4 Dec 2020 18:38:06 -0500 X-UUID: c98dc0ddbedf41bc912eb03ffbf4703b-20201205 X-UUID: c98dc0ddbedf41bc912eb03ffbf4703b-20201205 Received: from mtkcas07.mediatek.inc [(172.21.101.84)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.14 Build 0819 with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 932169252; Sat, 05 Dec 2020 07:37:36 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs08n1.mediatek.inc (172.21.101.55) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sat, 5 Dec 2020 07:37:19 +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; Sat, 5 Dec 2020 07:37:18 +0800 From: Ryder Lee To: Felix Fietkau , Lorenzo Bianconi CC: Shayne Chen , , , Ryder Lee Subject: [PATCH v2 2/2] mt76: mt7615: add vif check in mt7615_update_vif_beacon() Date: Sat, 5 Dec 2020 07:37:15 +0800 Message-ID: <5e89627ba5632db6da460f153bf00d7a3e8f9254.1607124652.git.ryder.lee@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <65336148b5d440dceb967a401488b119e14b9c5a.1607124652.git.ryder.lee@mediatek.com> References: <65336148b5d440dceb967a401488b119e14b9c5a.1607124652.git.ryder.lee@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org This avoids the WARN_ON(1) calltrace in station mode. Signed-off-by: Ryder Lee --- change since v2: add default: --- drivers/net/wireless/mediatek/mt76/mt7615/mac.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mac.c b/drivers/net/wireless/mediatek/mt76/mt7615/mac.c index 0f360be0b885..9e0765ddcb5f 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7615/mac.c +++ b/drivers/net/wireless/mediatek/mt76/mt7615/mac.c @@ -2017,7 +2017,16 @@ mt7615_update_vif_beacon(void *priv, u8 *mac, struct ieee80211_vif *vif) struct ieee80211_hw *hw = priv; struct mt7615_dev *dev = mt7615_hw_dev(hw); - mt7615_mcu_add_beacon(dev, hw, vif, vif->bss_conf.enable_beacon); + switch (vif->type) { + case NL80211_IFTYPE_MESH_POINT: + case NL80211_IFTYPE_ADHOC: + case NL80211_IFTYPE_AP: + mt7615_mcu_add_beacon(dev, hw, vif, + vif->bss_conf.enable_beacon); + break; + default: + break; + } } static void -- 2.18.0