diff options
Diffstat (limited to 'drivers/char/pcmcia/synclink_cs.c')
-rw-r--r-- | drivers/char/pcmcia/synclink_cs.c | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/drivers/char/pcmcia/synclink_cs.c b/drivers/char/pcmcia/synclink_cs.c index 1bd12296dca5..74d21c1c104f 100644 --- a/drivers/char/pcmcia/synclink_cs.c +++ b/drivers/char/pcmcia/synclink_cs.c | |||
@@ -75,8 +75,10 @@ | |||
75 | #include <pcmcia/cisreg.h> | 75 | #include <pcmcia/cisreg.h> |
76 | #include <pcmcia/ds.h> | 76 | #include <pcmcia/ds.h> |
77 | 77 | ||
78 | #ifdef CONFIG_HDLC_MODULE | 78 | #if defined(CONFIG_HDLC) || (defined(CONFIG_HDLC_MODULE) && defined(CONFIG_SYNCLINK_CS_MODULE)) |
79 | #define CONFIG_HDLC 1 | 79 | #define SYNCLINK_GENERIC_HDLC 1 |
80 | #else | ||
81 | #define SYNCLINK_GENERIC_HDLC 0 | ||
80 | #endif | 82 | #endif |
81 | 83 | ||
82 | #define GET_USER(error,value,addr) error = get_user(value,addr) | 84 | #define GET_USER(error,value,addr) error = get_user(value,addr) |
@@ -235,7 +237,7 @@ typedef struct _mgslpc_info { | |||
235 | int dosyncppp; | 237 | int dosyncppp; |
236 | spinlock_t netlock; | 238 | spinlock_t netlock; |
237 | 239 | ||
238 | #ifdef CONFIG_HDLC | 240 | #if SYNCLINK_GENERIC_HDLC |
239 | struct net_device *netdev; | 241 | struct net_device *netdev; |
240 | #endif | 242 | #endif |
241 | 243 | ||
@@ -392,7 +394,7 @@ static void tx_timeout(unsigned long context); | |||
392 | 394 | ||
393 | static int ioctl_common(MGSLPC_INFO *info, unsigned int cmd, unsigned long arg); | 395 | static int ioctl_common(MGSLPC_INFO *info, unsigned int cmd, unsigned long arg); |
394 | 396 | ||
395 | #ifdef CONFIG_HDLC | 397 | #if SYNCLINK_GENERIC_HDLC |
396 | #define dev_to_port(D) (dev_to_hdlc(D)->priv) | 398 | #define dev_to_port(D) (dev_to_hdlc(D)->priv) |
397 | static void hdlcdev_tx_done(MGSLPC_INFO *info); | 399 | static void hdlcdev_tx_done(MGSLPC_INFO *info); |
398 | static void hdlcdev_rx(MGSLPC_INFO *info, char *buf, int size); | 400 | static void hdlcdev_rx(MGSLPC_INFO *info, char *buf, int size); |
@@ -1053,7 +1055,7 @@ static void tx_done(MGSLPC_INFO *info) | |||
1053 | info->drop_rts_on_tx_done = 0; | 1055 | info->drop_rts_on_tx_done = 0; |
1054 | } | 1056 | } |
1055 | 1057 | ||
1056 | #ifdef CONFIG_HDLC | 1058 | #if SYNCLINK_GENERIC_HDLC |
1057 | if (info->netcount) | 1059 | if (info->netcount) |
1058 | hdlcdev_tx_done(info); | 1060 | hdlcdev_tx_done(info); |
1059 | else | 1061 | else |
@@ -1164,7 +1166,7 @@ static void dcd_change(MGSLPC_INFO *info) | |||
1164 | } | 1166 | } |
1165 | else | 1167 | else |
1166 | info->input_signal_events.dcd_down++; | 1168 | info->input_signal_events.dcd_down++; |
1167 | #ifdef CONFIG_HDLC | 1169 | #if SYNCLINK_GENERIC_HDLC |
1168 | if (info->netcount) { | 1170 | if (info->netcount) { |
1169 | if (info->serial_signals & SerialSignal_DCD) | 1171 | if (info->serial_signals & SerialSignal_DCD) |
1170 | netif_carrier_on(info->netdev); | 1172 | netif_carrier_on(info->netdev); |
@@ -2953,7 +2955,7 @@ static void mgslpc_add_device(MGSLPC_INFO *info) | |||
2953 | printk( "SyncLink PC Card %s:IO=%04X IRQ=%d\n", | 2955 | printk( "SyncLink PC Card %s:IO=%04X IRQ=%d\n", |
2954 | info->device_name, info->io_base, info->irq_level); | 2956 | info->device_name, info->io_base, info->irq_level); |
2955 | 2957 | ||
2956 | #ifdef CONFIG_HDLC | 2958 | #if SYNCLINK_GENERIC_HDLC |
2957 | hdlcdev_init(info); | 2959 | hdlcdev_init(info); |
2958 | #endif | 2960 | #endif |
2959 | } | 2961 | } |
@@ -2969,7 +2971,7 @@ static void mgslpc_remove_device(MGSLPC_INFO *remove_info) | |||
2969 | last->next_device = info->next_device; | 2971 | last->next_device = info->next_device; |
2970 | else | 2972 | else |
2971 | mgslpc_device_list = info->next_device; | 2973 | mgslpc_device_list = info->next_device; |
2972 | #ifdef CONFIG_HDLC | 2974 | #if SYNCLINK_GENERIC_HDLC |
2973 | hdlcdev_exit(info); | 2975 | hdlcdev_exit(info); |
2974 | #endif | 2976 | #endif |
2975 | release_resources(info); | 2977 | release_resources(info); |
@@ -3901,7 +3903,7 @@ static int rx_get_frame(MGSLPC_INFO *info) | |||
3901 | return_frame = 1; | 3903 | return_frame = 1; |
3902 | } | 3904 | } |
3903 | framesize = 0; | 3905 | framesize = 0; |
3904 | #ifdef CONFIG_HDLC | 3906 | #if SYNCLINK_GENERIC_HDLC |
3905 | { | 3907 | { |
3906 | struct net_device_stats *stats = hdlc_stats(info->netdev); | 3908 | struct net_device_stats *stats = hdlc_stats(info->netdev); |
3907 | stats->rx_errors++; | 3909 | stats->rx_errors++; |
@@ -3935,7 +3937,7 @@ static int rx_get_frame(MGSLPC_INFO *info) | |||
3935 | ++framesize; | 3937 | ++framesize; |
3936 | } | 3938 | } |
3937 | 3939 | ||
3938 | #ifdef CONFIG_HDLC | 3940 | #if SYNCLINK_GENERIC_HDLC |
3939 | if (info->netcount) | 3941 | if (info->netcount) |
3940 | hdlcdev_rx(info, buf->data, framesize); | 3942 | hdlcdev_rx(info, buf->data, framesize); |
3941 | else | 3943 | else |
@@ -4091,7 +4093,7 @@ static void tx_timeout(unsigned long context) | |||
4091 | 4093 | ||
4092 | spin_unlock_irqrestore(&info->lock,flags); | 4094 | spin_unlock_irqrestore(&info->lock,flags); |
4093 | 4095 | ||
4094 | #ifdef CONFIG_HDLC | 4096 | #if SYNCLINK_GENERIC_HDLC |
4095 | if (info->netcount) | 4097 | if (info->netcount) |
4096 | hdlcdev_tx_done(info); | 4098 | hdlcdev_tx_done(info); |
4097 | else | 4099 | else |
@@ -4099,7 +4101,7 @@ static void tx_timeout(unsigned long context) | |||
4099 | bh_transmit(info); | 4101 | bh_transmit(info); |
4100 | } | 4102 | } |
4101 | 4103 | ||
4102 | #ifdef CONFIG_HDLC | 4104 | #if SYNCLINK_GENERIC_HDLC |
4103 | 4105 | ||
4104 | /** | 4106 | /** |
4105 | * called by generic HDLC layer when protocol selected (PPP, frame relay, etc.) | 4107 | * called by generic HDLC layer when protocol selected (PPP, frame relay, etc.) |