diff options
Diffstat (limited to 'net/netrom/af_netrom.c')
-rw-r--r-- | net/netrom/af_netrom.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/net/netrom/af_netrom.c b/net/netrom/af_netrom.c index 1d50f801f181..43bbe2c9e49a 100644 --- a/net/netrom/af_netrom.c +++ b/net/netrom/af_netrom.c | |||
@@ -1377,6 +1377,15 @@ static struct notifier_block nr_dev_notifier = { | |||
1377 | 1377 | ||
1378 | static struct net_device **dev_nr; | 1378 | static struct net_device **dev_nr; |
1379 | 1379 | ||
1380 | static struct ax25_protocol nr_pid = { | ||
1381 | .pid = AX25_P_NETROM, | ||
1382 | .func = nr_route_frame | ||
1383 | }; | ||
1384 | |||
1385 | static struct ax25_linkfail nr_linkfail_notifier = { | ||
1386 | .func = nr_link_failed, | ||
1387 | }; | ||
1388 | |||
1380 | static int __init nr_proto_init(void) | 1389 | static int __init nr_proto_init(void) |
1381 | { | 1390 | { |
1382 | int i; | 1391 | int i; |
@@ -1424,8 +1433,8 @@ static int __init nr_proto_init(void) | |||
1424 | 1433 | ||
1425 | register_netdevice_notifier(&nr_dev_notifier); | 1434 | register_netdevice_notifier(&nr_dev_notifier); |
1426 | 1435 | ||
1427 | ax25_protocol_register(AX25_P_NETROM, nr_route_frame); | 1436 | ax25_register_pid(&nr_pid); |
1428 | ax25_linkfail_register(nr_link_failed); | 1437 | ax25_linkfail_register(&nr_linkfail_notifier); |
1429 | 1438 | ||
1430 | #ifdef CONFIG_SYSCTL | 1439 | #ifdef CONFIG_SYSCTL |
1431 | nr_register_sysctl(); | 1440 | nr_register_sysctl(); |
@@ -1474,7 +1483,7 @@ static void __exit nr_exit(void) | |||
1474 | nr_unregister_sysctl(); | 1483 | nr_unregister_sysctl(); |
1475 | #endif | 1484 | #endif |
1476 | 1485 | ||
1477 | ax25_linkfail_release(nr_link_failed); | 1486 | ax25_linkfail_release(&nr_linkfail_notifier); |
1478 | ax25_protocol_release(AX25_P_NETROM); | 1487 | ax25_protocol_release(AX25_P_NETROM); |
1479 | 1488 | ||
1480 | unregister_netdevice_notifier(&nr_dev_notifier); | 1489 | unregister_netdevice_notifier(&nr_dev_notifier); |