summaryrefslogtreecommitdiffstats
path: root/net/rose
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2001-01-10 17:17:53 +0000
committerRalf Baechle <ralf@linux-mips.org>2001-01-10 17:17:53 +0000
commitb2ad5f821b1381492d792ca10b1eb7a107b48f14 (patch)
tree954a648692e7da983db1d2470953705f6a729264 /net/rose
parentc9c06167e7933d93a6e396174c68abf242294abb (diff)
Merge with Linux 2.4.0-prerelease. Big Makefile rewrite, test your
Makefiles.
Diffstat (limited to 'net/rose')
-rw-r--r--net/rose/Makefile9
-rw-r--r--net/rose/af_rose.c11
-rw-r--r--net/rose/rose_dev.c3
-rw-r--r--net/rose/rose_in.c4
-rw-r--r--net/rose/rose_link.c4
-rw-r--r--net/rose/rose_loopback.c11
-rw-r--r--net/rose/rose_out.c4
-rw-r--r--net/rose/rose_route.c19
-rw-r--r--net/rose/rose_subr.c4
-rw-r--r--net/rose/rose_timer.c4
10 files changed, 13 insertions, 60 deletions
diff --git a/net/rose/Makefile b/net/rose/Makefile
index de3f1b257..7799143b0 100644
--- a/net/rose/Makefile
+++ b/net/rose/Makefile
@@ -8,13 +8,12 @@
# Note 2! The CFLAGS definition is now in the main makefile...
O_TARGET := rose.o
-O_OBJS := af_rose.o rose_dev.o rose_in.o rose_link.o rose_loopback.o \
+
+obj-y := af_rose.o rose_dev.o rose_in.o rose_link.o rose_loopback.o \
rose_out.o rose_route.o rose_subr.o rose_timer.o
-M_OBJS := $(O_TARGET)
+obj-m := $(O_TARGET)
-ifeq ($(CONFIG_SYSCTL),y)
-O_OBJS += sysctl_net_rose.o
-endif
+obj-$(CONFIG_SYSCTL) += sysctl_net_rose.o
include $(TOPDIR)/Rules.make
diff --git a/net/rose/af_rose.c b/net/rose/af_rose.c
index f639e578a..a92bf86f5 100644
--- a/net/rose/af_rose.c
+++ b/net/rose/af_rose.c
@@ -25,7 +25,6 @@
*/
#include <linux/config.h>
-#if defined(CONFIG_ROSE) || defined(CONFIG_ROSE_MODULE)
#include <linux/module.h>
#include <linux/init.h>
#include <linux/errno.h>
@@ -1448,7 +1447,7 @@ static int __init rose_proto_init(void)
sock_register(&rose_family_ops);
register_netdevice_notifier(&rose_dev_notifier);
- printk(KERN_INFO "F6FBB/G4KLX ROSE for Linux. Version 0.62 for AX25.037 Linux 2.1\n");
+ printk(KERN_INFO "F6FBB/G4KLX ROSE for Linux. Version 0.62 for AX25.037 Linux 2.4\n");
ax25_protocol_register(AX25_P_ROSE, rose_route_frame);
ax25_linkfail_register(rose_link_failed);
@@ -1460,17 +1459,14 @@ static int __init rose_proto_init(void)
rose_add_loopback_neigh();
-#ifdef CONFIG_PROC_FS
proc_net_create("rose", 0, rose_get_info);
proc_net_create("rose_neigh", 0, rose_neigh_get_info);
proc_net_create("rose_nodes", 0, rose_nodes_get_info);
proc_net_create("rose_routes", 0, rose_routes_get_info);
-#endif
return 0;
}
module_init(rose_proto_init);
-#ifdef MODULE
EXPORT_NO_SYMBOLS;
MODULE_PARM(rose_ndevs, "i");
@@ -1483,12 +1479,10 @@ static void __exit rose_exit(void)
{
int i;
-#ifdef CONFIG_PROC_FS
proc_net_remove("rose");
proc_net_remove("rose_neigh");
proc_net_remove("rose_nodes");
proc_net_remove("rose_routes");
-#endif
rose_loopback_clear();
rose_rt_free();
@@ -1518,7 +1512,4 @@ static void __exit rose_exit(void)
kfree(dev_rose);
}
module_exit(rose_exit);
-#endif /* MODULE */
-
-#endif
diff --git a/net/rose/rose_dev.c b/net/rose/rose_dev.c
index 88f2d55e7..92ad1e55a 100644
--- a/net/rose/rose_dev.c
+++ b/net/rose/rose_dev.c
@@ -15,7 +15,6 @@
*/
#include <linux/config.h>
-#if defined(CONFIG_ROSE) || defined(CONFIG_ROSE_MODULE)
#define __NO_VERSION__
#include <linux/module.h>
#include <linux/proc_fs.h>
@@ -205,5 +204,3 @@ int rose_init(struct net_device *dev)
return 0;
};
-
-#endif
diff --git a/net/rose/rose_in.c b/net/rose/rose_in.c
index be86c9e16..38fb76c1b 100644
--- a/net/rose/rose_in.c
+++ b/net/rose/rose_in.c
@@ -22,8 +22,6 @@
* Removed M bit processing.
*/
-#include <linux/config.h>
-#if defined(CONFIG_ROSE) || defined(CONFIG_ROSE_MODULE)
#include <linux/errno.h>
#include <linux/types.h>
#include <linux/socket.h>
@@ -303,5 +301,3 @@ int rose_process_rx_frame(struct sock *sk, struct sk_buff *skb)
return queued;
}
-
-#endif
diff --git a/net/rose/rose_link.c b/net/rose/rose_link.c
index d9b5a4a1d..2c793e4e6 100644
--- a/net/rose/rose_link.c
+++ b/net/rose/rose_link.c
@@ -14,8 +14,6 @@
* ROSE 003 Jonathan(G4KLX) New timer architecture.
*/
-#include <linux/config.h>
-#if defined(CONFIG_ROSE) || defined(CONFIG_ROSE_MODULE)
#include <linux/errno.h>
#include <linux/types.h>
#include <linux/socket.h>
@@ -322,5 +320,3 @@ void rose_transmit_link(struct sk_buff *skb, struct rose_neigh *neigh)
}
}
}
-
-#endif
diff --git a/net/rose/rose_loopback.c b/net/rose/rose_loopback.c
index 2136fd601..ad00608a3 100644
--- a/net/rose/rose_loopback.c
+++ b/net/rose/rose_loopback.c
@@ -14,14 +14,13 @@
*
*/
-#include <linux/config.h>
-#if defined(CONFIG_ROSE) || defined(CONFIG_ROSE_MODULE)
#include <linux/types.h>
#include <linux/socket.h>
#include <linux/timer.h>
#include <net/ax25.h>
#include <linux/skbuff.h>
#include <net/rose.h>
+#include <linux/init.h>
static struct sk_buff_head loopback_queue;
static struct timer_list loopback_timer;
@@ -107,9 +106,7 @@ static void rose_loopback_timer(unsigned long param)
}
}
-#ifdef MODULE
-
-void rose_loopback_clear(void)
+void __exit rose_loopback_clear(void)
{
struct sk_buff *skb;
@@ -120,7 +117,3 @@ void rose_loopback_clear(void)
kfree_skb(skb);
}
}
-
-#endif
-
-#endif
diff --git a/net/rose/rose_out.c b/net/rose/rose_out.c
index aea1d9f68..8f9855df7 100644
--- a/net/rose/rose_out.c
+++ b/net/rose/rose_out.c
@@ -15,8 +15,6 @@
* Removed M bit processing.
*/
-#include <linux/config.h>
-#if defined(CONFIG_ROSE) || defined(CONFIG_ROSE_MODULE)
#include <linux/errno.h>
#include <linux/types.h>
#include <linux/socket.h>
@@ -130,5 +128,3 @@ void rose_enquiry_response(struct sock *sk)
rose_stop_timer(sk);
}
-
-#endif
diff --git a/net/rose/rose_route.c b/net/rose/rose_route.c
index d5d4de9ec..1bedfdf0d 100644
--- a/net/rose/rose_route.c
+++ b/net/rose/rose_route.c
@@ -19,8 +19,6 @@
* Added use count to neighbours.
*/
-#include <linux/config.h>
-#if defined(CONFIG_ROSE) || defined(CONFIG_ROSE_MODULE)
#include <linux/errno.h>
#include <linux/types.h>
#include <linux/socket.h>
@@ -47,15 +45,16 @@
#include <linux/interrupt.h>
#include <linux/notifier.h>
#include <linux/netfilter.h>
+#include <linux/init.h>
#include <net/rose.h>
static unsigned int rose_neigh_no = 1;
-static struct rose_node *rose_node_list = NULL;
-static struct rose_neigh *rose_neigh_list = NULL;
-static struct rose_route *rose_route_list = NULL;
+static struct rose_node *rose_node_list;
+static struct rose_neigh *rose_neigh_list;
+static struct rose_route *rose_route_list;
-struct rose_neigh *rose_loopback_neigh = NULL;
+struct rose_neigh *rose_loopback_neigh;
static void rose_remove_neigh(struct rose_neigh *);
@@ -1126,12 +1125,10 @@ int rose_routes_get_info(char *buffer, char **start, off_t offset, int length)
return len;
}
-#ifdef MODULE
-
/*
* Release all memory associated with ROSE routing structures.
*/
-void rose_rt_free(void)
+void __exit rose_rt_free(void)
{
struct rose_neigh *s, *rose_neigh = rose_neigh_list;
struct rose_node *t, *rose_node = rose_node_list;
@@ -1158,7 +1155,3 @@ void rose_rt_free(void)
rose_remove_route(u);
}
}
-
-#endif
-
-#endif
diff --git a/net/rose/rose_subr.c b/net/rose/rose_subr.c
index dc172ac3b..384347a0e 100644
--- a/net/rose/rose_subr.c
+++ b/net/rose/rose_subr.c
@@ -15,8 +15,6 @@
* ROSE 003 Jonathan(G4KLX) Added use count to neighbours.
*/
-#include <linux/config.h>
-#if defined(CONFIG_ROSE) || defined(CONFIG_ROSE_MODULE)
#include <linux/errno.h>
#include <linux/types.h>
#include <linux/socket.h>
@@ -528,5 +526,3 @@ void rose_disconnect(struct sock *sk, int reason, int cause, int diagnostic)
sk->dead = 1;
}
-
-#endif
diff --git a/net/rose/rose_timer.c b/net/rose/rose_timer.c
index 718a64ec0..8bd30424d 100644
--- a/net/rose/rose_timer.c
+++ b/net/rose/rose_timer.c
@@ -15,8 +15,6 @@
* Implemented idle timer.
*/
-#include <linux/config.h>
-#if defined(CONFIG_ROSE) || defined(CONFIG_ROSE_MODULE)
#include <linux/errno.h>
#include <linux/types.h>
#include <linux/socket.h>
@@ -207,5 +205,3 @@ static void rose_idletimer_expiry(unsigned long param)
sk->dead = 1;
}
-
-#endif