Commit d26d04dc authored by Kai Germaschewski's avatar Kai Germaschewski

ISDN: Convert ISDN/X.25 to inl_priv / ind_priv

This is just simple renaming. However, ISDN/X.25 looks currently
rather badly broken, don't expect it to compile ;(
parent e7288954
...@@ -111,8 +111,8 @@ static int ...@@ -111,8 +111,8 @@ static int
isdn_x25_open(isdn_net_local *lp) isdn_x25_open(isdn_net_local *lp)
{ {
struct net_device * dev = & lp -> netdev -> dev; struct net_device * dev = & lp -> netdev -> dev;
struct concap_proto * cprot = lp -> netdev -> cprot; struct concap_proto * cprot = lp -> netdev -> ind_priv;
struct concap_proto * dops = lp -> dops; struct concap_proto * dops = lp -> inl_priv;
unsigned long flags; unsigned long flags;
save_flags(flags); save_flags(flags);
...@@ -126,7 +126,7 @@ isdn_x25_open(isdn_net_local *lp) ...@@ -126,7 +126,7 @@ isdn_x25_open(isdn_net_local *lp)
static void static void
isdn_x25_close(isdn_net_local *lp) isdn_x25_close(isdn_net_local *lp)
{ {
struct concap_proto * cprot = lp -> netdev -> cprot; struct concap_proto * cprot = lp -> netdev -> ind_priv;
if( cprot && cprot -> pops ) cprot -> pops -> close( cprot ); if( cprot && cprot -> pops ) cprot -> pops -> close( cprot );
} }
...@@ -134,7 +134,7 @@ isdn_x25_close(isdn_net_local *lp) ...@@ -134,7 +134,7 @@ isdn_x25_close(isdn_net_local *lp)
static void static void
isdn_x25_connected(isdn_net_local *lp) isdn_x25_connected(isdn_net_local *lp)
{ {
struct concap_proto *cprot = lp -> netdev -> cprot; struct concap_proto *cprot = lp -> netdev -> ind_priv;
struct concap_proto_ops *pops = cprot ? cprot -> pops : 0; struct concap_proto_ops *pops = cprot ? cprot -> pops : 0;
/* try if there are generic concap receiver routines */ /* try if there are generic concap receiver routines */
...@@ -148,7 +148,7 @@ isdn_x25_connected(isdn_net_local *lp) ...@@ -148,7 +148,7 @@ isdn_x25_connected(isdn_net_local *lp)
static void static void
isdn_x25_disconnected(isdn_net_local *lp) isdn_x25_disconnected(isdn_net_local *lp)
{ {
struct concap_proto *cprot = lp -> netdev -> cprot; struct concap_proto *cprot = lp -> netdev -> ind_priv;
struct concap_proto_ops *pops = cprot ? cprot -> pops : 0; struct concap_proto_ops *pops = cprot ? cprot -> pops : 0;
/* try if there are generic encap protocol /* try if there are generic encap protocol
...@@ -173,7 +173,7 @@ isdn_x25_start_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -173,7 +173,7 @@ isdn_x25_start_xmit(struct sk_buff *skb, struct net_device *dev)
when a dl_establish request is received from the upper layer. when a dl_establish request is received from the upper layer.
*/ */
isdn_net_local *lp = (isdn_net_local *) dev->priv; isdn_net_local *lp = (isdn_net_local *) dev->priv;
struct concap_proto * cprot = lp -> netdev -> cprot; struct concap_proto * cprot = lp -> netdev -> ind_priv;
int ret = cprot -> pops -> encap_and_xmit ( cprot , skb); int ret = cprot -> pops -> encap_and_xmit ( cprot , skb);
if (ret) if (ret)
...@@ -186,7 +186,7 @@ static void ...@@ -186,7 +186,7 @@ static void
isdn_x25_receive(isdn_net_dev *p, isdn_net_local *olp, struct sk_buff *skb) isdn_x25_receive(isdn_net_dev *p, isdn_net_local *olp, struct sk_buff *skb)
{ {
isdn_net_local *lp = &p->local; isdn_net_local *lp = &p->local;
struct concap_proto *cprot = lp -> netdev -> cprot; struct concap_proto *cprot = lp -> netdev -> ind_priv;
/* try if there are generic sync_device receiver routines */ /* try if there are generic sync_device receiver routines */
if(cprot) if(cprot)
...@@ -207,7 +207,7 @@ isdn_x25_init(struct net_device *dev) ...@@ -207,7 +207,7 @@ isdn_x25_init(struct net_device *dev)
/* ... , prepare for configuration of new one ... */ /* ... , prepare for configuration of new one ... */
switch ( lp->p_encap ){ switch ( lp->p_encap ){
case ISDN_NET_ENCAP_X25IFACE: case ISDN_NET_ENCAP_X25IFACE:
lp -> dops = &isdn_concap_reliable_dl_dops; lp -> inl_priv = &isdn_concap_reliable_dl_dops;
} }
/* ... and allocate new one ... */ /* ... and allocate new one ... */
p -> cprot = isdn_concap_new( cfg -> p_encap ); p -> cprot = isdn_concap_new( cfg -> p_encap );
...@@ -233,7 +233,7 @@ isdn_x25_cleanup(isdn_net_dev *p) ...@@ -233,7 +233,7 @@ isdn_x25_cleanup(isdn_net_dev *p)
if( cprot && cprot -> pops ) if( cprot && cprot -> pops )
cprot -> pops -> proto_del ( cprot ); cprot -> pops -> proto_del ( cprot );
p -> cprot = NULL; p -> cprot = NULL;
lp -> dops = NULL; lp -> inl_priv = NULL;
restore_flags(flags); restore_flags(flags);
} }
......
...@@ -134,9 +134,6 @@ struct isdn_net_local_s { ...@@ -134,9 +134,6 @@ struct isdn_net_local_s {
struct list_head running_devs; /* member of global running_devs */ struct list_head running_devs; /* member of global running_devs */
atomic_t refcnt; /* references held by ISDN code */ atomic_t refcnt; /* references held by ISDN code */
#ifdef CONFIG_ISDN_X25
struct concap_device_ops *dops; /* callbacks used by encapsulator */
#endif
#ifdef CONFIG_ISDN_PPP #ifdef CONFIG_ISDN_PPP
unsigned int mp_cfg; unsigned int mp_cfg;
u32 mp_txseq; u32 mp_txseq;
...@@ -208,10 +205,8 @@ struct isdn_net_dev_s { ...@@ -208,10 +205,8 @@ struct isdn_net_dev_s {
struct ippp_ccp *ccp; struct ippp_ccp *ccp;
unsigned long debug; unsigned long debug;
#endif #endif
#ifdef CONFIG_ISDN_X25 void *ind_priv; /* interface types can put their
struct concap_proto *cprot; /* connection oriented encapsulation protocol */ private data here */
#endif
}; };
/* ====================================================================== */ /* ====================================================================== */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment