[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20120527002508.656364551@linuxfoundation.org>
Date: Sun, 27 May 2012 09:25:14 +0900
From: Greg KH <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org
Cc: torvalds@...ux-foundation.org, akpm@...ux-foundation.org,
alan@...rguk.ukuu.org.uk, Stephen Rothwell <sfr@...b.auug.org.au>,
Youngsin Lee <youngsin@...lcomm.com>,
Raja Mani <rmani@....qualcomm.com>,
Senthil Kumar Balasubramanian <senthilb@....qualcomm.com>,
Vipin Mehta <vipimeht@....qualcomm.com>,
"Luis R. Rodriguez" <mcgrof@...jolero.org>,
"John W. Linville" <linville@...driver.com>
Subject: [ 08/91] cfg80211: warn if db.txt is empty with CONFIG_CFG80211_INTERNAL_REGDB
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: "Luis R. Rodriguez" <mcgrof@...jolero.org>
commit 80007efeff0568375b08faf93c7aad65602cb97e upstream.
It has happened twice now where elaborate troubleshooting has
undergone on systems where CONFIG_CFG80211_INTERNAL_REGDB [0]
has been set but yet net/wireless/db.txt was not updated.
Despite the documentation on this it seems system integrators could
use some more help with this, so throw out a kernel warning at boot time
when their database is empty.
This does mean that the error-prone system integrator won't likely
realize the issue until they boot the machine but -- it does not seem
to make sense to enable a build bug breaking random build testing.
[0] http://wireless.kernel.org/en/developers/Regulatory/CRDA#CONFIG_CFG80211_INTERNAL_REGDB
Cc: Stephen Rothwell <sfr@...b.auug.org.au>
Cc: Youngsin Lee <youngsin@...lcomm.com>
Cc: Raja Mani <rmani@....qualcomm.com>
Cc: Senthil Kumar Balasubramanian <senthilb@....qualcomm.com>
Cc: Vipin Mehta <vipimeht@....qualcomm.com>
Cc: yahuan@....qualcomm.com
Cc: jjan@....qualcomm.com
Cc: vthiagar@....qualcomm.com
Cc: henrykim@...lcomm.com
Cc: jouni@....qualcomm.com
Cc: athiruve@....qualcomm.com
Cc: cjkim@...lcomm.com
Cc: philipk@....qualcomm.com
Cc: sunnykim@...lcomm.com
Cc: sskwak@...lcomm.com
Cc: kkim@...lcomm.com
Cc: mattbyun@...lcomm.com
Cc: ryanlee@...lcomm.com
Cc: simbap@...lcomm.com
Cc: krislee@...lcomm.com
Cc: conner@...lcomm.com
Cc: hojinkim@...lcomm.com
Cc: honglee@...lcomm.com
Cc: johnwkim@...lcomm.com
Cc: jinyong@....qualcomm.com
Signed-off-by: Luis R. Rodriguez <mcgrof@...jolero.org>
Signed-off-by: John W. Linville <linville@...driver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
net/wireless/reg.c | 10 ++++++++++
1 file changed, 10 insertions(+)
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -388,7 +388,15 @@ static void reg_regdb_query(const char *
schedule_work(®_regdb_work);
}
+
+/* Feel free to add any other sanity checks here */
+static void reg_regdb_size_check(void)
+{
+ /* We should ideally BUILD_BUG_ON() but then random builds would fail */
+ WARN_ONCE(!reg_regdb_size, "db.txt is empty, you should update it...");
+}
#else
+static inline void reg_regdb_size_check(void) {}
static inline void reg_regdb_query(const char *alpha2) {}
#endif /* CONFIG_CFG80211_INTERNAL_REGDB */
@@ -2322,6 +2330,8 @@ int __init regulatory_init(void)
spin_lock_init(®_requests_lock);
spin_lock_init(®_pending_beacons_lock);
+ reg_regdb_size_check();
+
cfg80211_regdomain = cfg80211_world_regdom;
user_alpha2[0] = '9';
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists