Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp656841pxb; Fri, 14 Jan 2022 13:20:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJzOKhBdN/PbA/ahoceP/ERnV9O0qv2eTtlaY5wbeCk/Oqswr8jyg8M/jFS/EIc9kqpoVVSZ X-Received: by 2002:a63:6b42:: with SMTP id g63mr9317972pgc.345.1642195255181; Fri, 14 Jan 2022 13:20:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642195255; cv=none; d=google.com; s=arc-20160816; b=Bp8CHsTLw5Na+pfxsQMaqGW9QfGCzgDIx9hdvQ022KH3T4Fa15d7p4C8iPv8FAdGdH u/gYFhRyS5TMtdIDe0L60+ROzttsT/ytURb/01h5Tv2zrmMWaYC6tzyPBN03inQ6S9Ei rtzWAE2kR3pm3NsKHkn1y7X3TqMRU5jRzOVnAGfRrVqUb2hcEZfwJZY+PGhOQ9bKeeP3 B5ffqk/qVCX2X/OUGtejgeUGHvutDYfVCqT49FU4Qp0YVel3gRskFNdKbVET8nPvtQQL 7FliDkMfC1S764cINOFKP5BLU56KaW1bYWSw5ry0qOdjD6Johi6T+A41l68Yijr/jexN He4g== 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=24/+TQMV4Z/WJ3+g6dScMVS/9KNBMnjd8cHwjpjnsZ0=; b=rYaHtDDhnTMsQDd+3vJqVaB7c1TehMxX3rs1QhJTQCQEEt8EdXkXV4S5luAVvVnRJt 2fLDQv26zd/e0tRdcf9vP1s/bNhbx5D71+Weeu8SYMCy+MqRPvmeohQNVRc8VHGnGzD1 NcK6spZPkFQGpwZKoYguTwiyAQqWbl3SxOYM38UtY+S09dpRTwe3o6jLoq5AoOUOhryp WC+LfLNj0AbUwR0JT+raIpRrJYG4FFH+XScRjac+i93nI+YBJM24qW4H57hHDRuQE37h yOsSfaeSdZXIbGJWBIgmrKUZpd1DTWoans+NnqNbSXIEtG8IXqJLz42JkuMxMjFwl+SS rJnQ== 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 g15si6945113pgr.472.2022.01.14.13.20.40; Fri, 14 Jan 2022 13:20:55 -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 S240145AbiANJtt (ORCPT + 71 others); Fri, 14 Jan 2022 04:49:49 -0500 Received: from mailgw02.mediatek.com ([210.61.82.184]:43454 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S240107AbiANJtt (ORCPT ); Fri, 14 Jan 2022 04:49:49 -0500 X-UUID: b7200c202ff64b68ac80d10f9811539f-20220114 X-UUID: b7200c202ff64b68ac80d10f9811539f-20220114 Received: from mtkcas10.mediatek.inc [(172.21.101.39)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 896732081; Fri, 14 Jan 2022 17:49:47 +0800 Received: from mtkexhb01.mediatek.inc (172.21.101.102) by mtkmbs07n1.mediatek.inc (172.21.101.16) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 14 Jan 2022 17:49:45 +0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkexhb01.mediatek.inc (172.21.101.102) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 14 Jan 2022 17:49:45 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Fri, 14 Jan 2022 17:49:45 +0800 From: Shayne Chen To: Felix Fietkau CC: linux-wireless , Lorenzo Bianconi , Ryder Lee , "Evelyn Tsai" , Bo Jiao , linux-mediatek , Shayne Chen Subject: [PATCH] mt76: mt7915: set bssinfo/starec command when adding interface Date: Fri, 14 Jan 2022 17:49:11 +0800 Message-ID: <20220114094911.30561-1-shayne.chen@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 bssinfo/starec disabled commands are sent during removing interface. However, if we don't set corresponding enabled commands before removing interface, the fw may enter an exception state due to some NULL structs. For example, the following commands can cause fw timeout in our newer chips: ifconfig wlan0/mon0 up ifconfig wlan0/mon0 down Fix this by setting enabled commands once interface added. Signed-off-by: Shayne Chen --- drivers/net/wireless/mediatek/mt76/mt7915/main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/main.c b/drivers/net/wireless/mediatek/mt76/mt7915/main.c index b45b75f..41b0a4d 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7915/main.c +++ b/drivers/net/wireless/mediatek/mt76/mt7915/main.c @@ -257,6 +257,9 @@ static int mt7915_add_interface(struct ieee80211_hw *hw, mt7915_init_bitrate_mask(vif); memset(&mvif->cap, -1, sizeof(mvif->cap)); + mt7915_mcu_add_bss_info(phy, vif, true); + mt7915_mcu_add_sta(dev, vif, NULL, true); + out: mutex_unlock(&dev->mt76.mutex); -- 2.25.1