diff options
author | WANG Cong <xiyou.wangcong@gmail.com> | 2014-07-23 19:09:10 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-07-25 02:33:55 -0400 |
commit | 6b53dafe23fd1f1228c7dd9b8a1323e757966160 (patch) | |
tree | 81c8a2bd2c85e5d6542bb34f038f510a21bf3396 /net/core/net-sysfs.c | |
parent | 7b18ef08ba58a91bef7149e64443397cfc2523f3 (diff) |
net: do not name the pointer to struct net_device net
"net" is normally for struct net*, pointer to struct net_device
should be named to either "dev" or "ndev" etc.
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/net-sysfs.c')
-rw-r--r-- | net/core/net-sysfs.c | 142 |
1 files changed, 71 insertions, 71 deletions
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c index 7752f2ad49a5..9dd06699b09c 100644 --- a/net/core/net-sysfs.c +++ b/net/core/net-sysfs.c | |||
@@ -43,12 +43,12 @@ static ssize_t netdev_show(const struct device *dev, | |||
43 | struct device_attribute *attr, char *buf, | 43 | struct device_attribute *attr, char *buf, |
44 | ssize_t (*format)(const struct net_device *, char *)) | 44 | ssize_t (*format)(const struct net_device *, char *)) |
45 | { | 45 | { |
46 | struct net_device *net = to_net_dev(dev); | 46 | struct net_device *ndev = to_net_dev(dev); |
47 | ssize_t ret = -EINVAL; | 47 | ssize_t ret = -EINVAL; |
48 | 48 | ||
49 | read_lock(&dev_base_lock); | 49 | read_lock(&dev_base_lock); |
50 | if (dev_isalive(net)) | 50 | if (dev_isalive(ndev)) |
51 | ret = (*format)(net, buf); | 51 | ret = (*format)(ndev, buf); |
52 | read_unlock(&dev_base_lock); | 52 | read_unlock(&dev_base_lock); |
53 | 53 | ||
54 | return ret; | 54 | return ret; |
@@ -56,9 +56,9 @@ static ssize_t netdev_show(const struct device *dev, | |||
56 | 56 | ||
57 | /* generate a show function for simple field */ | 57 | /* generate a show function for simple field */ |
58 | #define NETDEVICE_SHOW(field, format_string) \ | 58 | #define NETDEVICE_SHOW(field, format_string) \ |
59 | static ssize_t format_##field(const struct net_device *net, char *buf) \ | 59 | static ssize_t format_##field(const struct net_device *dev, char *buf) \ |
60 | { \ | 60 | { \ |
61 | return sprintf(buf, format_string, net->field); \ | 61 | return sprintf(buf, format_string, dev->field); \ |
62 | } \ | 62 | } \ |
63 | static ssize_t field##_show(struct device *dev, \ | 63 | static ssize_t field##_show(struct device *dev, \ |
64 | struct device_attribute *attr, char *buf) \ | 64 | struct device_attribute *attr, char *buf) \ |
@@ -112,19 +112,19 @@ NETDEVICE_SHOW_RO(ifindex, fmt_dec); | |||
112 | NETDEVICE_SHOW_RO(type, fmt_dec); | 112 | NETDEVICE_SHOW_RO(type, fmt_dec); |
113 | NETDEVICE_SHOW_RO(link_mode, fmt_dec); | 113 | NETDEVICE_SHOW_RO(link_mode, fmt_dec); |
114 | 114 | ||
115 | static ssize_t format_name_assign_type(const struct net_device *net, char *buf) | 115 | static ssize_t format_name_assign_type(const struct net_device *dev, char *buf) |
116 | { | 116 | { |
117 | return sprintf(buf, fmt_dec, net->name_assign_type); | 117 | return sprintf(buf, fmt_dec, dev->name_assign_type); |
118 | } | 118 | } |
119 | 119 | ||
120 | static ssize_t name_assign_type_show(struct device *dev, | 120 | static ssize_t name_assign_type_show(struct device *dev, |
121 | struct device_attribute *attr, | 121 | struct device_attribute *attr, |
122 | char *buf) | 122 | char *buf) |
123 | { | 123 | { |
124 | struct net_device *net = to_net_dev(dev); | 124 | struct net_device *ndev = to_net_dev(dev); |
125 | ssize_t ret = -EINVAL; | 125 | ssize_t ret = -EINVAL; |
126 | 126 | ||
127 | if (net->name_assign_type != NET_NAME_UNKNOWN) | 127 | if (ndev->name_assign_type != NET_NAME_UNKNOWN) |
128 | ret = netdev_show(dev, attr, buf, format_name_assign_type); | 128 | ret = netdev_show(dev, attr, buf, format_name_assign_type); |
129 | 129 | ||
130 | return ret; | 130 | return ret; |
@@ -135,12 +135,12 @@ static DEVICE_ATTR_RO(name_assign_type); | |||
135 | static ssize_t address_show(struct device *dev, struct device_attribute *attr, | 135 | static ssize_t address_show(struct device *dev, struct device_attribute *attr, |
136 | char *buf) | 136 | char *buf) |
137 | { | 137 | { |
138 | struct net_device *net = to_net_dev(dev); | 138 | struct net_device *ndev = to_net_dev(dev); |
139 | ssize_t ret = -EINVAL; | 139 | ssize_t ret = -EINVAL; |
140 | 140 | ||
141 | read_lock(&dev_base_lock); | 141 | read_lock(&dev_base_lock); |
142 | if (dev_isalive(net)) | 142 | if (dev_isalive(ndev)) |
143 | ret = sysfs_format_mac(buf, net->dev_addr, net->addr_len); | 143 | ret = sysfs_format_mac(buf, ndev->dev_addr, ndev->addr_len); |
144 | read_unlock(&dev_base_lock); | 144 | read_unlock(&dev_base_lock); |
145 | return ret; | 145 | return ret; |
146 | } | 146 | } |
@@ -149,18 +149,18 @@ static DEVICE_ATTR_RO(address); | |||
149 | static ssize_t broadcast_show(struct device *dev, | 149 | static ssize_t broadcast_show(struct device *dev, |
150 | struct device_attribute *attr, char *buf) | 150 | struct device_attribute *attr, char *buf) |
151 | { | 151 | { |
152 | struct net_device *net = to_net_dev(dev); | 152 | struct net_device *ndev = to_net_dev(dev); |
153 | if (dev_isalive(net)) | 153 | if (dev_isalive(ndev)) |
154 | return sysfs_format_mac(buf, net->broadcast, net->addr_len); | 154 | return sysfs_format_mac(buf, ndev->broadcast, ndev->addr_len); |
155 | return -EINVAL; | 155 | return -EINVAL; |
156 | } | 156 | } |
157 | static DEVICE_ATTR_RO(broadcast); | 157 | static DEVICE_ATTR_RO(broadcast); |
158 | 158 | ||
159 | static int change_carrier(struct net_device *net, unsigned long new_carrier) | 159 | static int change_carrier(struct net_device *dev, unsigned long new_carrier) |
160 | { | 160 | { |
161 | if (!netif_running(net)) | 161 | if (!netif_running(dev)) |
162 | return -EINVAL; | 162 | return -EINVAL; |
163 | return dev_change_carrier(net, (bool) new_carrier); | 163 | return dev_change_carrier(dev, (bool) new_carrier); |
164 | } | 164 | } |
165 | 165 | ||
166 | static ssize_t carrier_store(struct device *dev, struct device_attribute *attr, | 166 | static ssize_t carrier_store(struct device *dev, struct device_attribute *attr, |
@@ -284,9 +284,9 @@ static DEVICE_ATTR_RO(carrier_changes); | |||
284 | 284 | ||
285 | /* read-write attributes */ | 285 | /* read-write attributes */ |
286 | 286 | ||
287 | static int change_mtu(struct net_device *net, unsigned long new_mtu) | 287 | static int change_mtu(struct net_device *dev, unsigned long new_mtu) |
288 | { | 288 | { |
289 | return dev_set_mtu(net, (int) new_mtu); | 289 | return dev_set_mtu(dev, (int) new_mtu); |
290 | } | 290 | } |
291 | 291 | ||
292 | static ssize_t mtu_store(struct device *dev, struct device_attribute *attr, | 292 | static ssize_t mtu_store(struct device *dev, struct device_attribute *attr, |
@@ -296,9 +296,9 @@ static ssize_t mtu_store(struct device *dev, struct device_attribute *attr, | |||
296 | } | 296 | } |
297 | NETDEVICE_SHOW_RW(mtu, fmt_dec); | 297 | NETDEVICE_SHOW_RW(mtu, fmt_dec); |
298 | 298 | ||
299 | static int change_flags(struct net_device *net, unsigned long new_flags) | 299 | static int change_flags(struct net_device *dev, unsigned long new_flags) |
300 | { | 300 | { |
301 | return dev_change_flags(net, (unsigned int) new_flags); | 301 | return dev_change_flags(dev, (unsigned int) new_flags); |
302 | } | 302 | } |
303 | 303 | ||
304 | static ssize_t flags_store(struct device *dev, struct device_attribute *attr, | 304 | static ssize_t flags_store(struct device *dev, struct device_attribute *attr, |
@@ -308,9 +308,9 @@ static ssize_t flags_store(struct device *dev, struct device_attribute *attr, | |||
308 | } | 308 | } |
309 | NETDEVICE_SHOW_RW(flags, fmt_hex); | 309 | NETDEVICE_SHOW_RW(flags, fmt_hex); |
310 | 310 | ||
311 | static int change_tx_queue_len(struct net_device *net, unsigned long new_len) | 311 | static int change_tx_queue_len(struct net_device *dev, unsigned long new_len) |
312 | { | 312 | { |
313 | net->tx_queue_len = new_len; | 313 | dev->tx_queue_len = new_len; |
314 | return 0; | 314 | return 0; |
315 | } | 315 | } |
316 | 316 | ||
@@ -363,9 +363,9 @@ static ssize_t ifalias_show(struct device *dev, | |||
363 | } | 363 | } |
364 | static DEVICE_ATTR_RW(ifalias); | 364 | static DEVICE_ATTR_RW(ifalias); |
365 | 365 | ||
366 | static int change_group(struct net_device *net, unsigned long new_group) | 366 | static int change_group(struct net_device *dev, unsigned long new_group) |
367 | { | 367 | { |
368 | dev_set_group(net, (int) new_group); | 368 | dev_set_group(dev, (int) new_group); |
369 | return 0; | 369 | return 0; |
370 | } | 370 | } |
371 | 371 | ||
@@ -796,20 +796,20 @@ static struct kobj_type rx_queue_ktype = { | |||
796 | .namespace = rx_queue_namespace | 796 | .namespace = rx_queue_namespace |
797 | }; | 797 | }; |
798 | 798 | ||
799 | static int rx_queue_add_kobject(struct net_device *net, int index) | 799 | static int rx_queue_add_kobject(struct net_device *dev, int index) |
800 | { | 800 | { |
801 | struct netdev_rx_queue *queue = net->_rx + index; | 801 | struct netdev_rx_queue *queue = dev->_rx + index; |
802 | struct kobject *kobj = &queue->kobj; | 802 | struct kobject *kobj = &queue->kobj; |
803 | int error = 0; | 803 | int error = 0; |
804 | 804 | ||
805 | kobj->kset = net->queues_kset; | 805 | kobj->kset = dev->queues_kset; |
806 | error = kobject_init_and_add(kobj, &rx_queue_ktype, NULL, | 806 | error = kobject_init_and_add(kobj, &rx_queue_ktype, NULL, |
807 | "rx-%u", index); | 807 | "rx-%u", index); |
808 | if (error) | 808 | if (error) |
809 | goto exit; | 809 | goto exit; |
810 | 810 | ||
811 | if (net->sysfs_rx_queue_group) { | 811 | if (dev->sysfs_rx_queue_group) { |
812 | error = sysfs_create_group(kobj, net->sysfs_rx_queue_group); | 812 | error = sysfs_create_group(kobj, dev->sysfs_rx_queue_group); |
813 | if (error) | 813 | if (error) |
814 | goto exit; | 814 | goto exit; |
815 | } | 815 | } |
@@ -825,18 +825,18 @@ exit: | |||
825 | #endif /* CONFIG_SYSFS */ | 825 | #endif /* CONFIG_SYSFS */ |
826 | 826 | ||
827 | int | 827 | int |
828 | net_rx_queue_update_kobjects(struct net_device *net, int old_num, int new_num) | 828 | net_rx_queue_update_kobjects(struct net_device *dev, int old_num, int new_num) |
829 | { | 829 | { |
830 | #ifdef CONFIG_SYSFS | 830 | #ifdef CONFIG_SYSFS |
831 | int i; | 831 | int i; |
832 | int error = 0; | 832 | int error = 0; |
833 | 833 | ||
834 | #ifndef CONFIG_RPS | 834 | #ifndef CONFIG_RPS |
835 | if (!net->sysfs_rx_queue_group) | 835 | if (!dev->sysfs_rx_queue_group) |
836 | return 0; | 836 | return 0; |
837 | #endif | 837 | #endif |
838 | for (i = old_num; i < new_num; i++) { | 838 | for (i = old_num; i < new_num; i++) { |
839 | error = rx_queue_add_kobject(net, i); | 839 | error = rx_queue_add_kobject(dev, i); |
840 | if (error) { | 840 | if (error) { |
841 | new_num = old_num; | 841 | new_num = old_num; |
842 | break; | 842 | break; |
@@ -844,10 +844,10 @@ net_rx_queue_update_kobjects(struct net_device *net, int old_num, int new_num) | |||
844 | } | 844 | } |
845 | 845 | ||
846 | while (--i >= new_num) { | 846 | while (--i >= new_num) { |
847 | if (net->sysfs_rx_queue_group) | 847 | if (dev->sysfs_rx_queue_group) |
848 | sysfs_remove_group(&net->_rx[i].kobj, | 848 | sysfs_remove_group(&dev->_rx[i].kobj, |
849 | net->sysfs_rx_queue_group); | 849 | dev->sysfs_rx_queue_group); |
850 | kobject_put(&net->_rx[i].kobj); | 850 | kobject_put(&dev->_rx[i].kobj); |
851 | } | 851 | } |
852 | 852 | ||
853 | return error; | 853 | return error; |
@@ -1155,13 +1155,13 @@ static struct kobj_type netdev_queue_ktype = { | |||
1155 | .namespace = netdev_queue_namespace, | 1155 | .namespace = netdev_queue_namespace, |
1156 | }; | 1156 | }; |
1157 | 1157 | ||
1158 | static int netdev_queue_add_kobject(struct net_device *net, int index) | 1158 | static int netdev_queue_add_kobject(struct net_device *dev, int index) |
1159 | { | 1159 | { |
1160 | struct netdev_queue *queue = net->_tx + index; | 1160 | struct netdev_queue *queue = dev->_tx + index; |
1161 | struct kobject *kobj = &queue->kobj; | 1161 | struct kobject *kobj = &queue->kobj; |
1162 | int error = 0; | 1162 | int error = 0; |
1163 | 1163 | ||
1164 | kobj->kset = net->queues_kset; | 1164 | kobj->kset = dev->queues_kset; |
1165 | error = kobject_init_and_add(kobj, &netdev_queue_ktype, NULL, | 1165 | error = kobject_init_and_add(kobj, &netdev_queue_ktype, NULL, |
1166 | "tx-%u", index); | 1166 | "tx-%u", index); |
1167 | if (error) | 1167 | if (error) |
@@ -1184,14 +1184,14 @@ exit: | |||
1184 | #endif /* CONFIG_SYSFS */ | 1184 | #endif /* CONFIG_SYSFS */ |
1185 | 1185 | ||
1186 | int | 1186 | int |
1187 | netdev_queue_update_kobjects(struct net_device *net, int old_num, int new_num) | 1187 | netdev_queue_update_kobjects(struct net_device *dev, int old_num, int new_num) |
1188 | { | 1188 | { |
1189 | #ifdef CONFIG_SYSFS | 1189 | #ifdef CONFIG_SYSFS |
1190 | int i; | 1190 | int i; |
1191 | int error = 0; | 1191 | int error = 0; |
1192 | 1192 | ||
1193 | for (i = old_num; i < new_num; i++) { | 1193 | for (i = old_num; i < new_num; i++) { |
1194 | error = netdev_queue_add_kobject(net, i); | 1194 | error = netdev_queue_add_kobject(dev, i); |
1195 | if (error) { | 1195 | if (error) { |
1196 | new_num = old_num; | 1196 | new_num = old_num; |
1197 | break; | 1197 | break; |
@@ -1199,7 +1199,7 @@ netdev_queue_update_kobjects(struct net_device *net, int old_num, int new_num) | |||
1199 | } | 1199 | } |
1200 | 1200 | ||
1201 | while (--i >= new_num) { | 1201 | while (--i >= new_num) { |
1202 | struct netdev_queue *queue = net->_tx + i; | 1202 | struct netdev_queue *queue = dev->_tx + i; |
1203 | 1203 | ||
1204 | #ifdef CONFIG_BQL | 1204 | #ifdef CONFIG_BQL |
1205 | sysfs_remove_group(&queue->kobj, &dql_group); | 1205 | sysfs_remove_group(&queue->kobj, &dql_group); |
@@ -1213,25 +1213,25 @@ netdev_queue_update_kobjects(struct net_device *net, int old_num, int new_num) | |||
1213 | #endif /* CONFIG_SYSFS */ | 1213 | #endif /* CONFIG_SYSFS */ |
1214 | } | 1214 | } |
1215 | 1215 | ||
1216 | static int register_queue_kobjects(struct net_device *net) | 1216 | static int register_queue_kobjects(struct net_device *dev) |
1217 | { | 1217 | { |
1218 | int error = 0, txq = 0, rxq = 0, real_rx = 0, real_tx = 0; | 1218 | int error = 0, txq = 0, rxq = 0, real_rx = 0, real_tx = 0; |
1219 | 1219 | ||
1220 | #ifdef CONFIG_SYSFS | 1220 | #ifdef CONFIG_SYSFS |
1221 | net->queues_kset = kset_create_and_add("queues", | 1221 | dev->queues_kset = kset_create_and_add("queues", |
1222 | NULL, &net->dev.kobj); | 1222 | NULL, &dev->dev.kobj); |
1223 | if (!net->queues_kset) | 1223 | if (!dev->queues_kset) |
1224 | return -ENOMEM; | 1224 | return -ENOMEM; |
1225 | real_rx = net->real_num_rx_queues; | 1225 | real_rx = dev->real_num_rx_queues; |
1226 | #endif | 1226 | #endif |
1227 | real_tx = net->real_num_tx_queues; | 1227 | real_tx = dev->real_num_tx_queues; |
1228 | 1228 | ||
1229 | error = net_rx_queue_update_kobjects(net, 0, real_rx); | 1229 | error = net_rx_queue_update_kobjects(dev, 0, real_rx); |
1230 | if (error) | 1230 | if (error) |
1231 | goto error; | 1231 | goto error; |
1232 | rxq = real_rx; | 1232 | rxq = real_rx; |
1233 | 1233 | ||
1234 | error = netdev_queue_update_kobjects(net, 0, real_tx); | 1234 | error = netdev_queue_update_kobjects(dev, 0, real_tx); |
1235 | if (error) | 1235 | if (error) |
1236 | goto error; | 1236 | goto error; |
1237 | txq = real_tx; | 1237 | txq = real_tx; |
@@ -1239,24 +1239,24 @@ static int register_queue_kobjects(struct net_device *net) | |||
1239 | return 0; | 1239 | return 0; |
1240 | 1240 | ||
1241 | error: | 1241 | error: |
1242 | netdev_queue_update_kobjects(net, txq, 0); | 1242 | netdev_queue_update_kobjects(dev, txq, 0); |
1243 | net_rx_queue_update_kobjects(net, rxq, 0); | 1243 | net_rx_queue_update_kobjects(dev, rxq, 0); |
1244 | return error; | 1244 | return error; |
1245 | } | 1245 | } |
1246 | 1246 | ||
1247 | static void remove_queue_kobjects(struct net_device *net) | 1247 | static void remove_queue_kobjects(struct net_device *dev) |
1248 | { | 1248 | { |
1249 | int real_rx = 0, real_tx = 0; | 1249 | int real_rx = 0, real_tx = 0; |
1250 | 1250 | ||
1251 | #ifdef CONFIG_SYSFS | 1251 | #ifdef CONFIG_SYSFS |
1252 | real_rx = net->real_num_rx_queues; | 1252 | real_rx = dev->real_num_rx_queues; |
1253 | #endif | 1253 | #endif |
1254 | real_tx = net->real_num_tx_queues; | 1254 | real_tx = dev->real_num_tx_queues; |
1255 | 1255 | ||
1256 | net_rx_queue_update_kobjects(net, real_rx, 0); | 1256 | net_rx_queue_update_kobjects(dev, real_rx, 0); |
1257 | netdev_queue_update_kobjects(net, real_tx, 0); | 1257 | netdev_queue_update_kobjects(dev, real_tx, 0); |
1258 | #ifdef CONFIG_SYSFS | 1258 | #ifdef CONFIG_SYSFS |
1259 | kset_unregister(net->queues_kset); | 1259 | kset_unregister(dev->queues_kset); |
1260 | #endif | 1260 | #endif |
1261 | } | 1261 | } |
1262 | 1262 | ||
@@ -1349,13 +1349,13 @@ static struct class net_class = { | |||
1349 | /* Delete sysfs entries but hold kobject reference until after all | 1349 | /* Delete sysfs entries but hold kobject reference until after all |
1350 | * netdev references are gone. | 1350 | * netdev references are gone. |
1351 | */ | 1351 | */ |
1352 | void netdev_unregister_kobject(struct net_device * net) | 1352 | void netdev_unregister_kobject(struct net_device *ndev) |
1353 | { | 1353 | { |
1354 | struct device *dev = &(net->dev); | 1354 | struct device *dev = &(ndev->dev); |
1355 | 1355 | ||
1356 | kobject_get(&dev->kobj); | 1356 | kobject_get(&dev->kobj); |
1357 | 1357 | ||
1358 | remove_queue_kobjects(net); | 1358 | remove_queue_kobjects(ndev); |
1359 | 1359 | ||
1360 | pm_runtime_set_memalloc_noio(dev, false); | 1360 | pm_runtime_set_memalloc_noio(dev, false); |
1361 | 1361 | ||
@@ -1363,18 +1363,18 @@ void netdev_unregister_kobject(struct net_device * net) | |||
1363 | } | 1363 | } |
1364 | 1364 | ||
1365 | /* Create sysfs entries for network device. */ | 1365 | /* Create sysfs entries for network device. */ |
1366 | int netdev_register_kobject(struct net_device *net) | 1366 | int netdev_register_kobject(struct net_device *ndev) |
1367 | { | 1367 | { |
1368 | struct device *dev = &(net->dev); | 1368 | struct device *dev = &(ndev->dev); |
1369 | const struct attribute_group **groups = net->sysfs_groups; | 1369 | const struct attribute_group **groups = ndev->sysfs_groups; |
1370 | int error = 0; | 1370 | int error = 0; |
1371 | 1371 | ||
1372 | device_initialize(dev); | 1372 | device_initialize(dev); |
1373 | dev->class = &net_class; | 1373 | dev->class = &net_class; |
1374 | dev->platform_data = net; | 1374 | dev->platform_data = ndev; |
1375 | dev->groups = groups; | 1375 | dev->groups = groups; |
1376 | 1376 | ||
1377 | dev_set_name(dev, "%s", net->name); | 1377 | dev_set_name(dev, "%s", ndev->name); |
1378 | 1378 | ||
1379 | #ifdef CONFIG_SYSFS | 1379 | #ifdef CONFIG_SYSFS |
1380 | /* Allow for a device specific group */ | 1380 | /* Allow for a device specific group */ |
@@ -1384,10 +1384,10 @@ int netdev_register_kobject(struct net_device *net) | |||
1384 | *groups++ = &netstat_group; | 1384 | *groups++ = &netstat_group; |
1385 | 1385 | ||
1386 | #if IS_ENABLED(CONFIG_WIRELESS_EXT) || IS_ENABLED(CONFIG_CFG80211) | 1386 | #if IS_ENABLED(CONFIG_WIRELESS_EXT) || IS_ENABLED(CONFIG_CFG80211) |
1387 | if (net->ieee80211_ptr) | 1387 | if (ndev->ieee80211_ptr) |
1388 | *groups++ = &wireless_group; | 1388 | *groups++ = &wireless_group; |
1389 | #if IS_ENABLED(CONFIG_WIRELESS_EXT) | 1389 | #if IS_ENABLED(CONFIG_WIRELESS_EXT) |
1390 | else if (net->wireless_handlers) | 1390 | else if (ndev->wireless_handlers) |
1391 | *groups++ = &wireless_group; | 1391 | *groups++ = &wireless_group; |
1392 | #endif | 1392 | #endif |
1393 | #endif | 1393 | #endif |
@@ -1397,7 +1397,7 @@ int netdev_register_kobject(struct net_device *net) | |||
1397 | if (error) | 1397 | if (error) |
1398 | return error; | 1398 | return error; |
1399 | 1399 | ||
1400 | error = register_queue_kobjects(net); | 1400 | error = register_queue_kobjects(ndev); |
1401 | if (error) { | 1401 | if (error) { |
1402 | device_del(dev); | 1402 | device_del(dev); |
1403 | return error; | 1403 | return error; |