Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp601648pxu; Fri, 4 Dec 2020 10:40:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJxITQ2YCgYR39hx7r+TbHjW3I1jYA7+oLed7fI5G7+9tjer0Egp1VrgFK0f/KcB8s8o44q5 X-Received: by 2002:aa7:d41a:: with SMTP id z26mr8945739edq.267.1607107218906; Fri, 04 Dec 2020 10:40:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607107218; cv=none; d=google.com; s=arc-20160816; b=nnxg1429foheASPYZ91Yf9Yg+CWwLymbXQRtXAOqfvtg72pfXIoYye9kyRjoFnZZX+ aV/WdZ12FOE6lm45WxkMBmNqzDO/60ZfKxShKN5Adva9qgB45IvNWf1FH5IZSWR3wq5a A9P2yrWX2qU9G74AvYEaBxKzZm/nUUYllefUhawPPhJl8Gq4ldhDFsQu2oeRMJDeDEnR KDNOHoB1+Vt1BUZeRkO08C+D94edJxnoNnd4HlV1Lu1pCXzKKLIuTaSIHW4ZA16MQi1B +x40gbgTEoDG5JsCgxvQ+hOrn9SJmK8QsSq357r6F02971BE/CGRTSfteT+DPmdcpsy/ FzvQ== 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=2oVhXH9Hdd7kFxHsylQ8KRm3zuSy5ipCpt+18LLrU7E=; b=mKu/RKZbMtejnRPN11qns7Y0M1x8aT+W8IGvuJZN7bzVD1RMVM/A9OPuX5sy6XK8Rv 6ENYqSE9hcTfitdwKLWl3+Z+TykKrCqFs2Mm2P/DSAMr1F/pgtjGCXQKk1oM0eO2Geku hE0CJjbFGPZ4vEFGhaTDgSkgKZ9G5+Swr+Owq/qxX3NPIN0XyGaQ55V8Tpox+Tkp19xV pTaImBOUyQSmTe0P761idLbcPBtHm2kSN7OLqI/heR5zwSPvMCPO3MS366b071KCBsLg JB8xlLwDYSCoW/tNoTwAPNknlpx2M58hEiIhZ25PXrNRJpvD9ZNDkIF43ppMxMOnMuGC rBfQ== 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 e19si3578327edv.458.2020.12.04.10.39.53; Fri, 04 Dec 2020 10:40:18 -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 S1728615AbgLDShJ (ORCPT + 99 others); Fri, 4 Dec 2020 13:37:09 -0500 Received: from mailgw02.mediatek.com ([210.61.82.184]:55687 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726021AbgLDShJ (ORCPT ); Fri, 4 Dec 2020 13:37:09 -0500 X-UUID: d25bcafe154a4befaabb94ac4d3e914b-20201205 X-UUID: d25bcafe154a4befaabb94ac4d3e914b-20201205 Received: from mtkexhb01.mediatek.inc [(172.21.101.102)] 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 744986383; Sat, 05 Dec 2020 02:36:25 +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 02:36:21 +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 02:36:22 +0800 From: Ryder Lee To: Felix Fietkau , Lorenzo Bianconi CC: Shayne Chen , , , Ryder Lee Subject: [PATCH 2/2] mt76: mt7615: add vif check in mt7615_update_vif_beacon() Date: Sat, 5 Dec 2020 02:36:22 +0800 Message-ID: <87747c34f3dd0f91a5fb68d1a40dd4adc6591092.1607104742.git.ryder.lee@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <6f63bc0fbba35c3005a9d6999104f41174466cb6.1607104742.git.ryder.lee@mediatek.com> References: <6f63bc0fbba35c3005a9d6999104f41174466cb6.1607104742.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 --- drivers/net/wireless/mediatek/mt76/mt7615/mac.c | 9 ++++++++- 1 file changed, 8 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..49dced019482 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7615/mac.c +++ b/drivers/net/wireless/mediatek/mt76/mt7615/mac.c @@ -2017,7 +2017,14 @@ 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; + } } static void -- 2.18.0