Commit 248c1097 authored by Kai Germaschewski's avatar Kai Germaschewski

ISDN cleanup: drivers/isdn/capi s/__u{32,16,8}/u{32,16,8}/

parent 9dbf0015
......@@ -49,7 +49,7 @@ struct capidrv_contr {
struct capidrv_contr *next;
__u32 contrnr;
u32 contrnr;
char name[20];
/*
......@@ -62,14 +62,14 @@ struct capidrv_contr {
* LISTEN state
*/
int state;
__u32 cipmask;
__u32 cipmask2;
u32 cipmask;
u32 cipmask2;
struct timer_list listentimer;
/*
* ID of capi message sent
*/
__u16 msgid;
u16 msgid;
/*
* B-Channels
......@@ -77,36 +77,36 @@ struct capidrv_contr {
int nbchan;
struct capidrv_bchan {
struct capidrv_contr *contr;
__u8 msn[ISDN_MSNLEN];
u8 msn[ISDN_MSNLEN];
int l2;
int l3;
__u8 num[ISDN_MSNLEN];
__u8 mynum[ISDN_MSNLEN];
u8 num[ISDN_MSNLEN];
u8 mynum[ISDN_MSNLEN];
int si1;
int si2;
int incoming;
int disconnecting;
struct capidrv_plci {
struct capidrv_plci *next;
__u32 plci;
__u32 ncci; /* ncci for CONNECT_ACTIVE_IND */
__u16 msgid; /* to identfy CONNECT_CONF */
u32 plci;
u32 ncci; /* ncci for CONNECT_ACTIVE_IND */
u16 msgid; /* to identfy CONNECT_CONF */
int chan;
int state;
int leasedline;
struct capidrv_ncci {
struct capidrv_ncci *next;
struct capidrv_plci *plcip;
__u32 ncci;
__u16 msgid; /* to identfy CONNECT_B3_CONF */
u32 ncci;
u16 msgid; /* to identfy CONNECT_B3_CONF */
int chan;
int state;
int oldstate;
/* */
__u16 datahandle;
u16 datahandle;
struct ncci_datahandle_queue {
struct ncci_datahandle_queue *next;
__u16 datahandle;
u16 datahandle;
int len;
} *ackqueue;
} *ncci_list;
......@@ -117,15 +117,15 @@ struct capidrv_contr {
struct capidrv_plci *plci_list;
/* for q931 data */
__u8 q931_buf[4096];
__u8 *q931_read;
__u8 *q931_write;
__u8 *q931_end;
u8 q931_buf[4096];
u8 *q931_read;
u8 *q931_write;
u8 *q931_end;
};
struct capidrv_data {
__u16 appid;
u16 appid;
int ncontr;
struct capidrv_contr *contr_list;
......@@ -149,11 +149,11 @@ static spinlock_t global_lock = SPIN_LOCK_UNLOCKED;
static struct capi_interface *capifuncs;
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 ---------------------------------------- */
static inline __u32 b1prot(int l2, int l3)
static inline u32 b1prot(int l2, int l3)
{
switch (l2) {
case ISDN_PROTO_L2_X75I:
......@@ -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) {
case ISDN_PROTO_L2_X75I:
......@@ -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) {
case ISDN_PROTO_L2_X75I:
......@@ -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" */
static unsigned char buf[9];
......@@ -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, 0, 0, 0, 0}, /*0 */
......@@ -275,12 +275,12 @@ static inline __u16 si2cip(__u8 si1, __u8 si2)
if (si2 > 4)
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, 0, 0, 0, 0, 0, 0, /*8-15 */
1, 2, 4, 10, 9, 9, 15, 7, /*16-23 */
......@@ -291,9 +291,9 @@ static inline __u8 cip2si1(__u16 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, 3, 0, 0, 0, 0, 0, 0, /*8-15 */
1, 2, 0, 0, 9, 0, 0, 0, /*16-23 */
......@@ -320,7 +320,7 @@ static inline capidrv_contr *findcontrbydriverid(int driverid)
return p;
}
static capidrv_contr *findcontrbynumber(__u32 contr)
static capidrv_contr *findcontrbynumber(u32 contr)
{
unsigned long flags;
capidrv_contr *p = global.contr_list;
......@@ -357,7 +357,7 @@ static capidrv_plci *new_plci(capidrv_contr * card, int chan)
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;
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)
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;
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)
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;
for (p = card->plci_list; p; p = p->next)
......@@ -406,7 +406,7 @@ static void free_plci(capidrv_contr * card, capidrv_plci * plcip)
static inline capidrv_ncci *new_ncci(capidrv_contr * card,
capidrv_plci * plcip,
__u32 ncci)
u32 ncci)
{
capidrv_ncci *nccip;
......@@ -430,7 +430,7 @@ static inline capidrv_ncci *new_ncci(capidrv_contr * card,
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_ncci *p;
......@@ -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,
__u32 ncci, __u16 msgid)
u32 ncci, u16 msgid)
{
capidrv_plci *plcip;
capidrv_ncci *p;
......@@ -474,7 +474,7 @@ static void free_ncci(capidrv_contr * card, 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;
......@@ -492,7 +492,7 @@ static int capidrv_add_ack(struct capidrv_ncci *nccip,
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;
int len;
......@@ -798,9 +798,9 @@ static void handle_controller(_cmsg * cmsg)
if ( cmsg->ManuID == 0x214D5641
&& cmsg->Class == 0
&& cmsg->Function == 1) {
__u8 *data = cmsg->ManuData+3;
__u16 len = cmsg->ManuData[0];
__u16 layer;
u8 *data = cmsg->ManuData+3;
u16 len = cmsg->ManuData[0];
u16 layer;
int direction;
if (len == 255) {
len = (cmsg->ManuData[1] | (cmsg->ManuData[2] << 8));
......@@ -1123,10 +1123,10 @@ static void handle_plci(_cmsg * cmsg)
cmd.arg = plcip->chan;
sprintf(cmd.parm.num, "%lu",
(unsigned long)
((__u32) cmsg->InfoElement[1]
| ((__u32) (cmsg->InfoElement[2]) << 8)
| ((__u32) (cmsg->InfoElement[3]) << 16)
| ((__u32) (cmsg->InfoElement[4]) << 24)));
((u32) cmsg->InfoElement[1]
| ((u32) (cmsg->InfoElement[2]) << 8)
| ((u32) (cmsg->InfoElement[3]) << 16)
| ((u32) (cmsg->InfoElement[4]) << 24)));
card->interface.statcallb(&cmd);
break;
}
......@@ -1373,7 +1373,7 @@ static void handle_data(_cmsg * cmsg, struct sk_buff *skb)
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;
......@@ -1415,9 +1415,9 @@ static void capidrv_signal(__u16 applid, void *dummy)
} while (0)
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;
if (!len) {
......@@ -1439,7 +1439,7 @@ static void handle_dtrace_data(capidrv_contr *card,
}
for (p = data, end = data+len; p < end; p++) {
__u8 w;
u8 w;
PUTBYTE_TO_STATUS(card, ' ');
w = (*p >> 4) & 0xf;
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)
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;
int active;
......@@ -1569,7 +1569,7 @@ static int capidrv_command(isdn_ctrl * c, capidrv_contr * card)
isdn_ctrl cmd;
struct capidrv_bchan *bchan;
struct capidrv_plci *plcip;
__u8 AdditionalInfo[1+2+2+31];
u8 AdditionalInfo[1+2+2+31];
int rc, isleasedline = 0;
if (c->command == ISDN_CMD_IOCTL)
......@@ -1577,8 +1577,8 @@ static int capidrv_command(isdn_ctrl * c, capidrv_contr * card)
switch (c->command) {
case ISDN_CMD_DIAL:{
__u8 calling[ISDN_MSNLEN + 3];
__u8 called[ISDN_MSNLEN + 2];
u8 calling[ISDN_MSNLEN + 3];
u8 called[ISDN_MSNLEN + 2];
if (debugmode)
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)
capidrv_ncci *nccip;
int len = skb->len;
size_t msglen;
__u16 errcode;
__u16 datahandle;
u16 errcode;
u16 datahandle;
if (!card) {
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)
datahandle = nccip->datahandle;
capi_fill_DATA_B3_REQ(&sendcmsg, global.appid, card->msgid++,
nccip->ncci, /* adr */
(__u32) skb->data, /* Data */
(u32) skb->data, /* Data */
skb->len, /* DataLength */
datahandle, /* DataHandle */
0 /* Flags */
......@@ -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);
int count;
__u8 *p;
u8 *p;
if (!card) {
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)
static void enable_dchannel_trace(capidrv_contr *card)
{
__u8 manufacturer[CAPI_MANUFACTURER_LEN];
u8 manufacturer[CAPI_MANUFACTURER_LEN];
capi_version version;
__u16 contr = card->contrnr;
__u16 errcode;
__u16 avmversion[3];
u16 contr = card->contrnr;
u16 errcode;
u16 avmversion[3];
errcode = (*capifuncs->capi_get_manufacturer)(contr, manufacturer);
if (errcode != CAPI_NOERROR) {
......@@ -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;
long flags;
......@@ -2135,7 +2135,7 @@ static int capidrv_addcontr(__u16 contr, struct capi_profile *profp)
return 0;
}
static int capidrv_delcontr(__u16 contr)
static int capidrv_delcontr(u16 contr)
{
capidrv_contr **pp, *card;
unsigned long flags;
......@@ -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) {
......@@ -2303,8 +2303,8 @@ static int __init capidrv_init(void)
capi_profile profile;
char rev[32];
char *p;
__u32 ncontr, contr;
__u16 errcode;
u32 ncontr, contr;
u16 errcode;
MOD_INC_USE_COUNT;
......
......@@ -27,12 +27,12 @@ MODULE_LICENSE("GPL");
/* from CAPI2.0 DDK AVM Berlin GmbH */
#ifndef CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON
char *capi_info2str(__u16 reason)
char *capi_info2str(u16 reason)
{
return "..";
}
#else
char *capi_info2str(__u16 reason)
char *capi_info2str(u16 reason)
{
switch (reason) {
......@@ -422,14 +422,14 @@ static unsigned char *cpars[] =
/*-------------------------------------------------------*/
#define byteTLcpy(x,y) *(__u8 *)(x)=*(__u8 *)(y);
#define wordTLcpy(x,y) *(__u16 *)(x)=*(__u16 *)(y);
#define byteTLcpy(x,y) *(u8 *)(x)=*(u8 *)(y);
#define wordTLcpy(x,y) *(u16 *)(x)=*(u16 *)(y);
#define dwordTLcpy(x,y) memcpy(x,y,4);
#define structTLcpy(x,y,l) memcpy (x,y,l)
#define structTLcpyovl(x,y,l) memmove (x,y,l)
#define byteTRcpy(x,y) *(__u8 *)(y)=*(__u8 *)(x);
#define wordTRcpy(x,y) *(__u16 *)(y)=*(__u16 *)(x);
#define byteTRcpy(x,y) *(u8 *)(y)=*(u8 *)(x);
#define wordTRcpy(x,y) *(u16 *)(y)=*(u16 *)(x);
#define dwordTRcpy(x,y) memcpy(y,x,4);
#define structTRcpy(x,y,l) memcpy (y,x,l)
#define structTRcpyovl(x,y,l) memmove (y,x,l)
......@@ -449,7 +449,7 @@ static unsigned command_2_index(unsigned c, unsigned sc)
/*-------------------------------------------------------*/
#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)
{
......@@ -486,7 +486,7 @@ static void pars_2_message(_cmsg * cmsg)
cmsg->l += 4;
break;
case _CSTRUCT:
if (*(__u8 **) OFF == 0) {
if (*(u8 **) OFF == 0) {
*(cmsg->m + cmsg->l) = '\0';
cmsg->l++;
} else if (**(_cstruct *) OFF != 0xff) {
......@@ -494,8 +494,8 @@ static void pars_2_message(_cmsg * cmsg)
cmsg->l += 1 + **(_cstruct *) OFF;
} else {
_cstruct s = *(_cstruct *) OFF;
structTLcpy(cmsg->m + cmsg->l, s, 3 + *(__u16 *) (s + 1));
cmsg->l += 3 + *(__u16 *) (s + 1);
structTLcpy(cmsg->m + cmsg->l, s, 3 + *(u16 *) (s + 1));
cmsg->l += 3 + *(u16 *) (s + 1);
}
break;
case _CMSTRUCT:
......@@ -514,7 +514,7 @@ static void pars_2_message(_cmsg * cmsg)
pars_2_message(cmsg);
_ls = cmsg->l - _l - 1;
if (_ls < 255)
(cmsg->m + _l)[0] = (__u8) _ls;
(cmsg->m + _l)[0] = (u8) _ls;
else {
structTLcpyovl(cmsg->m + _l + 3, cmsg->m + _l + 1, _ls);
(cmsg->m + _l)[0] = 0xff;
......@@ -527,7 +527,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->l = 8;
......@@ -564,12 +564,12 @@ static void message_2_pars(_cmsg * cmsg)
cmsg->l += 4;
break;
case _CSTRUCT:
*(__u8 **) OFF = cmsg->m + cmsg->l;
*(u8 **) OFF = cmsg->m + cmsg->l;
if (cmsg->m[cmsg->l] != 0xff)
cmsg->l += 1 + cmsg->m[cmsg->l];
else
cmsg->l += 3 + *(__u16 *) (cmsg->m + cmsg->l + 1);
cmsg->l += 3 + *(u16 *) (cmsg->m + cmsg->l + 1);
break;
case _CMSTRUCT:
/*----- Metastruktur 0 -----*/
......@@ -590,7 +590,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));
cmsg->m = msg;
......@@ -610,9 +610,9 @@ unsigned capi_message2cmsg(_cmsg * cmsg, __u8 * msg)
}
/*-------------------------------------------------------*/
unsigned capi_cmsg_header(_cmsg * cmsg, __u16 _ApplId,
__u8 _Command, __u8 _Subcommand,
__u16 _Messagenumber, __u32 _Controller)
unsigned capi_cmsg_header(_cmsg * cmsg, u16 _ApplId,
u8 _Command, u8 _Subcommand,
u16 _Messagenumber, u32 _Controller)
{
memset(cmsg, 0, sizeof(_cmsg));
cmsg->ApplId = _ApplId;
......@@ -708,7 +708,7 @@ static char *mnames[] =
"MANUFACTURER_RESP"
};
char *capi_cmd2str(__u8 cmd, __u8 subcmd)
char *capi_cmd2str(u8 cmd, u8 subcmd)
{
return mnames[command_2_index(cmd, subcmd)];
}
......@@ -785,7 +785,7 @@ static void bufprint(char *fmt,...)
p += strlen(p);
}
static void printstructlen(__u8 * m, unsigned len)
static void printstructlen(u8 * m, unsigned len)
{
unsigned hex = 0;
for (; len; len--, m++)
......@@ -805,14 +805,14 @@ static void printstructlen(__u8 * m, unsigned len)
bufprint(">");
}
static void printstruct(__u8 * m)
static void printstruct(u8 * m)
{
unsigned len;
if (m[0] != 0xff) {
len = m[0];
m += 1;
} else {
len = ((__u16 *) (m + 1))[0];
len = ((u16 *) (m + 1))[0];
m += 3;
}
printstructlen(m, len);
......@@ -833,15 +833,15 @@ static void protocol_message_2_pars(_cmsg * cmsg, int level)
switch (TYP) {
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++;
break;
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;
break;
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;
break;
case _CSTRUCT:
......@@ -854,7 +854,7 @@ static void protocol_message_2_pars(_cmsg * cmsg, int level)
if (cmsg->m[cmsg->l] != 0xff)
cmsg->l += 1 + cmsg->m[cmsg->l];
else
cmsg->l += 3 + *(__u16 *) (cmsg->m + cmsg->l + 1);
cmsg->l += 3 + *(u16 *) (cmsg->m + cmsg->l + 1);
break;
......@@ -877,7 +877,7 @@ static void protocol_message_2_pars(_cmsg * cmsg, int level)
}
}
/*-------------------------------------------------------*/
char *capi_message2str(__u8 * msg)
char *capi_message2str(u8 * msg)
{
_cmsg cmsg;
......@@ -909,9 +909,9 @@ char *capi_cmsg2str(_cmsg * cmsg)
cmsg->p = 0;
bufprint("%s ID=%03d #0x%04x LEN=%04d\n",
mnames[command_2_index(cmsg->Command, cmsg->Subcommand)],
((__u16 *) cmsg->m)[1],
((__u16 *) cmsg->m)[3],
((__u16 *) cmsg->m)[0]);
((u16 *) cmsg->m)[1],
((u16 *) cmsg->m)[3],
((u16 *) cmsg->m)[0]);
protocol_message_2_pars(cmsg, 1);
return buf;
}
......
......@@ -54,14 +54,14 @@ MODULE_PARM(showcapimsgs, "i");
struct msgidqueue {
struct msgidqueue *next;
__u16 msgid;
u16 msgid;
};
struct capi_ncci {
struct capi_ncci *next;
__u16 applid;
__u32 ncci;
__u32 winsize;
u16 applid;
u32 ncci;
u32 winsize;
int nmsg;
struct msgidqueue *msgidqueue;
struct msgidqueue *msgidlast;
......@@ -70,11 +70,11 @@ struct capi_ncci {
};
struct capi_appl {
__u16 applid;
u16 applid;
capi_register_params rparam;
int releasing;
void *param;
void (*signal) (__u16 applid, void *param);
void (*signal) (u16 applid, void *param);
struct sk_buff_head recv_queue;
int nncci;
struct capi_ncci *nccilist;
......@@ -88,9 +88,9 @@ struct capi_appl {
struct capi_notifier {
struct capi_notifier *next;
unsigned int cmd;
__u32 controller;
__u16 applid;
__u32 ncci;
u32 controller;
u16 applid;
u32 ncci;
};
/* ------------------------------------------------------------- */
......@@ -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) {
case CAPI_ALERT:
......@@ -159,7 +159,7 @@ static inline int capi_cmd_valid(__u8 cmd)
return 0;
}
static inline int capi_subcmd_valid(__u8 subcmd)
static inline int capi_subcmd_valid(u8 subcmd)
{
switch (subcmd) {
case CAPI_REQ:
......@@ -511,8 +511,8 @@ static inline struct capi_notifier *notify_dequeue(void)
return np;
}
static int notify_push(unsigned int cmd, __u32 controller,
__u16 applid, __u32 ncci)
static int notify_push(unsigned int cmd, u32 controller,
u16 applid, u32 ncci)
{
struct capi_notifier *np;
......@@ -541,7 +541,7 @@ static int notify_push(unsigned int cmd, __u32 controller,
/* -------- KCI_CONTRUP --------------------------------------- */
static void notify_up(__u32 contr)
static void notify_up(u32 contr)
{
struct capi_interface_user *p;
......@@ -556,7 +556,7 @@ static void notify_up(__u32 contr)
/* -------- KCI_CONTRDOWN ------------------------------------- */
static void notify_down(__u32 contr)
static void notify_down(u32 contr)
{
struct capi_interface_user *p;
printk(KERN_NOTICE "kcapi: notify down contr %d\n", contr);
......@@ -570,7 +570,7 @@ static void notify_down(__u32 contr)
/* -------- 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_ncciinfo n;
......@@ -587,7 +587,7 @@ static void notify_ncciup(__u32 contr, __u16 applid, __u32 ncci)
/* -------- 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_ncciinfo n;
......@@ -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;
if ((mq = np->msgidfree) == 0)
......@@ -667,7 +667,7 @@ static inline int mq_enqueue(struct capi_ncci * np, __u16 msgid)
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;
for (pp = &np->msgidqueue; *pp; pp = &(*pp)->next) {
......@@ -685,11 +685,11 @@ static inline int mq_dequeue(struct capi_ncci * np, __u16 msgid)
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;
for (pp = &APPL(appl)->nccilist; *pp; pp = nextpp) {
......@@ -716,7 +716,7 @@ static void controllercb_appl_released(struct capi_ctr * card, __u16 appl)
*/
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;
if (!VALID_APPLID(appl)) {
......@@ -745,7 +745,7 @@ static void controllercb_new_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;
if (!VALID_APPLID(appl)) {
......@@ -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;
for (np = app->nccilist; np; np = np->next) {
......@@ -784,7 +784,7 @@ static void recv_handler(void *dummy)
struct sk_buff *skb;
while ((skb = skb_dequeue(&recv_queue)) != 0) {
__u16 appl = CAPIMSG_APPID(skb->data);
u16 appl = CAPIMSG_APPID(skb->data);
struct capi_ncci *np;
if (!VALID_APPLID(appl)) {
printk(KERN_ERR "kcapi: recv_handler: applid %d ? (%s)\n",
......@@ -817,10 +817,10 @@ static void recv_handler(void *dummy)
}
static void controllercb_handle_capimsg(struct capi_ctr * card,
__u16 appl, struct sk_buff *skb)
u16 appl, struct sk_buff *skb)
{
int showctl = 0;
__u8 cmd, subcmd;
u8 cmd, subcmd;
if (card->cardstate != CARD_RUNNING) {
printk(KERN_INFO "kcapi: controller %d not active, got: %s",
......@@ -862,7 +862,7 @@ static void controllercb_handle_capimsg(struct capi_ctr * card,
static void controllercb_ready(struct capi_ctr * card)
{
__u16 appl;
u16 appl;
card->cardstate = CARD_RUNNING;
......@@ -880,7 +880,7 @@ static void controllercb_ready(struct capi_ctr * card)
static void controllercb_reseted(struct capi_ctr * card)
{
__u16 appl;
u16 appl;
if (card->cardstate == CARD_FREE)
return;
......@@ -1088,7 +1088,7 @@ void detach_capi_driver(struct capi_driver *driver)
/* -------- CAPI2.0 Interface ---------------------------------- */
/* ------------------------------------------------------------- */
static __u16 capi_isinstalled(void)
static u16 capi_isinstalled(void)
{
int i;
for (i = 0; i < CAPI_MAXCONTR; i++) {
......@@ -1098,7 +1098,7 @@ static __u16 capi_isinstalled(void)
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 i;
......@@ -1131,7 +1131,7 @@ static __u16 capi_register(capi_register_params * rparam, __u16 * applidp)
return CAPI_NOERROR;
}
static __u16 capi_release(__u16 applid)
static u16 capi_release(u16 applid)
{
int i;
......@@ -1154,12 +1154,12 @@ static __u16 capi_release(__u16 applid)
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;
__u32 contr;
u32 contr;
int showctl = 0;
__u8 cmd, subcmd;
u8 cmd, subcmd;
if (ncards == 0)
return CAPI_REGNOTINSTALLED;
......@@ -1212,7 +1212,7 @@ static __u16 capi_put_message(__u16 applid, struct sk_buff *skb)
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;
......@@ -1224,8 +1224,8 @@ static __u16 capi_get_message(__u16 applid, struct sk_buff **msgp)
return CAPI_NOERROR;
}
static __u16 capi_set_signal(__u16 applid,
void (*signal) (__u16 applid, void *param),
static u16 capi_set_signal(u16 applid,
void (*signal) (u16 applid, void *param),
void *param)
{
if (!VALID_APPLID(applid))
......@@ -1235,7 +1235,7 @@ static __u16 capi_set_signal(__u16 applid,
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) {
strncpy(buf, capi_manufakturer, CAPI_MANUFACTURER_LEN);
......@@ -1248,7 +1248,7 @@ static __u16 capi_get_manufacturer(__u32 contr, __u8 buf[CAPI_MANUFACTURER_LEN])
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) {
*verp = driver_version;
......@@ -1261,7 +1261,7 @@ static __u16 capi_get_version(__u32 contr, struct capi_version *verp)
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) {
strncpy(serial, driver_serial, CAPI_SERIAL_LEN);
......@@ -1274,7 +1274,7 @@ static __u16 capi_get_serial(__u32 contr, __u8 serial[CAPI_SERIAL_LEN])
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) {
profp->ncontroller = ncards;
......
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