From: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
To: nbd@nbd.name
Cc: linux-wireless@vger.kernel.org, sgruszka@redhat.com
Subject: [PATCH 1/3] mt76: dfs: run mt76x02_dfs_set_domain atomically
Date: Wed, 12 Dec 2018 22:51:53 +0100 [thread overview]
Message-ID: <b314693b76b509e357110cf148aa3f83410b5d00.1544568618.git.lorenzo.bianconi@redhat.com> (raw)
In-Reply-To: <cover.1544568618.git.lorenzo.bianconi@redhat.com>
Grab mt76_dev mutex in mt76x02_dfs_set_domain since it runs
concurrently with mt76x{0,2}_set_channel routines
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
---
drivers/net/wireless/mediatek/mt76/mt76x02_dfs.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_dfs.c b/drivers/net/wireless/mediatek/mt76/mt76x02_dfs.c
index 054609c634a2..5bd523b091b6 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x02_dfs.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x02_dfs.c
@@ -881,12 +881,14 @@ mt76x02_dfs_set_domain(struct mt76x02_dev *dev,
{
struct mt76x02_dfs_pattern_detector *dfs_pd = &dev->dfs_pd;
+ mutex_lock(&dev->mt76.mutex);
if (dfs_pd->region != region) {
tasklet_disable(&dfs_pd->dfs_tasklet);
dfs_pd->region = region;
mt76x02_dfs_init_params(dev);
tasklet_enable(&dfs_pd->dfs_tasklet);
}
+ mutex_unlock(&dev->mt76.mutex);
}
void mt76x02_regd_notifier(struct wiphy *wiphy,
--
2.19.2
next prev parent reply other threads:[~2018-12-12 21:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-12 21:51 [PATCH 0/3] add EDCCA support to mt76x{0,2}e drivers Lorenzo Bianconi
2018-12-12 21:51 ` Lorenzo Bianconi [this message]
2018-12-12 21:51 ` [PATCH 2/3] mt76x2: init: set default value for MT_TX_LINK_CFG Lorenzo Bianconi
2018-12-12 21:51 ` [PATCH 3/3] mt76: add energy detect CCA support to mt76x{0,2}e drivers Lorenzo Bianconi
2018-12-28 12:24 ` [PATCH 0/3] add EDCCA " Felix Fietkau
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=b314693b76b509e357110cf148aa3f83410b5d00.1544568618.git.lorenzo.bianconi@redhat.com \
--to=lorenzo.bianconi@redhat.com \
--cc=linux-wireless@vger.kernel.org \
--cc=nbd@nbd.name \
--cc=sgruszka@redhat.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 NNTP newsgroup(s).