Commit 5cacfc4f authored by Linus Torvalds's avatar Linus Torvalds

Merge http://linux-isdn.bkbits.net/linux-2.5.isdn

into penguin.transmeta.com:/home/penguin/torvalds/repositories/kernel/linux
parents c2050b96 2ec163ce
...@@ -10,13 +10,13 @@ export-objs := kcapi.o capiutil.o capifs.o ...@@ -10,13 +10,13 @@ export-objs := kcapi.o capiutil.o capifs.o
# Multipart objects. # Multipart objects.
kernelcapi-objs := kcapi.o kernelcapi-objs := kcapi.o capiutil.o
# Ordering constraints: kernelcapi.o first # Ordering constraints: kernelcapi.o first
# Each configuration option enables a list of files. # Each configuration option enables a list of files.
obj-$(CONFIG_ISDN_CAPI) += kernelcapi.o capiutil.o obj-$(CONFIG_ISDN_CAPI) += kernelcapi.o
obj-$(CONFIG_ISDN_CAPI_CAPI20) += capi.o obj-$(CONFIG_ISDN_CAPI_CAPI20) += capi.o
obj-$(CONFIG_ISDN_CAPI_CAPIDRV) += capidrv.o obj-$(CONFIG_ISDN_CAPI_CAPIDRV) += capidrv.o
obj-$(CONFIG_ISDN_CAPI_CAPIFS) += capifs.o obj-$(CONFIG_ISDN_CAPI_CAPIFS) += capifs.o
......
...@@ -49,7 +49,7 @@ struct capidrv_contr { ...@@ -49,7 +49,7 @@ struct capidrv_contr {
struct capidrv_contr *next; struct capidrv_contr *next;
__u32 contrnr; u32 contrnr;
char name[20]; char name[20];
/* /*
...@@ -62,14 +62,14 @@ struct capidrv_contr { ...@@ -62,14 +62,14 @@ struct capidrv_contr {
* LISTEN state * LISTEN state
*/ */
int state; int state;
__u32 cipmask; u32 cipmask;
__u32 cipmask2; u32 cipmask2;
struct timer_list listentimer; struct timer_list listentimer;
/* /*
* ID of capi message sent * ID of capi message sent
*/ */
__u16 msgid; u16 msgid;
/* /*
* B-Channels * B-Channels
...@@ -77,36 +77,36 @@ struct capidrv_contr { ...@@ -77,36 +77,36 @@ struct capidrv_contr {
int nbchan; int nbchan;
struct capidrv_bchan { struct capidrv_bchan {
struct capidrv_contr *contr; struct capidrv_contr *contr;
__u8 msn[ISDN_MSNLEN]; u8 msn[ISDN_MSNLEN];
int l2; int l2;
int l3; int l3;
__u8 num[ISDN_MSNLEN]; u8 num[ISDN_MSNLEN];
__u8 mynum[ISDN_MSNLEN]; u8 mynum[ISDN_MSNLEN];
int si1; int si1;
int si2; int si2;
int incoming; int incoming;
int disconnecting; int disconnecting;
struct capidrv_plci { struct capidrv_plci {
struct capidrv_plci *next; struct capidrv_plci *next;
__u32 plci; u32 plci;
__u32 ncci; /* ncci for CONNECT_ACTIVE_IND */ u32 ncci; /* ncci for CONNECT_ACTIVE_IND */
__u16 msgid; /* to identfy CONNECT_CONF */ u16 msgid; /* to identfy CONNECT_CONF */
int chan; int chan;
int state; int state;
int leasedline; int leasedline;
struct capidrv_ncci { struct capidrv_ncci {
struct capidrv_ncci *next; struct capidrv_ncci *next;
struct capidrv_plci *plcip; struct capidrv_plci *plcip;
__u32 ncci; u32 ncci;
__u16 msgid; /* to identfy CONNECT_B3_CONF */ u16 msgid; /* to identfy CONNECT_B3_CONF */
int chan; int chan;
int state; int state;
int oldstate; int oldstate;
/* */ /* */
__u16 datahandle; u16 datahandle;
struct ncci_datahandle_queue { struct ncci_datahandle_queue {
struct ncci_datahandle_queue *next; struct ncci_datahandle_queue *next;
__u16 datahandle; u16 datahandle;
int len; int len;
} *ackqueue; } *ackqueue;
} *ncci_list; } *ncci_list;
...@@ -117,15 +117,15 @@ struct capidrv_contr { ...@@ -117,15 +117,15 @@ struct capidrv_contr {
struct capidrv_plci *plci_list; struct capidrv_plci *plci_list;
/* for q931 data */ /* for q931 data */
__u8 q931_buf[4096]; u8 q931_buf[4096];
__u8 *q931_read; u8 *q931_read;
__u8 *q931_write; u8 *q931_write;
__u8 *q931_end; u8 *q931_end;
}; };
struct capidrv_data { struct capidrv_data {
__u16 appid; u16 appid;
int ncontr; int ncontr;
struct capidrv_contr *contr_list; struct capidrv_contr *contr_list;
...@@ -149,11 +149,11 @@ static spinlock_t global_lock = SPIN_LOCK_UNLOCKED; ...@@ -149,11 +149,11 @@ static spinlock_t global_lock = SPIN_LOCK_UNLOCKED;
static struct capi_interface *capifuncs; static struct capi_interface *capifuncs;
static void handle_dtrace_data(capidrv_contr *card, static void handle_dtrace_data(capidrv_contr *card,
int send, int level2, __u8 *data, __u16 len); int send, int level2, u8 *data, u16 len);
/* -------- convert functions ---------------------------------------- */ /* -------- convert functions ---------------------------------------- */
static inline __u32 b1prot(int l2, int l3) static inline u32 b1prot(int l2, int l3)
{ {
switch (l2) { switch (l2) {
case ISDN_PROTO_L2_X75I: case ISDN_PROTO_L2_X75I:
...@@ -176,7 +176,7 @@ static inline __u32 b1prot(int l2, int l3) ...@@ -176,7 +176,7 @@ static inline __u32 b1prot(int l2, int l3)
} }
} }
static inline __u32 b2prot(int l2, int l3) static inline u32 b2prot(int l2, int l3)
{ {
switch (l2) { switch (l2) {
case ISDN_PROTO_L2_X75I: case ISDN_PROTO_L2_X75I:
...@@ -196,7 +196,7 @@ static inline __u32 b2prot(int l2, int l3) ...@@ -196,7 +196,7 @@ static inline __u32 b2prot(int l2, int l3)
} }
} }
static inline __u32 b3prot(int l2, int l3) static inline u32 b3prot(int l2, int l3)
{ {
switch (l2) { switch (l2) {
case ISDN_PROTO_L2_X75I: case ISDN_PROTO_L2_X75I:
...@@ -215,7 +215,7 @@ static inline __u32 b3prot(int l2, int l3) ...@@ -215,7 +215,7 @@ static inline __u32 b3prot(int l2, int l3)
} }
} }
static _cstruct b1config_async_v110(__u16 rate) static _cstruct b1config_async_v110(u16 rate)
{ {
/* CAPI-Spec "B1 Configuration" */ /* CAPI-Spec "B1 Configuration" */
static unsigned char buf[9]; static unsigned char buf[9];
...@@ -247,9 +247,9 @@ static _cstruct b1config(int l2, int l3) ...@@ -247,9 +247,9 @@ static _cstruct b1config(int l2, int l3)
} }
} }
static inline __u16 si2cip(__u8 si1, __u8 si2) static inline u16 si2cip(u8 si1, u8 si2)
{ {
static const __u8 cip[17][5] = static const u8 cip[17][5] =
{ {
/* 0 1 2 3 4 */ /* 0 1 2 3 4 */
{0, 0, 0, 0, 0}, /*0 */ {0, 0, 0, 0, 0}, /*0 */
...@@ -275,12 +275,12 @@ static inline __u16 si2cip(__u8 si1, __u8 si2) ...@@ -275,12 +275,12 @@ static inline __u16 si2cip(__u8 si1, __u8 si2)
if (si2 > 4) if (si2 > 4)
si2 = 0; si2 = 0;
return (__u16) cip[si1][si2]; return (u16) cip[si1][si2];
} }
static inline __u8 cip2si1(__u16 cipval) static inline u8 cip2si1(u16 cipval)
{ {
static const __u8 si[32] = static const u8 si[32] =
{7, 1, 7, 7, 1, 1, 7, 7, /*0-7 */ {7, 1, 7, 7, 1, 1, 7, 7, /*0-7 */
7, 1, 0, 0, 0, 0, 0, 0, /*8-15 */ 7, 1, 0, 0, 0, 0, 0, 0, /*8-15 */
1, 2, 4, 10, 9, 9, 15, 7, /*16-23 */ 1, 2, 4, 10, 9, 9, 15, 7, /*16-23 */
...@@ -291,9 +291,9 @@ static inline __u8 cip2si1(__u16 cipval) ...@@ -291,9 +291,9 @@ static inline __u8 cip2si1(__u16 cipval)
return si[cipval]; return si[cipval];
} }
static inline __u8 cip2si2(__u16 cipval) static inline u8 cip2si2(u16 cipval)
{ {
static const __u8 si[32] = static const u8 si[32] =
{0, 0, 0, 0, 2, 3, 0, 0, /*0-7 */ {0, 0, 0, 0, 2, 3, 0, 0, /*0-7 */
0, 3, 0, 0, 0, 0, 0, 0, /*8-15 */ 0, 3, 0, 0, 0, 0, 0, 0, /*8-15 */
1, 2, 0, 0, 9, 0, 0, 0, /*16-23 */ 1, 2, 0, 0, 9, 0, 0, 0, /*16-23 */
...@@ -320,7 +320,7 @@ static inline capidrv_contr *findcontrbydriverid(int driverid) ...@@ -320,7 +320,7 @@ static inline capidrv_contr *findcontrbydriverid(int driverid)
return p; return p;
} }
static capidrv_contr *findcontrbynumber(__u32 contr) static capidrv_contr *findcontrbynumber(u32 contr)
{ {
unsigned long flags; unsigned long flags;
capidrv_contr *p = global.contr_list; capidrv_contr *p = global.contr_list;
...@@ -357,7 +357,7 @@ static capidrv_plci *new_plci(capidrv_contr * card, int chan) ...@@ -357,7 +357,7 @@ static capidrv_plci *new_plci(capidrv_contr * card, int chan)
return plcip; return plcip;
} }
static capidrv_plci *find_plci_by_plci(capidrv_contr * card, __u32 plci) static capidrv_plci *find_plci_by_plci(capidrv_contr * card, u32 plci)
{ {
capidrv_plci *p; capidrv_plci *p;
for (p = card->plci_list; p; p = p->next) for (p = card->plci_list; p; p = p->next)
...@@ -366,7 +366,7 @@ static capidrv_plci *find_plci_by_plci(capidrv_contr * card, __u32 plci) ...@@ -366,7 +366,7 @@ static capidrv_plci *find_plci_by_plci(capidrv_contr * card, __u32 plci)
return 0; return 0;
} }
static capidrv_plci *find_plci_by_msgid(capidrv_contr * card, __u16 msgid) static capidrv_plci *find_plci_by_msgid(capidrv_contr * card, u16 msgid)
{ {
capidrv_plci *p; capidrv_plci *p;
for (p = card->plci_list; p; p = p->next) for (p = card->plci_list; p; p = p->next)
...@@ -375,7 +375,7 @@ static capidrv_plci *find_plci_by_msgid(capidrv_contr * card, __u16 msgid) ...@@ -375,7 +375,7 @@ static capidrv_plci *find_plci_by_msgid(capidrv_contr * card, __u16 msgid)
return 0; return 0;
} }
static capidrv_plci *find_plci_by_ncci(capidrv_contr * card, __u32 ncci) static capidrv_plci *find_plci_by_ncci(capidrv_contr * card, u32 ncci)
{ {
capidrv_plci *p; capidrv_plci *p;
for (p = card->plci_list; p; p = p->next) for (p = card->plci_list; p; p = p->next)
...@@ -406,7 +406,7 @@ static void free_plci(capidrv_contr * card, capidrv_plci * plcip) ...@@ -406,7 +406,7 @@ static void free_plci(capidrv_contr * card, capidrv_plci * plcip)
static inline capidrv_ncci *new_ncci(capidrv_contr * card, static inline capidrv_ncci *new_ncci(capidrv_contr * card,
capidrv_plci * plcip, capidrv_plci * plcip,
__u32 ncci) u32 ncci)
{ {
capidrv_ncci *nccip; capidrv_ncci *nccip;
...@@ -430,7 +430,7 @@ static inline capidrv_ncci *new_ncci(capidrv_contr * card, ...@@ -430,7 +430,7 @@ static inline capidrv_ncci *new_ncci(capidrv_contr * card,
return nccip; return nccip;
} }
static inline capidrv_ncci *find_ncci(capidrv_contr * card, __u32 ncci) static inline capidrv_ncci *find_ncci(capidrv_contr * card, u32 ncci)
{ {
capidrv_plci *plcip; capidrv_plci *plcip;
capidrv_ncci *p; capidrv_ncci *p;
...@@ -445,7 +445,7 @@ static inline capidrv_ncci *find_ncci(capidrv_contr * card, __u32 ncci) ...@@ -445,7 +445,7 @@ static inline capidrv_ncci *find_ncci(capidrv_contr * card, __u32 ncci)
} }
static inline capidrv_ncci *find_ncci_by_msgid(capidrv_contr * card, static inline capidrv_ncci *find_ncci_by_msgid(capidrv_contr * card,
__u32 ncci, __u16 msgid) u32 ncci, u16 msgid)
{ {
capidrv_plci *plcip; capidrv_plci *plcip;
capidrv_ncci *p; capidrv_ncci *p;
...@@ -474,7 +474,7 @@ static void free_ncci(capidrv_contr * card, struct capidrv_ncci *nccip) ...@@ -474,7 +474,7 @@ static void free_ncci(capidrv_contr * card, struct capidrv_ncci *nccip)
} }
static int capidrv_add_ack(struct capidrv_ncci *nccip, static int capidrv_add_ack(struct capidrv_ncci *nccip,
__u16 datahandle, int len) u16 datahandle, int len)
{ {
struct ncci_datahandle_queue *n, **pp; struct ncci_datahandle_queue *n, **pp;
...@@ -492,7 +492,7 @@ static int capidrv_add_ack(struct capidrv_ncci *nccip, ...@@ -492,7 +492,7 @@ static int capidrv_add_ack(struct capidrv_ncci *nccip,
return 0; return 0;
} }
static int capidrv_del_ack(struct capidrv_ncci *nccip, __u16 datahandle) static int capidrv_del_ack(struct capidrv_ncci *nccip, u16 datahandle)
{ {
struct ncci_datahandle_queue **pp, *p; struct ncci_datahandle_queue **pp, *p;
int len; int len;
...@@ -798,9 +798,9 @@ static void handle_controller(_cmsg * cmsg) ...@@ -798,9 +798,9 @@ static void handle_controller(_cmsg * cmsg)
if ( cmsg->ManuID == 0x214D5641 if ( cmsg->ManuID == 0x214D5641
&& cmsg->Class == 0 && cmsg->Class == 0
&& cmsg->Function == 1) { && cmsg->Function == 1) {
__u8 *data = cmsg->ManuData+3; u8 *data = cmsg->ManuData+3;
__u16 len = cmsg->ManuData[0]; u16 len = cmsg->ManuData[0];
__u16 layer; u16 layer;
int direction; int direction;
if (len == 255) { if (len == 255) {
len = (cmsg->ManuData[1] | (cmsg->ManuData[2] << 8)); len = (cmsg->ManuData[1] | (cmsg->ManuData[2] << 8));
...@@ -1123,10 +1123,10 @@ static void handle_plci(_cmsg * cmsg) ...@@ -1123,10 +1123,10 @@ static void handle_plci(_cmsg * cmsg)
cmd.arg = plcip->chan; cmd.arg = plcip->chan;
sprintf(cmd.parm.num, "%lu", sprintf(cmd.parm.num, "%lu",
(unsigned long) (unsigned long)
((__u32) cmsg->InfoElement[1] ((u32) cmsg->InfoElement[1]
| ((__u32) (cmsg->InfoElement[2]) << 8) | ((u32) (cmsg->InfoElement[2]) << 8)
| ((__u32) (cmsg->InfoElement[3]) << 16) | ((u32) (cmsg->InfoElement[3]) << 16)
| ((__u32) (cmsg->InfoElement[4]) << 24))); | ((u32) (cmsg->InfoElement[4]) << 24)));
card->interface.statcallb(&cmd); card->interface.statcallb(&cmd);
break; break;
} }
...@@ -1373,7 +1373,7 @@ static void handle_data(_cmsg * cmsg, struct sk_buff *skb) ...@@ -1373,7 +1373,7 @@ static void handle_data(_cmsg * cmsg, struct sk_buff *skb)
static _cmsg s_cmsg; static _cmsg s_cmsg;
static void capidrv_signal(__u16 applid, void *dummy) static void capidrv_signal(u16 applid, void *dummy)
{ {
struct sk_buff *skb = 0; struct sk_buff *skb = 0;
...@@ -1415,9 +1415,9 @@ static void capidrv_signal(__u16 applid, void *dummy) ...@@ -1415,9 +1415,9 @@ static void capidrv_signal(__u16 applid, void *dummy)
} while (0) } while (0)
static void handle_dtrace_data(capidrv_contr *card, static void handle_dtrace_data(capidrv_contr *card,
int send, int level2, __u8 *data, __u16 len) int send, int level2, u8 *data, u16 len)
{ {
__u8 *p, *end; u8 *p, *end;
isdn_ctrl cmd; isdn_ctrl cmd;
if (!len) { if (!len) {
...@@ -1439,7 +1439,7 @@ static void handle_dtrace_data(capidrv_contr *card, ...@@ -1439,7 +1439,7 @@ static void handle_dtrace_data(capidrv_contr *card,
} }
for (p = data, end = data+len; p < end; p++) { for (p = data, end = data+len; p < end; p++) {
__u8 w; u8 w;
PUTBYTE_TO_STATUS(card, ' '); PUTBYTE_TO_STATUS(card, ' ');
w = (*p >> 4) & 0xf; w = (*p >> 4) & 0xf;
PUTBYTE_TO_STATUS(card, (w < 10) ? '0'+w : 'A'-10+w); PUTBYTE_TO_STATUS(card, (w < 10) ? '0'+w : 'A'-10+w);
...@@ -1539,7 +1539,7 @@ static int decodeFVteln(char *teln, unsigned long *bmaskp, int *activep) ...@@ -1539,7 +1539,7 @@ static int decodeFVteln(char *teln, unsigned long *bmaskp, int *activep)
return 0; return 0;
} }
static int FVteln2capi20(char *teln, __u8 AdditionalInfo[1+2+2+31]) static int FVteln2capi20(char *teln, u8 AdditionalInfo[1+2+2+31])
{ {
unsigned long bmask; unsigned long bmask;
int active; int active;
...@@ -1569,7 +1569,7 @@ static int capidrv_command(isdn_ctrl * c, capidrv_contr * card) ...@@ -1569,7 +1569,7 @@ static int capidrv_command(isdn_ctrl * c, capidrv_contr * card)
isdn_ctrl cmd; isdn_ctrl cmd;
struct capidrv_bchan *bchan; struct capidrv_bchan *bchan;
struct capidrv_plci *plcip; struct capidrv_plci *plcip;
__u8 AdditionalInfo[1+2+2+31]; u8 AdditionalInfo[1+2+2+31];
int rc, isleasedline = 0; int rc, isleasedline = 0;
if (c->command == ISDN_CMD_IOCTL) if (c->command == ISDN_CMD_IOCTL)
...@@ -1577,8 +1577,8 @@ static int capidrv_command(isdn_ctrl * c, capidrv_contr * card) ...@@ -1577,8 +1577,8 @@ static int capidrv_command(isdn_ctrl * c, capidrv_contr * card)
switch (c->command) { switch (c->command) {
case ISDN_CMD_DIAL:{ case ISDN_CMD_DIAL:{
__u8 calling[ISDN_MSNLEN + 3]; u8 calling[ISDN_MSNLEN + 3];
__u8 called[ISDN_MSNLEN + 2]; u8 called[ISDN_MSNLEN + 2];
if (debugmode) if (debugmode)
printk(KERN_DEBUG "capidrv-%d: ISDN_CMD_DIAL(ch=%ld,\"%s,%d,%d,%s\")\n", printk(KERN_DEBUG "capidrv-%d: ISDN_CMD_DIAL(ch=%ld,\"%s,%d,%d,%s\")\n",
...@@ -1870,8 +1870,8 @@ static int if_sendbuf(int id, int channel, int doack, struct sk_buff *skb) ...@@ -1870,8 +1870,8 @@ static int if_sendbuf(int id, int channel, int doack, struct sk_buff *skb)
capidrv_ncci *nccip; capidrv_ncci *nccip;
int len = skb->len; int len = skb->len;
size_t msglen; size_t msglen;
__u16 errcode; u16 errcode;
__u16 datahandle; u16 datahandle;
if (!card) { if (!card) {
printk(KERN_ERR "capidrv: if_sendbuf called with invalid driverId %d!\n", printk(KERN_ERR "capidrv: if_sendbuf called with invalid driverId %d!\n",
...@@ -1891,7 +1891,7 @@ static int if_sendbuf(int id, int channel, int doack, struct sk_buff *skb) ...@@ -1891,7 +1891,7 @@ static int if_sendbuf(int id, int channel, int doack, struct sk_buff *skb)
datahandle = nccip->datahandle; datahandle = nccip->datahandle;
capi_fill_DATA_B3_REQ(&sendcmsg, global.appid, card->msgid++, capi_fill_DATA_B3_REQ(&sendcmsg, global.appid, card->msgid++,
nccip->ncci, /* adr */ nccip->ncci, /* adr */
(__u32) skb->data, /* Data */ (u32) skb->data, /* Data */
skb->len, /* DataLength */ skb->len, /* DataLength */
datahandle, /* DataHandle */ datahandle, /* DataHandle */
0 /* Flags */ 0 /* Flags */
...@@ -1937,11 +1937,11 @@ static int if_sendbuf(int id, int channel, int doack, struct sk_buff *skb) ...@@ -1937,11 +1937,11 @@ static int if_sendbuf(int id, int channel, int doack, struct sk_buff *skb)
} }
} }
static int if_readstat(__u8 *buf, int len, int user, int id, int channel) static int if_readstat(u8 *buf, int len, int user, int id, int channel)
{ {
capidrv_contr *card = findcontrbydriverid(id); capidrv_contr *card = findcontrbydriverid(id);
int count; int count;
__u8 *p; u8 *p;
if (!card) { if (!card) {
printk(KERN_ERR "capidrv: if_readstat called with invalid driverId %d!\n", printk(KERN_ERR "capidrv: if_readstat called with invalid driverId %d!\n",
...@@ -1963,11 +1963,11 @@ static int if_readstat(__u8 *buf, int len, int user, int id, int channel) ...@@ -1963,11 +1963,11 @@ static int if_readstat(__u8 *buf, int len, int user, int id, int channel)
static void enable_dchannel_trace(capidrv_contr *card) static void enable_dchannel_trace(capidrv_contr *card)
{ {
__u8 manufacturer[CAPI_MANUFACTURER_LEN]; u8 manufacturer[CAPI_MANUFACTURER_LEN];
capi_version version; capi_version version;
__u16 contr = card->contrnr; u16 contr = card->contrnr;
__u16 errcode; u16 errcode;
__u16 avmversion[3]; u16 avmversion[3];
errcode = (*capifuncs->capi_get_manufacturer)(contr, manufacturer); errcode = (*capifuncs->capi_get_manufacturer)(contr, manufacturer);
if (errcode != CAPI_NOERROR) { if (errcode != CAPI_NOERROR) {
...@@ -2037,7 +2037,7 @@ static void listentimerfunc(unsigned long x) ...@@ -2037,7 +2037,7 @@ static void listentimerfunc(unsigned long x)
} }
static int capidrv_addcontr(__u16 contr, struct capi_profile *profp) static int capidrv_addcontr(u16 contr, struct capi_profile *profp)
{ {
capidrv_contr *card; capidrv_contr *card;
long flags; long flags;
...@@ -2135,7 +2135,7 @@ static int capidrv_addcontr(__u16 contr, struct capi_profile *profp) ...@@ -2135,7 +2135,7 @@ static int capidrv_addcontr(__u16 contr, struct capi_profile *profp)
return 0; return 0;
} }
static int capidrv_delcontr(__u16 contr) static int capidrv_delcontr(u16 contr)
{ {
capidrv_contr **pp, *card; capidrv_contr **pp, *card;
unsigned long flags; unsigned long flags;
...@@ -2218,7 +2218,7 @@ static int capidrv_delcontr(__u16 contr) ...@@ -2218,7 +2218,7 @@ static int capidrv_delcontr(__u16 contr)
} }
static void lower_callback(unsigned int cmd, __u32 contr, void *data) static void lower_callback(unsigned int cmd, u32 contr, void *data)
{ {
switch (cmd) { switch (cmd) {
...@@ -2303,8 +2303,8 @@ static int __init capidrv_init(void) ...@@ -2303,8 +2303,8 @@ static int __init capidrv_init(void)
capi_profile profile; capi_profile profile;
char rev[32]; char rev[32];
char *p; char *p;
__u32 ncontr, contr; u32 ncontr, contr;
__u16 errcode; u16 errcode;
MOD_INC_USE_COUNT; MOD_INC_USE_COUNT;
......
...@@ -20,19 +20,15 @@ ...@@ -20,19 +20,15 @@
#include <linux/config.h> #include <linux/config.h>
#include <linux/isdn/capiutil.h> #include <linux/isdn/capiutil.h>
MODULE_DESCRIPTION("CAPI4Linux: CAPI message conversion support");
MODULE_AUTHOR("Carsten Paeth");
MODULE_LICENSE("GPL");
/* from CAPI2.0 DDK AVM Berlin GmbH */ /* from CAPI2.0 DDK AVM Berlin GmbH */
#ifndef CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON #ifndef CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON
char *capi_info2str(__u16 reason) char *capi_info2str(u16 reason)
{ {
return ".."; return "..";
} }
#else #else
char *capi_info2str(__u16 reason) char *capi_info2str(u16 reason)
{ {
switch (reason) { switch (reason) {
...@@ -422,14 +418,14 @@ static unsigned char *cpars[] = ...@@ -422,14 +418,14 @@ static unsigned char *cpars[] =
/*-------------------------------------------------------*/ /*-------------------------------------------------------*/
#define byteTLcpy(x,y) *(__u8 *)(x)=*(__u8 *)(y); #define byteTLcpy(x,y) *(u8 *)(x)=*(u8 *)(y);
#define wordTLcpy(x,y) *(__u16 *)(x)=*(__u16 *)(y); #define wordTLcpy(x,y) *(u16 *)(x)=*(u16 *)(y);
#define dwordTLcpy(x,y) memcpy(x,y,4); #define dwordTLcpy(x,y) memcpy(x,y,4);
#define structTLcpy(x,y,l) memcpy (x,y,l) #define structTLcpy(x,y,l) memcpy (x,y,l)
#define structTLcpyovl(x,y,l) memmove (x,y,l) #define structTLcpyovl(x,y,l) memmove (x,y,l)
#define byteTRcpy(x,y) *(__u8 *)(y)=*(__u8 *)(x); #define byteTRcpy(x,y) *(u8 *)(y)=*(u8 *)(x);
#define wordTRcpy(x,y) *(__u16 *)(y)=*(__u16 *)(x); #define wordTRcpy(x,y) *(u16 *)(y)=*(u16 *)(x);
#define dwordTRcpy(x,y) memcpy(y,x,4); #define dwordTRcpy(x,y) memcpy(y,x,4);
#define structTRcpy(x,y,l) memcpy (y,x,l) #define structTRcpy(x,y,l) memcpy (y,x,l)
#define structTRcpyovl(x,y,l) memmove (y,x,l) #define structTRcpyovl(x,y,l) memmove (y,x,l)
...@@ -449,7 +445,7 @@ static unsigned command_2_index(unsigned c, unsigned sc) ...@@ -449,7 +445,7 @@ static unsigned command_2_index(unsigned c, unsigned sc)
/*-------------------------------------------------------*/ /*-------------------------------------------------------*/
#define TYP (cdef[cmsg->par[cmsg->p]].typ) #define TYP (cdef[cmsg->par[cmsg->p]].typ)
#define OFF (((__u8 *)cmsg)+cdef[cmsg->par[cmsg->p]].off) #define OFF (((u8 *)cmsg)+cdef[cmsg->par[cmsg->p]].off)
static void jumpcstruct(_cmsg * cmsg) static void jumpcstruct(_cmsg * cmsg)
{ {
...@@ -486,7 +482,7 @@ static void pars_2_message(_cmsg * cmsg) ...@@ -486,7 +482,7 @@ static void pars_2_message(_cmsg * cmsg)
cmsg->l += 4; cmsg->l += 4;
break; break;
case _CSTRUCT: case _CSTRUCT:
if (*(__u8 **) OFF == 0) { if (*(u8 **) OFF == 0) {
*(cmsg->m + cmsg->l) = '\0'; *(cmsg->m + cmsg->l) = '\0';
cmsg->l++; cmsg->l++;
} else if (**(_cstruct *) OFF != 0xff) { } else if (**(_cstruct *) OFF != 0xff) {
...@@ -494,8 +490,8 @@ static void pars_2_message(_cmsg * cmsg) ...@@ -494,8 +490,8 @@ static void pars_2_message(_cmsg * cmsg)
cmsg->l += 1 + **(_cstruct *) OFF; cmsg->l += 1 + **(_cstruct *) OFF;
} else { } else {
_cstruct s = *(_cstruct *) OFF; _cstruct s = *(_cstruct *) OFF;
structTLcpy(cmsg->m + cmsg->l, s, 3 + *(__u16 *) (s + 1)); structTLcpy(cmsg->m + cmsg->l, s, 3 + *(u16 *) (s + 1));
cmsg->l += 3 + *(__u16 *) (s + 1); cmsg->l += 3 + *(u16 *) (s + 1);
} }
break; break;
case _CMSTRUCT: case _CMSTRUCT:
...@@ -514,7 +510,7 @@ static void pars_2_message(_cmsg * cmsg) ...@@ -514,7 +510,7 @@ static void pars_2_message(_cmsg * cmsg)
pars_2_message(cmsg); pars_2_message(cmsg);
_ls = cmsg->l - _l - 1; _ls = cmsg->l - _l - 1;
if (_ls < 255) if (_ls < 255)
(cmsg->m + _l)[0] = (__u8) _ls; (cmsg->m + _l)[0] = (u8) _ls;
else { else {
structTLcpyovl(cmsg->m + _l + 3, cmsg->m + _l + 1, _ls); structTLcpyovl(cmsg->m + _l + 3, cmsg->m + _l + 1, _ls);
(cmsg->m + _l)[0] = 0xff; (cmsg->m + _l)[0] = 0xff;
...@@ -527,7 +523,7 @@ static void pars_2_message(_cmsg * cmsg) ...@@ -527,7 +523,7 @@ static void pars_2_message(_cmsg * cmsg)
} }
/*-------------------------------------------------------*/ /*-------------------------------------------------------*/
unsigned capi_cmsg2message(_cmsg * cmsg, __u8 * msg) unsigned capi_cmsg2message(_cmsg * cmsg, u8 * msg)
{ {
cmsg->m = msg; cmsg->m = msg;
cmsg->l = 8; cmsg->l = 8;
...@@ -564,12 +560,12 @@ static void message_2_pars(_cmsg * cmsg) ...@@ -564,12 +560,12 @@ static void message_2_pars(_cmsg * cmsg)
cmsg->l += 4; cmsg->l += 4;
break; break;
case _CSTRUCT: case _CSTRUCT:
*(__u8 **) OFF = cmsg->m + cmsg->l; *(u8 **) OFF = cmsg->m + cmsg->l;
if (cmsg->m[cmsg->l] != 0xff) if (cmsg->m[cmsg->l] != 0xff)
cmsg->l += 1 + cmsg->m[cmsg->l]; cmsg->l += 1 + cmsg->m[cmsg->l];
else else
cmsg->l += 3 + *(__u16 *) (cmsg->m + cmsg->l + 1); cmsg->l += 3 + *(u16 *) (cmsg->m + cmsg->l + 1);
break; break;
case _CMSTRUCT: case _CMSTRUCT:
/*----- Metastruktur 0 -----*/ /*----- Metastruktur 0 -----*/
...@@ -590,7 +586,7 @@ static void message_2_pars(_cmsg * cmsg) ...@@ -590,7 +586,7 @@ static void message_2_pars(_cmsg * cmsg)
} }
/*-------------------------------------------------------*/ /*-------------------------------------------------------*/
unsigned capi_message2cmsg(_cmsg * cmsg, __u8 * msg) unsigned capi_message2cmsg(_cmsg * cmsg, u8 * msg)
{ {
memset(cmsg, 0, sizeof(_cmsg)); memset(cmsg, 0, sizeof(_cmsg));
cmsg->m = msg; cmsg->m = msg;
...@@ -610,9 +606,9 @@ unsigned capi_message2cmsg(_cmsg * cmsg, __u8 * msg) ...@@ -610,9 +606,9 @@ unsigned capi_message2cmsg(_cmsg * cmsg, __u8 * msg)
} }
/*-------------------------------------------------------*/ /*-------------------------------------------------------*/
unsigned capi_cmsg_header(_cmsg * cmsg, __u16 _ApplId, unsigned capi_cmsg_header(_cmsg * cmsg, u16 _ApplId,
__u8 _Command, __u8 _Subcommand, u8 _Command, u8 _Subcommand,
__u16 _Messagenumber, __u32 _Controller) u16 _Messagenumber, u32 _Controller)
{ {
memset(cmsg, 0, sizeof(_cmsg)); memset(cmsg, 0, sizeof(_cmsg));
cmsg->ApplId = _ApplId; cmsg->ApplId = _ApplId;
...@@ -708,7 +704,7 @@ static char *mnames[] = ...@@ -708,7 +704,7 @@ static char *mnames[] =
"MANUFACTURER_RESP" "MANUFACTURER_RESP"
}; };
char *capi_cmd2str(__u8 cmd, __u8 subcmd) char *capi_cmd2str(u8 cmd, u8 subcmd)
{ {
return mnames[command_2_index(cmd, subcmd)]; return mnames[command_2_index(cmd, subcmd)];
} }
...@@ -785,7 +781,7 @@ static void bufprint(char *fmt,...) ...@@ -785,7 +781,7 @@ static void bufprint(char *fmt,...)
p += strlen(p); p += strlen(p);
} }
static void printstructlen(__u8 * m, unsigned len) static void printstructlen(u8 * m, unsigned len)
{ {
unsigned hex = 0; unsigned hex = 0;
for (; len; len--, m++) for (; len; len--, m++)
...@@ -805,14 +801,14 @@ static void printstructlen(__u8 * m, unsigned len) ...@@ -805,14 +801,14 @@ static void printstructlen(__u8 * m, unsigned len)
bufprint(">"); bufprint(">");
} }
static void printstruct(__u8 * m) static void printstruct(u8 * m)
{ {
unsigned len; unsigned len;
if (m[0] != 0xff) { if (m[0] != 0xff) {
len = m[0]; len = m[0];
m += 1; m += 1;
} else { } else {
len = ((__u16 *) (m + 1))[0]; len = ((u16 *) (m + 1))[0];
m += 3; m += 3;
} }
printstructlen(m, len); printstructlen(m, len);
...@@ -833,15 +829,15 @@ static void protocol_message_2_pars(_cmsg * cmsg, int level) ...@@ -833,15 +829,15 @@ static void protocol_message_2_pars(_cmsg * cmsg, int level)
switch (TYP) { switch (TYP) {
case _CBYTE: case _CBYTE:
bufprint("%-*s = 0x%x\n", slen, NAME, *(__u8 *) (cmsg->m + cmsg->l)); bufprint("%-*s = 0x%x\n", slen, NAME, *(u8 *) (cmsg->m + cmsg->l));
cmsg->l++; cmsg->l++;
break; break;
case _CWORD: case _CWORD:
bufprint("%-*s = 0x%x\n", slen, NAME, *(__u16 *) (cmsg->m + cmsg->l)); bufprint("%-*s = 0x%x\n", slen, NAME, *(u16 *) (cmsg->m + cmsg->l));
cmsg->l += 2; cmsg->l += 2;
break; break;
case _CDWORD: case _CDWORD:
bufprint("%-*s = 0x%lx\n", slen, NAME, *(__u32 *) (cmsg->m + cmsg->l)); bufprint("%-*s = 0x%lx\n", slen, NAME, *(u32 *) (cmsg->m + cmsg->l));
cmsg->l += 4; cmsg->l += 4;
break; break;
case _CSTRUCT: case _CSTRUCT:
...@@ -854,7 +850,7 @@ static void protocol_message_2_pars(_cmsg * cmsg, int level) ...@@ -854,7 +850,7 @@ static void protocol_message_2_pars(_cmsg * cmsg, int level)
if (cmsg->m[cmsg->l] != 0xff) if (cmsg->m[cmsg->l] != 0xff)
cmsg->l += 1 + cmsg->m[cmsg->l]; cmsg->l += 1 + cmsg->m[cmsg->l];
else else
cmsg->l += 3 + *(__u16 *) (cmsg->m + cmsg->l + 1); cmsg->l += 3 + *(u16 *) (cmsg->m + cmsg->l + 1);
break; break;
...@@ -877,7 +873,7 @@ static void protocol_message_2_pars(_cmsg * cmsg, int level) ...@@ -877,7 +873,7 @@ static void protocol_message_2_pars(_cmsg * cmsg, int level)
} }
} }
/*-------------------------------------------------------*/ /*-------------------------------------------------------*/
char *capi_message2str(__u8 * msg) char *capi_message2str(u8 * msg)
{ {
_cmsg cmsg; _cmsg cmsg;
...@@ -909,9 +905,9 @@ char *capi_cmsg2str(_cmsg * cmsg) ...@@ -909,9 +905,9 @@ char *capi_cmsg2str(_cmsg * cmsg)
cmsg->p = 0; cmsg->p = 0;
bufprint("%s ID=%03d #0x%04x LEN=%04d\n", bufprint("%s ID=%03d #0x%04x LEN=%04d\n",
mnames[command_2_index(cmsg->Command, cmsg->Subcommand)], mnames[command_2_index(cmsg->Command, cmsg->Subcommand)],
((__u16 *) cmsg->m)[1], ((u16 *) cmsg->m)[1],
((__u16 *) cmsg->m)[3], ((u16 *) cmsg->m)[3],
((__u16 *) cmsg->m)[0]); ((u16 *) cmsg->m)[0]);
protocol_message_2_pars(cmsg, 1); protocol_message_2_pars(cmsg, 1);
return buf; return buf;
} }
...@@ -923,15 +919,3 @@ EXPORT_SYMBOL(capi_cmd2str); ...@@ -923,15 +919,3 @@ EXPORT_SYMBOL(capi_cmd2str);
EXPORT_SYMBOL(capi_cmsg2str); EXPORT_SYMBOL(capi_cmsg2str);
EXPORT_SYMBOL(capi_message2str); EXPORT_SYMBOL(capi_message2str);
EXPORT_SYMBOL(capi_info2str); EXPORT_SYMBOL(capi_info2str);
static int __init capiutil_init(void)
{
return 0;
}
static void __exit capiutil_exit(void)
{
}
module_init(capiutil_init);
module_exit(capiutil_exit);
...@@ -54,14 +54,14 @@ MODULE_PARM(showcapimsgs, "i"); ...@@ -54,14 +54,14 @@ MODULE_PARM(showcapimsgs, "i");
struct msgidqueue { struct msgidqueue {
struct msgidqueue *next; struct msgidqueue *next;
__u16 msgid; u16 msgid;
}; };
struct capi_ncci { struct capi_ncci {
struct capi_ncci *next; struct capi_ncci *next;
__u16 applid; u16 applid;
__u32 ncci; u32 ncci;
__u32 winsize; u32 winsize;
int nmsg; int nmsg;
struct msgidqueue *msgidqueue; struct msgidqueue *msgidqueue;
struct msgidqueue *msgidlast; struct msgidqueue *msgidlast;
...@@ -70,11 +70,11 @@ struct capi_ncci { ...@@ -70,11 +70,11 @@ struct capi_ncci {
}; };
struct capi_appl { struct capi_appl {
__u16 applid; u16 applid;
capi_register_params rparam; capi_register_params rparam;
int releasing; int releasing;
void *param; void *param;
void (*signal) (__u16 applid, void *param); void (*signal) (u16 applid, void *param);
struct sk_buff_head recv_queue; struct sk_buff_head recv_queue;
int nncci; int nncci;
struct capi_ncci *nccilist; struct capi_ncci *nccilist;
...@@ -88,9 +88,9 @@ struct capi_appl { ...@@ -88,9 +88,9 @@ struct capi_appl {
struct capi_notifier { struct capi_notifier {
struct capi_notifier *next; struct capi_notifier *next;
unsigned int cmd; unsigned int cmd;
__u32 controller; u32 controller;
__u16 applid; u16 applid;
__u32 ncci; u32 ncci;
}; };
/* ------------------------------------------------------------- */ /* ------------------------------------------------------------- */
...@@ -136,7 +136,7 @@ static char *cardstate2str(unsigned short cardstate) ...@@ -136,7 +136,7 @@ static char *cardstate2str(unsigned short cardstate)
} }
} }
static inline int capi_cmd_valid(__u8 cmd) static inline int capi_cmd_valid(u8 cmd)
{ {
switch (cmd) { switch (cmd) {
case CAPI_ALERT: case CAPI_ALERT:
...@@ -159,7 +159,7 @@ static inline int capi_cmd_valid(__u8 cmd) ...@@ -159,7 +159,7 @@ static inline int capi_cmd_valid(__u8 cmd)
return 0; return 0;
} }
static inline int capi_subcmd_valid(__u8 subcmd) static inline int capi_subcmd_valid(u8 subcmd)
{ {
switch (subcmd) { switch (subcmd) {
case CAPI_REQ: case CAPI_REQ:
...@@ -511,8 +511,8 @@ static inline struct capi_notifier *notify_dequeue(void) ...@@ -511,8 +511,8 @@ static inline struct capi_notifier *notify_dequeue(void)
return np; return np;
} }
static int notify_push(unsigned int cmd, __u32 controller, static int notify_push(unsigned int cmd, u32 controller,
__u16 applid, __u32 ncci) u16 applid, u32 ncci)
{ {
struct capi_notifier *np; struct capi_notifier *np;
...@@ -541,7 +541,7 @@ static int notify_push(unsigned int cmd, __u32 controller, ...@@ -541,7 +541,7 @@ static int notify_push(unsigned int cmd, __u32 controller,
/* -------- KCI_CONTRUP --------------------------------------- */ /* -------- KCI_CONTRUP --------------------------------------- */
static void notify_up(__u32 contr) static void notify_up(u32 contr)
{ {
struct capi_interface_user *p; struct capi_interface_user *p;
...@@ -556,7 +556,7 @@ static void notify_up(__u32 contr) ...@@ -556,7 +556,7 @@ static void notify_up(__u32 contr)
/* -------- KCI_CONTRDOWN ------------------------------------- */ /* -------- KCI_CONTRDOWN ------------------------------------- */
static void notify_down(__u32 contr) static void notify_down(u32 contr)
{ {
struct capi_interface_user *p; struct capi_interface_user *p;
printk(KERN_NOTICE "kcapi: notify down contr %d\n", contr); printk(KERN_NOTICE "kcapi: notify down contr %d\n", contr);
...@@ -570,7 +570,7 @@ static void notify_down(__u32 contr) ...@@ -570,7 +570,7 @@ static void notify_down(__u32 contr)
/* -------- KCI_NCCIUP ---------------------------------------- */ /* -------- KCI_NCCIUP ---------------------------------------- */
static void notify_ncciup(__u32 contr, __u16 applid, __u32 ncci) static void notify_ncciup(u32 contr, u16 applid, u32 ncci)
{ {
struct capi_interface_user *p; struct capi_interface_user *p;
struct capi_ncciinfo n; struct capi_ncciinfo n;
...@@ -587,7 +587,7 @@ static void notify_ncciup(__u32 contr, __u16 applid, __u32 ncci) ...@@ -587,7 +587,7 @@ static void notify_ncciup(__u32 contr, __u16 applid, __u32 ncci)
/* -------- KCI_NCCIDOWN -------------------------------------- */ /* -------- KCI_NCCIDOWN -------------------------------------- */
static void notify_nccidown(__u32 contr, __u16 applid, __u32 ncci) static void notify_nccidown(u32 contr, u16 applid, u32 ncci)
{ {
struct capi_interface_user *p; struct capi_interface_user *p;
struct capi_ncciinfo n; struct capi_ncciinfo n;
...@@ -650,7 +650,7 @@ static inline void mq_init(struct capi_ncci * np) ...@@ -650,7 +650,7 @@ static inline void mq_init(struct capi_ncci * np)
} }
} }
static inline int mq_enqueue(struct capi_ncci * np, __u16 msgid) static inline int mq_enqueue(struct capi_ncci * np, u16 msgid)
{ {
struct msgidqueue *mq; struct msgidqueue *mq;
if ((mq = np->msgidfree) == 0) if ((mq = np->msgidfree) == 0)
...@@ -667,7 +667,7 @@ static inline int mq_enqueue(struct capi_ncci * np, __u16 msgid) ...@@ -667,7 +667,7 @@ static inline int mq_enqueue(struct capi_ncci * np, __u16 msgid)
return 1; return 1;
} }
static inline int mq_dequeue(struct capi_ncci * np, __u16 msgid) static inline int mq_dequeue(struct capi_ncci * np, u16 msgid)
{ {
struct msgidqueue **pp; struct msgidqueue **pp;
for (pp = &np->msgidqueue; *pp; pp = &(*pp)->next) { for (pp = &np->msgidqueue; *pp; pp = &(*pp)->next) {
...@@ -685,11 +685,11 @@ static inline int mq_dequeue(struct capi_ncci * np, __u16 msgid) ...@@ -685,11 +685,11 @@ static inline int mq_dequeue(struct capi_ncci * np, __u16 msgid)
return 0; return 0;
} }
static void controllercb_appl_registered(struct capi_ctr * card, __u16 appl) static void controllercb_appl_registered(struct capi_ctr * card, u16 appl)
{ {
} }
static void controllercb_appl_released(struct capi_ctr * card, __u16 appl) static void controllercb_appl_released(struct capi_ctr * card, u16 appl)
{ {
struct capi_ncci **pp, **nextpp; struct capi_ncci **pp, **nextpp;
for (pp = &APPL(appl)->nccilist; *pp; pp = nextpp) { for (pp = &APPL(appl)->nccilist; *pp; pp = nextpp) {
...@@ -716,7 +716,7 @@ static void controllercb_appl_released(struct capi_ctr * card, __u16 appl) ...@@ -716,7 +716,7 @@ static void controllercb_appl_released(struct capi_ctr * card, __u16 appl)
*/ */
static void controllercb_new_ncci(struct capi_ctr * card, static void controllercb_new_ncci(struct capi_ctr * card,
__u16 appl, __u32 ncci, __u32 winsize) u16 appl, u32 ncci, u32 winsize)
{ {
struct capi_ncci *np; struct capi_ncci *np;
if (!VALID_APPLID(appl)) { if (!VALID_APPLID(appl)) {
...@@ -745,7 +745,7 @@ static void controllercb_new_ncci(struct capi_ctr * card, ...@@ -745,7 +745,7 @@ static void controllercb_new_ncci(struct capi_ctr * card,
} }
static void controllercb_free_ncci(struct capi_ctr * card, static void controllercb_free_ncci(struct capi_ctr * card,
__u16 appl, __u32 ncci) u16 appl, u32 ncci)
{ {
struct capi_ncci **pp; struct capi_ncci **pp;
if (!VALID_APPLID(appl)) { if (!VALID_APPLID(appl)) {
...@@ -767,7 +767,7 @@ static void controllercb_free_ncci(struct capi_ctr * card, ...@@ -767,7 +767,7 @@ static void controllercb_free_ncci(struct capi_ctr * card,
} }
static struct capi_ncci *find_ncci(struct capi_appl * app, __u32 ncci) static struct capi_ncci *find_ncci(struct capi_appl * app, u32 ncci)
{ {
struct capi_ncci *np; struct capi_ncci *np;
for (np = app->nccilist; np; np = np->next) { for (np = app->nccilist; np; np = np->next) {
...@@ -784,7 +784,7 @@ static void recv_handler(void *dummy) ...@@ -784,7 +784,7 @@ static void recv_handler(void *dummy)
struct sk_buff *skb; struct sk_buff *skb;
while ((skb = skb_dequeue(&recv_queue)) != 0) { while ((skb = skb_dequeue(&recv_queue)) != 0) {
__u16 appl = CAPIMSG_APPID(skb->data); u16 appl = CAPIMSG_APPID(skb->data);
struct capi_ncci *np; struct capi_ncci *np;
if (!VALID_APPLID(appl)) { if (!VALID_APPLID(appl)) {
printk(KERN_ERR "kcapi: recv_handler: applid %d ? (%s)\n", printk(KERN_ERR "kcapi: recv_handler: applid %d ? (%s)\n",
...@@ -817,10 +817,10 @@ static void recv_handler(void *dummy) ...@@ -817,10 +817,10 @@ static void recv_handler(void *dummy)
} }
static void controllercb_handle_capimsg(struct capi_ctr * card, static void controllercb_handle_capimsg(struct capi_ctr * card,
__u16 appl, struct sk_buff *skb) u16 appl, struct sk_buff *skb)
{ {
int showctl = 0; int showctl = 0;
__u8 cmd, subcmd; u8 cmd, subcmd;
if (card->cardstate != CARD_RUNNING) { if (card->cardstate != CARD_RUNNING) {
printk(KERN_INFO "kcapi: controller %d not active, got: %s", printk(KERN_INFO "kcapi: controller %d not active, got: %s",
...@@ -862,7 +862,7 @@ static void controllercb_handle_capimsg(struct capi_ctr * card, ...@@ -862,7 +862,7 @@ static void controllercb_handle_capimsg(struct capi_ctr * card,
static void controllercb_ready(struct capi_ctr * card) static void controllercb_ready(struct capi_ctr * card)
{ {
__u16 appl; u16 appl;
card->cardstate = CARD_RUNNING; card->cardstate = CARD_RUNNING;
...@@ -880,7 +880,7 @@ static void controllercb_ready(struct capi_ctr * card) ...@@ -880,7 +880,7 @@ static void controllercb_ready(struct capi_ctr * card)
static void controllercb_reseted(struct capi_ctr * card) static void controllercb_reseted(struct capi_ctr * card)
{ {
__u16 appl; u16 appl;
if (card->cardstate == CARD_FREE) if (card->cardstate == CARD_FREE)
return; return;
...@@ -1088,7 +1088,7 @@ void detach_capi_driver(struct capi_driver *driver) ...@@ -1088,7 +1088,7 @@ void detach_capi_driver(struct capi_driver *driver)
/* -------- CAPI2.0 Interface ---------------------------------- */ /* -------- CAPI2.0 Interface ---------------------------------- */
/* ------------------------------------------------------------- */ /* ------------------------------------------------------------- */
static __u16 capi_isinstalled(void) static u16 capi_isinstalled(void)
{ {
int i; int i;
for (i = 0; i < CAPI_MAXCONTR; i++) { for (i = 0; i < CAPI_MAXCONTR; i++) {
...@@ -1098,7 +1098,7 @@ static __u16 capi_isinstalled(void) ...@@ -1098,7 +1098,7 @@ static __u16 capi_isinstalled(void)
return CAPI_REGNOTINSTALLED; return CAPI_REGNOTINSTALLED;
} }
static __u16 capi_register(capi_register_params * rparam, __u16 * applidp) static u16 capi_register(capi_register_params * rparam, u16 * applidp)
{ {
int appl; int appl;
int i; int i;
...@@ -1131,7 +1131,7 @@ static __u16 capi_register(capi_register_params * rparam, __u16 * applidp) ...@@ -1131,7 +1131,7 @@ static __u16 capi_register(capi_register_params * rparam, __u16 * applidp)
return CAPI_NOERROR; return CAPI_NOERROR;
} }
static __u16 capi_release(__u16 applid) static u16 capi_release(u16 applid)
{ {
int i; int i;
...@@ -1154,12 +1154,12 @@ static __u16 capi_release(__u16 applid) ...@@ -1154,12 +1154,12 @@ static __u16 capi_release(__u16 applid)
return CAPI_NOERROR; return CAPI_NOERROR;
} }
static __u16 capi_put_message(__u16 applid, struct sk_buff *skb) static u16 capi_put_message(u16 applid, struct sk_buff *skb)
{ {
struct capi_ncci *np; struct capi_ncci *np;
__u32 contr; u32 contr;
int showctl = 0; int showctl = 0;
__u8 cmd, subcmd; u8 cmd, subcmd;
if (ncards == 0) if (ncards == 0)
return CAPI_REGNOTINSTALLED; return CAPI_REGNOTINSTALLED;
...@@ -1212,7 +1212,7 @@ static __u16 capi_put_message(__u16 applid, struct sk_buff *skb) ...@@ -1212,7 +1212,7 @@ static __u16 capi_put_message(__u16 applid, struct sk_buff *skb)
return CAPI_NOERROR; return CAPI_NOERROR;
} }
static __u16 capi_get_message(__u16 applid, struct sk_buff **msgp) static u16 capi_get_message(u16 applid, struct sk_buff **msgp)
{ {
struct sk_buff *skb; struct sk_buff *skb;
...@@ -1224,8 +1224,8 @@ static __u16 capi_get_message(__u16 applid, struct sk_buff **msgp) ...@@ -1224,8 +1224,8 @@ static __u16 capi_get_message(__u16 applid, struct sk_buff **msgp)
return CAPI_NOERROR; return CAPI_NOERROR;
} }
static __u16 capi_set_signal(__u16 applid, static u16 capi_set_signal(u16 applid,
void (*signal) (__u16 applid, void *param), void (*signal) (u16 applid, void *param),
void *param) void *param)
{ {
if (!VALID_APPLID(applid)) if (!VALID_APPLID(applid))
...@@ -1235,7 +1235,7 @@ static __u16 capi_set_signal(__u16 applid, ...@@ -1235,7 +1235,7 @@ static __u16 capi_set_signal(__u16 applid,
return CAPI_NOERROR; return CAPI_NOERROR;
} }
static __u16 capi_get_manufacturer(__u32 contr, __u8 buf[CAPI_MANUFACTURER_LEN]) static u16 capi_get_manufacturer(u32 contr, u8 buf[CAPI_MANUFACTURER_LEN])
{ {
if (contr == 0) { if (contr == 0) {
strncpy(buf, capi_manufakturer, CAPI_MANUFACTURER_LEN); strncpy(buf, capi_manufakturer, CAPI_MANUFACTURER_LEN);
...@@ -1248,7 +1248,7 @@ static __u16 capi_get_manufacturer(__u32 contr, __u8 buf[CAPI_MANUFACTURER_LEN]) ...@@ -1248,7 +1248,7 @@ static __u16 capi_get_manufacturer(__u32 contr, __u8 buf[CAPI_MANUFACTURER_LEN])
return CAPI_NOERROR; return CAPI_NOERROR;
} }
static __u16 capi_get_version(__u32 contr, struct capi_version *verp) static u16 capi_get_version(u32 contr, struct capi_version *verp)
{ {
if (contr == 0) { if (contr == 0) {
*verp = driver_version; *verp = driver_version;
...@@ -1261,7 +1261,7 @@ static __u16 capi_get_version(__u32 contr, struct capi_version *verp) ...@@ -1261,7 +1261,7 @@ static __u16 capi_get_version(__u32 contr, struct capi_version *verp)
return CAPI_NOERROR; return CAPI_NOERROR;
} }
static __u16 capi_get_serial(__u32 contr, __u8 serial[CAPI_SERIAL_LEN]) static u16 capi_get_serial(u32 contr, u8 serial[CAPI_SERIAL_LEN])
{ {
if (contr == 0) { if (contr == 0) {
strncpy(serial, driver_serial, CAPI_SERIAL_LEN); strncpy(serial, driver_serial, CAPI_SERIAL_LEN);
...@@ -1274,7 +1274,7 @@ static __u16 capi_get_serial(__u32 contr, __u8 serial[CAPI_SERIAL_LEN]) ...@@ -1274,7 +1274,7 @@ static __u16 capi_get_serial(__u32 contr, __u8 serial[CAPI_SERIAL_LEN])
return CAPI_NOERROR; return CAPI_NOERROR;
} }
static __u16 capi_get_profile(__u32 contr, struct capi_profile *profp) static u16 capi_get_profile(u32 contr, struct capi_profile *profp)
{ {
if (contr == 0) { if (contr == 0) {
profp->ncontroller = ncards; profp->ncontroller = ncards;
......
...@@ -41,12 +41,12 @@ enum avmcardtype { ...@@ -41,12 +41,12 @@ enum avmcardtype {
typedef struct avmcard_dmabuf { typedef struct avmcard_dmabuf {
long size; long size;
__u8 *dmabuf; u8 *dmabuf;
dma_addr_t dmaaddr; dma_addr_t dmaaddr;
} avmcard_dmabuf; } avmcard_dmabuf;
typedef struct avmcard_dmainfo { typedef struct avmcard_dmainfo {
__u32 recvlen; u32 recvlen;
avmcard_dmabuf recvbuf; avmcard_dmabuf recvbuf;
avmcard_dmabuf sendbuf; avmcard_dmabuf sendbuf;
...@@ -71,7 +71,7 @@ typedef struct avmcard { ...@@ -71,7 +71,7 @@ typedef struct avmcard {
int interrupt; int interrupt;
void *mbase; void *mbase;
volatile __u32 csr; volatile u32 csr;
avmcard_dmainfo *dma; avmcard_dmainfo *dma;
struct avmctrl_info { struct avmctrl_info {
...@@ -542,9 +542,9 @@ int b1_loaded(avmcard *card); ...@@ -542,9 +542,9 @@ int b1_loaded(avmcard *card);
int b1_load_firmware(struct capi_ctr *ctrl, capiloaddata *data); int b1_load_firmware(struct capi_ctr *ctrl, capiloaddata *data);
void b1_reset_ctr(struct capi_ctr *ctrl); void b1_reset_ctr(struct capi_ctr *ctrl);
void b1_register_appl(struct capi_ctr *ctrl, __u16 appl, void b1_register_appl(struct capi_ctr *ctrl, u16 appl,
capi_register_params *rp); capi_register_params *rp);
void b1_release_appl(struct capi_ctr *ctrl, __u16 appl); void b1_release_appl(struct capi_ctr *ctrl, u16 appl);
void b1_send_message(struct capi_ctr *ctrl, struct sk_buff *skb); void b1_send_message(struct capi_ctr *ctrl, struct sk_buff *skb);
void b1_parse_version(avmctrl_info *card); void b1_parse_version(avmctrl_info *card);
void b1_handle_interrupt(avmcard * card); void b1_handle_interrupt(avmcard * card);
...@@ -567,9 +567,9 @@ int b1dma_load_firmware(struct capi_ctr *ctrl, capiloaddata *data); ...@@ -567,9 +567,9 @@ int b1dma_load_firmware(struct capi_ctr *ctrl, capiloaddata *data);
void b1dma_reset_ctr(struct capi_ctr *ctrl); void b1dma_reset_ctr(struct capi_ctr *ctrl);
void b1dma_remove_ctr(struct capi_ctr *ctrl); void b1dma_remove_ctr(struct capi_ctr *ctrl);
void b1dma_register_appl(struct capi_ctr *ctrl, void b1dma_register_appl(struct capi_ctr *ctrl,
__u16 appl, u16 appl,
capi_register_params *rp); capi_register_params *rp);
void b1dma_release_appl(struct capi_ctr *ctrl, __u16 appl); void b1dma_release_appl(struct capi_ctr *ctrl, u16 appl);
void b1dma_send_message(struct capi_ctr *ctrl, struct sk_buff *skb); void b1dma_send_message(struct capi_ctr *ctrl, struct sk_buff *skb);
int b1dmactl_read_proc(char *page, char **start, off_t off, int b1dmactl_read_proc(char *page, char **start, off_t off,
int count, int *eof, struct capi_ctr *ctrl); int count, int *eof, struct capi_ctr *ctrl);
......
...@@ -297,7 +297,7 @@ void b1_reset_ctr(struct capi_ctr *ctrl) ...@@ -297,7 +297,7 @@ void b1_reset_ctr(struct capi_ctr *ctrl)
} }
void b1_register_appl(struct capi_ctr *ctrl, void b1_register_appl(struct capi_ctr *ctrl,
__u16 appl, u16 appl,
capi_register_params *rp) capi_register_params *rp)
{ {
avmctrl_info *cinfo = (avmctrl_info *)(ctrl->driverdata); avmctrl_info *cinfo = (avmctrl_info *)(ctrl->driverdata);
...@@ -323,7 +323,7 @@ void b1_register_appl(struct capi_ctr *ctrl, ...@@ -323,7 +323,7 @@ void b1_register_appl(struct capi_ctr *ctrl,
ctrl->appl_registered(ctrl, appl); ctrl->appl_registered(ctrl, appl);
} }
void b1_release_appl(struct capi_ctr *ctrl, __u16 appl) void b1_release_appl(struct capi_ctr *ctrl, u16 appl)
{ {
avmctrl_info *cinfo = (avmctrl_info *)(ctrl->driverdata); avmctrl_info *cinfo = (avmctrl_info *)(ctrl->driverdata);
avmcard *card = cinfo->card; avmcard *card = cinfo->card;
...@@ -343,14 +343,14 @@ void b1_send_message(struct capi_ctr *ctrl, struct sk_buff *skb) ...@@ -343,14 +343,14 @@ void b1_send_message(struct capi_ctr *ctrl, struct sk_buff *skb)
avmcard *card = cinfo->card; avmcard *card = cinfo->card;
unsigned int port = card->port; unsigned int port = card->port;
unsigned long flags; unsigned long flags;
__u16 len = CAPIMSG_LEN(skb->data); u16 len = CAPIMSG_LEN(skb->data);
__u8 cmd = CAPIMSG_COMMAND(skb->data); u8 cmd = CAPIMSG_COMMAND(skb->data);
__u8 subcmd = CAPIMSG_SUBCOMMAND(skb->data); u8 subcmd = CAPIMSG_SUBCOMMAND(skb->data);
save_flags(flags); save_flags(flags);
cli(); cli();
if (CAPICMD(cmd, subcmd) == CAPI_DATA_B3_REQ) { if (CAPICMD(cmd, subcmd) == CAPI_DATA_B3_REQ) {
__u16 dlen = CAPIMSG_DATALEN(skb->data); u16 dlen = CAPIMSG_DATALEN(skb->data);
b1_put_byte(port, SEND_DATA_B3_REQ); b1_put_byte(port, SEND_DATA_B3_REQ);
b1_put_slice(port, skb->data, len); b1_put_slice(port, skb->data, len);
b1_put_slice(port, skb->data + len, dlen); b1_put_slice(port, skb->data + len, dlen);
...@@ -369,8 +369,8 @@ void b1_parse_version(avmctrl_info *cinfo) ...@@ -369,8 +369,8 @@ void b1_parse_version(avmctrl_info *cinfo)
struct capi_ctr *ctrl = cinfo->capi_ctrl; struct capi_ctr *ctrl = cinfo->capi_ctrl;
avmcard *card = cinfo->card; avmcard *card = cinfo->card;
capi_profile *profp; capi_profile *profp;
__u8 *dversion; u8 *dversion;
__u8 flag; u8 flag;
int i, j; int i, j;
for (j = 0; j < AVM_MAXVERSION; j++) for (j = 0; j < AVM_MAXVERSION; j++)
...@@ -394,7 +394,7 @@ void b1_parse_version(avmctrl_info *cinfo) ...@@ -394,7 +394,7 @@ void b1_parse_version(avmctrl_info *cinfo)
profp = &ctrl->profile; profp = &ctrl->profile;
flag = ((__u8 *)(profp->manu))[1]; flag = ((u8 *)(profp->manu))[1];
switch (flag) { switch (flag) {
case 0: if (cinfo->version[VER_CARDTYPE]) case 0: if (cinfo->version[VER_CARDTYPE])
strcpy(cinfo->cardname, cinfo->version[VER_CARDTYPE]); strcpy(cinfo->cardname, cinfo->version[VER_CARDTYPE]);
...@@ -410,7 +410,7 @@ void b1_parse_version(avmctrl_info *cinfo) ...@@ -410,7 +410,7 @@ void b1_parse_version(avmctrl_info *cinfo)
printk(KERN_NOTICE "%s: card %d \"%s\" ready.\n", printk(KERN_NOTICE "%s: card %d \"%s\" ready.\n",
card->name, ctrl->cnr, cinfo->cardname); card->name, ctrl->cnr, cinfo->cardname);
flag = ((__u8 *)(profp->manu))[3]; flag = ((u8 *)(profp->manu))[3];
if (flag) if (flag)
printk(KERN_NOTICE "%s: card %d Protocol:%s%s%s%s%s%s%s\n", printk(KERN_NOTICE "%s: card %d Protocol:%s%s%s%s%s%s%s\n",
card->name, card->name,
...@@ -424,7 +424,7 @@ void b1_parse_version(avmctrl_info *cinfo) ...@@ -424,7 +424,7 @@ void b1_parse_version(avmctrl_info *cinfo)
(flag & 0x40) ? " 1TR6" : "" (flag & 0x40) ? " 1TR6" : ""
); );
flag = ((__u8 *)(profp->manu))[5]; flag = ((u8 *)(profp->manu))[5];
if (flag) if (flag)
printk(KERN_NOTICE "%s: card %d Linetype:%s%s%s%s\n", printk(KERN_NOTICE "%s: card %d Linetype:%s%s%s%s\n",
card->name, card->name,
...@@ -574,7 +574,7 @@ int b1ctl_read_proc(char *page, char **start, off_t off, ...@@ -574,7 +574,7 @@ int b1ctl_read_proc(char *page, char **start, off_t off,
{ {
avmctrl_info *cinfo = (avmctrl_info *)(ctrl->driverdata); avmctrl_info *cinfo = (avmctrl_info *)(ctrl->driverdata);
avmcard *card = cinfo->card; avmcard *card = cinfo->card;
__u8 flag; u8 flag;
int len = 0; int len = 0;
char *s; char *s;
...@@ -604,7 +604,7 @@ int b1ctl_read_proc(char *page, char **start, off_t off, ...@@ -604,7 +604,7 @@ int b1ctl_read_proc(char *page, char **start, off_t off,
len += sprintf(page+len, "%-16s %s\n", "ver_serial", s); len += sprintf(page+len, "%-16s %s\n", "ver_serial", s);
if (card->cardtype != avm_m1) { if (card->cardtype != avm_m1) {
flag = ((__u8 *)(ctrl->profile.manu))[3]; flag = ((u8 *)(ctrl->profile.manu))[3];
if (flag) if (flag)
len += sprintf(page+len, "%-16s%s%s%s%s%s%s%s\n", len += sprintf(page+len, "%-16s%s%s%s%s%s%s%s\n",
"protocol", "protocol",
...@@ -618,7 +618,7 @@ int b1ctl_read_proc(char *page, char **start, off_t off, ...@@ -618,7 +618,7 @@ int b1ctl_read_proc(char *page, char **start, off_t off,
); );
} }
if (card->cardtype != avm_m1) { if (card->cardtype != avm_m1) {
flag = ((__u8 *)(ctrl->profile.manu))[5]; flag = ((u8 *)(ctrl->profile.manu))[5];
if (flag) if (flag)
len += sprintf(page+len, "%-16s%s%s%s%s\n", len += sprintf(page+len, "%-16s%s%s%s%s\n",
"linetype", "linetype",
......
...@@ -130,41 +130,41 @@ static int b1dma_fromlink(avmcard *card, void *buf, unsigned int len) ...@@ -130,41 +130,41 @@ static int b1dma_fromlink(avmcard *card, void *buf, unsigned int len)
return 0; return 0;
} }
static int WriteReg(avmcard *card, __u32 reg, __u8 val) static int WriteReg(avmcard *card, u32 reg, u8 val)
{ {
__u8 cmd = 0x00; u8 cmd = 0x00;
if ( b1dma_tolink(card, &cmd, 1) == 0 if ( b1dma_tolink(card, &cmd, 1) == 0
&& b1dma_tolink(card, &reg, 4) == 0) { && b1dma_tolink(card, &reg, 4) == 0) {
__u32 tmp = val; u32 tmp = val;
return b1dma_tolink(card, &tmp, 4); return b1dma_tolink(card, &tmp, 4);
} }
return -1; return -1;
} }
static __u8 ReadReg(avmcard *card, __u32 reg) static u8 ReadReg(avmcard *card, u32 reg)
{ {
__u8 cmd = 0x01; u8 cmd = 0x01;
if ( b1dma_tolink(card, &cmd, 1) == 0 if ( b1dma_tolink(card, &cmd, 1) == 0
&& b1dma_tolink(card, &reg, 4) == 0) { && b1dma_tolink(card, &reg, 4) == 0) {
__u32 tmp; u32 tmp;
if (b1dma_fromlink(card, &tmp, 4) == 0) if (b1dma_fromlink(card, &tmp, 4) == 0)
return (__u8)tmp; return (u8)tmp;
} }
return 0xff; return 0xff;
} }
/* ------------------------------------------------------------- */ /* ------------------------------------------------------------- */
static inline void _put_byte(void **pp, __u8 val) static inline void _put_byte(void **pp, u8 val)
{ {
__u8 *s = *pp; u8 *s = *pp;
*s++ = val; *s++ = val;
*pp = s; *pp = s;
} }
static inline void _put_word(void **pp, __u32 val) static inline void _put_word(void **pp, u32 val)
{ {
__u8 *s = *pp; u8 *s = *pp;
*s++ = val & 0xff; *s++ = val & 0xff;
*s++ = (val >> 8) & 0xff; *s++ = (val >> 8) & 0xff;
*s++ = (val >> 16) & 0xff; *s++ = (val >> 16) & 0xff;
...@@ -180,19 +180,19 @@ static inline void _put_slice(void **pp, unsigned char *dp, unsigned int len) ...@@ -180,19 +180,19 @@ static inline void _put_slice(void **pp, unsigned char *dp, unsigned int len)
_put_byte(pp, *dp++); _put_byte(pp, *dp++);
} }
static inline __u8 _get_byte(void **pp) static inline u8 _get_byte(void **pp)
{ {
__u8 *s = *pp; u8 *s = *pp;
__u8 val; u8 val;
val = *s++; val = *s++;
*pp = s; *pp = s;
return val; return val;
} }
static inline __u32 _get_word(void **pp) static inline u32 _get_word(void **pp)
{ {
__u8 *s = *pp; u8 *s = *pp;
__u32 val; u32 val;
val = *s++; val = *s++;
val |= (*s++ << 8); val |= (*s++ << 8);
val |= (*s++ << 16); val |= (*s++ << 16);
...@@ -201,7 +201,7 @@ static inline __u32 _get_word(void **pp) ...@@ -201,7 +201,7 @@ static inline __u32 _get_word(void **pp)
return val; return val;
} }
static inline __u32 _get_slice(void **pp, unsigned char *dp) static inline u32 _get_slice(void **pp, unsigned char *dp)
{ {
unsigned int len, i; unsigned int len, i;
...@@ -357,9 +357,9 @@ static void b1dma_dispatch_tx(avmcard *card) ...@@ -357,9 +357,9 @@ static void b1dma_dispatch_tx(avmcard *card)
avmcard_dmainfo *dma = card->dma; avmcard_dmainfo *dma = card->dma;
unsigned long flags; unsigned long flags;
struct sk_buff *skb; struct sk_buff *skb;
__u8 cmd, subcmd; u8 cmd, subcmd;
__u16 len; u16 len;
__u32 txlen; u32 txlen;
int inint; int inint;
void *p; void *p;
...@@ -391,7 +391,7 @@ static void b1dma_dispatch_tx(avmcard *card) ...@@ -391,7 +391,7 @@ static void b1dma_dispatch_tx(avmcard *card)
p = dma->sendbuf.dmabuf; p = dma->sendbuf.dmabuf;
if (CAPICMD(cmd, subcmd) == CAPI_DATA_B3_REQ) { if (CAPICMD(cmd, subcmd) == CAPI_DATA_B3_REQ) {
__u16 dlen = CAPIMSG_DATALEN(skb->data); u16 dlen = CAPIMSG_DATALEN(skb->data);
_put_byte(&p, SEND_DATA_B3_REQ); _put_byte(&p, SEND_DATA_B3_REQ);
_put_slice(&p, skb->data, len); _put_slice(&p, skb->data, len);
_put_slice(&p, skb->data + len, dlen); _put_slice(&p, skb->data + len, dlen);
...@@ -399,7 +399,7 @@ static void b1dma_dispatch_tx(avmcard *card) ...@@ -399,7 +399,7 @@ static void b1dma_dispatch_tx(avmcard *card)
_put_byte(&p, SEND_MESSAGE); _put_byte(&p, SEND_MESSAGE);
_put_slice(&p, skb->data, len); _put_slice(&p, skb->data, len);
} }
txlen = (__u8 *)p - (__u8 *)dma->sendbuf.dmabuf; txlen = (u8 *)p - (u8 *)dma->sendbuf.dmabuf;
#ifdef CONFIG_B1DMA_DEBUG #ifdef CONFIG_B1DMA_DEBUG
printk(KERN_DEBUG "tx(%d): put msg len=%d\n", printk(KERN_DEBUG "tx(%d): put msg len=%d\n",
inint, txlen); inint, txlen);
...@@ -447,7 +447,7 @@ static void queue_pollack(avmcard *card) ...@@ -447,7 +447,7 @@ static void queue_pollack(avmcard *card)
_put_byte(&p, 0); _put_byte(&p, 0);
_put_byte(&p, 0); _put_byte(&p, 0);
_put_byte(&p, SEND_POLLACK); _put_byte(&p, SEND_POLLACK);
skb_put(skb, (__u8 *)p - (__u8 *)skb->data); skb_put(skb, (u8 *)p - (u8 *)skb->data);
skb_queue_tail(&card->dma->send_queue, skb); skb_queue_tail(&card->dma->send_queue, skb);
b1dma_dispatch_tx(card); b1dma_dispatch_tx(card);
...@@ -462,8 +462,8 @@ static void b1dma_handle_rx(avmcard *card) ...@@ -462,8 +462,8 @@ static void b1dma_handle_rx(avmcard *card)
struct capi_ctr *ctrl = cinfo->capi_ctrl; struct capi_ctr *ctrl = cinfo->capi_ctrl;
struct sk_buff *skb; struct sk_buff *skb;
void *p = dma->recvbuf.dmabuf+4; void *p = dma->recvbuf.dmabuf+4;
__u32 ApplId, MsgLen, DataB3Len, NCCI, WindowSize; u32 ApplId, MsgLen, DataB3Len, NCCI, WindowSize;
__u8 b1cmd = _get_byte(&p); u8 b1cmd = _get_byte(&p);
#ifdef CONFIG_B1DMA_DEBUG #ifdef CONFIG_B1DMA_DEBUG
printk(KERN_DEBUG "rx: 0x%x %lu\n", b1cmd, (unsigned long)dma->recvlen); printk(KERN_DEBUG "rx: 0x%x %lu\n", b1cmd, (unsigned long)dma->recvlen);
...@@ -585,8 +585,8 @@ static void b1dma_handle_rx(avmcard *card) ...@@ -585,8 +585,8 @@ static void b1dma_handle_rx(avmcard *card)
static void b1dma_handle_interrupt(avmcard *card) static void b1dma_handle_interrupt(avmcard *card)
{ {
__u32 status = b1dmainmeml(card->mbase+AMCC_INTCSR); u32 status = b1dmainmeml(card->mbase+AMCC_INTCSR);
__u32 newcsr; u32 newcsr;
if ((status & ANY_S5933_INT) == 0) if ((status & ANY_S5933_INT) == 0)
return; return;
...@@ -598,9 +598,9 @@ static void b1dma_handle_interrupt(avmcard *card) ...@@ -598,9 +598,9 @@ static void b1dma_handle_interrupt(avmcard *card)
if ((status & RX_TC_INT) != 0) { if ((status & RX_TC_INT) != 0) {
struct avmcard_dmainfo *dma = card->dma; struct avmcard_dmainfo *dma = card->dma;
__u32 rxlen; u32 rxlen;
if (card->dma->recvlen == 0) { if (card->dma->recvlen == 0) {
dma->recvlen = *((__u32 *)dma->recvbuf.dmabuf); dma->recvlen = *((u32 *)dma->recvbuf.dmabuf);
rxlen = (dma->recvlen + 3) & ~3; rxlen = (dma->recvlen + 3) & ~3;
b1dmaoutmeml(card->mbase+AMCC_RXPTR, b1dmaoutmeml(card->mbase+AMCC_RXPTR,
dma->recvbuf.dmaaddr+4); dma->recvbuf.dmaaddr+4);
...@@ -695,7 +695,7 @@ static void b1dma_send_init(avmcard *card) ...@@ -695,7 +695,7 @@ static void b1dma_send_init(avmcard *card)
_put_word(&p, CAPI_MAXAPPL); _put_word(&p, CAPI_MAXAPPL);
_put_word(&p, AVM_NCCI_PER_CHANNEL*30); _put_word(&p, AVM_NCCI_PER_CHANNEL*30);
_put_word(&p, card->cardnr - 1); _put_word(&p, card->cardnr - 1);
skb_put(skb, (__u8 *)p - (__u8 *)skb->data); skb_put(skb, (u8 *)p - (u8 *)skb->data);
skb_queue_tail(&card->dma->send_queue, skb); skb_queue_tail(&card->dma->send_queue, skb);
b1dma_dispatch_tx(card); b1dma_dispatch_tx(card);
...@@ -772,7 +772,7 @@ void b1dma_reset_ctr(struct capi_ctr *ctrl) ...@@ -772,7 +772,7 @@ void b1dma_reset_ctr(struct capi_ctr *ctrl)
void b1dma_register_appl(struct capi_ctr *ctrl, void b1dma_register_appl(struct capi_ctr *ctrl,
__u16 appl, u16 appl,
capi_register_params *rp) capi_register_params *rp)
{ {
avmctrl_info *cinfo = (avmctrl_info *)(ctrl->driverdata); avmctrl_info *cinfo = (avmctrl_info *)(ctrl->driverdata);
...@@ -801,7 +801,7 @@ void b1dma_register_appl(struct capi_ctr *ctrl, ...@@ -801,7 +801,7 @@ void b1dma_register_appl(struct capi_ctr *ctrl,
_put_word(&p, nconn); _put_word(&p, nconn);
_put_word(&p, rp->datablkcnt); _put_word(&p, rp->datablkcnt);
_put_word(&p, rp->datablklen); _put_word(&p, rp->datablklen);
skb_put(skb, (__u8 *)p - (__u8 *)skb->data); skb_put(skb, (u8 *)p - (u8 *)skb->data);
skb_queue_tail(&card->dma->send_queue, skb); skb_queue_tail(&card->dma->send_queue, skb);
b1dma_dispatch_tx(card); b1dma_dispatch_tx(card);
...@@ -811,7 +811,7 @@ void b1dma_register_appl(struct capi_ctr *ctrl, ...@@ -811,7 +811,7 @@ void b1dma_register_appl(struct capi_ctr *ctrl,
/* ------------------------------------------------------------- */ /* ------------------------------------------------------------- */
void b1dma_release_appl(struct capi_ctr *ctrl, __u16 appl) void b1dma_release_appl(struct capi_ctr *ctrl, u16 appl)
{ {
avmctrl_info *cinfo = (avmctrl_info *)(ctrl->driverdata); avmctrl_info *cinfo = (avmctrl_info *)(ctrl->driverdata);
avmcard *card = cinfo->card; avmcard *card = cinfo->card;
...@@ -830,7 +830,7 @@ void b1dma_release_appl(struct capi_ctr *ctrl, __u16 appl) ...@@ -830,7 +830,7 @@ void b1dma_release_appl(struct capi_ctr *ctrl, __u16 appl)
_put_byte(&p, SEND_RELEASE); _put_byte(&p, SEND_RELEASE);
_put_word(&p, appl); _put_word(&p, appl);
skb_put(skb, (__u8 *)p - (__u8 *)skb->data); skb_put(skb, (u8 *)p - (u8 *)skb->data);
skb_queue_tail(&card->dma->send_queue, skb); skb_queue_tail(&card->dma->send_queue, skb);
b1dma_dispatch_tx(card); b1dma_dispatch_tx(card);
} }
...@@ -853,10 +853,10 @@ int b1dmactl_read_proc(char *page, char **start, off_t off, ...@@ -853,10 +853,10 @@ int b1dmactl_read_proc(char *page, char **start, off_t off,
avmctrl_info *cinfo = (avmctrl_info *)(ctrl->driverdata); avmctrl_info *cinfo = (avmctrl_info *)(ctrl->driverdata);
avmcard *card = cinfo->card; avmcard *card = cinfo->card;
unsigned long flags; unsigned long flags;
__u8 flag; u8 flag;
int len = 0; int len = 0;
char *s; char *s;
__u32 txoff, txlen, rxoff, rxlen, csr; u32 txoff, txlen, rxoff, rxlen, csr;
len += sprintf(page+len, "%-16s %s\n", "name", card->name); len += sprintf(page+len, "%-16s %s\n", "name", card->name);
len += sprintf(page+len, "%-16s 0x%x\n", "io", card->port); len += sprintf(page+len, "%-16s 0x%x\n", "io", card->port);
...@@ -883,7 +883,7 @@ int b1dmactl_read_proc(char *page, char **start, off_t off, ...@@ -883,7 +883,7 @@ int b1dmactl_read_proc(char *page, char **start, off_t off,
len += sprintf(page+len, "%-16s %s\n", "ver_serial", s); len += sprintf(page+len, "%-16s %s\n", "ver_serial", s);
if (card->cardtype != avm_m1) { if (card->cardtype != avm_m1) {
flag = ((__u8 *)(ctrl->profile.manu))[3]; flag = ((u8 *)(ctrl->profile.manu))[3];
if (flag) if (flag)
len += sprintf(page+len, "%-16s%s%s%s%s%s%s%s\n", len += sprintf(page+len, "%-16s%s%s%s%s%s%s%s\n",
"protocol", "protocol",
...@@ -897,7 +897,7 @@ int b1dmactl_read_proc(char *page, char **start, off_t off, ...@@ -897,7 +897,7 @@ int b1dmactl_read_proc(char *page, char **start, off_t off,
); );
} }
if (card->cardtype != avm_m1) { if (card->cardtype != avm_m1) {
flag = ((__u8 *)(ctrl->profile.manu))[5]; flag = ((u8 *)(ctrl->profile.manu))[5];
if (flag) if (flag)
len += sprintf(page+len, "%-16s%s%s%s%s\n", len += sprintf(page+len, "%-16s%s%s%s%s\n",
"linetype", "linetype",
......
...@@ -193,14 +193,14 @@ static int c4_peek(avmcard *card, unsigned long off, unsigned long *valuep) ...@@ -193,14 +193,14 @@ static int c4_peek(avmcard *card, unsigned long off, unsigned long *valuep)
static int c4_load_t4file(avmcard *card, capiloaddatapart * t4file) static int c4_load_t4file(avmcard *card, capiloaddatapart * t4file)
{ {
__u32 val; u32 val;
unsigned char *dp; unsigned char *dp;
int left, retval; int left, retval;
__u32 loadoff = 0; u32 loadoff = 0;
dp = t4file->data; dp = t4file->data;
left = t4file->len; left = t4file->len;
while (left >= sizeof(__u32)) { while (left >= sizeof(u32)) {
if (t4file->user) { if (t4file->user) {
retval = copy_from_user(&val, dp, sizeof(val)); retval = copy_from_user(&val, dp, sizeof(val));
if (retval) if (retval)
...@@ -213,9 +213,9 @@ static int c4_load_t4file(avmcard *card, capiloaddatapart * t4file) ...@@ -213,9 +213,9 @@ static int c4_load_t4file(avmcard *card, capiloaddatapart * t4file)
card->name); card->name);
return -EIO; return -EIO;
} }
left -= sizeof(__u32); left -= sizeof(u32);
dp += sizeof(__u32); dp += sizeof(u32);
loadoff += sizeof(__u32); loadoff += sizeof(u32);
} }
if (left) { if (left) {
val = 0; val = 0;
...@@ -237,16 +237,16 @@ static int c4_load_t4file(avmcard *card, capiloaddatapart * t4file) ...@@ -237,16 +237,16 @@ static int c4_load_t4file(avmcard *card, capiloaddatapart * t4file)
/* ------------------------------------------------------------- */ /* ------------------------------------------------------------- */
static inline void _put_byte(void **pp, __u8 val) static inline void _put_byte(void **pp, u8 val)
{ {
__u8 *s = *pp; u8 *s = *pp;
*s++ = val; *s++ = val;
*pp = s; *pp = s;
} }
static inline void _put_word(void **pp, __u32 val) static inline void _put_word(void **pp, u32 val)
{ {
__u8 *s = *pp; u8 *s = *pp;
*s++ = val & 0xff; *s++ = val & 0xff;
*s++ = (val >> 8) & 0xff; *s++ = (val >> 8) & 0xff;
*s++ = (val >> 16) & 0xff; *s++ = (val >> 16) & 0xff;
...@@ -262,19 +262,19 @@ static inline void _put_slice(void **pp, unsigned char *dp, unsigned int len) ...@@ -262,19 +262,19 @@ static inline void _put_slice(void **pp, unsigned char *dp, unsigned int len)
_put_byte(pp, *dp++); _put_byte(pp, *dp++);
} }
static inline __u8 _get_byte(void **pp) static inline u8 _get_byte(void **pp)
{ {
__u8 *s = *pp; u8 *s = *pp;
__u8 val; u8 val;
val = *s++; val = *s++;
*pp = s; *pp = s;
return val; return val;
} }
static inline __u32 _get_word(void **pp) static inline u32 _get_word(void **pp)
{ {
__u8 *s = *pp; u8 *s = *pp;
__u32 val; u32 val;
val = *s++; val = *s++;
val |= (*s++ << 8); val |= (*s++ << 8);
val |= (*s++ << 16); val |= (*s++ << 16);
...@@ -283,7 +283,7 @@ static inline __u32 _get_word(void **pp) ...@@ -283,7 +283,7 @@ static inline __u32 _get_word(void **pp)
return val; return val;
} }
static inline __u32 _get_slice(void **pp, unsigned char *dp) static inline u32 _get_slice(void **pp, unsigned char *dp)
{ {
unsigned int len, i; unsigned int len, i;
...@@ -411,9 +411,9 @@ static void c4_dispatch_tx(avmcard *card) ...@@ -411,9 +411,9 @@ static void c4_dispatch_tx(avmcard *card)
avmcard_dmainfo *dma = card->dma; avmcard_dmainfo *dma = card->dma;
unsigned long flags; unsigned long flags;
struct sk_buff *skb; struct sk_buff *skb;
__u8 cmd, subcmd; u8 cmd, subcmd;
__u16 len; u16 len;
__u32 txlen; u32 txlen;
void *p; void *p;
save_flags(flags); save_flags(flags);
...@@ -442,7 +442,7 @@ static void c4_dispatch_tx(avmcard *card) ...@@ -442,7 +442,7 @@ static void c4_dispatch_tx(avmcard *card)
p = dma->sendbuf.dmabuf; p = dma->sendbuf.dmabuf;
if (CAPICMD(cmd, subcmd) == CAPI_DATA_B3_REQ) { if (CAPICMD(cmd, subcmd) == CAPI_DATA_B3_REQ) {
__u16 dlen = CAPIMSG_DATALEN(skb->data); u16 dlen = CAPIMSG_DATALEN(skb->data);
_put_byte(&p, SEND_DATA_B3_REQ); _put_byte(&p, SEND_DATA_B3_REQ);
_put_slice(&p, skb->data, len); _put_slice(&p, skb->data, len);
_put_slice(&p, skb->data + len, dlen); _put_slice(&p, skb->data + len, dlen);
...@@ -450,7 +450,7 @@ static void c4_dispatch_tx(avmcard *card) ...@@ -450,7 +450,7 @@ static void c4_dispatch_tx(avmcard *card)
_put_byte(&p, SEND_MESSAGE); _put_byte(&p, SEND_MESSAGE);
_put_slice(&p, skb->data, len); _put_slice(&p, skb->data, len);
} }
txlen = (__u8 *)p - (__u8 *)dma->sendbuf.dmabuf; txlen = (u8 *)p - (u8 *)dma->sendbuf.dmabuf;
#ifdef CONFIG_C4_DEBUG #ifdef CONFIG_C4_DEBUG
printk(KERN_DEBUG "%s: tx put msg len=%d\n", card->name, txlen); printk(KERN_DEBUG "%s: tx put msg len=%d\n", card->name, txlen);
#endif #endif
...@@ -496,7 +496,7 @@ static void queue_pollack(avmcard *card) ...@@ -496,7 +496,7 @@ static void queue_pollack(avmcard *card)
_put_byte(&p, 0); _put_byte(&p, 0);
_put_byte(&p, 0); _put_byte(&p, 0);
_put_byte(&p, SEND_POLLACK); _put_byte(&p, SEND_POLLACK);
skb_put(skb, (__u8 *)p - (__u8 *)skb->data); skb_put(skb, (u8 *)p - (u8 *)skb->data);
skb_queue_tail(&card->dma->send_queue, skb); skb_queue_tail(&card->dma->send_queue, skb);
c4_dispatch_tx(card); c4_dispatch_tx(card);
...@@ -511,9 +511,9 @@ static void c4_handle_rx(avmcard *card) ...@@ -511,9 +511,9 @@ static void c4_handle_rx(avmcard *card)
avmctrl_info *cinfo; avmctrl_info *cinfo;
struct sk_buff *skb; struct sk_buff *skb;
void *p = dma->recvbuf.dmabuf; void *p = dma->recvbuf.dmabuf;
__u32 ApplId, MsgLen, DataB3Len, NCCI, WindowSize; u32 ApplId, MsgLen, DataB3Len, NCCI, WindowSize;
__u8 b1cmd = _get_byte(&p); u8 b1cmd = _get_byte(&p);
__u32 cidx; u32 cidx;
#ifdef CONFIG_C4_DEBUG #ifdef CONFIG_C4_DEBUG
...@@ -674,7 +674,7 @@ static void c4_handle_rx(avmcard *card) ...@@ -674,7 +674,7 @@ static void c4_handle_rx(avmcard *card)
static void c4_handle_interrupt(avmcard *card) static void c4_handle_interrupt(avmcard *card)
{ {
__u32 status = c4inmeml(card->mbase+DOORBELL); u32 status = c4inmeml(card->mbase+DOORBELL);
if (status & DBELL_RESET_HOST) { if (status & DBELL_RESET_HOST) {
int i; int i;
...@@ -760,13 +760,13 @@ static void c4_send_init(avmcard *card) ...@@ -760,13 +760,13 @@ static void c4_send_init(avmcard *card)
_put_word(&p, CAPI_MAXAPPL); _put_word(&p, CAPI_MAXAPPL);
_put_word(&p, AVM_NCCI_PER_CHANNEL*30); _put_word(&p, AVM_NCCI_PER_CHANNEL*30);
_put_word(&p, card->cardnr - 1); _put_word(&p, card->cardnr - 1);
skb_put(skb, (__u8 *)p - (__u8 *)skb->data); skb_put(skb, (u8 *)p - (u8 *)skb->data);
skb_queue_tail(&card->dma->send_queue, skb); skb_queue_tail(&card->dma->send_queue, skb);
c4_dispatch_tx(card); c4_dispatch_tx(card);
} }
static int queue_sendconfigword(avmcard *card, __u32 val) static int queue_sendconfigword(avmcard *card, u32 val)
{ {
struct sk_buff *skb; struct sk_buff *skb;
void *p; void *p;
...@@ -782,7 +782,7 @@ static int queue_sendconfigword(avmcard *card, __u32 val) ...@@ -782,7 +782,7 @@ static int queue_sendconfigword(avmcard *card, __u32 val)
_put_byte(&p, 0); _put_byte(&p, 0);
_put_byte(&p, SEND_CONFIG); _put_byte(&p, SEND_CONFIG);
_put_word(&p, val); _put_word(&p, val);
skb_put(skb, (__u8 *)p - (__u8 *)skb->data); skb_put(skb, (u8 *)p - (u8 *)skb->data);
skb_queue_tail(&card->dma->send_queue, skb); skb_queue_tail(&card->dma->send_queue, skb);
c4_dispatch_tx(card); c4_dispatch_tx(card);
...@@ -808,7 +808,7 @@ static int queue_sendconfig(avmcard *card, char cval[4]) ...@@ -808,7 +808,7 @@ static int queue_sendconfig(avmcard *card, char cval[4])
_put_byte(&p, cval[1]); _put_byte(&p, cval[1]);
_put_byte(&p, cval[2]); _put_byte(&p, cval[2]);
_put_byte(&p, cval[3]); _put_byte(&p, cval[3]);
skb_put(skb, (__u8 *)p - (__u8 *)skb->data); skb_put(skb, (u8 *)p - (u8 *)skb->data);
skb_queue_tail(&card->dma->send_queue, skb); skb_queue_tail(&card->dma->send_queue, skb);
c4_dispatch_tx(card); c4_dispatch_tx(card);
...@@ -817,7 +817,7 @@ static int queue_sendconfig(avmcard *card, char cval[4]) ...@@ -817,7 +817,7 @@ static int queue_sendconfig(avmcard *card, char cval[4])
static int c4_send_config(avmcard *card, capiloaddatapart * config) static int c4_send_config(avmcard *card, capiloaddatapart * config)
{ {
__u8 val[4]; u8 val[4];
unsigned char *dp; unsigned char *dp;
int left, retval; int left, retval;
...@@ -828,7 +828,7 @@ static int c4_send_config(avmcard *card, capiloaddatapart * config) ...@@ -828,7 +828,7 @@ static int c4_send_config(avmcard *card, capiloaddatapart * config)
dp = config->data; dp = config->data;
left = config->len; left = config->len;
while (left >= sizeof(__u32)) { while (left >= sizeof(u32)) {
if (config->user) { if (config->user) {
retval = copy_from_user(val, dp, sizeof(val)); retval = copy_from_user(val, dp, sizeof(val));
if (retval) if (retval)
...@@ -954,7 +954,7 @@ static void c4_remove_ctr(struct capi_ctr *ctrl) ...@@ -954,7 +954,7 @@ static void c4_remove_ctr(struct capi_ctr *ctrl)
void c4_register_appl(struct capi_ctr *ctrl, void c4_register_appl(struct capi_ctr *ctrl,
__u16 appl, u16 appl,
capi_register_params *rp) capi_register_params *rp)
{ {
avmctrl_info *cinfo = (avmctrl_info *)(ctrl->driverdata); avmctrl_info *cinfo = (avmctrl_info *)(ctrl->driverdata);
...@@ -985,7 +985,7 @@ void c4_register_appl(struct capi_ctr *ctrl, ...@@ -985,7 +985,7 @@ void c4_register_appl(struct capi_ctr *ctrl,
_put_word(&p, nconn); _put_word(&p, nconn);
_put_word(&p, rp->datablkcnt); _put_word(&p, rp->datablkcnt);
_put_word(&p, rp->datablklen); _put_word(&p, rp->datablklen);
skb_put(skb, (__u8 *)p - (__u8 *)skb->data); skb_put(skb, (u8 *)p - (u8 *)skb->data);
skb_queue_tail(&card->dma->send_queue, skb); skb_queue_tail(&card->dma->send_queue, skb);
c4_dispatch_tx(card); c4_dispatch_tx(card);
...@@ -996,7 +996,7 @@ void c4_register_appl(struct capi_ctr *ctrl, ...@@ -996,7 +996,7 @@ void c4_register_appl(struct capi_ctr *ctrl,
/* ------------------------------------------------------------- */ /* ------------------------------------------------------------- */
void c4_release_appl(struct capi_ctr *ctrl, __u16 appl) void c4_release_appl(struct capi_ctr *ctrl, u16 appl)
{ {
avmctrl_info *cinfo = (avmctrl_info *)(ctrl->driverdata); avmctrl_info *cinfo = (avmctrl_info *)(ctrl->driverdata);
avmcard *card = cinfo->card; avmcard *card = cinfo->card;
...@@ -1016,7 +1016,7 @@ void c4_release_appl(struct capi_ctr *ctrl, __u16 appl) ...@@ -1016,7 +1016,7 @@ void c4_release_appl(struct capi_ctr *ctrl, __u16 appl)
_put_byte(&p, SEND_RELEASE); _put_byte(&p, SEND_RELEASE);
_put_word(&p, appl); _put_word(&p, appl);
skb_put(skb, (__u8 *)p - (__u8 *)skb->data); skb_put(skb, (u8 *)p - (u8 *)skb->data);
skb_queue_tail(&card->dma->send_queue, skb); skb_queue_tail(&card->dma->send_queue, skb);
c4_dispatch_tx(card); c4_dispatch_tx(card);
} }
...@@ -1056,7 +1056,7 @@ static int c4_read_proc(char *page, char **start, off_t off, ...@@ -1056,7 +1056,7 @@ static int c4_read_proc(char *page, char **start, off_t off,
{ {
avmctrl_info *cinfo = (avmctrl_info *)(ctrl->driverdata); avmctrl_info *cinfo = (avmctrl_info *)(ctrl->driverdata);
avmcard *card = cinfo->card; avmcard *card = cinfo->card;
__u8 flag; u8 flag;
int len = 0; int len = 0;
char *s; char *s;
...@@ -1085,7 +1085,7 @@ static int c4_read_proc(char *page, char **start, off_t off, ...@@ -1085,7 +1085,7 @@ static int c4_read_proc(char *page, char **start, off_t off,
len += sprintf(page+len, "%-16s %s\n", "ver_serial", s); len += sprintf(page+len, "%-16s %s\n", "ver_serial", s);
if (card->cardtype != avm_m1) { if (card->cardtype != avm_m1) {
flag = ((__u8 *)(ctrl->profile.manu))[3]; flag = ((u8 *)(ctrl->profile.manu))[3];
if (flag) if (flag)
len += sprintf(page+len, "%-16s%s%s%s%s%s%s%s\n", len += sprintf(page+len, "%-16s%s%s%s%s%s%s%s\n",
"protocol", "protocol",
...@@ -1099,7 +1099,7 @@ static int c4_read_proc(char *page, char **start, off_t off, ...@@ -1099,7 +1099,7 @@ static int c4_read_proc(char *page, char **start, off_t off,
); );
} }
if (card->cardtype != avm_m1) { if (card->cardtype != avm_m1) {
flag = ((__u8 *)(ctrl->profile.manu))[5]; flag = ((u8 *)(ctrl->profile.manu))[5];
if (flag) if (flag)
len += sprintf(page+len, "%-16s%s%s%s%s\n", len += sprintf(page+len, "%-16s%s%s%s%s\n",
"linetype", "linetype",
......
...@@ -484,14 +484,14 @@ static void t1isa_send_message(struct capi_ctr *ctrl, struct sk_buff *skb) ...@@ -484,14 +484,14 @@ static void t1isa_send_message(struct capi_ctr *ctrl, struct sk_buff *skb)
avmcard *card = cinfo->card; avmcard *card = cinfo->card;
unsigned int port = card->port; unsigned int port = card->port;
unsigned long flags; unsigned long flags;
__u16 len = CAPIMSG_LEN(skb->data); u16 len = CAPIMSG_LEN(skb->data);
__u8 cmd = CAPIMSG_COMMAND(skb->data); u8 cmd = CAPIMSG_COMMAND(skb->data);
__u8 subcmd = CAPIMSG_SUBCOMMAND(skb->data); u8 subcmd = CAPIMSG_SUBCOMMAND(skb->data);
save_flags(flags); save_flags(flags);
cli(); cli();
if (CAPICMD(cmd, subcmd) == CAPI_DATA_B3_REQ) { if (CAPICMD(cmd, subcmd) == CAPI_DATA_B3_REQ) {
__u16 dlen = CAPIMSG_DATALEN(skb->data); u16 dlen = CAPIMSG_DATALEN(skb->data);
b1_put_byte(port, SEND_DATA_B3_REQ); b1_put_byte(port, SEND_DATA_B3_REQ);
t1_put_slice(port, skb->data, len); t1_put_slice(port, skb->data, len);
t1_put_slice(port, skb->data + len, dlen); t1_put_slice(port, skb->data + len, dlen);
......
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