|
@@ -140,6 +140,7 @@ struct frad_state {
|
|
|
int dce_pvc_count;
|
|
|
|
|
|
struct timer_list timer;
|
|
|
+ struct net_device *dev;
|
|
|
unsigned long last_poll;
|
|
|
int reliable;
|
|
|
int dce_changed;
|
|
@@ -597,9 +598,10 @@ static void fr_set_link_state(int reliable, struct net_device *dev)
|
|
|
}
|
|
|
|
|
|
|
|
|
-static void fr_timer(unsigned long arg)
|
|
|
+static void fr_timer(struct timer_list *t)
|
|
|
{
|
|
|
- struct net_device *dev = (struct net_device *)arg;
|
|
|
+ struct frad_state *st = from_timer(st, t, timer);
|
|
|
+ struct net_device *dev = st->dev;
|
|
|
hdlc_device *hdlc = dev_to_hdlc(dev);
|
|
|
int i, cnt = 0, reliable;
|
|
|
u32 list;
|
|
@@ -644,8 +646,6 @@ static void fr_timer(unsigned long arg)
|
|
|
state(hdlc)->settings.t391 * HZ;
|
|
|
}
|
|
|
|
|
|
- state(hdlc)->timer.function = fr_timer;
|
|
|
- state(hdlc)->timer.data = arg;
|
|
|
add_timer(&state(hdlc)->timer);
|
|
|
}
|
|
|
|
|
@@ -1003,8 +1003,8 @@ static void fr_start(struct net_device *dev)
|
|
|
state(hdlc)->n391cnt = 0;
|
|
|
state(hdlc)->txseq = state(hdlc)->rxseq = 0;
|
|
|
|
|
|
- setup_timer(&state(hdlc)->timer, fr_timer,
|
|
|
- (unsigned long)dev);
|
|
|
+ state(hdlc)->dev = dev;
|
|
|
+ timer_setup(&state(hdlc)->timer, fr_timer, 0);
|
|
|
/* First poll after 1 s */
|
|
|
state(hdlc)->timer.expires = jiffies + HZ;
|
|
|
add_timer(&state(hdlc)->timer);
|