aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/i4l/isdn_x25iface.c
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2010-05-22 02:36:56 -0400
committerGrant Likely <grant.likely@secretlab.ca>2010-05-22 02:36:56 -0400
commitcf9b59e9d3e008591d1f54830f570982bb307a0d (patch)
tree113478ce8fd8c832ba726ffdf59b82cb46356476 /drivers/isdn/i4l/isdn_x25iface.c
parent44504b2bebf8b5823c59484e73096a7d6574471d (diff)
parentf4b87dee923342505e1ddba8d34ce9de33e75050 (diff)
Merge remote branch 'origin' into secretlab/next-devicetree
Merging in current state of Linus' tree to deal with merge conflicts and build failures in vio.c after merge. Conflicts: drivers/i2c/busses/i2c-cpm.c drivers/i2c/busses/i2c-mpc.c drivers/net/gianfar.c Also fixed up one line in arch/powerpc/kernel/vio.c to use the correct node pointer. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'drivers/isdn/i4l/isdn_x25iface.c')
-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;