summaryrefslogtreecommitdiff
path: root/drivers/isdn/hisax/hisax_if.h
blob: 4898fce2d5094d220f529950b1d9b98d8f30c8fb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/*
 * Interface between low level (hardware) drivers and 
 * HiSax protocol stack
 *
 * Author       Kai Germaschewski
 * Copyright    2001 by Kai Germaschewski  <kai.germaschewski@gmx.de>
 * 
 * This software may be used and distributed according to the terms
 * of the GNU General Public License, incorporated herein by reference.
 *
 */

#ifndef __HISAX_IF_H__
#define __HISAX_IF_H__

#include <linux/skbuff.h>

#define REQUEST		0
#define CONFIRM		1
#define INDICATION	2
#define RESPONSE	3

#define PH_ACTIVATE	0x0100
#define PH_DEACTIVATE	0x0110
#define PH_DATA		0x0120
#define PH_PULL		0x0130
#define PH_DATA_E	0x0140

#define L1_MODE_NULL	0
#define L1_MODE_TRANS	1
#define L1_MODE_HDLC	2
#define L1_MODE_EXTRN	3
#define L1_MODE_HDLC_56K 4
#define L1_MODE_MODEM	7
#define L1_MODE_V32	8
#define L1_MODE_FAX	9

struct hisax_if {
	void *priv; // private to driver
	void (*l1l2)(struct hisax_if *, int pr, void *arg);
	void (*l2l1)(struct hisax_if *, int pr, void *arg);
};

struct hisax_b_if {
	struct hisax_if ifc;

	// private to hisax
	struct BCState *bcs;
};

struct hisax_d_if {
	struct hisax_if ifc;

	// private to hisax
	struct module *owner;
	struct IsdnCardState *cs;
	struct hisax_b_if *b_if[2];
	struct sk_buff_head erq;
	long ph_state;
};

int hisax_register(struct hisax_d_if *hisax_if, struct hisax_b_if *b_if[],
		   char *name, int protocol);
void hisax_unregister(struct hisax_d_if *hisax_if);

#endif