This is a note to let you know that I've just added the patch titled

    cfg80211: warn if db.txt is empty with CONFIG_CFG80211_INTERNAL_REGDB

to the 3.4-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     cfg80211-warn-if-db.txt-is-empty-with-config_cfg80211_internal_regdb.patch
and it can be found in the queue-3.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From 80007efeff0568375b08faf93c7aad65602cb97e Mon Sep 17 00:00:00 2001
From: "Luis R. Rodriguez" <mcg...@frijolero.org>
Date: Fri, 23 Mar 2012 07:23:31 -0700
Subject: cfg80211: warn if db.txt is empty with CONFIG_CFG80211_INTERNAL_REGDB

From: "Luis R. Rodriguez" <mcg...@frijolero.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 <s...@canb.auug.org.au>
Cc: Youngsin Lee <young...@qualcomm.com>
Cc: Raja Mani <rm...@qca.qualcomm.com>
Cc: Senthil Kumar Balasubramanian <senth...@qca.qualcomm.com>
Cc: Vipin Mehta <vipim...@qca.qualcomm.com>
Cc: yah...@qca.qualcomm.com
Cc: j...@qca.qualcomm.com
Cc: vthia...@qca.qualcomm.com
Cc: henry...@qualcomm.com
Cc: jo...@qca.qualcomm.com
Cc: athir...@qca.qualcomm.com
Cc: cj...@qualcomm.com
Cc: phil...@qca.qualcomm.com
Cc: sunny...@qualcomm.com
Cc: ssk...@qualcomm.com
Cc: k...@qualcomm.com
Cc: mattb...@qualcomm.com
Cc: ryan...@qualcomm.com
Cc: sim...@qualcomm.com
Cc: kris...@qualcomm.com
Cc: con...@qualcomm.com
Cc: hojin...@qualcomm.com
Cc: hong...@qualcomm.com
Cc: johnw...@qualcomm.com
Cc: jiny...@qca.qualcomm.com
Signed-off-by: Luis R. Rodriguez <mcg...@frijolero.org>
Signed-off-by: John W. Linville <linvi...@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.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(&reg_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(&reg_requests_lock);
        spin_lock_init(&reg_pending_beacons_lock);
 
+       reg_regdb_size_check();
+
        cfg80211_regdomain = cfg80211_world_regdom;
 
        user_alpha2[0] = '9';


Patches currently in stable-queue which might be from mcg...@frijolero.org are

queue-3.4/cfg80211-warn-if-db.txt-is-empty-with-config_cfg80211_internal_regdb.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to