|
@@ -3644,27 +3644,14 @@ void regulatory_propagate_dfs_state(struct wiphy *wiphy,
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-int __init regulatory_init(void)
|
|
|
|
|
|
+static int __init regulatory_init_db(void)
|
|
{
|
|
{
|
|
- int err = 0;
|
|
|
|
|
|
+ int err;
|
|
|
|
|
|
err = load_builtin_regdb_keys();
|
|
err = load_builtin_regdb_keys();
|
|
if (err)
|
|
if (err)
|
|
return err;
|
|
return err;
|
|
|
|
|
|
- reg_pdev = platform_device_register_simple("regulatory", 0, NULL, 0);
|
|
|
|
- if (IS_ERR(reg_pdev))
|
|
|
|
- return PTR_ERR(reg_pdev);
|
|
|
|
-
|
|
|
|
- spin_lock_init(®_requests_lock);
|
|
|
|
- spin_lock_init(®_pending_beacons_lock);
|
|
|
|
- spin_lock_init(®_indoor_lock);
|
|
|
|
-
|
|
|
|
- rcu_assign_pointer(cfg80211_regdomain, cfg80211_world_regdom);
|
|
|
|
-
|
|
|
|
- user_alpha2[0] = '9';
|
|
|
|
- user_alpha2[1] = '7';
|
|
|
|
-
|
|
|
|
/* We always try to get an update for the static regdomain */
|
|
/* We always try to get an update for the static regdomain */
|
|
err = regulatory_hint_core(cfg80211_world_regdom->alpha2);
|
|
err = regulatory_hint_core(cfg80211_world_regdom->alpha2);
|
|
if (err) {
|
|
if (err) {
|
|
@@ -3692,6 +3679,31 @@ int __init regulatory_init(void)
|
|
|
|
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
+#ifndef MODULE
|
|
|
|
+late_initcall(regulatory_init_db);
|
|
|
|
+#endif
|
|
|
|
+
|
|
|
|
+int __init regulatory_init(void)
|
|
|
|
+{
|
|
|
|
+ reg_pdev = platform_device_register_simple("regulatory", 0, NULL, 0);
|
|
|
|
+ if (IS_ERR(reg_pdev))
|
|
|
|
+ return PTR_ERR(reg_pdev);
|
|
|
|
+
|
|
|
|
+ spin_lock_init(®_requests_lock);
|
|
|
|
+ spin_lock_init(®_pending_beacons_lock);
|
|
|
|
+ spin_lock_init(®_indoor_lock);
|
|
|
|
+
|
|
|
|
+ rcu_assign_pointer(cfg80211_regdomain, cfg80211_world_regdom);
|
|
|
|
+
|
|
|
|
+ user_alpha2[0] = '9';
|
|
|
|
+ user_alpha2[1] = '7';
|
|
|
|
+
|
|
|
|
+#ifdef MODULE
|
|
|
|
+ return regulatory_init_db();
|
|
|
|
+#else
|
|
|
|
+ return 0;
|
|
|
|
+#endif
|
|
|
|
+}
|
|
|
|
|
|
void regulatory_exit(void)
|
|
void regulatory_exit(void)
|
|
{
|
|
{
|