From patchwork Sat Apr 3 17:39:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Bianconi X-Patchwork-Id: 415125 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 390BEC433ED for ; Sat, 3 Apr 2021 17:40:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EDEC761287 for ; Sat, 3 Apr 2021 17:40:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236920AbhDCRkJ (ORCPT ); Sat, 3 Apr 2021 13:40:09 -0400 Received: from mail.kernel.org ([198.145.29.99]:45678 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236819AbhDCRkJ (ORCPT ); Sat, 3 Apr 2021 13:40:09 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0D1C56124C; Sat, 3 Apr 2021 17:40:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1617471606; bh=S4dM6+RPKZXERZx50L1tMJIGxsk27JygKtyfxh/aVAc=; h=From:To:Cc:Subject:Date:From; b=W2o6jCal5Z/Amau22F71QnzZiO5L3kPJ9DmU+MnVySkaCNi3Rpo6wo9pyelagLiMr rlQ8MJuPhBWP0MeK+5ezpHnaGOsEjLtM4H/e7/v6cTmvbu8mHeE+/s5ABWyy0v3gIS ih/hKgicKmPAUmkBdtsAWL3xiTGVySAbpbHHJuyXjDPrhvpXf9eNW5XRPrnxaRRqNK igVxhhkAhHrOV1Wxj91OD/57W72aD6cQbrYo4G1esh39TeBimojjGl5I6s09xnjskD Uk7RMKCulxAcxUPD+jIazVNDc3OPcDPxEo6wgsiO0RmBp7V6NvU5prW8Qhmq5NnBIz SiRmw1BzVx8eQ== From: Lorenzo Bianconi To: nbd@nbd.name Cc: linux-wireless@vger.kernel.org, lorenzo.bianconi@redhat.com, ryder.lee@mediatek.com Subject: [PATCH] mt76: mt7615: always wake the device in mt7615_remove_interface Date: Sat, 3 Apr 2021 19:39:58 +0200 Message-Id: X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Similar to mt7921 driver, make sure the mcu is not in sleep mode before sending mcu messages in mt7615_remove_interface routine. Signed-off-by: Lorenzo Bianconi --- drivers/net/wireless/mediatek/mt76/mt7615/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/main.c b/drivers/net/wireless/mediatek/mt76/mt7615/main.c index 740c9a45e21b..57567e35f71d 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7615/main.c +++ b/drivers/net/wireless/mediatek/mt76/mt7615/main.c @@ -257,11 +257,11 @@ static void mt7615_remove_interface(struct ieee80211_hw *hw, struct mt7615_phy *phy = mt7615_hw_phy(hw); int idx = msta->wcid.idx; + mt7615_mutex_acquire(dev); + mt7615_mcu_add_bss_info(phy, vif, NULL, false); mt7615_mcu_sta_add(phy, vif, NULL, false); - mt7615_mutex_acquire(dev); - mt76_testmode_reset(phy->mt76, true); if (vif == phy->monitor_vif) phy->monitor_vif = NULL;