Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp303197lqd; Wed, 24 Apr 2024 02:50:39 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXuibHIybPSAG2vRjEE2WWvItAF3zb+IgtW9fM0K76YkJg1Lqi7rvZHkW3IMoppU+Eg7JWwGjuZn8ZnB3MbJpBEx4Jllte6OVWa9BSL2w== X-Google-Smtp-Source: AGHT+IEmMGGtBwO5VQlyxd4/qsG5RyZTj901Yo6UYnrJys4A9g+UuT6MolqmZw3J0bu0gd9464Jv X-Received: by 2002:a05:6870:9194:b0:21e:df09:fbb6 with SMTP id b20-20020a056870919400b0021edf09fbb6mr2004967oaf.41.1713952238967; Wed, 24 Apr 2024 02:50:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713952238; cv=pass; d=google.com; s=arc-20160816; b=nClb7aZZyQ+GK1Wkboj7EKmwrOGnXr6T3gV8JLg/Q4cWYxru5c1s+01poy4ub6Y9v0 prrw4QflryPS1v+QSg9bJXEFsBGCH8ENlWTLJa24vc2X5BGeNbfTo8f62uB6ggZoX59Q qbqPJjae53c+u0rG9KUy2P+tMGEgLQuWFGehUArRAHSuzpmmc50h2lZVv/v8zrLH6Aay ejgmon1oFupqZH4DgSWF1xpvPhSAG+LWfX06yvBubGvpJ7SisuyvGhGsjVE0ek19ff3C yRj5r2ky18lgMLLf0Uq52YsLaU2OcPDgtAVG0QbL1HYZUjeQ/FyVmskq6FLgFA0yqwqx KkRQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:message-id:in-reply-to:date:references:subject:cc:to :from:dkim-signature; bh=flrLT2KXYZN9G7QzeSNth6PGpz0QD4KxDFgpP/x601I=; fh=dOMLs8tQZrbR1kKGN4s4yFYuMJnaZ+mjYNoMt3n9+ck=; b=UgbwAMvdfJnpidn87Ufm5wrV6Au+yD4V2VIMhKip17YOAOsblIl62lTfIFDjOacKsk OZqmzcWkOqFNQtB+CWmh3a1x2+4oASZtGt7BioBCzN22m7//kVkkWGE52I/9QzP7xWM6 li1w8u3g2fwvzB8SYLrbyGIiEWQM1JbITiSpX52qRlieuotMYSM+TnbrpcFX74qdWMEw Y4pe/xGRDQp/eqhSNSwspIKH6eoOW7K/HG/SzE7RjygEpkrCM3tpo1OaVlYtMAswbU+J UbjVvOzATMatGBxFanLJ9Xzo7CNkW3iSmQ/DGy2qSw/cUXQUcSBuBRt4rKRbML5Uprdw dlUA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=llcj1PHG; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-wireless+bounces-6763-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-6763-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id u11-20020a63140b000000b005e46d335070si10805000pgl.203.2024.04.24.02.50.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Apr 2024 02:50:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-6763-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=llcj1PHG; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-wireless+bounces-6763-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-6763-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 35BF5283BAA for ; Wed, 24 Apr 2024 09:50:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D6622158DC1; Wed, 24 Apr 2024 09:50:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="llcj1PHG" X-Original-To: linux-wireless@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B05FE1E4A9 for ; Wed, 24 Apr 2024 09:50:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713952231; cv=none; b=lYq5WRsayx3JD5gd1t2lLC3TyMJVvevyYJ3reJzHJ2VpU3yHGaH3tf1c5Bs1vAZ8w/GAnl3uBA9HLIpEp3tNjk5gvA/+kGDVXbZpf6Gpffc1By+BThlCygk/GHoJz3K1ZIOhb59o9n0s1pcZvgNGCEQPeHXXbpXd7lveXs3SjaY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713952231; c=relaxed/simple; bh=ZgfWCv5rt80c3R+V8piEBul82k/vEs/F7mBFn4S+wkw=; h=From:To:Cc:Subject:References:Date:In-Reply-To:Message-ID: MIME-Version:Content-Type; b=QQBKXJZsLiKGN8L+aBLrSuUcinA1kEhRmDL8YqHve/JFBihjhe0475RfI1TZr/lwX1PGCjqZlefSQLDtI4VMyvfpqRu+YYd/TU4fSAOgFZNowHAhOHLPgNR9d7ExfNvlYxajQAR6DVpWUYRPksP5L4gAwX50ToPQMtDlctstHvc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=llcj1PHG; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id F0E43C113CE; Wed, 24 Apr 2024 09:50:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713952231; bh=ZgfWCv5rt80c3R+V8piEBul82k/vEs/F7mBFn4S+wkw=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=llcj1PHGQFl1TegzZ1jT8kMTyxj4uiHiuqqxKXlub/wKhhTO5qDQf1d/oWmc1vtEm vr4uefpCgCDESei1wzG8fh16xyVSRCpOdqDucEnwxohZq+BCBMgn40MgSt3F+McMn/ jCakuyskNLNiuWmLOkrUKnxmk9M607mZWVRuQa6h2z2I6ACZhqayCOqTWbp/Csb/1l +TFtYzu2Pr2IOhsPs7zNNBr+HtJWWci8soVosb6XpWgssVi2YI9neyJjALY3t11ybK n1IGyTYPKdeuihY9ckOtD1BaEom/hs4L+edVg8kyNQoy2v/RFK+RRzrGnzMlkeDlyY jKbiKW75HAq0g== From: Kalle Valo To: Johannes Berg Cc: Karthikeyan Periyasamy , ath12k@lists.infradead.org, linux-wireless@vger.kernel.org Subject: Re: [PATCH v2 3/3] wifi: ath12k: Add lock to protect the hardware state References: <20240424065646.1666166-1-quic_periyasa@quicinc.com> <20240424065646.1666166-4-quic_periyasa@quicinc.com> <517caf852d37b3803bcf087a6b575f2ecdb5ba10.camel@sipsolutions.net> <87il07t7zq.fsf@kernel.org> <3dc4339f5c3f603027c2214058e7e3251652a7f0.camel@sipsolutions.net> Date: Wed, 24 Apr 2024 12:50:27 +0300 In-Reply-To: <3dc4339f5c3f603027c2214058e7e3251652a7f0.camel@sipsolutions.net> (Johannes Berg's message of "Wed, 24 Apr 2024 11:43:58 +0200") Message-ID: <87edavt7h8.fsf@kernel.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Johannes Berg writes: > On Wed, 2024-04-24 at 12:39 +0300, Kalle Valo wrote: >> >> Exactly. Swithing to use wiphy_lock() definitely one of my longterm >> goals in ath12k. I already started working on switching ath12k to use >> wiphy_lock() but IIRC I got blocked by not being able to call >> wiphy_delayed_work_cancel() without taking wiphy_lock. > > That's because I didn't want to have an async version, but theoretically > we could have a version of it that just cancels the timer. If you don't > hold the wiphy mutex already you could even wait for it to finish. It > just adds more complexity there, and I was trying to make it all a lot > more obvious :) Yeah, understandable. I think changing ath12k WMI event handling to use wiphy_work makes sense, running them in tasklet context feels overkill. I just need to write the patch :) But after that I hope we can switch to using wiphy mutex. -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches