]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[ROSE]: Eleminate HZ from ROSE kernel interfaces
authorRalf Baechle <ralf@linux-mips.org>
Thu, 4 May 2006 06:28:20 +0000 (23:28 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 4 May 2006 06:28:20 +0000 (23:28 -0700)
Convert all ROSE sysctl time values from jiffies to ms as units.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/rose.h
net/rose/af_rose.c
net/rose/rose_link.c

index 3249b979605a2de9aed8d38b75f48235a4e3c59a..012b09ed24015ffffad4732e49be73aa82c1e7a9 100644 (file)
@@ -49,14 +49,14 @@ enum {
        ROSE_STATE_5                    /* Deferred Call Acceptance */
 };
 
-#define ROSE_DEFAULT_T0                        (180 * HZ)      /* Default T10 T20 value */
-#define ROSE_DEFAULT_T1                        (200 * HZ)      /* Default T11 T21 value */
-#define ROSE_DEFAULT_T2                        (180 * HZ)      /* Default T12 T22 value */
-#define        ROSE_DEFAULT_T3                 (180 * HZ)      /* Default T13 T23 value */
-#define        ROSE_DEFAULT_HB                 (5 * HZ)        /* Default Holdback value */
-#define        ROSE_DEFAULT_IDLE               (0 * 60 * HZ)   /* No Activity Timeout - none */
+#define ROSE_DEFAULT_T0                        180000          /* Default T10 T20 value */
+#define ROSE_DEFAULT_T1                        200000          /* Default T11 T21 value */
+#define ROSE_DEFAULT_T2                        180000          /* Default T12 T22 value */
+#define        ROSE_DEFAULT_T3                 180000          /* Default T13 T23 value */
+#define        ROSE_DEFAULT_HB                 5000            /* Default Holdback value */
+#define        ROSE_DEFAULT_IDLE               0               /* No Activity Timeout - none */
 #define        ROSE_DEFAULT_ROUTING            1               /* Default routing flag */
-#define        ROSE_DEFAULT_FAIL_TIMEOUT       (120 * HZ)      /* Time until link considered usable */
+#define        ROSE_DEFAULT_FAIL_TIMEOUT       120000          /* Time until link considered usable */
 #define        ROSE_DEFAULT_MAXVC              50              /* Maximum number of VCs per neighbour */
 #define        ROSE_DEFAULT_WINDOW_SIZE        7               /* Default window size */
 
index ea65396d1619a5344b6b1c742dd4575dbf8a0088..ef4538ac84f0965edf03446b51466198a3809ad2 100644 (file)
@@ -518,11 +518,11 @@ static int rose_create(struct socket *sock, int protocol)
        init_timer(&rose->timer);
        init_timer(&rose->idletimer);
 
-       rose->t1   = sysctl_rose_call_request_timeout;
-       rose->t2   = sysctl_rose_reset_request_timeout;
-       rose->t3   = sysctl_rose_clear_request_timeout;
-       rose->hb   = sysctl_rose_ack_hold_back_timeout;
-       rose->idle = sysctl_rose_no_activity_timeout;
+       rose->t1   = msecs_to_jiffies(sysctl_rose_call_request_timeout);
+       rose->t2   = msecs_to_jiffies(sysctl_rose_reset_request_timeout);
+       rose->t3   = msecs_to_jiffies(sysctl_rose_clear_request_timeout);
+       rose->hb   = msecs_to_jiffies(sysctl_rose_ack_hold_back_timeout);
+       rose->idle = msecs_to_jiffies(sysctl_rose_no_activity_timeout);
 
        rose->state = ROSE_STATE_0;
 
index 09e9e9d04d92a9a8b0198e6b5cef4c66d845c26c..bd86a63960ce3114ad4c6c3ae8a90804d6b66d66 100644 (file)
@@ -40,7 +40,8 @@ void rose_start_ftimer(struct rose_neigh *neigh)
 
        neigh->ftimer.data     = (unsigned long)neigh;
        neigh->ftimer.function = &rose_ftimer_expiry;
-       neigh->ftimer.expires  = jiffies + sysctl_rose_link_fail_timeout;
+       neigh->ftimer.expires  =
+               jiffies + msecs_to_jiffies(sysctl_rose_link_fail_timeout);
 
        add_timer(&neigh->ftimer);
 }
@@ -51,7 +52,8 @@ static void rose_start_t0timer(struct rose_neigh *neigh)
 
        neigh->t0timer.data     = (unsigned long)neigh;
        neigh->t0timer.function = &rose_t0timer_expiry;
-       neigh->t0timer.expires  = jiffies + sysctl_rose_restart_request_timeout;
+       neigh->t0timer.expires  =
+               jiffies + msecs_to_jiffies(sysctl_rose_restart_request_timeout);
 
        add_timer(&neigh->t0timer);
 }