net: disallow to use net_assign_generic externally
[safe/jmp/linux-2.6] / include / net / netrom.h
index ad05d7a..f0793c1 100644 (file)
@@ -6,8 +6,10 @@
 
 #ifndef _NETROM_H
 #define _NETROM_H 
+
 #include <linux/netrom.h>
 #include <linux/list.h>
+#include <linux/slab.h>
 #include <net/sock.h>
 
 #define        NR_NETWORK_LEN                  15
@@ -41,11 +43,11 @@ enum {
 #define        NR_COND_PEER_RX_BUSY            0x04
 #define        NR_COND_OWN_RX_BUSY             0x08
 
-#define NR_DEFAULT_T1                  (120 * HZ)      /* Outstanding frames - 120 seconds */
-#define NR_DEFAULT_T2                  (5   * HZ)      /* Response delay     - 5 seconds */
+#define NR_DEFAULT_T1                  120000          /* Outstanding frames - 120 seconds */
+#define NR_DEFAULT_T2                  5000            /* Response delay     - 5 seconds */
 #define NR_DEFAULT_N2                  3               /* Number of Retries - 3 */
-#define        NR_DEFAULT_T4                   (180 * HZ)      /* Busy Delay - 180 seconds */
-#define        NR_DEFAULT_IDLE                 (0 * 60 * HZ)   /* No Activity Timeout - none */
+#define        NR_DEFAULT_T4                   180000          /* Busy Delay - 180 seconds */
+#define        NR_DEFAULT_IDLE                 0               /* No Activity Timeout - none */
 #define        NR_DEFAULT_WINDOW               4               /* Default Window Size - 4 */
 #define        NR_DEFAULT_OBS                  6               /* Default Obsolescence Count - 6 */
 #define        NR_DEFAULT_QUAL                 10              /* Default Neighbour Quality - 10 */
@@ -131,8 +133,9 @@ static __inline__ void nr_node_put(struct nr_node *nr_node)
 static __inline__ void nr_neigh_put(struct nr_neigh *nr_neigh)
 {
        if (atomic_dec_and_test(&nr_neigh->refcount)) {
-               if (nr_neigh->digipeat != NULL)
-                       kfree(nr_neigh->digipeat);
+               if (nr_neigh->ax25)
+                       ax25_cb_put(nr_neigh->ax25);
+               kfree(nr_neigh->digipeat);
                kfree(nr_neigh);
        }
 }
@@ -211,8 +214,8 @@ extern struct net_device *nr_dev_get(ax25_address *);
 extern int  nr_rt_ioctl(unsigned int, void __user *);
 extern void nr_link_failed(ax25_cb *, int);
 extern int  nr_route_frame(struct sk_buff *, ax25_cb *);
-extern struct file_operations nr_nodes_fops;
-extern struct file_operations nr_neigh_fops;
+extern const struct file_operations nr_nodes_fops;
+extern const struct file_operations nr_neigh_fops;
 extern void nr_rt_free(void);
 
 /* nr_subr.c */