Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4984957yba; Mon, 13 May 2019 03:23:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqwDfSh9U+s5nqWQoUPtTfSPVrCuFbD6qESS66eI4IyqBfohX0BpIkfb5o8FgqtZBTd1nU/J X-Received: by 2002:a17:902:7e04:: with SMTP id b4mr29593508plm.211.1557743028492; Mon, 13 May 2019 03:23:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557743028; cv=none; d=google.com; s=arc-20160816; b=RZejYpBOHJyJDcDhqhHNXhv8ooU3toVNk2zdNK4+rE+Fc5Phb6A3CwWPIOwn7+81kO vM7GzLD9lPcW4wMGai7anfVmgn8aQTKIaHsoRqDXvRKP3fvhB06nTTbffPPcIY1Q63uv sRalYqKA8CbbZXW4d+I9Y7OQUuuDbrUJHvBK81NsnmzFqMMwl1pNLYNorh/P8fGXBc6D dNoJYcDtAiJQyjAy4GoxYaXTgao6wZlVAOrRDLy8vkL7F/KTK17/G6rYemjYfw6c1Lo9 wBaB3dHdtOFsejjbebxOr9UCserMm+Idh3ctD9LQOCZhDFJgW2J6sbioKoHa6iMm4E9q F3/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=6vmo4TzTzbiMYYHvAcgSjuBnEng625hljj3v+2kVuZU=; b=FV26bSwLW4f9NHJcCUNgdPFf0E2kQ/2uUCTjxpqiEzjNif1qYGzl1CGx9KiTKtR8Mv Nh01mdkjd85m3gQVtKa9xjM81cP9DulbjVif48bG6NeZwN4B4uDgQkHQzrD99V6IzD7D HZpE1ZkoAO0EDdd0UqJJ75F8vWZT5rfDnwafGYQ5N5DpRR6Lbyam56VEIUepghMEcA3Z 5oVJ7yD/ApSAl9isHjJHnZUJIc0PsHQFtVEBosg/P5k7DsvlOTsslKAzJqaoPbAh6OWq xhDRHjwFTeciL7MECfkV7xjpMybrecIs0Cah3DeFPkfQ/kspVdrytnBuIH16Z3tV71X5 XVLg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f67si3776517plb.439.2019.05.13.03.23.34; Mon, 13 May 2019 03:23:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728632AbfEMJlQ (ORCPT + 99 others); Mon, 13 May 2019 05:41:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48244 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726274AbfEMJlQ (ORCPT ); Mon, 13 May 2019 05:41:16 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5A017882F0; Mon, 13 May 2019 09:41:16 +0000 (UTC) Received: from localhost (unknown [10.40.205.200]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6F6DC63BB9; Mon, 13 May 2019 09:41:13 +0000 (UTC) Date: Mon, 13 May 2019 11:41:12 +0200 From: Stanislaw Gruszka To: Lorenzo Bianconi Cc: nbd@nbd.name, lorenzo.bianconi@redhat.com, linux-wireless@vger.kernel.org Subject: Re: [PATCH 3/4] mt76: mt76x2: move mutex_lock inside mt76x2_set_channel Message-ID: <20190513094111.GA15694@redhat.com> References: <1527e88fc4a307aa218f515811f2f2c15786caec.1557567465.git.lorenzo@kernel.org> <20190513083755.GA13726@redhat.com> <20190513091905.GB3127@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190513091905.GB3127@localhost.localdomain> User-Agent: Mutt/1.8.3 (2017-05-23) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Mon, 13 May 2019 09:41:16 +0000 (UTC) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Mon, May 13, 2019 at 11:19:06AM +0200, Lorenzo Bianconi wrote: > > On Sat, May 11, 2019 at 12:17:53PM +0200, Lorenzo Bianconi wrote: > > > This is a preliminary patch to run mt76x02_edcca_init atomically > > > > > > Signed-off-by: Lorenzo Bianconi > > > --- > > > .../wireless/mediatek/mt76/mt76x2/pci_main.c | 16 ++++++++------ > > > .../wireless/mediatek/mt76/mt76x2/usb_main.c | 22 ++++++++++--------- > > > 2 files changed, 21 insertions(+), 17 deletions(-) > > > > > > diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2/pci_main.c b/drivers/net/wireless/mediatek/mt76/mt76x2/pci_main.c > > > index e416eee6a306..3a1467326f4d 100644 > > > --- a/drivers/net/wireless/mediatek/mt76/mt76x2/pci_main.c > > > +++ b/drivers/net/wireless/mediatek/mt76/mt76x2/pci_main.c > > > @@ -54,14 +54,14 @@ mt76x2_set_channel(struct mt76x02_dev *dev, struct cfg80211_chan_def *chandef) > > > int ret; > > > > > > cancel_delayed_work_sync(&dev->cal_work); > > > > Since now you use mutex in mt76x2_phy_calibrate() you can remove > > cancel_delayed_work_sync() and drop other changes from this patch > > as releasing mutex just to acquire it in almost next step make > > no sense. > > I agree with you, the only difference is in that way we will perform phy > calibration even during scanning. If the there are no > objections I will post a v3 removing cancel_delayed_work_sync and > reworking patch 3/4 Oh, calibration work should not be done during scanning, so cancel cal_work should be added to .sw_scan_start() callback or this patch should stay unchanged. Stanislaw