Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4983084yba; Mon, 13 May 2019 03:21:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqz67sifIZUISn9R8Q13VpJVLmul8uAo850GZhvsid/6uhaes5FgzEpugAsgmFfBBubPI070 X-Received: by 2002:a63:4f1c:: with SMTP id d28mr29282190pgb.144.1557742890211; Mon, 13 May 2019 03:21:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557742890; cv=none; d=google.com; s=arc-20160816; b=uVWTCI9dZYrbDqnmxYgxEYP0RccKmsSw0YQrypAP0RVuQs9FpsBbe2ur7UGt6LJBiY xoBUz9XEJ2SsCaEOZhOiTsVxcVodSo3rlr1QIEZ0B4wkbzHL/mqN/uJFycENIWg+E0W8 GCj1WmseqpYS7jFhgU55V8hR8McOB5Zy+oGAqF7CmcjQY573uFEQ9caNdG15S26z5wxy wWXayIr796WSacQJQd9/eBePdTx35bnfvHu1/yBqwwm+bcehFxLTURFry2Kdbrb2h/c2 xNx515oLk/n2mzHfp84PerNEx5sAPjYZbTw6CF2zx0pt2MeNnr+mmoLmR02PwI4siFd2 IoCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:openpgp:from:references:cc:to:subject :dkim-signature; bh=Tt/BANLlImzkjsM3UzyLhwyPn0bAVuqJVjAzJQuIRbc=; b=Gkna/kCjZ41qbGwQJdcpwamcUPYzwGtAJJcTcb8NLe37AIf8+YxL+pItyQiuLoc4M7 AgiSgDX+0akLgEgEc8D/dXPAZN2LF66r1KU4Zf/JdOKhCp4YTqdFqNCX1i2atsS3ac9u ERrpwrvxIS8tZmb27dhEl4VxIC3U+mULy1LzlrcnFvD8Fei98ax5ymzAXhllGuJLxtsS mWQgoDLwZYjUEuGPV6dvNJ8uz6uiPM0w5wKKL5XrC0gO98Qfk5dxZw+92F7s0zocpJHc s+0qlcLfU2WKMK0XkVsaPKRCg52VU1Ajh9R1Pga3AE0NvJgOzZlAW1vJf2HTtVo4vnDa D6zQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=ZVm36oYP; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l1si15402790pgi.344.2019.05.13.03.20.59; Mon, 13 May 2019 03:21:30 -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; dkim=fail header.i=@nbd.name header.s=20160729 header.b=ZVm36oYP; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728406AbfEMJag (ORCPT + 99 others); Mon, 13 May 2019 05:30:36 -0400 Received: from nbd.name ([46.4.11.11]:56882 "EHLO nbd.name" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726218AbfEMJae (ORCPT ); Mon, 13 May 2019 05:30:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=Content-Transfer-Encoding:Content-Type:In-Reply-To: MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender:Reply-To: 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=Tt/BANLlImzkjsM3UzyLhwyPn0bAVuqJVjAzJQuIRbc=; b=ZVm36oYPkU7M5FkSIm7QUVrl60 Cbp6AgVi92hM8hvIAdjxgdYnToQuas4VWEcm/QWXuIrkZJbnM22p/8yGVY4Dk3HdLEcH70Cj3OlFS XUrmmIxl/Mm3MuZfsznyuSds77e/w0p8IcaCV2vVht32k/yFjLRaYpYgeZI1kw8vUNok=; Received: from p54ae9c89.dip0.t-ipconnect.de ([84.174.156.137] helo=nf.local) by ds12 with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1hQ7I1-0002q2-66; Mon, 13 May 2019 11:30:33 +0200 Subject: Re: [PATCH 3/4] mt76: mt76x2: move mutex_lock inside mt76x2_set_channel To: Lorenzo Bianconi , Stanislaw Gruszka Cc: lorenzo.bianconi@redhat.com, linux-wireless@vger.kernel.org References: <1527e88fc4a307aa218f515811f2f2c15786caec.1557567465.git.lorenzo@kernel.org> <20190513083755.GA13726@redhat.com> <20190513091905.GB3127@localhost.localdomain> From: Felix Fietkau Openpgp: preference=signencrypt Autocrypt: addr=nbd@nbd.name; prefer-encrypt=mutual; keydata= mQGiBEah5CcRBADIY7pu4LIv3jBlyQ/2u87iIZGe6f0f8pyB4UjzfJNXhJb8JylYYRzIOSxh ExKsdLCnJqsG1PY1mqTtoG8sONpwsHr2oJ4itjcGHfn5NJSUGTbtbbxLro13tHkGFCoCr4Z5 Pv+XRgiANSpYlIigiMbOkide6wbggQK32tC20QxUIwCg4k6dtV/4kwEeiOUfErq00TVqIiEE AKcUi4taOuh/PQWx/Ujjl/P1LfJXqLKRPa8PwD4j2yjoc9l+7LptSxJThL9KSu6gtXQjcoR2 vCK0OeYJhgO4kYMI78h1TSaxmtImEAnjFPYJYVsxrhay92jisYc7z5R/76AaELfF6RCjjGeP wdalulG+erWju710Bif7E1yjYVWeA/9Wd1lsOmx6uwwYgNqoFtcAunDaMKi9xVQW18FsUusM TdRvTZLBpoUAy+MajAL+R73TwLq3LnKpIcCwftyQXK5pEDKq57OhxJVv1Q8XkA9Dn1SBOjNB l25vJDFAT9ntp9THeDD2fv15yk4EKpWhu4H00/YX8KkhFsrtUs69+vZQwbQcRmVsaXggRmll dGthdSA8bmJkQG5iZC5uYW1lPohgBBMRAgAgBQJGoeQnAhsjBgsJCAcDAgQVAggDBBYCAwEC HgECF4AACgkQ130UHQKnbvXsvgCgjsAIIOsY7xZ8VcSm7NABpi91yTMAniMMmH7FRenEAYMa VrwYTIThkTlQuQINBEah5FQQCACMIep/hTzgPZ9HbCTKm9xN4bZX0JjrqjFem1Nxf3MBM5vN CYGBn8F4sGIzPmLhl4xFeq3k5irVg/YvxSDbQN6NJv8o+tP6zsMeWX2JjtV0P4aDIN1pK2/w VxcicArw0VYdv2ZCarccFBgH2a6GjswqlCqVM3gNIMI8ikzenKcso8YErGGiKYeMEZLwHaxE Y7mTPuOTrWL8uWWRL5mVjhZEVvDez6em/OYvzBwbkhImrryF29e3Po2cfY2n7EKjjr3/141K DHBBdgXlPNfDwROnA5ugjjEBjwkwBQqPpDA7AYPvpHh5vLbZnVGu5CwG7NAsrb2isRmjYoqk wu++3117AAMFB/9S0Sj7qFFQcD4laADVsabTpNNpaV4wAgVTRHKV/kC9luItzwDnUcsZUPdQ f3MueRJ3jIHU0UmRBG3uQftqbZJj3ikhnfvyLmkCNe+/hXhPu9sGvXyi2D4vszICvc1KL4RD aLSrOsROx22eZ26KqcW4ny7+va2FnvjsZgI8h4sDmaLzKczVRIiLITiMpLFEU/VoSv0m1F4B FtRgoiyjFzigWG0MsTdAN6FJzGh4mWWGIlE7o5JraNhnTd+yTUIPtw3ym6l8P+gbvfoZida0 TspgwBWLnXQvP5EDvlZnNaKa/3oBes6z0QdaSOwZCRA3QSLHBwtgUsrT6RxRSweLrcabiEkE GBECAAkFAkah5FQCGwwACgkQ130UHQKnbvW2GgCfTKx80VvCR/PvsUlrvdOLsIgeRGAAn1ee RjMaxwtSdaCKMw3j33ZbsWS4 Message-ID: <26124e15-b410-42d4-631e-4a814176dac0@nbd.name> Date: Mon, 13 May 2019 11:30:32 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190513091905.GB3127@localhost.localdomain> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On 2019-05-13 11:19, 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 I don't agree for two reasons: 1. If we only rely on the mutex, we're blocking the workqueue. That might have some unwanted side effects. 2. We really should avoid having the calibration work during scanning, otherwise this creates extra latency on channel changes, making the whole scan slower. - Felix