]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/netrom/af_netrom.c
[NETROM]: Use socket helpers instead of direct fiddling with struct sock
[linux-2.6-omap-h63xx.git] / net / netrom / af_netrom.c
index d44981f5a6195b4a017552b16e5a4ca82db98c88..389a4119e1b405a9cebbf11f4a9076ff4b2d95c4 100644 (file)
@@ -8,7 +8,6 @@
  * Copyright Alan Cox GW4PTS (alan@lxorguk.ukuu.org.uk)
  * Copyright Darryl Miles G7LED (dlm@g7led.demon.co.uk)
  */
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/moduleparam.h>
 #include <linux/capability.h>
@@ -425,11 +424,16 @@ static int nr_create(struct socket *sock, int protocol)
 
        nr_init_timers(sk);
 
-       nr->t1     = sysctl_netrom_transport_timeout;
-       nr->t2     = sysctl_netrom_transport_acknowledge_delay;
-       nr->n2     = sysctl_netrom_transport_maximum_tries;
-       nr->t4     = sysctl_netrom_transport_busy_delay;
-       nr->idle   = sysctl_netrom_transport_no_activity_timeout;
+       nr->t1     =
+               msecs_to_jiffies(sysctl_netrom_transport_timeout);
+       nr->t2     =
+               msecs_to_jiffies(sysctl_netrom_transport_acknowledge_delay);
+       nr->n2     =
+               msecs_to_jiffies(sysctl_netrom_transport_maximum_tries);
+       nr->t4     =
+               msecs_to_jiffies(sysctl_netrom_transport_busy_delay);
+       nr->idle   =
+               msecs_to_jiffies(sysctl_netrom_transport_no_activity_timeout);
        nr->window = sysctl_netrom_transport_requested_window_size;
 
        nr->bpqext = 1;
@@ -796,7 +800,7 @@ static int nr_accept(struct socket *sock, struct socket *newsock, int flags)
 
        /* Now attach up the new socket */
        kfree_skb(skb);
-       sk->sk_ack_backlog--;
+       sk_acceptq_removed(sk);
        newsock->sk = newsk;
 
 out:
@@ -981,7 +985,7 @@ int nr_rx_frame(struct sk_buff *skb, struct net_device *dev)
        nr_make->vr        = 0;
        nr_make->vl        = 0;
        nr_make->state     = NR_STATE_3;
-       sk->sk_ack_backlog++;
+       sk_acceptq_added(sk);
 
        nr_insert_socket(make);
 
@@ -1365,8 +1369,6 @@ static struct notifier_block nr_dev_notifier = {
 
 static struct net_device **dev_nr;
 
-static char banner[] __initdata = KERN_INFO "G4KLX NET/ROM for Linux. Version 0.7 for AX25.037 Linux 2.4\n";
-
 static int __init nr_proto_init(void)
 {
        int i;
@@ -1414,7 +1416,6 @@ static int __init nr_proto_init(void)
        }
                
        register_netdevice_notifier(&nr_dev_notifier);
-       printk(banner);
 
        ax25_protocol_register(AX25_P_NETROM, nr_route_frame);
        ax25_linkfail_register(nr_link_failed);