Commit 51fd9471 authored by Nicholas Mc Guire's avatar Nicholas Mc Guire Committed by David S. Miller

tlan: use msecs_to_jiffies for conversion

This is only an API consolidation and should make things more readable
it replaces var * HZ / 1000 by msecs_to_jiffies(var).
Signed-off-by: default avatarNicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 45e826fd
...@@ -2540,7 +2540,7 @@ static void tlan_phy_power_down(struct net_device *dev) ...@@ -2540,7 +2540,7 @@ static void tlan_phy_power_down(struct net_device *dev)
* This is abitrary. It is intended to make sure the * This is abitrary. It is intended to make sure the
* transceiver settles. * transceiver settles.
*/ */
tlan_set_timer(dev, (HZ/20), TLAN_TIMER_PHY_PUP); tlan_set_timer(dev, msecs_to_jiffies(50), TLAN_TIMER_PHY_PUP);
} }
...@@ -2593,7 +2593,7 @@ static void tlan_phy_reset(struct net_device *dev) ...@@ -2593,7 +2593,7 @@ static void tlan_phy_reset(struct net_device *dev)
* I don't remember why I wait this long. * I don't remember why I wait this long.
* I've changed this to 50ms, as it seems long enough. * I've changed this to 50ms, as it seems long enough.
*/ */
tlan_set_timer(dev, (HZ/20), TLAN_TIMER_PHY_START_LINK); tlan_set_timer(dev, msecs_to_jiffies(50), TLAN_TIMER_PHY_START_LINK);
} }
...@@ -2658,7 +2658,7 @@ static void tlan_phy_start_link(struct net_device *dev) ...@@ -2658,7 +2658,7 @@ static void tlan_phy_start_link(struct net_device *dev)
data = TLAN_NET_CFG_1FRAG | TLAN_NET_CFG_1CHAN data = TLAN_NET_CFG_1FRAG | TLAN_NET_CFG_1CHAN
| TLAN_NET_CFG_PHY_EN; | TLAN_NET_CFG_PHY_EN;
tlan_dio_write16(dev->base_addr, TLAN_NET_CONFIG, data); tlan_dio_write16(dev->base_addr, TLAN_NET_CONFIG, data);
tlan_set_timer(dev, (40*HZ/1000), TLAN_TIMER_PHY_PDOWN); tlan_set_timer(dev, msecs_to_jiffies(40), TLAN_TIMER_PHY_PDOWN);
return; return;
} else if (priv->phy_num == 0) { } else if (priv->phy_num == 0) {
control = 0; control = 0;
...@@ -2725,7 +2725,7 @@ static void tlan_phy_finish_auto_neg(struct net_device *dev) ...@@ -2725,7 +2725,7 @@ static void tlan_phy_finish_auto_neg(struct net_device *dev)
(priv->adapter->flags & TLAN_ADAPTER_USE_INTERN_10) && (priv->adapter->flags & TLAN_ADAPTER_USE_INTERN_10) &&
(priv->phy_num != 0)) { (priv->phy_num != 0)) {
priv->phy_num = 0; priv->phy_num = 0;
tlan_set_timer(dev, (400*HZ/1000), TLAN_TIMER_PHY_PDOWN); tlan_set_timer(dev, msecs_to_jiffies(400), TLAN_TIMER_PHY_PDOWN);
return; return;
} }
...@@ -2744,7 +2744,7 @@ static void tlan_phy_finish_auto_neg(struct net_device *dev) ...@@ -2744,7 +2744,7 @@ static void tlan_phy_finish_auto_neg(struct net_device *dev)
/* Wait for 100 ms. No reason in partiticular. /* Wait for 100 ms. No reason in partiticular.
*/ */
tlan_set_timer(dev, (HZ/10), TLAN_TIMER_FINISH_RESET); tlan_set_timer(dev, msecs_to_jiffies(100), TLAN_TIMER_FINISH_RESET);
} }
...@@ -2796,7 +2796,7 @@ static void tlan_phy_monitor(unsigned long data) ...@@ -2796,7 +2796,7 @@ static void tlan_phy_monitor(unsigned long data)
/* set to external PHY */ /* set to external PHY */
priv->phy_num = 1; priv->phy_num = 1;
/* restart autonegotiation */ /* restart autonegotiation */
tlan_set_timer(dev, 4 * HZ / 10, tlan_set_timer(dev, msecs_to_jiffies(400),
TLAN_TIMER_PHY_PDOWN); TLAN_TIMER_PHY_PDOWN);
return; return;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment