Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp194166pxb; Thu, 14 Jan 2021 03:35:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJzPY/6B1NQxM6ulw1yLlW8rNfPKZVbTPik4zLtHkK21CGB3cdtqg6hgJZJ7528KGdUGse01 X-Received: by 2002:a05:6402:1045:: with SMTP id e5mr5485748edu.40.1610624138747; Thu, 14 Jan 2021 03:35:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610624138; cv=none; d=google.com; s=arc-20160816; b=RfE2KCp+kmh5cf2SkPhrGYNBB5xQQplzIEbxQCTfzA7a/FrqfTy/+S3/mClcOUQZtY Rgv8fPv2ko+wr+g2TDG+mJdv8t8+nLYWIO2NGqIBZ+uIgRdl/zkQYoFjf5j7wfAuFZ2d V6r4eob09VjW/PMdLX/wgbc9E4+kHCVRwYVFLjsM42Flq4n7IretAsWyl9ig12n8zRIy Ns4HSAqzfdIseYKhv2msoK289r8C3KfizSF9RE2WRDN6OVvkc7zLga3/L1uCg4uEB7ou 5jp3PYVUujIOViBy3X/azzn98VlCKh8ZIUBs5GMvkHhMrcBXJ5LInxQ93R/nZ99uqOEj 0l3Q== 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 :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=ixUx+csBL+2MPJ0Q+vaz3WbYKtI0EGHk49a0YtwmS/w=; b=xaDMEz+L9/+MZHgxipFxrjUnfWGet8XK3Q46ksJBnMiFawRZJC7fGoPwpmecf3R3G2 8sGg+rhQsIwvpd835xGgrKxO5qB7LV3ZAb83+9wiVNU5ZcX7JZa69bwvvlaMEWGrfHtj sCsiiCmKgBNtp2Y+Wacqzm2SclNi0fqQlczUiw1yaIErZPLLuKJWLjXRSL9X5gC3VpE4 d3MBjlwh7D2lDevBSB3Okww/mwIJWMWpriIyoJ8vJ/Rd/+aMse5JtTeFs/PAu0gXS8xo W0/fM+zMYu7JgnIV7vThfxlZWh6bmnmjxY1+hGEuUF5qhxJ19J4SWS0U+y3r5EkV9Uto Yw4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=EkW9q6vn; 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 a5si2252354ejk.214.2021.01.14.03.34.51; Thu, 14 Jan 2021 03:35:38 -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=EkW9q6vn; 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 S1729023AbhANLbH (ORCPT + 99 others); Thu, 14 Jan 2021 06:31:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54642 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727967AbhANLbG (ORCPT ); Thu, 14 Jan 2021 06:31:06 -0500 Received: from nbd.name (nbd.name [IPv6:2a01:4f8:221:3d45::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 92E04C06179A for ; Thu, 14 Jan 2021 03:29:28 -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:References:In-Reply-To: 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:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=ixUx+csBL+2MPJ0Q+vaz3WbYKtI0EGHk49a0YtwmS/w=; b=EkW9q6vn9sIqoRRunjeF/lGAcq s24d9tGOWipnYs5ngeiHzTm16JMLU0ftfPeHjKHOWBx7NevWzpIwJFMfU6tRmHm01tBrYCAfGK9kZ zwHjbItDWSMLMXV5X+uS/BaDVKQEriXDlUM4c7wrcGv0CCGmNGPAVO3Wb9wnIIvLphGc=; 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 1l00og-0001PU-Pc for linux-wireless@vger.kernel.org; Thu, 14 Jan 2021 12:29:26 +0100 From: Felix Fietkau To: linux-wireless@vger.kernel.org Subject: [PATCH 2/7] mt76: mt7915: ensure that init work completes before starting the device Date: Thu, 14 Jan 2021 12:29:20 +0100 Message-Id: <20210114112925.87646-2-nbd@nbd.name> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20210114112925.87646-1-nbd@nbd.name> References: <20210114112925.87646-1-nbd@nbd.name> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Without this change, the start operation could potentially race against eeprom or txbf init Signed-off-by: Felix Fietkau --- drivers/net/wireless/mediatek/mt76/mt7915/main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/main.c b/drivers/net/wireless/mediatek/mt76/mt7915/main.c index 73c5ee10fd3e..05dd75961d95 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7915/main.c +++ b/drivers/net/wireless/mediatek/mt76/mt7915/main.c @@ -26,6 +26,8 @@ static int mt7915_start(struct ieee80211_hw *hw) struct mt7915_phy *phy = mt7915_hw_phy(hw); bool running; + flush_work(&dev->init_work); + mutex_lock(&dev->mt76.mutex); running = mt7915_dev_running(dev); -- 2.28.0