From: Hans Grobler (vvdvhfdv@mx.dy.fi)
Date: Mon Dec 18 2000 - 18:16:05 EET
ax25-2.4.0-test13-pre3-patch-v1:
= ax25.h:
- ax25_register_sysctl, ax25_unregister_sysctl:
wrapped in conditional that will handle the case when
sysctl is not configured.
= af_ax25.c:
- ax25_init, ax25_exit:
removed CONFIG_SYSCTL conditionals (making code cleaner?)
= ax25_dev.c:
- CONFIG_AX25, CONFIG_AX25_MODULE:
removed unnecessary conditionals (the Makefiles handle this)
- ax25_dev_list:
removed explicit initialization as per linux 2.4.
- ax25_dev_device_up, ax25_dev_device_down:
removed CONFIG_SYSCTL conditionals (making code cleaner?)
- ax25_dev_free:
converted to linux2.4 "__exit" function & removed MODULE
conditional.
= ax25_ds_*:
- CONFIG_AX25_DAMA_SLAVE:
removed unnecessary conditional (the Makefiles handle this)
= ax25_iface.c:
- CONFIG_AX25, CONFIG_AX25_MODULE:
removed unnecessary conditionals (the Makefiles handle this)
- protocol_list,listen_list:
removed explicit initialization as per linux 2.4.
= ax25_addr, ax25_in.c, ax25_ip.c, ax25_out.c, ax25_timer, ax25_std_*:
- CONFIG_AX25, CONFIG_AX25_MODULE:
removed unnecessary conditionals (the Makefiles handle this)
= ax25_route.c
- CONFIG_AX25, CONFIG_AX25_MODULE:
removed unnecessary conditionals (the Makefiles handle this)
- ax25_route_list:
removed explicit initialization as per linux 2.4.
- ax25_rt_free:
converted to linux2.4 "__exit" function & removed MODULE
conditional.
= ax25_uid.c:
- CONFIG_AX25, CONFIG_AX25_MODULE:
removed unnecessary conditionals (the Makefiles handle this)
- ax25_uid_list:
removed explicit initialization as per linux 2.4.
- ax25_uid_free:
converted to linux2.4 "__exit" function & removed MODULE
conditional.
af_ax25.c-2.4.0-test13-pre2-patch-v1:
- CONFIG_AX25, CONFIG_AX25_MODULE:
removed unnecessary conditionals (the Makefiles handle this)
- ax25_list:
removed explicit initialization as per linux 2.4.
mmm, volatile... inconsisent with other protocols...
- ax25_init, ax25_exit:
removed conditionals for PROC_FS as the PROC_FS headers do
the right thing if PROC_FS is not selected.
diff -u3Nr -X dontdiff linux-2.4.0-test13-pre3.orig/include/net/ax25.h linux-2.4.0-test13-pre3/include/net/ax25.h
--- linux-2.4.0-test13-pre3.orig/include/net/ax25.h Tue Dec 12 02:27:18 2000
+++ linux-2.4.0-test13-pre3/include/net/ax25.h Mon Dec 18 17:38:56 2000
@@ -339,7 +339,12 @@
extern void ax25_uid_free(void);
/* sysctl_net_ax25.c */
+#ifdef CONFIG_SYSCTL
extern void ax25_register_sysctl(void);
extern void ax25_unregister_sysctl(void);
+#else
+extern inline void ax25_register_sysctl(void) {};
+extern inline void ax25_unregister_sysctl(void) {};
+#endif /* CONFIG_SYSCTL */
#endif
diff -u3Nr -X dontdiff linux-2.4.0-test13-pre3.orig/net/ax25/af_ax25.c linux-2.4.0-test13-pre3/net/ax25/af_ax25.c
--- linux-2.4.0-test13-pre3.orig/net/ax25/af_ax25.c Mon Oct 16 21:42:54 2000
+++ linux-2.4.0-test13-pre3/net/ax25/af_ax25.c Mon Dec 18 17:35:33 2000
@@ -105,7 +105,6 @@
*/
#include <linux/config.h>
-#if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE)
#include <linux/module.h>
#include <linux/errno.h>
#include <linux/types.h>
@@ -140,7 +139,7 @@
-ax25_cb *volatile ax25_list = NULL;
+ax25_cb *volatile ax25_list;
static struct proto_ops ax25_proto_ops;
@@ -1853,15 +1852,11 @@
ax25_packet_type.type = htons(ETH_P_AX25);
dev_add_pack(&ax25_packet_type);
register_netdevice_notifier(&ax25_dev_notifier);
-#ifdef CONFIG_SYSCTL
ax25_register_sysctl();
-#endif
-#ifdef CONFIG_PROC_FS
proc_net_create("ax25_route", 0, ax25_rt_get_info);
proc_net_create("ax25", 0, ax25_get_info);
proc_net_create("ax25_calls", 0, ax25_uid_get_info);
-#endif
printk(KERN_INFO "NET4: G4KLX/GW4PTS AX.25 for Linux. Version 0.37 for Linux NET4.0\n");
return 0;
@@ -1869,24 +1864,19 @@
module_init(ax25_init);
-#ifdef MODULE
MODULE_AUTHOR("Jonathan Naylor G4KLX <flqlga.rzvbrbkje@narviknett.no>");
MODULE_DESCRIPTION("The amateur radio AX.25 link layer protocol");
static void __exit ax25_exit(void)
{
-#ifdef CONFIG_PROC_FS
proc_net_remove("ax25_route");
proc_net_remove("ax25");
proc_net_remove("ax25_calls");
-#endif
ax25_rt_free();
ax25_uid_free();
ax25_dev_free();
-#ifdef CONFIG_SYSCTL
ax25_unregister_sysctl();
-#endif
unregister_netdevice_notifier(&ax25_dev_notifier);
ax25_packet_type.type = htons(ETH_P_AX25);
@@ -1895,6 +1885,3 @@
sock_unregister(PF_AX25);
}
module_exit(ax25_exit);
-#endif /* MODULE */
-
-#endif
diff -u3Nr -X dontdiff linux-2.4.0-test13-pre3.orig/net/ax25/ax25_addr.c linux-2.4.0-test13-pre3/net/ax25/ax25_addr.c
--- linux-2.4.0-test13-pre3.orig/net/ax25/ax25_addr.c Wed Jul 22 22:45:58 1998
+++ linux-2.4.0-test13-pre3/net/ax25/ax25_addr.c Mon Dec 18 17:35:33 2000
@@ -20,7 +20,6 @@
*/
#include <linux/config.h>
-#if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE)
#include <linux/errno.h>
#include <linux/types.h>
#include <linux/socket.h>
@@ -303,4 +302,3 @@
}
}
-#endif
diff -u3Nr -X dontdiff linux-2.4.0-test13-pre3.orig/net/ax25/ax25_dev.c linux-2.4.0-test13-pre3/net/ax25/ax25_dev.c
--- linux-2.4.0-test13-pre3.orig/net/ax25/ax25_dev.c Wed Aug 18 20:38:48 1999
+++ linux-2.4.0-test13-pre3/net/ax25/ax25_dev.c Mon Dec 18 17:35:33 2000
@@ -17,7 +17,6 @@
*/
#include <linux/config.h>
-#if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE)
#include <linux/errno.h>
#include <linux/types.h>
#include <linux/socket.h>
@@ -39,8 +38,9 @@
#include <linux/fcntl.h>
#include <linux/mm.h>
#include <linux/interrupt.h>
+#include <linux/init.h>
-ax25_dev *ax25_dev_list = NULL;
+ax25_dev *ax25_dev_list;
ax25_dev *ax25_dev_ax25dev(struct net_device *dev)
{
@@ -78,9 +78,7 @@
return;
}
-#ifdef CONFIG_SYSCTL
ax25_unregister_sysctl();
-#endif
memset(ax25_dev, 0x00, sizeof(*ax25_dev));
@@ -107,9 +105,7 @@
ax25_dev_list = ax25_dev;
restore_flags(flags);
-#ifdef CONFIG_SYSCTL
ax25_register_sysctl();
-#endif
}
void ax25_dev_device_down(struct net_device *dev)
@@ -120,9 +116,7 @@
if ((ax25_dev = ax25_dev_ax25dev(dev)) == NULL)
return;
-#ifdef CONFIG_SYSCTL
ax25_unregister_sysctl();
-#endif
save_flags(flags); cli();
@@ -141,9 +135,7 @@
ax25_dev_list = s->next;
restore_flags(flags);
kfree(ax25_dev);
-#ifdef CONFIG_SYSCTL
ax25_register_sysctl();
-#endif
return;
}
@@ -152,9 +144,7 @@
s->next = ax25_dev->next;
restore_flags(flags);
kfree(ax25_dev);
-#ifdef CONFIG_SYSCTL
ax25_register_sysctl();
-#endif
return;
}
@@ -162,9 +152,7 @@
}
restore_flags(flags);
-#ifdef CONFIG_SYSCTL
ax25_register_sysctl();
-#endif
}
int ax25_fwd_ioctl(unsigned int cmd, struct ax25_fwd_struct *fwd)
@@ -209,12 +197,10 @@
return ax25_dev->forward;
}
-#ifdef MODULE
-
/*
* Free all memory associated with device structures.
*/
-void ax25_dev_free(void)
+void __exit ax25_dev_free(void)
{
ax25_dev *s, *ax25_dev = ax25_dev_list;
@@ -225,7 +211,3 @@
kfree(s);
}
}
-
-#endif
-
-#endif
diff -u3Nr -X dontdiff linux-2.4.0-test13-pre3.orig/net/ax25/ax25_ds_in.c linux-2.4.0-test13-pre3/net/ax25/ax25_ds_in.c
--- linux-2.4.0-test13-pre3.orig/net/ax25/ax25_ds_in.c Thu Oct 12 23:05:34 2000
+++ linux-2.4.0-test13-pre3/net/ax25/ax25_ds_in.c Mon Dec 18 17:35:33 2000
@@ -23,7 +23,6 @@
*/
#include <linux/config.h>
-#if defined(CONFIG_AX25_DAMA_SLAVE)
#include <linux/errno.h>
#include <linux/types.h>
#include <linux/socket.h>
@@ -312,4 +311,3 @@
return queued;
}
-#endif
diff -u3Nr -X dontdiff linux-2.4.0-test13-pre3.orig/net/ax25/ax25_ds_subr.c linux-2.4.0-test13-pre3/net/ax25/ax25_ds_subr.c
--- linux-2.4.0-test13-pre3.orig/net/ax25/ax25_ds_subr.c Thu Jan 20 20:48:35 2000
+++ linux-2.4.0-test13-pre3/net/ax25/ax25_ds_subr.c Mon Dec 18 17:35:33 2000
@@ -23,7 +23,6 @@
*/
#include <linux/config.h>
-#if defined(CONFIG_AX25_DAMA_SLAVE)
#include <linux/errno.h>
#include <linux/types.h>
#include <linux/socket.h>
@@ -217,4 +216,3 @@
ax25_dev_dama_off(ax25->ax25_dev);
}
-#endif
diff -u3Nr -X dontdiff linux-2.4.0-test13-pre3.orig/net/ax25/ax25_ds_timer.c linux-2.4.0-test13-pre3/net/ax25/ax25_ds_timer.c
--- linux-2.4.0-test13-pre3.orig/net/ax25/ax25_ds_timer.c Fri Dec 18 23:56:21 1998
+++ linux-2.4.0-test13-pre3/net/ax25/ax25_ds_timer.c Mon Dec 18 17:35:33 2000
@@ -16,7 +16,6 @@
*/
#include <linux/config.h>
-#if defined(CONFIG_AX25_DAMA_SLAVE)
#include <linux/errno.h>
#include <linux/types.h>
#include <linux/socket.h>
@@ -224,5 +223,3 @@
ax25_calculate_t1(ax25);
ax25_start_t1timer(ax25);
}
-
-#endif
diff -u3Nr -X dontdiff linux-2.4.0-test13-pre3.orig/net/ax25/ax25_iface.c linux-2.4.0-test13-pre3/net/ax25/ax25_iface.c
--- linux-2.4.0-test13-pre3.orig/net/ax25/ax25_iface.c Wed Aug 18 20:38:48 1999
+++ linux-2.4.0-test13-pre3/net/ax25/ax25_iface.c Mon Dec 18 17:35:33 2000
@@ -14,7 +14,6 @@
*/
#include <linux/config.h>
-#if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE)
#include <linux/errno.h>
#include <linux/types.h>
#include <linux/socket.h>
@@ -40,18 +39,18 @@
struct protocol_struct *next;
unsigned int pid;
int (*func)(struct sk_buff *, ax25_cb *);
-} *protocol_list = NULL;
+} *protocol_list;
static struct linkfail_struct {
struct linkfail_struct *next;
void (*func)(ax25_cb *, int);
-} *linkfail_list = NULL;
+} *linkfail_list;
static struct listen_struct {
struct listen_struct *next;
ax25_address callsign;
struct net_device *dev;
-} *listen_list = NULL;
+} *listen_list;
int ax25_protocol_register(unsigned int pid, int (*func)(struct sk_buff *, ax25_cb *))
{
@@ -267,4 +266,3 @@
return 0;
}
-#endif
diff -u3Nr -X dontdiff linux-2.4.0-test13-pre3.orig/net/ax25/ax25_in.c linux-2.4.0-test13-pre3/net/ax25/ax25_in.c
--- linux-2.4.0-test13-pre3.orig/net/ax25/ax25_in.c Tue Jun 27 03:06:55 2000
+++ linux-2.4.0-test13-pre3/net/ax25/ax25_in.c Mon Dec 18 17:35:33 2000
@@ -39,7 +39,6 @@
*/
#include <linux/config.h>
-#if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE)
#include <linux/errno.h>
#include <linux/types.h>
#include <linux/socket.h>
@@ -480,4 +479,3 @@
return ax25_rcv(skb, dev, (ax25_address *)dev->dev_addr, ptype);
}
-#endif
diff -u3Nr -X dontdiff linux-2.4.0-test13-pre3.orig/net/ax25/ax25_ip.c linux-2.4.0-test13-pre3/net/ax25/ax25_ip.c
--- linux-2.4.0-test13-pre3.orig/net/ax25/ax25_ip.c Thu Jan 20 20:48:35 2000
+++ linux-2.4.0-test13-pre3/net/ax25/ax25_ip.c Mon Dec 18 17:35:33 2000
@@ -14,7 +14,6 @@
*/
#include <linux/config.h>
-#if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE)
#include <linux/errno.h>
#include <linux/types.h>
#include <linux/socket.h>
@@ -210,4 +209,3 @@
#endif
-#endif
diff -u3Nr -X dontdiff linux-2.4.0-test13-pre3.orig/net/ax25/ax25_out.c linux-2.4.0-test13-pre3/net/ax25/ax25_out.c
--- linux-2.4.0-test13-pre3.orig/net/ax25/ax25_out.c Tue Jun 27 03:06:55 2000
+++ linux-2.4.0-test13-pre3/net/ax25/ax25_out.c Mon Dec 18 17:35:33 2000
@@ -35,7 +35,6 @@
*/
#include <linux/config.h>
-#if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE)
#include <linux/errno.h>
#include <linux/types.h>
#include <linux/socket.h>
@@ -408,4 +407,3 @@
return 0;
}
-#endif
diff -u3Nr -X dontdiff linux-2.4.0-test13-pre3.orig/net/ax25/ax25_route.c linux-2.4.0-test13-pre3/net/ax25/ax25_route.c
--- linux-2.4.0-test13-pre3.orig/net/ax25/ax25_route.c Tue Aug 29 06:16:05 2000
+++ linux-2.4.0-test13-pre3/net/ax25/ax25_route.c Mon Dec 18 17:35:33 2000
@@ -42,7 +42,6 @@
*/
#include <linux/config.h>
-#if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE)
#include <linux/errno.h>
#include <linux/types.h>
#include <linux/socket.h>
@@ -64,8 +63,9 @@
#include <linux/fcntl.h>
#include <linux/mm.h>
#include <linux/interrupt.h>
+#include <linux/init.h>
-static ax25_route *ax25_route_list = NULL;
+static ax25_route *ax25_route_list;
static ax25_route *ax25_find_route(ax25_address *, struct net_device *);
@@ -434,12 +434,10 @@
return skb;
}
-#ifdef MODULE
-
/*
* Free all memory associated with routing structures.
*/
-void ax25_rt_free(void)
+void __exit ax25_rt_free(void)
{
ax25_route *s, *ax25_rt = ax25_route_list;
@@ -453,7 +451,3 @@
kfree(s);
}
}
-
-#endif
-
-#endif
diff -u3Nr -X dontdiff linux-2.4.0-test13-pre3.orig/net/ax25/ax25_std_in.c linux-2.4.0-test13-pre3/net/ax25/ax25_std_in.c
--- linux-2.4.0-test13-pre3.orig/net/ax25/ax25_std_in.c Wed Jul 22 22:45:58 1998
+++ linux-2.4.0-test13-pre3/net/ax25/ax25_std_in.c Mon Dec 18 17:35:33 2000
@@ -38,7 +38,6 @@
*/
#include <linux/config.h>
-#if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE)
#include <linux/errno.h>
#include <linux/types.h>
#include <linux/socket.h>
@@ -467,5 +466,3 @@
return queued;
}
-
-#endif
diff -u3Nr -X dontdiff linux-2.4.0-test13-pre3.orig/net/ax25/ax25_std_subr.c linux-2.4.0-test13-pre3/net/ax25/ax25_std_subr.c
--- linux-2.4.0-test13-pre3.orig/net/ax25/ax25_std_subr.c Mon Jul 7 17:19:59 1997
+++ linux-2.4.0-test13-pre3/net/ax25/ax25_std_subr.c Mon Dec 18 17:35:33 2000
@@ -21,7 +21,6 @@
*/
#include <linux/config.h>
-#if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE)
#include <linux/errno.h>
#include <linux/types.h>
#include <linux/socket.h>
@@ -102,5 +101,3 @@
ax25->condition &= ~AX25_COND_ACK_PENDING;
}
-
-#endif
diff -u3Nr -X dontdiff linux-2.4.0-test13-pre3.orig/net/ax25/ax25_std_timer.c linux-2.4.0-test13-pre3/net/ax25/ax25_std_timer.c
--- linux-2.4.0-test13-pre3.orig/net/ax25/ax25_std_timer.c Mon Jul 7 17:19:59 1997
+++ linux-2.4.0-test13-pre3/net/ax25/ax25_std_timer.c Mon Dec 18 17:35:33 2000
@@ -23,7 +23,6 @@
*/
#include <linux/config.h>
-#if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE)
#include <linux/errno.h>
#include <linux/types.h>
#include <linux/socket.h>
@@ -170,5 +169,3 @@
ax25_calculate_t1(ax25);
ax25_start_t1timer(ax25);
}
-
-#endif
diff -u3Nr -X dontdiff linux-2.4.0-test13-pre3.orig/net/ax25/ax25_subr.c linux-2.4.0-test13-pre3/net/ax25/ax25_subr.c
--- linux-2.4.0-test13-pre3.orig/net/ax25/ax25_subr.c Thu Jan 20 20:48:35 2000
+++ linux-2.4.0-test13-pre3/net/ax25/ax25_subr.c Mon Dec 18 17:35:33 2000
@@ -34,7 +34,6 @@
*/
#include <linux/config.h>
-#if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE)
#include <linux/errno.h>
#include <linux/types.h>
#include <linux/socket.h>
@@ -324,5 +323,3 @@
ax25->sk->dead = 1;
}
}
-
-#endif
diff -u3Nr -X dontdiff linux-2.4.0-test13-pre3.orig/net/ax25/ax25_timer.c linux-2.4.0-test13-pre3/net/ax25/ax25_timer.c
--- linux-2.4.0-test13-pre3.orig/net/ax25/ax25_timer.c Thu May 4 20:25:34 2000
+++ linux-2.4.0-test13-pre3/net/ax25/ax25_timer.c Mon Dec 18 17:35:33 2000
@@ -26,7 +26,6 @@
*/
#include <linux/config.h>
-#if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE)
#include <linux/errno.h>
#include <linux/types.h>
#include <linux/socket.h>
@@ -255,5 +254,3 @@
#endif
}
}
-
-#endif
diff -u3Nr -X dontdiff linux-2.4.0-test13-pre3.orig/net/ax25/ax25_uid.c linux-2.4.0-test13-pre3/net/ax25/ax25_uid.c
--- linux-2.4.0-test13-pre3.orig/net/ax25/ax25_uid.c Tue Aug 29 06:16:05 2000
+++ linux-2.4.0-test13-pre3/net/ax25/ax25_uid.c Mon Dec 18 17:35:33 2000
@@ -14,7 +14,6 @@
*/
#include <linux/config.h>
-#if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE)
#include <linux/errno.h>
#include <linux/types.h>
#include <linux/socket.h>
@@ -48,7 +47,7 @@
* Callsign/UID mapper. This is in kernel space for security on multi-amateur machines.
*/
-static ax25_uid_assoc *ax25_uid_list = NULL;
+static ax25_uid_assoc *ax25_uid_list;
int ax25_uid_policy = 0;
@@ -164,12 +163,10 @@
return len;
}
-#ifdef MODULE
-
/*
* Free all memory associated with UID/Callsign structures.
*/
-void ax25_uid_free(void)
+void __exit ax25_uid_free(void)
{
ax25_uid_assoc *s, *ax25_uid = ax25_uid_list;
@@ -180,7 +177,3 @@
kfree(s);
}
}
-
-#endif
-
-#endif
-
To unsubscribe from this list: send the line "unsubscribe linux-hams" in
the body of a message to dheones@globetrotter.net
This archive was generated by hypermail 2b30 : Mon Dec 18 2000 - 18:16:55 EET