From mboxrd@z Thu Jan 1 00:00:00 1970 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.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, 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 38918C11F66 for ; Fri, 9 Jul 2021 13:23:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2933C611B0 for ; Fri, 9 Jul 2021 13:23:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233086AbhGINZu (ORCPT ); Fri, 9 Jul 2021 09:25:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:56330 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233029AbhGINZh (ORCPT ); Fri, 9 Jul 2021 09:25:37 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id B169D61377; Fri, 9 Jul 2021 13:22:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1625836974; bh=u0DPRHnA81eONtWYWsapGza7NAVDu4368Xw5ICQf5XQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=unhkiDYgZ6SsvjasGGIaPen71TjIFlMQE1Rf2bvwIbeguzUqWoBr1gpowjab5uWgD YNn0r/Ap6kMil/Q3OHDK5qz3qZZKqsqHFR5mxHkWnoAi+FiOdHW0EEUdc/uczFKmHh AVW03c10edeIyLuQHrUE+iptz5rHHEmnaL2XN+zU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Lorenzo Bianconi , Felix Fietkau , Deren Wu Subject: [PATCH 5.12 11/11] mt76: mt7921: get rid of mcu_reset function pointer Date: Fri, 9 Jul 2021 15:21:48 +0200 Message-Id: <20210709131604.189244317@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210709131549.679160341@linuxfoundation.org> References: <20210709131549.679160341@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Lorenzo Bianconi commit d43b3257621dfe57c71d875afd3f624b9a042fc5 upstream. since mcu_reset it used only by mt7921, move the reset callback to mt7921_mcu_parse_response routine and get rid of the function pointer. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/linux-wireless/364293ec8609dd254067d8173c1599526ffd662c.1619000828.git.lorenzo@kernel.org/ Signed-off-by: Deren Wu Cc: # 5.12: f92f81d35ac2 mt76: mt7921: check mcu returned values in mt7921_start Cc: # 5.12: d32464e68ffc mt76: mt7921: introduce mt7921_run_firmware utility routine. Cc: # 5.12: 1f7396acfef4 mt76: mt7921: introduce __mt7921_start utility routine Cc: # 5.12: 3990465db682 mt76: dma: introduce mt76_dma_queue_reset routine Cc: # 5.12: c001df978e4c mt76: dma: export mt76_dma_rx_cleanup routine Cc: # 5.12: 0c1ce9884607 mt76: mt7921: add wifi reset support Cc: # 5.12: e513ae49088b mt76: mt7921: abort uncompleted scan by wifi reset Cc: # 5.12 Signed-off-by: Greg Kroah-Hartman --- drivers/net/wireless/mediatek/mt76/mt7921/mcu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c @@ -161,6 +161,8 @@ mt7921_mcu_parse_response(struct mt76_de if (!skb) { dev_err(mdev->dev, "Message %d (seq %d) timeout\n", cmd, seq); + mt7921_reset(mdev); + return -ETIMEDOUT; } @@ -952,7 +954,6 @@ int mt7921_mcu_init(struct mt7921_dev *d .mcu_skb_send_msg = mt7921_mcu_send_message, .mcu_parse_response = mt7921_mcu_parse_response, .mcu_restart = mt7921_mcu_restart, - .mcu_reset = mt7921_reset, }; dev->mt76.mcu_ops = &mt7921_mcu_ops;