aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mISDNif.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/mISDNif.h')
-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 5c948f337817..8f2d60da04e7 100644
--- a/include/linux/mISDNif.h
+++ b/include/linux/mISDNif.h
@@ -37,7 +37,7 @@
37 */ 37 */
38#define MISDN_MAJOR_VERSION 1 38#define MISDN_MAJOR_VERSION 1
39#define MISDN_MINOR_VERSION 0 39#define MISDN_MINOR_VERSION 0
40#define MISDN_RELEASE 18 40#define MISDN_RELEASE 19
41 41
42/* primitives for information exchange 42/* primitives for information exchange
43 * generell format 43 * generell format
@@ -242,7 +242,8 @@ struct mISDNhead {
242#define TEI_SAPI 63 242#define TEI_SAPI 63
243#define CTRL_SAPI 0 243#define CTRL_SAPI 0
244 244
245#define MISDN_CHMAP_SIZE 4 245#define MISDN_MAX_CHANNEL 127
246#define MISDN_CHMAP_SIZE ((MISDN_MAX_CHANNEL + 1) >> 3)
246 247
247#define SOL_MISDN 0 248#define SOL_MISDN 0
248 249
@@ -275,11 +276,32 @@ struct mISDN_devinfo {
275 u_int Dprotocols; 276 u_int Dprotocols;
276 u_int Bprotocols; 277 u_int Bprotocols;
277 u_int protocol; 278 u_int protocol;
278 u_long channelmap[MISDN_CHMAP_SIZE]; 279 u_char channelmap[MISDN_CHMAP_SIZE];
279 u_int nrbchan; 280 u_int nrbchan;
280 char name[MISDN_MAX_IDLEN]; 281 char name[MISDN_MAX_IDLEN];
281}; 282};
282 283
284static inline int
285test_channelmap(u_int nr, u_char *map)
286{
287 if (nr <= MISDN_MAX_CHANNEL)
288 return map[nr >> 3] & (1 << (nr & 7));
289 else
290 return 0;
291}
292
293static inline void
294set_channelmap(u_int nr, u_char *map)
295{
296 map[nr >> 3] |= (1 << (nr & 7));
297}
298
299static inline void
300clear_channelmap(u_int nr, u_char *map)
301{
302 map[nr >> 3] &= ~(1 << (nr & 7));
303}
304
283/* CONTROL_CHANNEL parameters */ 305/* CONTROL_CHANNEL parameters */
284#define MISDN_CTRL_GETOP 0x0000 306#define MISDN_CTRL_GETOP 0x0000
285#define MISDN_CTRL_LOOP 0x0001 307#define MISDN_CTRL_LOOP 0x0001
@@ -405,7 +427,7 @@ struct mISDNdevice {
405 u_int Dprotocols; 427 u_int Dprotocols;
406 u_int Bprotocols; 428 u_int Bprotocols;
407 u_int nrbchan; 429 u_int nrbchan;
408 u_long channelmap[MISDN_CHMAP_SIZE]; 430 u_char channelmap[MISDN_CHMAP_SIZE];
409 struct list_head bchannels; 431 struct list_head bchannels;
410 struct mISDNchannel *teimgr; 432 struct mISDNchannel *teimgr;
411 struct device dev; 433 struct device dev;
@@ -430,7 +452,7 @@ struct mISDNstack {
430#endif 452#endif
431}; 453};
432 454
433/* global alloc/queue dunctions */ 455/* global alloc/queue functions */
434 456
435static inline struct sk_buff * 457static inline struct sk_buff *
436mI_alloc_skb(unsigned int len, gfp_t gfp_mask) 458mI_alloc_skb(unsigned int len, gfp_t gfp_mask)