Commit 43db5879 authored by Kai Germaschewski's avatar Kai Germaschewski

ISDN/PPP: Move state from ipppd to isdn_net_dev/isdn_net_local

A lot of the state in struct ipppd actually belongs to
isdn_net_dev or isdn_net_local, making it more easily accessible at a
most places, and also removing the ambiguity whether it's link-
or bundle-specific.
parent b449f5b2
...@@ -2093,6 +2093,7 @@ isdn_net_tasklet(unsigned long data) ...@@ -2093,6 +2093,7 @@ isdn_net_tasklet(unsigned long data)
void void
isdn_net_online(isdn_net_dev *idev) isdn_net_online(isdn_net_dev *idev)
{ {
// FIXME check we're connected
isdn_net_local *mlp = idev->mlp; isdn_net_local *mlp = idev->mlp;
unsigned long flags; unsigned long flags;
......
This diff is collapsed.
...@@ -356,6 +356,24 @@ typedef struct isdn_net_local_s { ...@@ -356,6 +356,24 @@ typedef struct isdn_net_local_s {
#ifdef CONFIG_ISDN_X25 #ifdef CONFIG_ISDN_X25
struct concap_device_ops *dops; /* callbacks used by encapsulator */ struct concap_device_ops *dops; /* callbacks used by encapsulator */
#endif #endif
#ifdef CONFIG_ISDN_PPP
unsigned int mpppcfg;
long mp_seqno;
struct isdn_ppp_compressor *compressor;
struct isdn_ppp_compressor *decompressor;
void *comp_stat;
void *decomp_stat;
unsigned long compflags;
struct ippp_ccp_reset *reset;
unsigned long debug;
#ifdef CONFIG_ISDN_PPP_VJ
unsigned char *cbuf;
struct slcompress *slcomp;
#endif
#endif
/* use an own struct for that in later versions */ /* use an own struct for that in later versions */
ulong cisco_myseq; /* Local keepalive seq. for Cisco */ ulong cisco_myseq; /* Local keepalive seq. for Cisco */
ulong cisco_mineseen; /* returned keepalive seq. from remote */ ulong cisco_mineseen; /* returned keepalive seq. from remote */
...@@ -415,6 +433,18 @@ typedef struct isdn_net_dev_s { ...@@ -415,6 +433,18 @@ typedef struct isdn_net_dev_s {
char name[10]; /* Name of device */ char name[10]; /* Name of device */
struct list_head global_list; /* global list of all isdn_net_devs */ struct list_head global_list; /* global list of all isdn_net_devs */
#ifdef CONFIG_ISDN_PPP #ifdef CONFIG_ISDN_PPP
unsigned int pppcfg;
unsigned int pppmru;
unsigned int pppseq; /* last seq no seen */
struct isdn_ppp_compressor *compressor;
struct isdn_ppp_compressor *decompressor;
void *comp_stat;
void *decomp_stat;
unsigned long compflags;
struct ippp_ccp_reset *reset;
unsigned long debug;
ippp_bundle * pb; /* pointer to the common bundle structure ippp_bundle * pb; /* pointer to the common bundle structure
* with the per-bundle data */ * with the per-bundle data */
#endif #endif
......
...@@ -172,7 +172,7 @@ enum ippp_ccp_reset_states { ...@@ -172,7 +172,7 @@ enum ippp_ccp_reset_states {
struct ippp_ccp_reset_state { struct ippp_ccp_reset_state {
enum ippp_ccp_reset_states state; /* State of this transaction */ enum ippp_ccp_reset_states state; /* State of this transaction */
struct ipppd *is; /* Backlink to device stuff */ struct ippp_ccp_reset *icr; /* Backlink */
unsigned char id; /* Backlink id index */ unsigned char id; /* Backlink id index */
unsigned char ta:1; /* The timer is active (flag) */ unsigned char ta:1; /* The timer is active (flag) */
unsigned char expra:1; /* We expect a ResetAck at all */ unsigned char expra:1; /* We expect a ResetAck at all */
...@@ -189,6 +189,10 @@ struct ippp_ccp_reset_state { ...@@ -189,6 +189,10 @@ struct ippp_ccp_reset_state {
struct ippp_ccp_reset { struct ippp_ccp_reset {
struct ippp_ccp_reset_state *rs[256]; /* One per possible id */ struct ippp_ccp_reset_state *rs[256]; /* One per possible id */
unsigned char lastid; /* Last id allocated by the engine */ unsigned char lastid; /* Last id allocated by the engine */
void (*xmit_reset)(void *priv, int proto, unsigned char code,
unsigned char id, unsigned char *data, int len);
void (*kick_up)(void *priv);
void *priv;
}; };
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
......
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