aboutsummaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-08-04 17:00:37 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-08-04 17:00:37 -0700
commit82248a5e92793014d156a12dbcbba633794ce9f8 (patch)
treec91d54ea1122d8faf69bf15c7b8e1dc6921296b4 /include/linux
parentc2d5cedadcd3976cfc1fa5590e3a73a059c6401a (diff)
parent31981db0d0b665713ab3e9531f936fdb67947225 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/kkeil/ISDN-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/kkeil/ISDN-2.6: Add DIP switch readout for HFC-4S IOB4ST Fix remaining big endian issue of hfcmulti mISDN cleanup user interface mISDN fix main ISDN Makefile
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/mISDNif.h32
1 files changed, 27 insertions, 5 deletions
diff --git a/include/linux/mISDNif.h b/include/linux/mISDNif.h
index 5c948f33781..8f2d60da04e 100644
--- a/include/linux/mISDNif.h
+++ b/include/linux/mISDNif.h
@@ -37,7 +37,7 @@
*/
#define MISDN_MAJOR_VERSION 1
#define MISDN_MINOR_VERSION 0
-#define MISDN_RELEASE 18
+#define MISDN_RELEASE 19
/* primitives for information exchange
* generell format
@@ -242,7 +242,8 @@ struct mISDNhead {
#define TEI_SAPI 63
#define CTRL_SAPI 0
-#define MISDN_CHMAP_SIZE 4
+#define MISDN_MAX_CHANNEL 127
+#define MISDN_CHMAP_SIZE ((MISDN_MAX_CHANNEL + 1) >> 3)
#define SOL_MISDN 0
@@ -275,11 +276,32 @@ struct mISDN_devinfo {
u_int Dprotocols;
u_int Bprotocols;
u_int protocol;
- u_long channelmap[MISDN_CHMAP_SIZE];
+ u_char channelmap[MISDN_CHMAP_SIZE];
u_int nrbchan;
char name[MISDN_MAX_IDLEN];
};
+static inline int
+test_channelmap(u_int nr, u_char *map)
+{
+ if (nr <= MISDN_MAX_CHANNEL)
+ return map[nr >> 3] & (1 << (nr & 7));
+ else
+ return 0;
+}
+
+static inline void
+set_channelmap(u_int nr, u_char *map)
+{
+ map[nr >> 3] |= (1 << (nr & 7));
+}
+
+static inline void
+clear_channelmap(u_int nr, u_char *map)
+{
+ map[nr >> 3] &= ~(1 << (nr & 7));
+}
+
/* CONTROL_CHANNEL parameters */
#define MISDN_CTRL_GETOP 0x0000
#define MISDN_CTRL_LOOP 0x0001
@@ -405,7 +427,7 @@ struct mISDNdevice {
u_int Dprotocols;
u_int Bprotocols;
u_int nrbchan;
- u_long channelmap[MISDN_CHMAP_SIZE];
+ u_char channelmap[MISDN_CHMAP_SIZE];
struct list_head bchannels;
struct mISDNchannel *teimgr;
struct device dev;
@@ -430,7 +452,7 @@ struct mISDNstack {
#endif
};
-/* global alloc/queue dunctions */
+/* global alloc/queue functions */
static inline struct sk_buff *
mI_alloc_skb(unsigned int len, gfp_t gfp_mask)