diff options
Diffstat (limited to 'drivers/isdn/hisax/tei.c')
-rw-r--r-- | drivers/isdn/hisax/tei.c | 76 |
1 files changed, 38 insertions, 38 deletions
diff --git a/drivers/isdn/hisax/tei.c b/drivers/isdn/hisax/tei.c index 9b6db9c92cd8..9195f9fd628f 100644 --- a/drivers/isdn/hisax/tei.c +++ b/drivers/isdn/hisax/tei.c @@ -3,7 +3,7 @@ * Author Karsten Keil * based on the teles driver from Jan den Ouden * Copyright by Karsten Keil <keil@isdn4linux.de> - * + * * This software may be used and distributed according to the terms * of the GNU General Public License, incorporated herein by reference. * @@ -43,7 +43,7 @@ enum { ST_TEI_IDVERIFY, }; -#define TEI_STATE_COUNT (ST_TEI_IDVERIFY+1) +#define TEI_STATE_COUNT (ST_TEI_IDVERIFY + 1) static char *strTeiState[] = { @@ -62,7 +62,7 @@ enum { EV_T202, }; -#define TEI_EVENT_COUNT (EV_T202+1) +#define TEI_EVENT_COUNT (EV_T202 + 1) static char *strTeiEvent[] = { @@ -130,14 +130,14 @@ tei_id_request(struct FsmInst *fi, int event, void *arg) if (st->l2.tei != -1) { st->ma.tei_m.printdebug(&st->ma.tei_m, - "assign request for already assigned tei %d", - st->l2.tei); + "assign request for already assigned tei %d", + st->l2.tei); return; } st->ma.ri = random_ri(); if (st->ma.debug) st->ma.tei_m.printdebug(&st->ma.tei_m, - "assign request ri %d", st->ma.ri); + "assign request ri %d", st->ma.ri); put_tei_msg(st, ID_REQUEST, st->ma.ri, 127); FsmChangeState(&st->ma.tei_m, ST_TEI_IDREQ); FsmAddTimer(&st->ma.t202, st->ma.T202, EV_T202, NULL, 1); @@ -156,11 +156,11 @@ tei_id_assign(struct FsmInst *fi, int event, void *arg) tei = skb->data[4] >> 1; if (st->ma.debug) st->ma.tei_m.printdebug(&st->ma.tei_m, - "identity assign ri %d tei %d", ri, tei); + "identity assign ri %d tei %d", ri, tei); if ((ost = findtei(st, tei))) { /* same tei is in use */ if (ri != ost->ma.ri) { st->ma.tei_m.printdebug(&st->ma.tei_m, - "possible duplicate assignment tei %d", tei); + "possible duplicate assignment tei %d", tei); ost->l2.l2tei(ost, MDL_ERROR | RESPONSE, NULL); } } else if (ri == st->ma.ri) { @@ -183,14 +183,14 @@ tei_id_test_dup(struct FsmInst *fi, int event, void *arg) tei = skb->data[4] >> 1; if (st->ma.debug) st->ma.tei_m.printdebug(&st->ma.tei_m, - "foreign identity assign ri %d tei %d", ri, tei); + "foreign identity assign ri %d tei %d", ri, tei); if ((ost = findtei(st, tei))) { /* same tei is in use */ if (ri != ost->ma.ri) { /* and it wasn't our request */ st->ma.tei_m.printdebug(&st->ma.tei_m, - "possible duplicate assignment tei %d", tei); + "possible duplicate assignment tei %d", tei); FsmEvent(&ost->ma.tei_m, EV_VERIFY, NULL); } - } + } } static void @@ -204,7 +204,7 @@ tei_id_denied(struct FsmInst *fi, int event, void *arg) tei = skb->data[4] >> 1; if (st->ma.debug) st->ma.tei_m.printdebug(&st->ma.tei_m, - "identity denied ri %d tei %d", ri, tei); + "identity denied ri %d tei %d", ri, tei); } static void @@ -217,7 +217,7 @@ tei_id_chk_req(struct FsmInst *fi, int event, void *arg) tei = skb->data[4] >> 1; if (st->ma.debug) st->ma.tei_m.printdebug(&st->ma.tei_m, - "identity check req tei %d", tei); + "identity check req tei %d", tei); if ((st->l2.tei != -1) && ((tei == GROUP_TEI) || (tei == st->l2.tei))) { FsmDelTimer(&st->ma.t202, 4); FsmChangeState(&st->ma.tei_m, ST_TEI_NOP); @@ -236,7 +236,7 @@ tei_id_remove(struct FsmInst *fi, int event, void *arg) tei = skb->data[4] >> 1; if (st->ma.debug) st->ma.tei_m.printdebug(&st->ma.tei_m, - "identity remove tei %d", tei); + "identity remove tei %d", tei); if ((st->l2.tei != -1) && ((tei == GROUP_TEI) || (tei == st->l2.tei))) { FsmDelTimer(&st->ma.t202, 5); FsmChangeState(&st->ma.tei_m, ST_TEI_NOP); @@ -253,7 +253,7 @@ tei_id_verify(struct FsmInst *fi, int event, void *arg) if (st->ma.debug) st->ma.tei_m.printdebug(&st->ma.tei_m, - "id verify request for tei %d", st->l2.tei); + "id verify request for tei %d", st->l2.tei); put_tei_msg(st, ID_VERIFY, 0, st->l2.tei); FsmChangeState(&st->ma.tei_m, ST_TEI_IDVERIFY); FsmAddTimer(&st->ma.t202, st->ma.T202, EV_T202, NULL, 2); @@ -270,8 +270,8 @@ tei_id_req_tout(struct FsmInst *fi, int event, void *arg) st->ma.ri = random_ri(); if (st->ma.debug) st->ma.tei_m.printdebug(&st->ma.tei_m, - "assign req(%d) ri %d", 4 - st->ma.N202, - st->ma.ri); + "assign req(%d) ri %d", 4 - st->ma.N202, + st->ma.ri); put_tei_msg(st, ID_REQUEST, st->ma.ri, 127); FsmAddTimer(&st->ma.t202, st->ma.T202, EV_T202, NULL, 3); } else { @@ -292,13 +292,13 @@ tei_id_ver_tout(struct FsmInst *fi, int event, void *arg) if (--st->ma.N202) { if (st->ma.debug) st->ma.tei_m.printdebug(&st->ma.tei_m, - "id verify req(%d) for tei %d", - 3 - st->ma.N202, st->l2.tei); + "id verify req(%d) for tei %d", + 3 - st->ma.N202, st->l2.tei); put_tei_msg(st, ID_VERIFY, 0, st->l2.tei); FsmAddTimer(&st->ma.t202, st->ma.T202, EV_T202, NULL, 4); } else { st->ma.tei_m.printdebug(&st->ma.tei_m, - "verify req for tei %d failed", st->l2.tei); + "verify req for tei %d failed", st->l2.tei); st->l3.l3l2(st, MDL_REMOVE | REQUEST, NULL); cs = (struct IsdnCardState *) st->l1.hardware; cs->cardmsg(cs, MDL_REMOVE | REQUEST, NULL); @@ -320,25 +320,25 @@ tei_l1l2(struct PStack *st, int pr, void *arg) if (pr == (PH_DATA | INDICATION)) { if (skb->len < 3) { st->ma.tei_m.printdebug(&st->ma.tei_m, - "short mgr frame %ld/3", skb->len); + "short mgr frame %ld/3", skb->len); } else if ((skb->data[0] != ((TEI_SAPI << 2) | 2)) || (skb->data[1] != ((GROUP_TEI << 1) | 1))) { st->ma.tei_m.printdebug(&st->ma.tei_m, - "wrong mgr sapi/tei %x/%x", - skb->data[0], skb->data[1]); + "wrong mgr sapi/tei %x/%x", + skb->data[0], skb->data[1]); } else if ((skb->data[2] & 0xef) != UI) { st->ma.tei_m.printdebug(&st->ma.tei_m, - "mgr frame is not ui %x", skb->data[2]); + "mgr frame is not ui %x", skb->data[2]); } else { skb_pull(skb, 3); if (skb->len < 5) { st->ma.tei_m.printdebug(&st->ma.tei_m, - "short mgr frame %ld/5", skb->len); + "short mgr frame %ld/5", skb->len); } else if (skb->data[0] != TEI_ENTITY_ID) { /* wrong management entity identifier, ignore */ st->ma.tei_m.printdebug(&st->ma.tei_m, - "tei handler wrong entity id %x", - skb->data[0]); + "tei handler wrong entity id %x", + skb->data[0]); } else { mt = skb->data[3]; if (mt == ID_ASSIGNED) @@ -351,13 +351,13 @@ tei_l1l2(struct PStack *st, int pr, void *arg) FsmEvent(&st->ma.tei_m, EV_REMOVE, skb); else { st->ma.tei_m.printdebug(&st->ma.tei_m, - "tei handler wrong mt %x\n", mt); + "tei handler wrong mt %x\n", mt); } } } } else { st->ma.tei_m.printdebug(&st->ma.tei_m, - "tei handler wrong pr %x\n", pr); + "tei handler wrong pr %x\n", pr); } dev_kfree_skb(skb); } @@ -371,7 +371,7 @@ tei_l2tei(struct PStack *st, int pr, void *arg) if (pr == (MDL_ASSIGN | INDICATION)) { if (st->ma.debug) st->ma.tei_m.printdebug(&st->ma.tei_m, - "fixed assign tei %d", st->l2.tei); + "fixed assign tei %d", st->l2.tei); st->l3.l3l2(st, MDL_ASSIGN | REQUEST, (void *) (long) st->l2.tei); cs = (struct IsdnCardState *) st->l1.hardware; cs->cardmsg(cs, MDL_ASSIGN | REQUEST, NULL); @@ -379,14 +379,14 @@ tei_l2tei(struct PStack *st, int pr, void *arg) return; } switch (pr) { - case (MDL_ASSIGN | INDICATION): - FsmEvent(&st->ma.tei_m, EV_IDREQ, arg); - break; - case (MDL_ERROR | REQUEST): - FsmEvent(&st->ma.tei_m, EV_VERIFY, arg); - break; - default: - break; + case (MDL_ASSIGN | INDICATION): + FsmEvent(&st->ma.tei_m, EV_IDREQ, arg); + break; + case (MDL_ERROR | REQUEST): + FsmEvent(&st->ma.tei_m, EV_VERIFY, arg); + break; + default: + break; } } |