Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp775442pxu; Fri, 4 Dec 2020 15:39:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJzyv2vEq8UDibYRbDyfQ30isbhEERFSw/mQaoiwT42posies4aUAVEM4G5wnE2R3xXO13fG X-Received: by 2002:aa7:c1c6:: with SMTP id d6mr10022899edp.275.1607125190341; Fri, 04 Dec 2020 15:39:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607125190; cv=none; d=google.com; s=arc-20160816; b=hIF1kL5jgLAE+jwytQ/d+xVHQtdpRhZArrqtVhsS6MAqXAnN/E9HHJZ6cLY7BALAYM aa2GPBFs6sBnB+bbKzHGhk4qK+SwAPp42RhSEqQlHTnGCcySuWZowCUTSbOcNNzigP/7 b5UtaX0exD+xU78BKTjnxFsrgdXOpf3xJkxr0C62yO7/44u9XjUdQGYIpZD58irZCoMY zOkPYONbD2DZT3IMrEwLuF2chg1vA8GLn8DyfNP2+NQvGf6200z4OMcJcnZT052orHIq pHfGWxorQlSxKXRTd/saU+68IctcrQtYUWeaV/WqI8imqQZHQ6cGoMpFmtTObd627mXr +ILg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=00pLA0HzGCmNijnI21njVuZiFjGo8YxDP074arBZy40=; b=c3NVSviGR8Yc9m8Zy7J+Ywbk4qr2UYAk/3Oz8yfqdacoCxXjHqT3t+NqHmAY3+ww9N pP8EFAKKWSSheCa5LoFfQ+KXSWeuCZ2oP1ieL0opqHPkbjlhLLSFWBFogvEv746LT1s4 R6jQSpWnGYtAwH2fydxdldsgZYaLcpFJ9KXUNe9MIImLCqkxa3qQxzo2urNEtXqqhNHb qXRF0aVODPDODwP333LITR1f521PBK3R52d9ySOxWEeCeEfGmD8Uov+WAy37sTrsFolJ zPeOlJRK/7ujH+3uVwv8WT6dbFmF7XR01IP1N9Bd/HOm0yuyBR3EWvfs60utUqRjnrT6 ICWQ== 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 lx6si2260616ejb.550.2020.12.04.15.39.27; Fri, 04 Dec 2020 15:39:50 -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 S1726603AbgLDXhy (ORCPT + 99 others); Fri, 4 Dec 2020 18:37:54 -0500 Received: from mailgw01.mediatek.com ([210.61.82.183]:51671 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726111AbgLDXhy (ORCPT ); Fri, 4 Dec 2020 18:37:54 -0500 X-UUID: dbcf439a5eb94733840aadda579dcfb0-20201205 X-UUID: dbcf439a5eb94733840aadda579dcfb0-20201205 Received: from mtkcas07.mediatek.inc [(172.21.101.84)] by mailgw01.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 1608178693; Sat, 05 Dec 2020 07:37:21 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs06n1.mediatek.inc (172.21.101.129) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sat, 5 Dec 2020 07:37:14 +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:16 +0800 From: Ryder Lee To: Felix Fietkau , Lorenzo Bianconi CC: Shayne Chen , , , Ryder Lee Subject: [PATCH v2 1/2] mt76: mt7915: add vif check in mt7915_update_vif_beacon() Date: Sat, 5 Dec 2020 07:37:14 +0800 Message-ID: <65336148b5d440dceb967a401488b119e14b9c5a.1607124652.git.ryder.lee@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org To avoid the warn_on() calltrace in station mode. [ 4522.024382] ieee80211_tx_dequeue+0x1258/0x1298 [mac80211] [ 4522.029868] ieee80211_beacon_get_template+0x10/0x18 [mac80211] [ 4522.035780] mt7915_mcu_add_beacon+0x2c/0x208 [mt7915e] [ 4522.040997] mt7915_mcu_get_rx_rate+0x304/0x878 [mt7915e] [ 4522.046394] ieee80211_delayed_tailroom_dec+0x158/0x180 [mac80211] [ 4522.052573] ieee80211_iterate_interfaces+0x48/0x68 [mac80211] [ 4522.058398] mt7915_mac_reset_work+0x3b4/0x630 [mt7915e] [ 4522.063704] process_one_work+0x1fc/0x390 [ 4522.067703] worker_thread+0x48/0x4d0 [ 4522.071356] kthread+0x120/0x128 Signed-off-by: Ryder Lee --- change since v2: add default: --- drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mac.c b/drivers/net/wireless/mediatek/mt76/mt7915/mac.c index a7fa6fffffff..7f08c88d3282 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7915/mac.c +++ b/drivers/net/wireless/mediatek/mt76/mt7915/mac.c @@ -1407,7 +1407,15 @@ mt7915_update_vif_beacon(void *priv, u8 *mac, struct ieee80211_vif *vif) { struct ieee80211_hw *hw = priv; - mt7915_mcu_add_beacon(hw, vif, vif->bss_conf.enable_beacon); + switch (vif->type) { + case NL80211_IFTYPE_MESH_POINT: + case NL80211_IFTYPE_ADHOC: + case NL80211_IFTYPE_AP: + mt7915_mcu_add_beacon(hw, vif, vif->bss_conf.enable_beacon); + break; + default: + break; + } } static void -- 2.18.0