diff options
author | Karsten Keil <keil@b1-systems.de> | 2009-07-08 14:31:42 -0400 |
---|---|---|
committer | Karsten Keil <keil@b1-systems.de> | 2009-07-25 14:16:01 -0400 |
commit | c38fc3bc2ecddd4f5278131603e6964cbed071b2 (patch) | |
tree | 3821cf2fc6226375bbbf8c338316eef33f5b899d /include/linux/isdn | |
parent | 6bd4bcd3cd8affc09eaee7efbc037f65f4a71501 (diff) |
ISDN: Add support for none reverse bitstreams to isdnhdc
The original isdnhdlc code was developed for devices which had
reversed bitorder in the byte stream. Adding code to handle normal
bitstreams as well.
Signed-off-by: Karsten Keil <keil@b1-systems.de>
Diffstat (limited to 'include/linux/isdn')
-rw-r--r-- | include/linux/isdn/hdlc.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/include/linux/isdn/hdlc.h b/include/linux/isdn/hdlc.h index 8f3540c7f692..4b3ecc40889a 100644 --- a/include/linux/isdn/hdlc.h +++ b/include/linux/isdn/hdlc.h | |||
@@ -6,6 +6,7 @@ | |||
6 | * controllers. | 6 | * controllers. |
7 | * | 7 | * |
8 | * Copyright (C) | 8 | * Copyright (C) |
9 | * 2009 Karsten Keil <keil@b1-systems.de> | ||
9 | * 2002 Wolfgang Mües <wolfgang@iksw-muees.de> | 10 | * 2002 Wolfgang Mües <wolfgang@iksw-muees.de> |
10 | * 2001 Frode Isaksen <fisaksen@bewan.com> | 11 | * 2001 Frode Isaksen <fisaksen@bewan.com> |
11 | * 2001 Kai Germaschewski <kai.germaschewski@gmx.de> | 12 | * 2001 Kai Germaschewski <kai.germaschewski@gmx.de> |
@@ -50,8 +51,14 @@ struct isdnhdlc_vars { | |||
50 | u32 do_adapt56:1; | 51 | u32 do_adapt56:1; |
51 | /* set if in closing phase (need to send CRC + flag) */ | 52 | /* set if in closing phase (need to send CRC + flag) */ |
52 | u32 do_closing:1; | 53 | u32 do_closing:1; |
54 | /* set if data is bitreverse */ | ||
55 | u32 do_bitreverse:1; | ||
53 | }; | 56 | }; |
54 | 57 | ||
58 | /* Feature Flags */ | ||
59 | #define HDLC_56KBIT 0x01 | ||
60 | #define HDLC_DCHANNEL 0x02 | ||
61 | #define HDLC_BITREVERSE 0x04 | ||
55 | 62 | ||
56 | /* | 63 | /* |
57 | The return value from isdnhdlc_decode is | 64 | The return value from isdnhdlc_decode is |
@@ -62,13 +69,12 @@ struct isdnhdlc_vars { | |||
62 | #define HDLC_CRC_ERROR 2 | 69 | #define HDLC_CRC_ERROR 2 |
63 | #define HDLC_LENGTH_ERROR 3 | 70 | #define HDLC_LENGTH_ERROR 3 |
64 | 71 | ||
65 | extern void isdnhdlc_rcv_init(struct isdnhdlc_vars *hdlc, int do_adapt56); | 72 | extern void isdnhdlc_rcv_init(struct isdnhdlc_vars *hdlc, u32 features); |
66 | 73 | ||
67 | extern int isdnhdlc_decode(struct isdnhdlc_vars *hdlc, const u8 *src, | 74 | extern int isdnhdlc_decode(struct isdnhdlc_vars *hdlc, const u8 *src, |
68 | int slen, int *count, u8 *dst, int dsize); | 75 | int slen, int *count, u8 *dst, int dsize); |
69 | 76 | ||
70 | extern void isdnhdlc_out_init(struct isdnhdlc_vars *hdlc, int is_d_channel, | 77 | extern void isdnhdlc_out_init(struct isdnhdlc_vars *hdlc, u32 features); |
71 | int do_adapt56); | ||
72 | 78 | ||
73 | extern int isdnhdlc_encode(struct isdnhdlc_vars *hdlc, const u8 *src, | 79 | extern int isdnhdlc_encode(struct isdnhdlc_vars *hdlc, const u8 *src, |
74 | u16 slen, int *count, u8 *dst, int dsize); | 80 | u16 slen, int *count, u8 *dst, int dsize); |