Loading net/wireless/reg.c +8 −29 Original line number Diff line number Diff line Loading @@ -91,10 +91,6 @@ static struct regulatory_request __rcu *last_request = /* To trigger userspace events */ static struct platform_device *reg_pdev; static const struct device_type reg_device_type = { .uevent = reg_device_uevent, }; /* * Central wireless core regulatory domains, we only need two, * the current one and a world regulatory domain in case we have no Loading Loading @@ -487,11 +483,16 @@ static inline void reg_regdb_query(const char *alpha2) {} /* * This lets us keep regulatory code which is updated on a regulatory * basis in userspace. Country information is filled in by * reg_device_uevent * basis in userspace. */ static int call_crda(const char *alpha2) { char country[12]; char *env[] = { country, NULL }; snprintf(country, sizeof(country), "COUNTRY=%c%c", alpha2[0], alpha2[1]); if (!is_world_regdom((char *) alpha2)) pr_info("Calling CRDA for country: %c%c\n", alpha2[0], alpha2[1]); Loading @@ -501,7 +502,7 @@ static int call_crda(const char *alpha2) /* query internal regulatory database (if it exists) */ reg_regdb_query(alpha2); return kobject_uevent(®_pdev->dev.kobj, KOBJ_CHANGE); return kobject_uevent_env(®_pdev->dev.kobj, KOBJ_CHANGE, env); } static enum reg_request_treatment Loading Loading @@ -2544,26 +2545,6 @@ int set_regdom(const struct ieee80211_regdomain *rd) return 0; } int reg_device_uevent(struct device *dev, struct kobj_uevent_env *env) { struct regulatory_request *lr; u8 alpha2[2]; bool add = false; rcu_read_lock(); lr = get_last_request(); if (lr && !lr->processed) { memcpy(alpha2, lr->alpha2, 2); add = true; } rcu_read_unlock(); if (add) return add_uevent_var(env, "COUNTRY=%c%c", alpha2[0], alpha2[1]); return 0; } void wiphy_regulatory_register(struct wiphy *wiphy) { struct regulatory_request *lr; Loading Loading @@ -2614,8 +2595,6 @@ int __init regulatory_init(void) if (IS_ERR(reg_pdev)) return PTR_ERR(reg_pdev); reg_pdev->dev.type = ®_device_type; spin_lock_init(®_requests_lock); spin_lock_init(®_pending_beacons_lock); Loading net/wireless/reg.h +0 −1 Original line number Diff line number Diff line Loading @@ -26,7 +26,6 @@ enum nl80211_dfs_regions reg_get_dfs_region(struct wiphy *wiphy); int regulatory_hint_user(const char *alpha2, enum nl80211_user_reg_hint_type user_reg_hint_type); int reg_device_uevent(struct device *dev, struct kobj_uevent_env *env); void wiphy_regulatory_register(struct wiphy *wiphy); void wiphy_regulatory_deregister(struct wiphy *wiphy); Loading Loading
net/wireless/reg.c +8 −29 Original line number Diff line number Diff line Loading @@ -91,10 +91,6 @@ static struct regulatory_request __rcu *last_request = /* To trigger userspace events */ static struct platform_device *reg_pdev; static const struct device_type reg_device_type = { .uevent = reg_device_uevent, }; /* * Central wireless core regulatory domains, we only need two, * the current one and a world regulatory domain in case we have no Loading Loading @@ -487,11 +483,16 @@ static inline void reg_regdb_query(const char *alpha2) {} /* * This lets us keep regulatory code which is updated on a regulatory * basis in userspace. Country information is filled in by * reg_device_uevent * basis in userspace. */ static int call_crda(const char *alpha2) { char country[12]; char *env[] = { country, NULL }; snprintf(country, sizeof(country), "COUNTRY=%c%c", alpha2[0], alpha2[1]); if (!is_world_regdom((char *) alpha2)) pr_info("Calling CRDA for country: %c%c\n", alpha2[0], alpha2[1]); Loading @@ -501,7 +502,7 @@ static int call_crda(const char *alpha2) /* query internal regulatory database (if it exists) */ reg_regdb_query(alpha2); return kobject_uevent(®_pdev->dev.kobj, KOBJ_CHANGE); return kobject_uevent_env(®_pdev->dev.kobj, KOBJ_CHANGE, env); } static enum reg_request_treatment Loading Loading @@ -2544,26 +2545,6 @@ int set_regdom(const struct ieee80211_regdomain *rd) return 0; } int reg_device_uevent(struct device *dev, struct kobj_uevent_env *env) { struct regulatory_request *lr; u8 alpha2[2]; bool add = false; rcu_read_lock(); lr = get_last_request(); if (lr && !lr->processed) { memcpy(alpha2, lr->alpha2, 2); add = true; } rcu_read_unlock(); if (add) return add_uevent_var(env, "COUNTRY=%c%c", alpha2[0], alpha2[1]); return 0; } void wiphy_regulatory_register(struct wiphy *wiphy) { struct regulatory_request *lr; Loading Loading @@ -2614,8 +2595,6 @@ int __init regulatory_init(void) if (IS_ERR(reg_pdev)) return PTR_ERR(reg_pdev); reg_pdev->dev.type = ®_device_type; spin_lock_init(®_requests_lock); spin_lock_init(®_pending_beacons_lock); Loading
net/wireless/reg.h +0 −1 Original line number Diff line number Diff line Loading @@ -26,7 +26,6 @@ enum nl80211_dfs_regions reg_get_dfs_region(struct wiphy *wiphy); int regulatory_hint_user(const char *alpha2, enum nl80211_user_reg_hint_type user_reg_hint_type); int reg_device_uevent(struct device *dev, struct kobj_uevent_env *env); void wiphy_regulatory_register(struct wiphy *wiphy); void wiphy_regulatory_deregister(struct wiphy *wiphy); Loading