diff options
author | Chas Williams <chas@cmf.nrl.navy.mil> | 2006-09-29 20:15:59 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-09-29 20:15:59 -0400 |
commit | 987e46bdf314c55e060570ff46723d770e461f0e (patch) | |
tree | c544f11f72d0e12f5862b8dda9e650227525b8f1 | |
parent | edbc9b014fda4b13466b2e2ac53b940337548ab4 (diff) |
[ATM]: [lec] use work queue instead of timer for lec arp expiry
Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/atm/lec.c | 17 | ||||
-rw-r--r-- | net/atm/lec.h | 2 |
2 files changed, 8 insertions, 11 deletions
diff --git a/net/atm/lec.c b/net/atm/lec.c index eb94e94bffa9..29acfb0e6d04 100644 --- a/net/atm/lec.c +++ b/net/atm/lec.c | |||
@@ -1442,7 +1442,7 @@ static void lane2_associate_ind(struct net_device *dev, u8 *mac_addr, | |||
1442 | 1442 | ||
1443 | #define LEC_ARP_REFRESH_INTERVAL (3*HZ) | 1443 | #define LEC_ARP_REFRESH_INTERVAL (3*HZ) |
1444 | 1444 | ||
1445 | static void lec_arp_check_expire(unsigned long data); | 1445 | static void lec_arp_check_expire(void *data); |
1446 | static void lec_arp_expire_arp(unsigned long data); | 1446 | static void lec_arp_expire_arp(unsigned long data); |
1447 | 1447 | ||
1448 | /* | 1448 | /* |
@@ -1465,11 +1465,8 @@ static void lec_arp_init(struct lec_priv *priv) | |||
1465 | INIT_HLIST_HEAD(&priv->lec_no_forward); | 1465 | INIT_HLIST_HEAD(&priv->lec_no_forward); |
1466 | INIT_HLIST_HEAD(&priv->mcast_fwds); | 1466 | INIT_HLIST_HEAD(&priv->mcast_fwds); |
1467 | spin_lock_init(&priv->lec_arp_lock); | 1467 | spin_lock_init(&priv->lec_arp_lock); |
1468 | init_timer(&priv->lec_arp_timer); | 1468 | INIT_WORK(&priv->lec_arp_work, lec_arp_check_expire, priv); |
1469 | priv->lec_arp_timer.expires = jiffies + LEC_ARP_REFRESH_INTERVAL; | 1469 | schedule_delayed_work(&priv->lec_arp_work, LEC_ARP_REFRESH_INTERVAL); |
1470 | priv->lec_arp_timer.data = (unsigned long)priv; | ||
1471 | priv->lec_arp_timer.function = lec_arp_check_expire; | ||
1472 | add_timer(&priv->lec_arp_timer); | ||
1473 | } | 1470 | } |
1474 | 1471 | ||
1475 | static void lec_arp_clear_vccs(struct lec_arp_table *entry) | 1472 | static void lec_arp_clear_vccs(struct lec_arp_table *entry) |
@@ -1719,7 +1716,7 @@ static void lec_arp_destroy(struct lec_priv *priv) | |||
1719 | struct lec_arp_table *entry; | 1716 | struct lec_arp_table *entry; |
1720 | int i; | 1717 | int i; |
1721 | 1718 | ||
1722 | del_timer_sync(&priv->lec_arp_timer); | 1719 | cancel_rearming_delayed_work(&priv->lec_arp_work); |
1723 | 1720 | ||
1724 | /* | 1721 | /* |
1725 | * Remove all entries | 1722 | * Remove all entries |
@@ -1865,10 +1862,10 @@ static void lec_arp_expire_vcc(unsigned long data) | |||
1865 | * to ESI_FORWARD_DIRECT. This causes the flush period to end | 1862 | * to ESI_FORWARD_DIRECT. This causes the flush period to end |
1866 | * regardless of the progress of the flush protocol. | 1863 | * regardless of the progress of the flush protocol. |
1867 | */ | 1864 | */ |
1868 | static void lec_arp_check_expire(unsigned long data) | 1865 | static void lec_arp_check_expire(void *data) |
1869 | { | 1866 | { |
1870 | unsigned long flags; | 1867 | unsigned long flags; |
1871 | struct lec_priv *priv = (struct lec_priv *)data; | 1868 | struct lec_priv *priv = data; |
1872 | struct hlist_node *node, *next; | 1869 | struct hlist_node *node, *next; |
1873 | struct lec_arp_table *entry; | 1870 | struct lec_arp_table *entry; |
1874 | unsigned long now; | 1871 | unsigned long now; |
@@ -1930,7 +1927,7 @@ static void lec_arp_check_expire(unsigned long data) | |||
1930 | } | 1927 | } |
1931 | spin_unlock_irqrestore(&priv->lec_arp_lock, flags); | 1928 | spin_unlock_irqrestore(&priv->lec_arp_lock, flags); |
1932 | 1929 | ||
1933 | mod_timer(&priv->lec_arp_timer, jiffies + LEC_ARP_REFRESH_INTERVAL); | 1930 | schedule_delayed_work(&priv->lec_arp_work, LEC_ARP_REFRESH_INTERVAL); |
1934 | } | 1931 | } |
1935 | 1932 | ||
1936 | /* | 1933 | /* |
diff --git a/net/atm/lec.h b/net/atm/lec.h index 8052641b2ec0..8ac6b7321635 100644 --- a/net/atm/lec.h +++ b/net/atm/lec.h | |||
@@ -93,7 +93,7 @@ struct lec_priv { | |||
93 | spinlock_t lec_arp_lock; | 93 | spinlock_t lec_arp_lock; |
94 | struct atm_vcc *mcast_vcc; /* Default Multicast Send VCC */ | 94 | struct atm_vcc *mcast_vcc; /* Default Multicast Send VCC */ |
95 | struct atm_vcc *lecd; | 95 | struct atm_vcc *lecd; |
96 | struct timer_list lec_arp_timer; /* C10 */ | 96 | struct work_struct lec_arp_work; /* C10 */ |
97 | unsigned int maximum_unknown_frame_count; | 97 | unsigned int maximum_unknown_frame_count; |
98 | /* | 98 | /* |
99 | * Within the period of time defined by this variable, the client will send | 99 | * Within the period of time defined by this variable, the client will send |