aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/i4l
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/isdn/i4l')
-rw-r--r--drivers/isdn/i4l/isdn_x25iface.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/isdn/i4l/isdn_x25iface.c b/drivers/isdn/i4l/isdn_x25iface.c
index efcf1f9327e5..fd10d7c785d4 100644
--- a/drivers/isdn/i4l/isdn_x25iface.c
+++ b/drivers/isdn/i4l/isdn_x25iface.c
@@ -194,7 +194,7 @@ static int isdn_x25iface_receive(struct concap_proto *cprot, struct sk_buff *skb
194 if ( ( (ix25_pdata_t*) (cprot->proto_data) ) 194 if ( ( (ix25_pdata_t*) (cprot->proto_data) )
195 -> state == WAN_CONNECTED ){ 195 -> state == WAN_CONNECTED ){
196 if( skb_push(skb, 1)){ 196 if( skb_push(skb, 1)){
197 skb -> data[0]=0x00; 197 skb->data[0] = X25_IFACE_DATA;
198 skb->protocol = x25_type_trans(skb, cprot->net_dev); 198 skb->protocol = x25_type_trans(skb, cprot->net_dev);
199 netif_rx(skb); 199 netif_rx(skb);
200 return 0; 200 return 0;
@@ -224,7 +224,7 @@ static int isdn_x25iface_connect_ind(struct concap_proto *cprot)
224 224
225 skb = dev_alloc_skb(1); 225 skb = dev_alloc_skb(1);
226 if( skb ){ 226 if( skb ){
227 *( skb_put(skb, 1) ) = 0x01; 227 *(skb_put(skb, 1)) = X25_IFACE_CONNECT;
228 skb->protocol = x25_type_trans(skb, cprot->net_dev); 228 skb->protocol = x25_type_trans(skb, cprot->net_dev);
229 netif_rx(skb); 229 netif_rx(skb);
230 return 0; 230 return 0;
@@ -253,7 +253,7 @@ static int isdn_x25iface_disconn_ind(struct concap_proto *cprot)
253 *state_p = WAN_DISCONNECTED; 253 *state_p = WAN_DISCONNECTED;
254 skb = dev_alloc_skb(1); 254 skb = dev_alloc_skb(1);
255 if( skb ){ 255 if( skb ){
256 *( skb_put(skb, 1) ) = 0x02; 256 *(skb_put(skb, 1)) = X25_IFACE_DISCONNECT;
257 skb->protocol = x25_type_trans(skb, cprot->net_dev); 257 skb->protocol = x25_type_trans(skb, cprot->net_dev);
258 netif_rx(skb); 258 netif_rx(skb);
259 return 0; 259 return 0;
@@ -272,9 +272,10 @@ static int isdn_x25iface_xmit(struct concap_proto *cprot, struct sk_buff *skb)
272 unsigned char firstbyte = skb->data[0]; 272 unsigned char firstbyte = skb->data[0];
273 enum wan_states *state = &((ix25_pdata_t*)cprot->proto_data)->state; 273 enum wan_states *state = &((ix25_pdata_t*)cprot->proto_data)->state;
274 int ret = 0; 274 int ret = 0;
275 IX25DEBUG( "isdn_x25iface_xmit: %s first=%x state=%d \n", MY_DEVNAME(cprot -> net_dev), firstbyte, *state ); 275 IX25DEBUG("isdn_x25iface_xmit: %s first=%x state=%d\n",
276 MY_DEVNAME(cprot->net_dev), firstbyte, *state);
276 switch ( firstbyte ){ 277 switch ( firstbyte ){
277 case 0x00: /* dl_data request */ 278 case X25_IFACE_DATA:
278 if( *state == WAN_CONNECTED ){ 279 if( *state == WAN_CONNECTED ){
279 skb_pull(skb, 1); 280 skb_pull(skb, 1);
280 cprot -> net_dev -> trans_start = jiffies; 281 cprot -> net_dev -> trans_start = jiffies;
@@ -285,7 +286,7 @@ static int isdn_x25iface_xmit(struct concap_proto *cprot, struct sk_buff *skb)
285 } 286 }
286 illegal_state_warn( *state, firstbyte ); 287 illegal_state_warn( *state, firstbyte );
287 break; 288 break;
288 case 0x01: /* dl_connect request */ 289 case X25_IFACE_CONNECT:
289 if( *state == WAN_DISCONNECTED ){ 290 if( *state == WAN_DISCONNECTED ){
290 *state = WAN_CONNECTING; 291 *state = WAN_CONNECTING;
291 ret = cprot -> dops -> connect_req(cprot); 292 ret = cprot -> dops -> connect_req(cprot);
@@ -298,7 +299,7 @@ static int isdn_x25iface_xmit(struct concap_proto *cprot, struct sk_buff *skb)
298 illegal_state_warn( *state, firstbyte ); 299 illegal_state_warn( *state, firstbyte );
299 } 300 }
300 break; 301 break;
301 case 0x02: /* dl_disconnect request */ 302 case X25_IFACE_DISCONNECT:
302 switch ( *state ){ 303 switch ( *state ){
303 case WAN_DISCONNECTED: 304 case WAN_DISCONNECTED:
304 /* Should not happen. However, give upper layer a 305 /* Should not happen. However, give upper layer a
@@ -318,7 +319,7 @@ static int isdn_x25iface_xmit(struct concap_proto *cprot, struct sk_buff *skb)
318 illegal_state_warn( *state, firstbyte ); 319 illegal_state_warn( *state, firstbyte );
319 } 320 }
320 break; 321 break;
321 case 0x03: /* changing lapb parameters requested */ 322 case X25_IFACE_PARAMS:
322 printk(KERN_WARNING "isdn_x25iface_xmit: setting of lapb" 323 printk(KERN_WARNING "isdn_x25iface_xmit: setting of lapb"
323 " options not yet supported\n"); 324 " options not yet supported\n");
324 break; 325 break;