Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2908848pxb; Tue, 19 Jan 2021 08:53:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJxPEA8xSyDM9bloEusD402jNmKp0t0Ck+h9/UZFAzTeQl1R+A4vmVmpubg8VEdSnkJINQq0 X-Received: by 2002:a17:906:1d5a:: with SMTP id o26mr3619644ejh.301.1611075194126; Tue, 19 Jan 2021 08:53:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611075194; cv=none; d=google.com; s=arc-20160816; b=LrIkUh/DHaDxH013dNM97ag97YyjlMt47FuXih1xdoeyTEOR54N0dIFE392tS0TS49 ZYZctkPxZu/bJjXiA8NxZbS6H1mkWs+Vc5lgBI1uX9FMvTATKXNRijKmhYBkYTb46THe uYrNJH5qpJsJ3MLBY6YuF4nCxa15ihaOvBz05sxgh5p/yJ1tSJPH09YJhVbYXrcQVQDL BTmj8f/zKbHXL0QqaXJeilgb9FpuPBwkr33LQzT0HYHcUyQPtdWKprTTJAh2l/R4lsGx b8WtHWsx4Fz6RZDKz6pPWGklyJ3fZUa49tEcBYlTNhnZtitT1qlxiTGpbMY4Qvf4yB/i G7Dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:to:from:dkim-signature; bh=6w7headccSB59swvRpobgD0yFcr++Rbit3mShGL0LWw=; b=xkLE6deXv5N3LG80lzMM5EK9ndJOScDidtKX6uIOkgr9+kj84n3QIyUXAcjeiPd+Rn jHjVR1luJmbkfGpMk2u1329KTsv9lFwFHyzWdkD8bmlj1eUQG6V6ucZYcOyuOBch9htw wqVsks8QlTThiMx/xsxfoetOm0pPQ9x7k+5zNWhhB3hWI5PN9WyMta2wreTUHjpsVUU9 +p/EZX1PCeK8NJb1gKiCaGDh8wU75uB29HQDa4j0yK9QB7TRCAjrH7NEgUhLFdJRNfqm FgbH+zDOK+OMPymn35Dm8JSXGEzOC+PIeQuZ6x/fUHKdBYML7X6Cr4BI6p4eUGxbac7K 502A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=b3P7BqIR; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v1si9873638edr.598.2021.01.19.08.52.50; Tue, 19 Jan 2021 08:53:14 -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; dkim=fail header.i=@nbd.name header.s=20160729 header.b=b3P7BqIR; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390882AbhASQvc (ORCPT + 99 others); Tue, 19 Jan 2021 11:51:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54762 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731297AbhASQul (ORCPT ); Tue, 19 Jan 2021 11:50:41 -0500 Received: from nbd.name (nbd.name [IPv6:2a01:4f8:221:3d45::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DBEB8C061575 for ; Tue, 19 Jan 2021 08:49:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Subject :To:From:Sender:Reply-To:Cc:Content-Type:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=6w7headccSB59swvRpobgD0yFcr++Rbit3mShGL0LWw=; b=b3P7BqIRuJ5xBHb2u7c1VRlGbo FEn/tod027uFIkQXj/VHpVparCHpkRTjHurv1jhJ9vdAsBUXZ/WxUzbwcLE90wjgC8pqrMztwd1T1 3Nuby7jRZSg2fMbzRBBb6nBI/9N5G8mVXO4hCYmpzJ3TzA0a325CQANblSACT8SekZhk=; Received: from p54ae91f2.dip0.t-ipconnect.de ([84.174.145.242] helo=localhost.localdomain) by ds12 with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.89) (envelope-from ) id 1l1uCO-0004Hf-6R for linux-wireless@vger.kernel.org; Tue, 19 Jan 2021 17:49:44 +0100 From: Felix Fietkau To: linux-wireless@vger.kernel.org Subject: [PATCH 1/3] mt76: fix crash on tearing down ext phy Date: Tue, 19 Jan 2021 17:49:41 +0100 Message-Id: <20210119164943.99223-1-nbd@nbd.name> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Only clear dev->phy2 after the phy is gone, the driver may still need to access it until shutdown is complete Signed-off-by: Felix Fietkau --- drivers/net/wireless/mediatek/mt76/mac80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/mediatek/mt76/mac80211.c b/drivers/net/wireless/mediatek/mt76/mac80211.c index f2714436883b..696d00d1976c 100644 --- a/drivers/net/wireless/mediatek/mt76/mac80211.c +++ b/drivers/net/wireless/mediatek/mt76/mac80211.c @@ -387,9 +387,9 @@ void mt76_unregister_phy(struct mt76_phy *phy) { struct mt76_dev *dev = phy->dev; - dev->phy2 = NULL; mt76_tx_status_check(dev, NULL, true); ieee80211_unregister_hw(phy->hw); + dev->phy2 = NULL; } EXPORT_SYMBOL_GPL(mt76_unregister_phy); -- 2.28.0