Commit aa799cfe authored by Kai Germaschewski's avatar Kai Germaschewski

ISDN: Move isdn_net_lib specific definitions out of linux/isdn.h

isdn_net_dev and isdn_net_local logically are used by isdn_net_lib,
so let's move them there.
parent 72166211
......@@ -44,7 +44,7 @@ struct isdn_slot {
unsigned long obytes; /* Statistics outgoing bytes */
struct isdn_v110 iv110; /* For V.110 */
int m_idx; /* Index for mdm.... */
isdn_net_dev *idev; /* pointer to isdn_net_dev */
isdn_net_dev *priv; /* pointer to isdn_net_dev */
};
static struct isdn_slot slot[ISDN_MAX_CHANNELS];
......@@ -2023,19 +2023,19 @@ isdn_slot_num(int sl)
}
void
isdn_slot_set_idev(int sl, isdn_net_dev *idev)
isdn_slot_set_priv(int sl, void *priv)
{
BUG_ON(sl < 0);
slot[sl].idev = idev;
slot[sl].priv = priv;
}
isdn_net_dev *
isdn_slot_idev(int sl)
void *
isdn_slot_priv(int sl)
{
BUG_ON(sl < 0);
return slot[sl].idev;
return slot[sl].priv;
}
int
......
......@@ -96,6 +96,6 @@ extern void isdn_slot_set_usage(int slot, int usage);
extern char *isdn_slot_num(int slot);
extern int isdn_slot_m_idx(int slot);
extern void isdn_slot_set_m_idx(int slot, int midx);
extern void isdn_slot_set_idev(int sl, isdn_net_dev *);
extern isdn_net_dev *isdn_slot_idev(int sl);
extern void isdn_slot_set_priv(int sl, void *);
extern void *isdn_slot_priv(int sl);
extern int isdn_hard_header_len(void);
......@@ -7,8 +7,7 @@
* of the GNU General Public License, incorporated herein by reference.
*/
#include <linux/ppp_defs.h> /* for PPP_PROTOCOL */
#include <linux/isdn_ppp.h> /* for isdn_ppp info */
#include "isdn_net_lib.h"
extern struct file_operations isdn_ppp_fops;
extern struct isdn_netif_ops isdn_ppp_ops;
......
......@@ -12,8 +12,7 @@
#ifndef __ISDN_PPP_MP_H__
#define __ISDN_PPP_MP_H__
#include <linux/kernel.h>
#include <linux/isdn.h>
#include "isdn_net_lib.h"
#ifdef CONFIG_ISDN_MPP
......
......@@ -10,9 +10,7 @@
#ifndef __ISDN_PPP_VJ_H__
#define __ISDN_PPP_VJ_H__
#include <linux/kernel.h>
#include <linux/isdn.h>
#include "isdn_net_lib.h"
#ifdef CONFIG_ISDN_PPP_VJ
......
......@@ -278,142 +278,6 @@ struct isdn_net_phone {
which holds the linux device structure (here: isdn_net_device)
*/
typedef struct {
unsigned long seqerrs;
unsigned long frame_drops;
unsigned long overflows;
unsigned long max_queue_len;
} isdn_mppp_stats;
/* Local interface-data */
typedef struct isdn_net_local_s {
ulong magic;
struct net_device_stats stats; /* Ethernet Statistics */
int flags; /* Connection-flags */
int dialmax; /* Max. Number of Dial-retries */
int dialtimeout; /* How long shall we try on dialing */
int dialwait; /* wait after failed attempt */
int cbdelay; /* Delay before Callback starts */
char msn[ISDN_MSNLEN]; /* MSNs/EAZs for this interface */
u_char cbhup; /* Flag: Reject Call before Callback*/
int hupflags; /* Flags for charge-unit-hangup: */
int onhtime; /* Time to keep link up */
u_char p_encap; /* Packet encapsulation */
u_char l2_proto; /* Layer-2-protocol */
u_char l3_proto; /* Layer-3-protocol */
ulong slavedelay; /* Dynamic bundling delaytime */
int triggercps; /* BogoCPS needed for trigger slave */
struct list_head phone[2]; /* List of remote-phonenumbers */
/* phone[0] = Incoming Numbers */
/* phone[1] = Outgoing Numbers */
struct list_head slaves; /* list of all bundled channels
protected by serializing config
ioctls / no change allowed when
interface is running */
struct list_head online; /* list of all bundled channels
which can be used for actual
data (IP) transfer
protected by xmit_lock */
spinlock_t xmit_lock; /* used to protect the xmit path of
a net_device, including all
associated channels's frame_cnt */
struct list_head running_devs; /* member of global running_devs */
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
unsigned int mp_cfg;
u32 mp_txseq;
struct sk_buff_head mp_frags; /* fragments sl list */
u32 mp_rxseq; /* last processed packet seq #: any
packets with smaller seq # will
be dropped unconditionally */
struct ippp_ccp *ccp;
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 */
ulong cisco_myseq; /* Local keepalive seq. for Cisco */
ulong cisco_mineseen; /* returned keepalive seq. from remote */
ulong cisco_yourseq; /* Remote keepalive seq. for Cisco */
int cisco_keepalive_period; /* keepalive period */
ulong cisco_last_slarp_in; /* jiffie of last keepalive packet we received */
char cisco_line_state; /* state of line according to keepalive packets */
char cisco_debserint; /* debugging flag of cisco hdlc with slarp */
struct timer_list cisco_timer;
struct isdn_netif_ops *ops;
struct net_device dev; /* interface to upper levels */
} isdn_net_local;
/* the interface itself */
typedef struct isdn_net_dev_s {
int isdn_slot; /* Index to isdn device/channel */
int pre_device; /* Preselected isdn-device */
int pre_channel; /* Preselected isdn-channel */
int exclusive; /* -1 if non excl./idx to excl chan */
struct timer_list dial_timer; /* dial events timer */
struct fsm_inst fi; /* call control state machine */
int dial_event; /* event in case of timer expiry */
int dial; /* # of phone number just dialed */
int outgoing; /* Flag: outgoing call */
int dialretry; /* Counter for Dialout-retries */
int cps; /* current speed of this interface */
int transcount; /* byte-counter for cps-calculation */
int last_jiffies; /* when transcount was reset */
int sqfull; /* Flag: netdev-queue overloaded */
ulong sqfull_stamp; /* Start-Time of overload */
int huptimer; /* Timeout-counter for auto-hangup */
int charge; /* Counter for charging units */
int charge_state; /* ChargeInfo state machine */
unsigned long chargetime; /* Timer for Charging info */
int chargeint; /* Interval between charge-infos */
int pppbind; /* ippp device for bindings */
struct ipppd *ipppd; /* /dev/ipppX which controls us */
struct sk_buff_head super_tx_queue; /* List of supervisory frames to */
/* be transmitted asap */
int frame_cnt; /* number of frames currently */
/* queued in HL driver */
struct tasklet_struct tlet;
isdn_net_local *mlp; /* Ptr to master device for all devs*/
struct list_head slaves; /* member of local->slaves */
struct list_head online; /* member of local->online */
char name[10]; /* Name of device */
struct list_head global_list; /* global list of all isdn_net_devs */
#ifdef CONFIG_ISDN_PPP
unsigned int pppcfg;
u32 mp_rxseq; /* last seq no seen on this channel */
struct ippp_ccp *ccp;
unsigned long debug;
#endif
#ifdef CONFIG_ISDN_X25
struct concap_proto *cprot; /* connection oriented encapsulation protocol */
#endif
} isdn_net_dev;
/*===================== End of ip-over-ISDN stuff ===========================*/
/*======================= Start of ISDN-tty stuff ===========================*/
......
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