From patchwork Sun May 20 05:43:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felix Fietkau X-Patchwork-Id: 10413125 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5555660353 for ; Sun, 20 May 2018 05:44:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4673D286F3 for ; Sun, 20 May 2018 05:44:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3ABFE286F7; Sun, 20 May 2018 05:44:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DE3D8286F3 for ; Sun, 20 May 2018 05:44:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751162AbeETFoA (ORCPT ); Sun, 20 May 2018 01:44:00 -0400 Received: from nbd.name ([46.4.11.11]:51952 "EHLO nbd.name" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751026AbeETFnw (ORCPT ); Sun, 20 May 2018 01:43:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: 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=+eZECNsRaONdGEq72tV7qU4cUUX8Ggkd5QKcTnn4Q1U=; b=j2XJGYE5/VB3W+3H6Vf2BlHEH4 VA4wMm91t40hnCtCGABF7Jfj1eDGzHt0HaUBNkebOmfqBBwmHP7bWmrqn7V5s0pS2W+27WI55gyiY SgyhvaCMBS8wMwCCEHa8IsVrFCelIkC8Q57K8h7suEedPUXtwV4XYxr8ubBUiE6Rjtz8=; Received: by maeck.lan (Postfix, from userid 501) id D057A2B66F9A; Sun, 20 May 2018 07:43:49 +0200 (CEST) From: Felix Fietkau To: linux-wireless@vger.kernel.org Cc: kvalo@codeaurora.org Subject: [PATCH 5/5] mt76: use udelay instead of usleep_range in mt76x2_mac_stop Date: Sun, 20 May 2018 07:43:49 +0200 Message-Id: <20180520054349.49422-5-nbd@nbd.name> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180520054349.49422-1-nbd@nbd.name> References: <20180520054349.49422-1-nbd@nbd.name> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP usleep_range can cause excessive latency on channel change if waiting for the MAC to stop fails. It will be forced to stop by the code following that loop anyway. Signed-off-by: Felix Fietkau --- drivers/net/wireless/mediatek/mt76/mt76x2_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2_init.c b/drivers/net/wireless/mediatek/mt76/mt76x2_init.c index 7096256c7f50..4e5f360d0655 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x2_init.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x2_init.c @@ -376,7 +376,7 @@ void mt76x2_mac_stop(struct mt76x2_dev *dev, bool force) if ((mt76_rr(dev, MT_MAC_STATUS) & (MT_MAC_STATUS_RX | MT_MAC_STATUS_TX)) || mt76_rr(dev, MT_BBP(IBI, 12))) { - usleep_range(10, 20); + udelay(1); continue; }