[WAN]: Converted synclink drivers to use netif_carrier_*()
authorKrzysztof Halasa <khc@pm.waw.pl>
Fri, 21 Jul 2006 21:44:55 +0000 (14:44 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 21 Jul 2006 21:44:55 +0000 (14:44 -0700)
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>
drivers/char/pcmcia/synclink_cs.c
drivers/char/synclink.c
drivers/char/synclink_gt.c
drivers/char/synclinkmp.c

index 17bc8abd5df50b8e9ad1c821340f333807504586..00f574cbb0d47ca0c69d8b4b0c2ed77be9e24282 100644 (file)
@@ -1174,8 +1174,12 @@ static void dcd_change(MGSLPC_INFO *info)
        else
                info->input_signal_events.dcd_down++;
 #ifdef CONFIG_HDLC
-       if (info->netcount)
-               hdlc_set_carrier(info->serial_signals & SerialSignal_DCD, info->netdev);
+       if (info->netcount) {
+               if (info->serial_signals & SerialSignal_DCD)
+                       netif_carrier_on(info->netdev);
+               else
+                       netif_carrier_off(info->netdev);
+       }
 #endif
        wake_up_interruptible(&info->status_event_wait_q);
        wake_up_interruptible(&info->event_wait_q);
@@ -4251,8 +4255,10 @@ static int hdlcdev_open(struct net_device *dev)
        spin_lock_irqsave(&info->lock, flags);
        get_signals(info);
        spin_unlock_irqrestore(&info->lock, flags);
-       hdlc_set_carrier(info->serial_signals & SerialSignal_DCD, dev);
-
+       if (info->serial_signals & SerialSignal_DCD)
+               netif_carrier_on(dev);
+       else
+               netif_carrier_off(dev);
        return 0;
 }
 
index df782dd1098c1b61b92fc915d18f471b07dff0ad..78b1b1a2732b3e9216556c3caa2b77354a0457d6 100644 (file)
@@ -1344,8 +1344,12 @@ static void mgsl_isr_io_pin( struct mgsl_struct *info )
                        } else
                                info->input_signal_events.dcd_down++;
 #ifdef CONFIG_HDLC
-                       if (info->netcount)
-                               hdlc_set_carrier(status & MISCSTATUS_DCD, info->netdev);
+                       if (info->netcount) {
+                               if (status & MISCSTATUS_DCD)
+                                       netif_carrier_on(info->netdev);
+                               else
+                                       netif_carrier_off(info->netdev);
+                       }
 #endif
                }
                if (status & MISCSTATUS_CTS_LATCHED)
@@ -7844,8 +7848,10 @@ static int hdlcdev_open(struct net_device *dev)
        spin_lock_irqsave(&info->irq_spinlock, flags);
        usc_get_serial_signals(info);
        spin_unlock_irqrestore(&info->irq_spinlock, flags);
-       hdlc_set_carrier(info->serial_signals & SerialSignal_DCD, dev);
-
+       if (info->serial_signals & SerialSignal_DCD)
+               netif_carrier_on(dev);
+       else
+               netif_carrier_off(dev);
        return 0;
 }
 
index e829594195c1d836c6dca220c74e47939a5f45ec..b2dbbdb1bf81340092aa91d8b03e2c4b54f20c6a 100644 (file)
@@ -1497,8 +1497,10 @@ static int hdlcdev_open(struct net_device *dev)
        spin_lock_irqsave(&info->lock, flags);
        get_signals(info);
        spin_unlock_irqrestore(&info->lock, flags);
-       hdlc_set_carrier(info->signals & SerialSignal_DCD, dev);
-
+       if (info->signals & SerialSignal_DCD)
+               netif_carrier_on(dev);
+       else
+               netif_carrier_off(dev);
        return 0;
 }
 
@@ -1997,8 +1999,12 @@ static void dcd_change(struct slgt_info *info)
                info->input_signal_events.dcd_down++;
        }
 #ifdef CONFIG_HDLC
-       if (info->netcount)
-               hdlc_set_carrier(info->signals & SerialSignal_DCD, info->netdev);
+       if (info->netcount) {
+               if (info->signals & SerialSignal_DCD)
+                       netif_carrier_on(info->netdev);
+               else
+                       netif_carrier_off(info->netdev);
+       }
 #endif
        wake_up_interruptible(&info->status_event_wait_q);
        wake_up_interruptible(&info->event_wait_q);
index 1e443a233f5102e3eef924ef0cb114e82b6f8f43..66f3754fbbdf443e891b21cdfcf88c799144e6b9 100644 (file)
@@ -1752,8 +1752,10 @@ static int hdlcdev_open(struct net_device *dev)
        spin_lock_irqsave(&info->lock, flags);
        get_signals(info);
        spin_unlock_irqrestore(&info->lock, flags);
-       hdlc_set_carrier(info->serial_signals & SerialSignal_DCD, dev);
-
+       if (info->serial_signals & SerialSignal_DCD)
+               netif_carrier_on(dev);
+       else
+               netif_carrier_off(dev);
        return 0;
 }
 
@@ -2522,8 +2524,12 @@ void isr_io_pin( SLMP_INFO *info, u16 status )
                        } else
                                info->input_signal_events.dcd_down++;
 #ifdef CONFIG_HDLC
-                       if (info->netcount)
-                               hdlc_set_carrier(status & SerialSignal_DCD, info->netdev);
+                       if (info->netcount) {
+                               if (status & SerialSignal_DCD)
+                                       netif_carrier_on(info->netdev);
+                               else
+                                       netif_carrier_off(info->netdev);
+                       }
 #endif
                }
                if (status & MISCSTATUS_CTS_LATCHED)