aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/i4l/isdn_concap.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/isdn/i4l/isdn_concap.c')
-rw-r--r--drivers/isdn/i4l/isdn_concap.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/drivers/isdn/i4l/isdn_concap.c b/drivers/isdn/i4l/isdn_concap.c
index d568689669f8..91d57304d4d3 100644
--- a/drivers/isdn/i4l/isdn_concap.c
+++ b/drivers/isdn/i4l/isdn_concap.c
@@ -1,5 +1,5 @@
1/* $Id: isdn_concap.c,v 1.1.2.2 2004/01/12 22:37:19 keil Exp $ 1/* $Id: isdn_concap.c,v 1.1.2.2 2004/01/12 22:37:19 keil Exp $
2 * 2 *
3 * Linux ISDN subsystem, protocol encapsulation 3 * Linux ISDN subsystem, protocol encapsulation
4 * 4 *
5 * This software may be used and distributed according to the terms 5 * This software may be used and distributed according to the terms
@@ -25,57 +25,57 @@
25 protocols that require for reliable datalink semantics. That means: 25 protocols that require for reliable datalink semantics. That means:
26 26
27 - before any data is to be submitted the connection must explicitly 27 - before any data is to be submitted the connection must explicitly
28 be set up. 28 be set up.
29 - after the successful set up of the connection is signalled the 29 - after the successful set up of the connection is signalled the
30 connection is considered to be reliably up. 30 connection is considered to be reliably up.
31 31
32 Auto-dialing ist not compatible with this requirements. Thus, auto-dialing 32 Auto-dialing ist not compatible with this requirements. Thus, auto-dialing
33 is completely bypassed. 33 is completely bypassed.
34 34
35 It might be possible to implement a (non standardized) datalink protocol 35 It might be possible to implement a (non standardized) datalink protocol
36 that provides a reliable data link service while using some auto dialing 36 that provides a reliable data link service while using some auto dialing
37 mechanism. Such a protocol would need an auxiliary channel (i.e. user-user- 37 mechanism. Such a protocol would need an auxiliary channel (i.e. user-user-
38 signaling on the D-channel) while the B-channel is down. 38 signaling on the D-channel) while the B-channel is down.
39 */ 39*/
40 40
41 41
42static int isdn_concap_dl_data_req(struct concap_proto *concap, struct sk_buff *skb) 42static int isdn_concap_dl_data_req(struct concap_proto *concap, struct sk_buff *skb)
43{ 43{
44 struct net_device *ndev = concap -> net_dev; 44 struct net_device *ndev = concap->net_dev;
45 isdn_net_dev *nd = ((isdn_net_local *) netdev_priv(ndev))->netdev; 45 isdn_net_dev *nd = ((isdn_net_local *) netdev_priv(ndev))->netdev;
46 isdn_net_local *lp = isdn_net_get_locked_lp(nd); 46 isdn_net_local *lp = isdn_net_get_locked_lp(nd);
47 47
48 IX25DEBUG( "isdn_concap_dl_data_req: %s \n", concap->net_dev->name); 48 IX25DEBUG("isdn_concap_dl_data_req: %s \n", concap->net_dev->name);
49 if (!lp) { 49 if (!lp) {
50 IX25DEBUG( "isdn_concap_dl_data_req: %s : isdn_net_send_skb returned %d\n", concap -> net_dev -> name, 1); 50 IX25DEBUG("isdn_concap_dl_data_req: %s : isdn_net_send_skb returned %d\n", concap->net_dev->name, 1);
51 return 1; 51 return 1;
52 } 52 }
53 lp->huptimer = 0; 53 lp->huptimer = 0;
54 isdn_net_writebuf_skb(lp, skb); 54 isdn_net_writebuf_skb(lp, skb);
55 spin_unlock_bh(&lp->xmit_lock); 55 spin_unlock_bh(&lp->xmit_lock);
56 IX25DEBUG( "isdn_concap_dl_data_req: %s : isdn_net_send_skb returned %d\n", concap -> net_dev -> name, 0); 56 IX25DEBUG("isdn_concap_dl_data_req: %s : isdn_net_send_skb returned %d\n", concap->net_dev->name, 0);
57 return 0; 57 return 0;
58} 58}
59 59
60 60
61static int isdn_concap_dl_connect_req(struct concap_proto *concap) 61static int isdn_concap_dl_connect_req(struct concap_proto *concap)
62{ 62{
63 struct net_device *ndev = concap -> net_dev; 63 struct net_device *ndev = concap->net_dev;
64 isdn_net_local *lp = netdev_priv(ndev); 64 isdn_net_local *lp = netdev_priv(ndev);
65 int ret; 65 int ret;
66 IX25DEBUG( "isdn_concap_dl_connect_req: %s \n", ndev -> name); 66 IX25DEBUG("isdn_concap_dl_connect_req: %s \n", ndev->name);
67 67
68 /* dial ... */ 68 /* dial ... */
69 ret = isdn_net_dial_req( lp ); 69 ret = isdn_net_dial_req(lp);
70 if ( ret ) IX25DEBUG("dialing failed\n"); 70 if (ret) IX25DEBUG("dialing failed\n");
71 return ret; 71 return ret;
72} 72}
73 73
74static int isdn_concap_dl_disconn_req(struct concap_proto *concap) 74static int isdn_concap_dl_disconn_req(struct concap_proto *concap)
75{ 75{
76 IX25DEBUG( "isdn_concap_dl_disconn_req: %s \n", concap -> net_dev -> name); 76 IX25DEBUG("isdn_concap_dl_disconn_req: %s \n", concap->net_dev->name);
77 77
78 isdn_net_hangup( concap -> net_dev ); 78 isdn_net_hangup(concap->net_dev);
79 return 0; 79 return 0;
80} 80}
81 81
@@ -88,10 +88,10 @@ struct concap_device_ops isdn_concap_reliable_dl_dops = {
88/* The following should better go into a dedicated source file such that 88/* The following should better go into a dedicated source file such that
89 this sourcefile does not need to include any protocol specific header 89 this sourcefile does not need to include any protocol specific header
90 files. For now: 90 files. For now:
91 */ 91*/
92struct concap_proto * isdn_concap_new( int encap ) 92struct concap_proto *isdn_concap_new(int encap)
93{ 93{
94 switch ( encap ) { 94 switch (encap) {
95 case ISDN_NET_ENCAP_X25IFACE: 95 case ISDN_NET_ENCAP_X25IFACE:
96 return isdn_x25iface_proto_new(); 96 return isdn_x25iface_proto_new();
97 } 97 }