diff options
Diffstat (limited to 'net/core/net-sysfs.c')
-rw-r--r-- | net/core/net-sysfs.c | 154 |
1 files changed, 87 insertions, 67 deletions
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c index 1cac29ebb05b..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,16 +112,35 @@ 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 *dev, char *buf) | ||
116 | { | ||
117 | return sprintf(buf, fmt_dec, dev->name_assign_type); | ||
118 | } | ||
119 | |||
120 | static ssize_t name_assign_type_show(struct device *dev, | ||
121 | struct device_attribute *attr, | ||
122 | char *buf) | ||
123 | { | ||
124 | struct net_device *ndev = to_net_dev(dev); | ||
125 | ssize_t ret = -EINVAL; | ||
126 | |||
127 | if (ndev->name_assign_type != NET_NAME_UNKNOWN) | ||
128 | ret = netdev_show(dev, attr, buf, format_name_assign_type); | ||
129 | |||
130 | return ret; | ||
131 | } | ||
132 | static DEVICE_ATTR_RO(name_assign_type); | ||
133 | |||
115 | /* use same locking rules as GIFHWADDR ioctl's */ | 134 | /* use same locking rules as GIFHWADDR ioctl's */ |
116 | 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, |
117 | char *buf) | 136 | char *buf) |
118 | { | 137 | { |
119 | struct net_device *net = to_net_dev(dev); | 138 | struct net_device *ndev = to_net_dev(dev); |
120 | ssize_t ret = -EINVAL; | 139 | ssize_t ret = -EINVAL; |
121 | 140 | ||
122 | read_lock(&dev_base_lock); | 141 | read_lock(&dev_base_lock); |
123 | if (dev_isalive(net)) | 142 | if (dev_isalive(ndev)) |
124 | ret = sysfs_format_mac(buf, net->dev_addr, net->addr_len); | 143 | ret = sysfs_format_mac(buf, ndev->dev_addr, ndev->addr_len); |
125 | read_unlock(&dev_base_lock); | 144 | read_unlock(&dev_base_lock); |
126 | return ret; | 145 | return ret; |
127 | } | 146 | } |
@@ -130,18 +149,18 @@ static DEVICE_ATTR_RO(address); | |||
130 | static ssize_t broadcast_show(struct device *dev, | 149 | static ssize_t broadcast_show(struct device *dev, |
131 | struct device_attribute *attr, char *buf) | 150 | struct device_attribute *attr, char *buf) |
132 | { | 151 | { |
133 | struct net_device *net = to_net_dev(dev); | 152 | struct net_device *ndev = to_net_dev(dev); |
134 | if (dev_isalive(net)) | 153 | if (dev_isalive(ndev)) |
135 | return sysfs_format_mac(buf, net->broadcast, net->addr_len); | 154 | return sysfs_format_mac(buf, ndev->broadcast, ndev->addr_len); |
136 | return -EINVAL; | 155 | return -EINVAL; |
137 | } | 156 | } |
138 | static DEVICE_ATTR_RO(broadcast); | 157 | static DEVICE_ATTR_RO(broadcast); |
139 | 158 | ||
140 | 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) |
141 | { | 160 | { |
142 | if (!netif_running(net)) | 161 | if (!netif_running(dev)) |
143 | return -EINVAL; | 162 | return -EINVAL; |
144 | return dev_change_carrier(net, (bool) new_carrier); | 163 | return dev_change_carrier(dev, (bool) new_carrier); |
145 | } | 164 | } |
146 | 165 | ||
147 | 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, |
@@ -265,9 +284,9 @@ static DEVICE_ATTR_RO(carrier_changes); | |||
265 | 284 | ||
266 | /* read-write attributes */ | 285 | /* read-write attributes */ |
267 | 286 | ||
268 | 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) |
269 | { | 288 | { |
270 | return dev_set_mtu(net, (int) new_mtu); | 289 | return dev_set_mtu(dev, (int) new_mtu); |
271 | } | 290 | } |
272 | 291 | ||
273 | 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, |
@@ -277,9 +296,9 @@ static ssize_t mtu_store(struct device *dev, struct device_attribute *attr, | |||
277 | } | 296 | } |
278 | NETDEVICE_SHOW_RW(mtu, fmt_dec); | 297 | NETDEVICE_SHOW_RW(mtu, fmt_dec); |
279 | 298 | ||
280 | 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) |
281 | { | 300 | { |
282 | return dev_change_flags(net, (unsigned int) new_flags); | 301 | return dev_change_flags(dev, (unsigned int) new_flags); |
283 | } | 302 | } |
284 | 303 | ||
285 | 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, |
@@ -289,9 +308,9 @@ static ssize_t flags_store(struct device *dev, struct device_attribute *attr, | |||
289 | } | 308 | } |
290 | NETDEVICE_SHOW_RW(flags, fmt_hex); | 309 | NETDEVICE_SHOW_RW(flags, fmt_hex); |
291 | 310 | ||
292 | 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) |
293 | { | 312 | { |
294 | net->tx_queue_len = new_len; | 313 | dev->tx_queue_len = new_len; |
295 | return 0; | 314 | return 0; |
296 | } | 315 | } |
297 | 316 | ||
@@ -344,9 +363,9 @@ static ssize_t ifalias_show(struct device *dev, | |||
344 | } | 363 | } |
345 | static DEVICE_ATTR_RW(ifalias); | 364 | static DEVICE_ATTR_RW(ifalias); |
346 | 365 | ||
347 | 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) |
348 | { | 367 | { |
349 | dev_set_group(net, (int) new_group); | 368 | dev_set_group(dev, (int) new_group); |
350 | return 0; | 369 | return 0; |
351 | } | 370 | } |
352 | 371 | ||
@@ -387,6 +406,7 @@ static struct attribute *net_class_attrs[] = { | |||
387 | &dev_attr_dev_port.attr, | 406 | &dev_attr_dev_port.attr, |
388 | &dev_attr_iflink.attr, | 407 | &dev_attr_iflink.attr, |
389 | &dev_attr_ifindex.attr, | 408 | &dev_attr_ifindex.attr, |
409 | &dev_attr_name_assign_type.attr, | ||
390 | &dev_attr_addr_assign_type.attr, | 410 | &dev_attr_addr_assign_type.attr, |
391 | &dev_attr_addr_len.attr, | 411 | &dev_attr_addr_len.attr, |
392 | &dev_attr_link_mode.attr, | 412 | &dev_attr_link_mode.attr, |
@@ -776,20 +796,20 @@ static struct kobj_type rx_queue_ktype = { | |||
776 | .namespace = rx_queue_namespace | 796 | .namespace = rx_queue_namespace |
777 | }; | 797 | }; |
778 | 798 | ||
779 | 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) |
780 | { | 800 | { |
781 | struct netdev_rx_queue *queue = net->_rx + index; | 801 | struct netdev_rx_queue *queue = dev->_rx + index; |
782 | struct kobject *kobj = &queue->kobj; | 802 | struct kobject *kobj = &queue->kobj; |
783 | int error = 0; | 803 | int error = 0; |
784 | 804 | ||
785 | kobj->kset = net->queues_kset; | 805 | kobj->kset = dev->queues_kset; |
786 | error = kobject_init_and_add(kobj, &rx_queue_ktype, NULL, | 806 | error = kobject_init_and_add(kobj, &rx_queue_ktype, NULL, |
787 | "rx-%u", index); | 807 | "rx-%u", index); |
788 | if (error) | 808 | if (error) |
789 | goto exit; | 809 | goto exit; |
790 | 810 | ||
791 | if (net->sysfs_rx_queue_group) { | 811 | if (dev->sysfs_rx_queue_group) { |
792 | error = sysfs_create_group(kobj, net->sysfs_rx_queue_group); | 812 | error = sysfs_create_group(kobj, dev->sysfs_rx_queue_group); |
793 | if (error) | 813 | if (error) |
794 | goto exit; | 814 | goto exit; |
795 | } | 815 | } |
@@ -805,18 +825,18 @@ exit: | |||
805 | #endif /* CONFIG_SYSFS */ | 825 | #endif /* CONFIG_SYSFS */ |
806 | 826 | ||
807 | int | 827 | int |
808 | 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) |
809 | { | 829 | { |
810 | #ifdef CONFIG_SYSFS | 830 | #ifdef CONFIG_SYSFS |
811 | int i; | 831 | int i; |
812 | int error = 0; | 832 | int error = 0; |
813 | 833 | ||
814 | #ifndef CONFIG_RPS | 834 | #ifndef CONFIG_RPS |
815 | if (!net->sysfs_rx_queue_group) | 835 | if (!dev->sysfs_rx_queue_group) |
816 | return 0; | 836 | return 0; |
817 | #endif | 837 | #endif |
818 | for (i = old_num; i < new_num; i++) { | 838 | for (i = old_num; i < new_num; i++) { |
819 | error = rx_queue_add_kobject(net, i); | 839 | error = rx_queue_add_kobject(dev, i); |
820 | if (error) { | 840 | if (error) { |
821 | new_num = old_num; | 841 | new_num = old_num; |
822 | break; | 842 | break; |
@@ -824,10 +844,10 @@ net_rx_queue_update_kobjects(struct net_device *net, int old_num, int new_num) | |||
824 | } | 844 | } |
825 | 845 | ||
826 | while (--i >= new_num) { | 846 | while (--i >= new_num) { |
827 | if (net->sysfs_rx_queue_group) | 847 | if (dev->sysfs_rx_queue_group) |
828 | sysfs_remove_group(&net->_rx[i].kobj, | 848 | sysfs_remove_group(&dev->_rx[i].kobj, |
829 | net->sysfs_rx_queue_group); | 849 | dev->sysfs_rx_queue_group); |
830 | kobject_put(&net->_rx[i].kobj); | 850 | kobject_put(&dev->_rx[i].kobj); |
831 | } | 851 | } |
832 | 852 | ||
833 | return error; | 853 | return error; |
@@ -1135,13 +1155,13 @@ static struct kobj_type netdev_queue_ktype = { | |||
1135 | .namespace = netdev_queue_namespace, | 1155 | .namespace = netdev_queue_namespace, |
1136 | }; | 1156 | }; |
1137 | 1157 | ||
1138 | 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) |
1139 | { | 1159 | { |
1140 | struct netdev_queue *queue = net->_tx + index; | 1160 | struct netdev_queue *queue = dev->_tx + index; |
1141 | struct kobject *kobj = &queue->kobj; | 1161 | struct kobject *kobj = &queue->kobj; |
1142 | int error = 0; | 1162 | int error = 0; |
1143 | 1163 | ||
1144 | kobj->kset = net->queues_kset; | 1164 | kobj->kset = dev->queues_kset; |
1145 | error = kobject_init_and_add(kobj, &netdev_queue_ktype, NULL, | 1165 | error = kobject_init_and_add(kobj, &netdev_queue_ktype, NULL, |
1146 | "tx-%u", index); | 1166 | "tx-%u", index); |
1147 | if (error) | 1167 | if (error) |
@@ -1164,14 +1184,14 @@ exit: | |||
1164 | #endif /* CONFIG_SYSFS */ | 1184 | #endif /* CONFIG_SYSFS */ |
1165 | 1185 | ||
1166 | int | 1186 | int |
1167 | 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) |
1168 | { | 1188 | { |
1169 | #ifdef CONFIG_SYSFS | 1189 | #ifdef CONFIG_SYSFS |
1170 | int i; | 1190 | int i; |
1171 | int error = 0; | 1191 | int error = 0; |
1172 | 1192 | ||
1173 | for (i = old_num; i < new_num; i++) { | 1193 | for (i = old_num; i < new_num; i++) { |
1174 | error = netdev_queue_add_kobject(net, i); | 1194 | error = netdev_queue_add_kobject(dev, i); |
1175 | if (error) { | 1195 | if (error) { |
1176 | new_num = old_num; | 1196 | new_num = old_num; |
1177 | break; | 1197 | break; |
@@ -1179,7 +1199,7 @@ netdev_queue_update_kobjects(struct net_device *net, int old_num, int new_num) | |||
1179 | } | 1199 | } |
1180 | 1200 | ||
1181 | while (--i >= new_num) { | 1201 | while (--i >= new_num) { |
1182 | struct netdev_queue *queue = net->_tx + i; | 1202 | struct netdev_queue *queue = dev->_tx + i; |
1183 | 1203 | ||
1184 | #ifdef CONFIG_BQL | 1204 | #ifdef CONFIG_BQL |
1185 | sysfs_remove_group(&queue->kobj, &dql_group); | 1205 | sysfs_remove_group(&queue->kobj, &dql_group); |
@@ -1193,25 +1213,25 @@ netdev_queue_update_kobjects(struct net_device *net, int old_num, int new_num) | |||
1193 | #endif /* CONFIG_SYSFS */ | 1213 | #endif /* CONFIG_SYSFS */ |
1194 | } | 1214 | } |
1195 | 1215 | ||
1196 | static int register_queue_kobjects(struct net_device *net) | 1216 | static int register_queue_kobjects(struct net_device *dev) |
1197 | { | 1217 | { |
1198 | 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; |
1199 | 1219 | ||
1200 | #ifdef CONFIG_SYSFS | 1220 | #ifdef CONFIG_SYSFS |
1201 | net->queues_kset = kset_create_and_add("queues", | 1221 | dev->queues_kset = kset_create_and_add("queues", |
1202 | NULL, &net->dev.kobj); | 1222 | NULL, &dev->dev.kobj); |
1203 | if (!net->queues_kset) | 1223 | if (!dev->queues_kset) |
1204 | return -ENOMEM; | 1224 | return -ENOMEM; |
1205 | real_rx = net->real_num_rx_queues; | 1225 | real_rx = dev->real_num_rx_queues; |
1206 | #endif | 1226 | #endif |
1207 | real_tx = net->real_num_tx_queues; | 1227 | real_tx = dev->real_num_tx_queues; |
1208 | 1228 | ||
1209 | error = net_rx_queue_update_kobjects(net, 0, real_rx); | 1229 | error = net_rx_queue_update_kobjects(dev, 0, real_rx); |
1210 | if (error) | 1230 | if (error) |
1211 | goto error; | 1231 | goto error; |
1212 | rxq = real_rx; | 1232 | rxq = real_rx; |
1213 | 1233 | ||
1214 | error = netdev_queue_update_kobjects(net, 0, real_tx); | 1234 | error = netdev_queue_update_kobjects(dev, 0, real_tx); |
1215 | if (error) | 1235 | if (error) |
1216 | goto error; | 1236 | goto error; |
1217 | txq = real_tx; | 1237 | txq = real_tx; |
@@ -1219,24 +1239,24 @@ static int register_queue_kobjects(struct net_device *net) | |||
1219 | return 0; | 1239 | return 0; |
1220 | 1240 | ||
1221 | error: | 1241 | error: |
1222 | netdev_queue_update_kobjects(net, txq, 0); | 1242 | netdev_queue_update_kobjects(dev, txq, 0); |
1223 | net_rx_queue_update_kobjects(net, rxq, 0); | 1243 | net_rx_queue_update_kobjects(dev, rxq, 0); |
1224 | return error; | 1244 | return error; |
1225 | } | 1245 | } |
1226 | 1246 | ||
1227 | static void remove_queue_kobjects(struct net_device *net) | 1247 | static void remove_queue_kobjects(struct net_device *dev) |
1228 | { | 1248 | { |
1229 | int real_rx = 0, real_tx = 0; | 1249 | int real_rx = 0, real_tx = 0; |
1230 | 1250 | ||
1231 | #ifdef CONFIG_SYSFS | 1251 | #ifdef CONFIG_SYSFS |
1232 | real_rx = net->real_num_rx_queues; | 1252 | real_rx = dev->real_num_rx_queues; |
1233 | #endif | 1253 | #endif |
1234 | real_tx = net->real_num_tx_queues; | 1254 | real_tx = dev->real_num_tx_queues; |
1235 | 1255 | ||
1236 | net_rx_queue_update_kobjects(net, real_rx, 0); | 1256 | net_rx_queue_update_kobjects(dev, real_rx, 0); |
1237 | netdev_queue_update_kobjects(net, real_tx, 0); | 1257 | netdev_queue_update_kobjects(dev, real_tx, 0); |
1238 | #ifdef CONFIG_SYSFS | 1258 | #ifdef CONFIG_SYSFS |
1239 | kset_unregister(net->queues_kset); | 1259 | kset_unregister(dev->queues_kset); |
1240 | #endif | 1260 | #endif |
1241 | } | 1261 | } |
1242 | 1262 | ||
@@ -1329,13 +1349,13 @@ static struct class net_class = { | |||
1329 | /* Delete sysfs entries but hold kobject reference until after all | 1349 | /* Delete sysfs entries but hold kobject reference until after all |
1330 | * netdev references are gone. | 1350 | * netdev references are gone. |
1331 | */ | 1351 | */ |
1332 | void netdev_unregister_kobject(struct net_device * net) | 1352 | void netdev_unregister_kobject(struct net_device *ndev) |
1333 | { | 1353 | { |
1334 | struct device *dev = &(net->dev); | 1354 | struct device *dev = &(ndev->dev); |
1335 | 1355 | ||
1336 | kobject_get(&dev->kobj); | 1356 | kobject_get(&dev->kobj); |
1337 | 1357 | ||
1338 | remove_queue_kobjects(net); | 1358 | remove_queue_kobjects(ndev); |
1339 | 1359 | ||
1340 | pm_runtime_set_memalloc_noio(dev, false); | 1360 | pm_runtime_set_memalloc_noio(dev, false); |
1341 | 1361 | ||
@@ -1343,18 +1363,18 @@ void netdev_unregister_kobject(struct net_device * net) | |||
1343 | } | 1363 | } |
1344 | 1364 | ||
1345 | /* Create sysfs entries for network device. */ | 1365 | /* Create sysfs entries for network device. */ |
1346 | int netdev_register_kobject(struct net_device *net) | 1366 | int netdev_register_kobject(struct net_device *ndev) |
1347 | { | 1367 | { |
1348 | struct device *dev = &(net->dev); | 1368 | struct device *dev = &(ndev->dev); |
1349 | const struct attribute_group **groups = net->sysfs_groups; | 1369 | const struct attribute_group **groups = ndev->sysfs_groups; |
1350 | int error = 0; | 1370 | int error = 0; |
1351 | 1371 | ||
1352 | device_initialize(dev); | 1372 | device_initialize(dev); |
1353 | dev->class = &net_class; | 1373 | dev->class = &net_class; |
1354 | dev->platform_data = net; | 1374 | dev->platform_data = ndev; |
1355 | dev->groups = groups; | 1375 | dev->groups = groups; |
1356 | 1376 | ||
1357 | dev_set_name(dev, "%s", net->name); | 1377 | dev_set_name(dev, "%s", ndev->name); |
1358 | 1378 | ||
1359 | #ifdef CONFIG_SYSFS | 1379 | #ifdef CONFIG_SYSFS |
1360 | /* Allow for a device specific group */ | 1380 | /* Allow for a device specific group */ |
@@ -1364,10 +1384,10 @@ int netdev_register_kobject(struct net_device *net) | |||
1364 | *groups++ = &netstat_group; | 1384 | *groups++ = &netstat_group; |
1365 | 1385 | ||
1366 | #if IS_ENABLED(CONFIG_WIRELESS_EXT) || IS_ENABLED(CONFIG_CFG80211) | 1386 | #if IS_ENABLED(CONFIG_WIRELESS_EXT) || IS_ENABLED(CONFIG_CFG80211) |
1367 | if (net->ieee80211_ptr) | 1387 | if (ndev->ieee80211_ptr) |
1368 | *groups++ = &wireless_group; | 1388 | *groups++ = &wireless_group; |
1369 | #if IS_ENABLED(CONFIG_WIRELESS_EXT) | 1389 | #if IS_ENABLED(CONFIG_WIRELESS_EXT) |
1370 | else if (net->wireless_handlers) | 1390 | else if (ndev->wireless_handlers) |
1371 | *groups++ = &wireless_group; | 1391 | *groups++ = &wireless_group; |
1372 | #endif | 1392 | #endif |
1373 | #endif | 1393 | #endif |
@@ -1377,7 +1397,7 @@ int netdev_register_kobject(struct net_device *net) | |||
1377 | if (error) | 1397 | if (error) |
1378 | return error; | 1398 | return error; |
1379 | 1399 | ||
1380 | error = register_queue_kobjects(net); | 1400 | error = register_queue_kobjects(ndev); |
1381 | if (error) { | 1401 | if (error) { |
1382 | device_del(dev); | 1402 | device_del(dev); |
1383 | return error; | 1403 | return error; |