diff options
author | Krzysztof Halasa <khc@pm.waw.pl> | 2006-07-21 17:44:55 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-07-21 17:44:55 -0400 |
commit | fbeff3c1d35d07b1f967e47fcfb00cd16b7ecd02 (patch) | |
tree | 4b7514b804e31b5e354ce6499256300917d1bf54 | |
parent | 41b1d174442d0845e58af4b1b171930fc09872c7 (diff) |
[WAN]: Converted synclink drivers to use netif_carrier_*()
WAN: Converted synclink drivers to use netif_carrier_*() instead
of hdlc_set_carrier().
Signed-off-by: Krzysztof Halasa <khc@pm.waw.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/char/pcmcia/synclink_cs.c | 14 | ||||
-rw-r--r-- | drivers/char/synclink.c | 14 | ||||
-rw-r--r-- | drivers/char/synclink_gt.c | 14 | ||||
-rw-r--r-- | drivers/char/synclinkmp.c | 14 |
4 files changed, 40 insertions, 16 deletions
diff --git a/drivers/char/pcmcia/synclink_cs.c b/drivers/char/pcmcia/synclink_cs.c index 17bc8abd5df5..00f574cbb0d4 100644 --- a/drivers/char/pcmcia/synclink_cs.c +++ b/drivers/char/pcmcia/synclink_cs.c | |||
@@ -1174,8 +1174,12 @@ static void dcd_change(MGSLPC_INFO *info) | |||
1174 | else | 1174 | else |
1175 | info->input_signal_events.dcd_down++; | 1175 | info->input_signal_events.dcd_down++; |
1176 | #ifdef CONFIG_HDLC | 1176 | #ifdef CONFIG_HDLC |
1177 | if (info->netcount) | 1177 | if (info->netcount) { |
1178 | hdlc_set_carrier(info->serial_signals & SerialSignal_DCD, info->netdev); | 1178 | if (info->serial_signals & SerialSignal_DCD) |
1179 | netif_carrier_on(info->netdev); | ||
1180 | else | ||
1181 | netif_carrier_off(info->netdev); | ||
1182 | } | ||
1179 | #endif | 1183 | #endif |
1180 | wake_up_interruptible(&info->status_event_wait_q); | 1184 | wake_up_interruptible(&info->status_event_wait_q); |
1181 | wake_up_interruptible(&info->event_wait_q); | 1185 | wake_up_interruptible(&info->event_wait_q); |
@@ -4251,8 +4255,10 @@ static int hdlcdev_open(struct net_device *dev) | |||
4251 | spin_lock_irqsave(&info->lock, flags); | 4255 | spin_lock_irqsave(&info->lock, flags); |
4252 | get_signals(info); | 4256 | get_signals(info); |
4253 | spin_unlock_irqrestore(&info->lock, flags); | 4257 | spin_unlock_irqrestore(&info->lock, flags); |
4254 | hdlc_set_carrier(info->serial_signals & SerialSignal_DCD, dev); | 4258 | if (info->serial_signals & SerialSignal_DCD) |
4255 | 4259 | netif_carrier_on(dev); | |
4260 | else | ||
4261 | netif_carrier_off(dev); | ||
4256 | return 0; | 4262 | return 0; |
4257 | } | 4263 | } |
4258 | 4264 | ||
diff --git a/drivers/char/synclink.c b/drivers/char/synclink.c index df782dd1098c..78b1b1a2732b 100644 --- a/drivers/char/synclink.c +++ b/drivers/char/synclink.c | |||
@@ -1344,8 +1344,12 @@ static void mgsl_isr_io_pin( struct mgsl_struct *info ) | |||
1344 | } else | 1344 | } else |
1345 | info->input_signal_events.dcd_down++; | 1345 | info->input_signal_events.dcd_down++; |
1346 | #ifdef CONFIG_HDLC | 1346 | #ifdef CONFIG_HDLC |
1347 | if (info->netcount) | 1347 | if (info->netcount) { |
1348 | hdlc_set_carrier(status & MISCSTATUS_DCD, info->netdev); | 1348 | if (status & MISCSTATUS_DCD) |
1349 | netif_carrier_on(info->netdev); | ||
1350 | else | ||
1351 | netif_carrier_off(info->netdev); | ||
1352 | } | ||
1349 | #endif | 1353 | #endif |
1350 | } | 1354 | } |
1351 | if (status & MISCSTATUS_CTS_LATCHED) | 1355 | if (status & MISCSTATUS_CTS_LATCHED) |
@@ -7844,8 +7848,10 @@ static int hdlcdev_open(struct net_device *dev) | |||
7844 | spin_lock_irqsave(&info->irq_spinlock, flags); | 7848 | spin_lock_irqsave(&info->irq_spinlock, flags); |
7845 | usc_get_serial_signals(info); | 7849 | usc_get_serial_signals(info); |
7846 | spin_unlock_irqrestore(&info->irq_spinlock, flags); | 7850 | spin_unlock_irqrestore(&info->irq_spinlock, flags); |
7847 | hdlc_set_carrier(info->serial_signals & SerialSignal_DCD, dev); | 7851 | if (info->serial_signals & SerialSignal_DCD) |
7848 | 7852 | netif_carrier_on(dev); | |
7853 | else | ||
7854 | netif_carrier_off(dev); | ||
7849 | return 0; | 7855 | return 0; |
7850 | } | 7856 | } |
7851 | 7857 | ||
diff --git a/drivers/char/synclink_gt.c b/drivers/char/synclink_gt.c index e829594195c1..b2dbbdb1bf81 100644 --- a/drivers/char/synclink_gt.c +++ b/drivers/char/synclink_gt.c | |||
@@ -1497,8 +1497,10 @@ static int hdlcdev_open(struct net_device *dev) | |||
1497 | spin_lock_irqsave(&info->lock, flags); | 1497 | spin_lock_irqsave(&info->lock, flags); |
1498 | get_signals(info); | 1498 | get_signals(info); |
1499 | spin_unlock_irqrestore(&info->lock, flags); | 1499 | spin_unlock_irqrestore(&info->lock, flags); |
1500 | hdlc_set_carrier(info->signals & SerialSignal_DCD, dev); | 1500 | if (info->signals & SerialSignal_DCD) |
1501 | 1501 | netif_carrier_on(dev); | |
1502 | else | ||
1503 | netif_carrier_off(dev); | ||
1502 | return 0; | 1504 | return 0; |
1503 | } | 1505 | } |
1504 | 1506 | ||
@@ -1997,8 +1999,12 @@ static void dcd_change(struct slgt_info *info) | |||
1997 | info->input_signal_events.dcd_down++; | 1999 | info->input_signal_events.dcd_down++; |
1998 | } | 2000 | } |
1999 | #ifdef CONFIG_HDLC | 2001 | #ifdef CONFIG_HDLC |
2000 | if (info->netcount) | 2002 | if (info->netcount) { |
2001 | hdlc_set_carrier(info->signals & SerialSignal_DCD, info->netdev); | 2003 | if (info->signals & SerialSignal_DCD) |
2004 | netif_carrier_on(info->netdev); | ||
2005 | else | ||
2006 | netif_carrier_off(info->netdev); | ||
2007 | } | ||
2002 | #endif | 2008 | #endif |
2003 | wake_up_interruptible(&info->status_event_wait_q); | 2009 | wake_up_interruptible(&info->status_event_wait_q); |
2004 | wake_up_interruptible(&info->event_wait_q); | 2010 | wake_up_interruptible(&info->event_wait_q); |
diff --git a/drivers/char/synclinkmp.c b/drivers/char/synclinkmp.c index 1e443a233f51..66f3754fbbdf 100644 --- a/drivers/char/synclinkmp.c +++ b/drivers/char/synclinkmp.c | |||
@@ -1752,8 +1752,10 @@ static int hdlcdev_open(struct net_device *dev) | |||
1752 | spin_lock_irqsave(&info->lock, flags); | 1752 | spin_lock_irqsave(&info->lock, flags); |
1753 | get_signals(info); | 1753 | get_signals(info); |
1754 | spin_unlock_irqrestore(&info->lock, flags); | 1754 | spin_unlock_irqrestore(&info->lock, flags); |
1755 | hdlc_set_carrier(info->serial_signals & SerialSignal_DCD, dev); | 1755 | if (info->serial_signals & SerialSignal_DCD) |
1756 | 1756 | netif_carrier_on(dev); | |
1757 | else | ||
1758 | netif_carrier_off(dev); | ||
1757 | return 0; | 1759 | return 0; |
1758 | } | 1760 | } |
1759 | 1761 | ||
@@ -2522,8 +2524,12 @@ void isr_io_pin( SLMP_INFO *info, u16 status ) | |||
2522 | } else | 2524 | } else |
2523 | info->input_signal_events.dcd_down++; | 2525 | info->input_signal_events.dcd_down++; |
2524 | #ifdef CONFIG_HDLC | 2526 | #ifdef CONFIG_HDLC |
2525 | if (info->netcount) | 2527 | if (info->netcount) { |
2526 | hdlc_set_carrier(status & SerialSignal_DCD, info->netdev); | 2528 | if (status & SerialSignal_DCD) |
2529 | netif_carrier_on(info->netdev); | ||
2530 | else | ||
2531 | netif_carrier_off(info->netdev); | ||
2532 | } | ||
2527 | #endif | 2533 | #endif |
2528 | } | 2534 | } |
2529 | if (status & MISCSTATUS_CTS_LATCHED) | 2535 | if (status & MISCSTATUS_CTS_LATCHED) |