From: Kalle Valo <kvalo@kernel.org>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>,
ath12k@lists.infradead.org, linux-wireless@vger.kernel.org
Subject: Re: [PATCH v2 3/3] wifi: ath12k: Add lock to protect the hardware state
Date: Wed, 24 Apr 2024 12:39:21 +0300 [thread overview]
Message-ID: <87il07t7zq.fsf@kernel.org> (raw)
In-Reply-To: <517caf852d37b3803bcf087a6b575f2ecdb5ba10.camel@sipsolutions.net> (Johannes Berg's message of "Wed, 24 Apr 2024 09:28:20 +0200")
Johannes Berg <johannes@sipsolutions.net> writes:
> On Wed, 2024-04-24 at 12:26 +0530, Karthikeyan Periyasamy wrote:
>> Currently, hardware state is not protected across the reconfigure
>> operations. However, in single wiphy models, multiple radio/links is
>> exposed as a MAC hardware (ieee80211_hw) through the driver hardware
>> abstraction (ath12k_hw) layer. In such scenario, we need to protect
>> hardware state across the multiple radio/link at the driver hardware
>> abstraction (ath12k_hw) layer. Therefore, introduce a new mutex in
>> the ath12k_hw layer.
>>
>
> It's your driver, but ... it would seem _simpler_ to do locking across
> the hw with a single wiphy model, because everything (except currently
> for ath12k_core_reset and ath12k_core_restart) already holds the wiphy
> mutex. You can probably move those to wiphy work.
>
> I'd avoid doing lock explosion like we had in mac80211, it's going to
> come back and bite you eventually :)
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. One way to solve
that might be to convert WMI event handling to use wiphy work but didn't
have the time to work on that so I put it on the backborner. I should
resurrect that branch and submit it as RFC.
But for the time being I think we need to add another mutex to ath12k, I
don't want to block Karthikeyan for too long.
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
next prev parent reply other threads:[~2024-04-24 9:39 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-24 6:56 [PATCH v2 0/3] wifi: ath12k: Refactor the hardware recovery procedures Karthikeyan Periyasamy
2024-04-24 6:56 ` [PATCH v2 1/3] wifi: ath12k: Refactor the hardware recovery procedure Karthikeyan Periyasamy
2024-04-24 20:20 ` Jeff Johnson
2024-04-25 6:26 ` Karthikeyan Periyasamy
2024-04-24 6:56 ` [PATCH v2 2/3] wifi: ath12k: Refactor the hardware state Karthikeyan Periyasamy
2024-04-24 6:56 ` [PATCH v2 3/3] wifi: ath12k: Add lock to protect " Karthikeyan Periyasamy
2024-04-24 7:28 ` Johannes Berg
2024-04-24 9:39 ` Kalle Valo [this message]
2024-04-24 9:43 ` Johannes Berg
2024-04-24 9:50 ` Kalle Valo
2024-04-24 9:52 ` Johannes Berg
2024-04-24 12:16 ` Kalle Valo
2024-04-24 20:41 ` Jeff Johnson
2024-04-25 6:58 ` Karthikeyan Periyasamy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87il07t7zq.fsf@kernel.org \
--to=kvalo@kernel.org \
--cc=ath12k@lists.infradead.org \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=quic_periyasa@quicinc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).