From: Johannes Berg <johannes@sipsolutions.net>
To: John Linville <linville@tuxdriver.com>
Cc: linux-wireless <linux-wireless@vger.kernel.org>
Subject: [PATCH] wireless: remove cfg80211_reg_mutex
Date: Tue, 21 Oct 2008 09:57:41 +0200 [thread overview]
Message-ID: <1224575861.27899.99.camel@johannes.berg> (raw)
This mutex is wrong, we use cfg80211_drv_mutex (which should
possibly be renamed to just cfg80211_mutex) everywhere except
in one place, fix that and get rid of the extra mutex.
Also get rid of a spurious regulatory_requests list definition.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
net/wireless/core.c | 6 ++----
net/wireless/reg.c | 3 ---
net/wireless/reg.h | 1 -
3 files changed, 2 insertions(+), 8 deletions(-)
--- everything.orig/net/wireless/core.c 2008-10-21 09:54:48.000000000 +0200
+++ everything/net/wireless/core.c 2008-10-21 09:55:06.000000000 +0200
@@ -302,12 +302,10 @@ int wiphy_register(struct wiphy *wiphy)
/* check and set up bitrates */
ieee80211_set_bitrate_flags(wiphy);
+ mutex_lock(&cfg80211_drv_mutex);
+
/* set up regulatory info */
- mutex_lock(&cfg80211_reg_mutex);
wiphy_update_regulatory(wiphy, REGDOM_SET_BY_CORE);
- mutex_unlock(&cfg80211_reg_mutex);
-
- mutex_lock(&cfg80211_drv_mutex);
res = device_add(&drv->wiphy.dev);
if (res)
--- everything.orig/net/wireless/reg.c 2008-10-21 09:52:13.000000000 +0200
+++ everything/net/wireless/reg.c 2008-10-21 09:54:54.000000000 +0200
@@ -52,7 +52,6 @@ struct regulatory_request {
};
static LIST_HEAD(regulatory_requests);
-DEFINE_MUTEX(cfg80211_reg_mutex);
/* To trigger userspace events */
static struct platform_device *reg_pdev;
@@ -63,8 +62,6 @@ static u32 supported_bandwidths[] = {
MHZ_TO_KHZ(20),
};
-static struct list_head regulatory_requests;
-
/* Central wireless core regulatory domains, we only need two,
* the current one and a world regulatory domain in case we have no
* information to give us an alpha2 */
--- everything.orig/net/wireless/reg.h 2008-10-21 09:54:48.000000000 +0200
+++ everything/net/wireless/reg.h 2008-10-21 09:54:51.000000000 +0200
@@ -1,7 +1,6 @@
#ifndef __NET_WIRELESS_REG_H
#define __NET_WIRELESS_REG_H
-extern struct mutex cfg80211_reg_mutex;
bool is_world_regdom(const char *alpha2);
bool reg_is_valid_request(const char *alpha2);
reply other threads:[~2008-10-21 7:57 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1224575861.27899.99.camel@johannes.berg \
--to=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.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