Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 85641
b: refs/heads/master
c: e848b58
h: refs/heads/master
i:
  85639: aa50f79
v: v3
  • Loading branch information
Jarek Poplawski authored and David S. Miller committed Feb 13, 2008
1 parent f6bcd2d commit 678717d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 21fab4a86a411c18c6b4d663ae710ca1f6206b3c
refs/heads/master: e848b583e03306f5f9b3a66a793c37e3649e04ca
1 change: 1 addition & 0 deletions trunk/include/net/ax25.h
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,7 @@ extern void ax25_dama_on(ax25_cb *);
extern void ax25_dama_off(ax25_cb *);

/* ax25_ds_timer.c */
extern void ax25_ds_setup_timer(ax25_dev *);
extern void ax25_ds_set_timer(ax25_dev *);
extern void ax25_ds_del_timer(ax25_dev *);
extern void ax25_ds_timer(ax25_cb *);
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/ax25/ax25_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ void ax25_dev_device_up(struct net_device *dev)
ax25_dev->values[AX25_VALUES_DS_TIMEOUT]= AX25_DEF_DS_TIMEOUT;

#if defined(CONFIG_AX25_DAMA_SLAVE) || defined(CONFIG_AX25_DAMA_MASTER)
init_timer(&ax25_dev->dama.slave_timer);
ax25_ds_setup_timer(ax25_dev);
#endif

spin_lock_bh(&ax25_dev_lock);
Expand Down
12 changes: 4 additions & 8 deletions trunk/net/ax25/ax25_ds_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,10 @@ static void ax25_ds_timeout(unsigned long);
* 1/10th of a second.
*/

static void ax25_ds_add_timer(ax25_dev *ax25_dev)
void ax25_ds_setup_timer(ax25_dev *ax25_dev)
{
struct timer_list *t = &ax25_dev->dama.slave_timer;
t->data = (unsigned long) ax25_dev;
t->function = &ax25_ds_timeout;
t->expires = jiffies + HZ;
add_timer(t);
setup_timer(&ax25_dev->dama.slave_timer, ax25_ds_timeout,
(unsigned long)ax25_dev);
}

void ax25_ds_del_timer(ax25_dev *ax25_dev)
Expand All @@ -60,10 +57,9 @@ void ax25_ds_set_timer(ax25_dev *ax25_dev)
if (ax25_dev == NULL) /* paranoia */
return;

del_timer(&ax25_dev->dama.slave_timer);
ax25_dev->dama.slave_timeout =
msecs_to_jiffies(ax25_dev->values[AX25_VALUES_DS_TIMEOUT]) / 10;
ax25_ds_add_timer(ax25_dev);
mod_timer(&ax25_dev->dama.slave_timer, jiffies + HZ);
}

/*
Expand Down

0 comments on commit 678717d

Please sign in to comment.