aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless
diff options
context:
space:
mode:
Diffstat (limited to 'net/wireless')
-rw-r--r--net/wireless/reg.c22
1 files changed, 17 insertions, 5 deletions
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index 6373a78a37e7..47d505616a4b 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -1616,7 +1616,7 @@ void reg_device_remove(struct wiphy *wiphy)
1616 1616
1617int regulatory_init(void) 1617int regulatory_init(void)
1618{ 1618{
1619 int err; 1619 int err = 0;
1620 1620
1621 reg_pdev = platform_device_register_simple("regulatory", 0, NULL, 0); 1621 reg_pdev = platform_device_register_simple("regulatory", 0, NULL, 0);
1622 if (IS_ERR(reg_pdev)) 1622 if (IS_ERR(reg_pdev))
@@ -1637,12 +1637,24 @@ int regulatory_init(void)
1637 cfg80211_regdomain = cfg80211_world_regdom; 1637 cfg80211_regdomain = cfg80211_world_regdom;
1638 1638
1639 err = regulatory_hint_core("00"); 1639 err = regulatory_hint_core("00");
1640#endif
1640 if (err) { 1641 if (err) {
1641 printk(KERN_ERR "cfg80211: calling CRDA failed - " 1642 if (err == -ENOMEM)
1642 "unable to update world regulatory domain, " 1643 return err;
1643 "using static definition\n"); 1644 /*
1644 } 1645 * N.B. kobject_uevent_env() can fail mainly for when we're out
1646 * memory which is handled and propagated appropriately above
1647 * but it can also fail during a netlink_broadcast() or during
1648 * early boot for call_usermodehelper(). For now treat these
1649 * errors as non-fatal.
1650 */
1651 printk(KERN_ERR "cfg80211: kobject_uevent_env() was unable "
1652 "to call CRDA during init");
1653#ifdef CONFIG_CFG80211_REG_DEBUG
1654 /* We want to find out exactly why when debugging */
1655 WARN_ON(err);
1645#endif 1656#endif
1657 }
1646 1658
1647 return 0; 1659 return 0;
1648} 1660}