diff options
Diffstat (limited to 'net/wireless')
-rw-r--r-- | net/wireless/core.c | 3 | ||||
-rw-r--r-- | net/wireless/ethtool.c | 4 | ||||
-rw-r--r-- | net/wireless/reg.c | 7 | ||||
-rw-r--r-- | net/wireless/sysfs.c | 4 | ||||
-rw-r--r-- | net/wireless/wext-proc.c | 5 |
5 files changed, 6 insertions, 17 deletions
diff --git a/net/wireless/core.c b/net/wireless/core.c index 33b75b9b8efa..5ffff039b017 100644 --- a/net/wireless/core.c +++ b/net/wireless/core.c | |||
@@ -875,8 +875,7 @@ static int cfg80211_netdev_notifier_call(struct notifier_block *nb, | |||
875 | /* allow mac80211 to determine the timeout */ | 875 | /* allow mac80211 to determine the timeout */ |
876 | wdev->ps_timeout = -1; | 876 | wdev->ps_timeout = -1; |
877 | 877 | ||
878 | if (!dev->ethtool_ops) | 878 | netdev_set_default_ethtool_ops(dev, &cfg80211_ethtool_ops); |
879 | dev->ethtool_ops = &cfg80211_ethtool_ops; | ||
880 | 879 | ||
881 | if ((wdev->iftype == NL80211_IFTYPE_STATION || | 880 | if ((wdev->iftype == NL80211_IFTYPE_STATION || |
882 | wdev->iftype == NL80211_IFTYPE_P2P_CLIENT || | 881 | wdev->iftype == NL80211_IFTYPE_P2P_CLIENT || |
diff --git a/net/wireless/ethtool.c b/net/wireless/ethtool.c index 48c48ffafa1d..e37862f1b127 100644 --- a/net/wireless/ethtool.c +++ b/net/wireless/ethtool.c | |||
@@ -15,10 +15,10 @@ static void cfg80211_get_drvinfo(struct net_device *dev, | |||
15 | strlcpy(info->version, init_utsname()->release, sizeof(info->version)); | 15 | strlcpy(info->version, init_utsname()->release, sizeof(info->version)); |
16 | 16 | ||
17 | if (wdev->wiphy->fw_version[0]) | 17 | if (wdev->wiphy->fw_version[0]) |
18 | strncpy(info->fw_version, wdev->wiphy->fw_version, | 18 | strlcpy(info->fw_version, wdev->wiphy->fw_version, |
19 | sizeof(info->fw_version)); | 19 | sizeof(info->fw_version)); |
20 | else | 20 | else |
21 | strncpy(info->fw_version, "N/A", sizeof(info->fw_version)); | 21 | strlcpy(info->fw_version, "N/A", sizeof(info->fw_version)); |
22 | 22 | ||
23 | strlcpy(info->bus_info, dev_name(wiphy_dev(wdev->wiphy)), | 23 | strlcpy(info->bus_info, dev_name(wiphy_dev(wdev->wiphy)), |
24 | sizeof(info->bus_info)); | 24 | sizeof(info->bus_info)); |
diff --git a/net/wireless/reg.c b/net/wireless/reg.c index 93ab840957a0..98532c00242d 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c | |||
@@ -2265,7 +2265,6 @@ int set_regdom(const struct ieee80211_regdomain *rd) | |||
2265 | return r; | 2265 | return r; |
2266 | } | 2266 | } |
2267 | 2267 | ||
2268 | #ifdef CONFIG_HOTPLUG | ||
2269 | int reg_device_uevent(struct device *dev, struct kobj_uevent_env *env) | 2268 | int reg_device_uevent(struct device *dev, struct kobj_uevent_env *env) |
2270 | { | 2269 | { |
2271 | struct regulatory_request *lr; | 2270 | struct regulatory_request *lr; |
@@ -2285,12 +2284,6 @@ int reg_device_uevent(struct device *dev, struct kobj_uevent_env *env) | |||
2285 | alpha2[0], alpha2[1]); | 2284 | alpha2[0], alpha2[1]); |
2286 | return 0; | 2285 | return 0; |
2287 | } | 2286 | } |
2288 | #else | ||
2289 | int reg_device_uevent(struct device *dev, struct kobj_uevent_env *env) | ||
2290 | { | ||
2291 | return -ENODEV; | ||
2292 | } | ||
2293 | #endif /* CONFIG_HOTPLUG */ | ||
2294 | 2287 | ||
2295 | void wiphy_regulatory_register(struct wiphy *wiphy) | 2288 | void wiphy_regulatory_register(struct wiphy *wiphy) |
2296 | { | 2289 | { |
diff --git a/net/wireless/sysfs.c b/net/wireless/sysfs.c index 73bf39f11314..238ee49b3868 100644 --- a/net/wireless/sysfs.c +++ b/net/wireless/sysfs.c | |||
@@ -77,13 +77,11 @@ static void wiphy_dev_release(struct device *dev) | |||
77 | cfg80211_dev_free(rdev); | 77 | cfg80211_dev_free(rdev); |
78 | } | 78 | } |
79 | 79 | ||
80 | #ifdef CONFIG_HOTPLUG | ||
81 | static int wiphy_uevent(struct device *dev, struct kobj_uevent_env *env) | 80 | static int wiphy_uevent(struct device *dev, struct kobj_uevent_env *env) |
82 | { | 81 | { |
83 | /* TODO, we probably need stuff here */ | 82 | /* TODO, we probably need stuff here */ |
84 | return 0; | 83 | return 0; |
85 | } | 84 | } |
86 | #endif | ||
87 | 85 | ||
88 | static int wiphy_suspend(struct device *dev, pm_message_t state) | 86 | static int wiphy_suspend(struct device *dev, pm_message_t state) |
89 | { | 87 | { |
@@ -132,9 +130,7 @@ struct class ieee80211_class = { | |||
132 | .owner = THIS_MODULE, | 130 | .owner = THIS_MODULE, |
133 | .dev_release = wiphy_dev_release, | 131 | .dev_release = wiphy_dev_release, |
134 | .dev_attrs = ieee80211_dev_attrs, | 132 | .dev_attrs = ieee80211_dev_attrs, |
135 | #ifdef CONFIG_HOTPLUG | ||
136 | .dev_uevent = wiphy_uevent, | 133 | .dev_uevent = wiphy_uevent, |
137 | #endif | ||
138 | .suspend = wiphy_suspend, | 134 | .suspend = wiphy_suspend, |
139 | .resume = wiphy_resume, | 135 | .resume = wiphy_resume, |
140 | .ns_type = &net_ns_type_operations, | 136 | .ns_type = &net_ns_type_operations, |
diff --git a/net/wireless/wext-proc.c b/net/wireless/wext-proc.c index 8bafa31fa9f8..e98a01c1034f 100644 --- a/net/wireless/wext-proc.c +++ b/net/wireless/wext-proc.c | |||
@@ -143,7 +143,8 @@ static const struct file_operations wireless_seq_fops = { | |||
143 | int __net_init wext_proc_init(struct net *net) | 143 | int __net_init wext_proc_init(struct net *net) |
144 | { | 144 | { |
145 | /* Create /proc/net/wireless entry */ | 145 | /* Create /proc/net/wireless entry */ |
146 | if (!proc_net_fops_create(net, "wireless", S_IRUGO, &wireless_seq_fops)) | 146 | if (!proc_create("wireless", S_IRUGO, net->proc_net, |
147 | &wireless_seq_fops)) | ||
147 | return -ENOMEM; | 148 | return -ENOMEM; |
148 | 149 | ||
149 | return 0; | 150 | return 0; |
@@ -151,5 +152,5 @@ int __net_init wext_proc_init(struct net *net) | |||
151 | 152 | ||
152 | void __net_exit wext_proc_exit(struct net *net) | 153 | void __net_exit wext_proc_exit(struct net *net) |
153 | { | 154 | { |
154 | proc_net_remove(net, "wireless"); | 155 | remove_proc_entry("wireless", net->proc_net); |
155 | } | 156 | } |