Lines Matching refs:st

86 *dss1_new_l3_process(struct PStack *st, int cr)  in dss1_new_l3_process()  argument
89 if (!(proc = new_l3_process(st, cr))) in dss1_new_l3_process()
105 free_invoke_id(p->st, p->prot.dss1.invoke_id); in dss1_release_l3_process()
113 l3dss1_search_dummy_proc(struct PStack *st, int id) in l3dss1_search_dummy_proc() argument
114 { struct l3_process *pc = st->l3.proc; /* start of processes */ in l3dss1_search_dummy_proc()
131 l3dss1_dummy_return_result(struct PStack *st, int id, u_char *p, u_char nlen) in l3dss1_dummy_return_result() argument
136 if ((pc = l3dss1_search_dummy_proc(st, id))) in l3dss1_dummy_return_result()
139 cs = pc->st->l1.hardware; in l3dss1_dummy_return_result()
149 free_invoke_id(pc->st, pc->prot.dss1.invoke_id); in l3dss1_dummy_return_result()
156 l3_debug(st, "dummy return result id=0x%x result len=%d", id, nlen); in l3dss1_dummy_return_result()
164 l3dss1_dummy_error_return(struct PStack *st, int id, ulong error) in l3dss1_dummy_error_return() argument
169 if ((pc = l3dss1_search_dummy_proc(st, id))) in l3dss1_dummy_error_return()
172 cs = pc->st->l1.hardware; in l3dss1_dummy_error_return()
182 free_invoke_id(pc->st, pc->prot.dss1.invoke_id); in l3dss1_dummy_error_return()
189 l3_debug(st, "dummy return error id=0x%x error=0x%lx", id, error); in l3dss1_dummy_error_return()
197 l3dss1_dummy_invoke(struct PStack *st, int cr, int id, in l3dss1_dummy_invoke() argument
202 l3_debug(st, "dummy invoke %s id=0x%x ident=0x%x datalen=%d", in l3dss1_dummy_invoke()
206 cs = st->l1.hardware; in l3dss1_dummy_invoke()
221 l3dss1_parse_facility(struct PStack *st, struct l3_process *pc, in l3dss1_parse_facility() argument
230 st = pc->st; /* valid Stack */ in l3dss1_parse_facility()
232 if ((!st) || (cr >= 0)) return; /* neither pc nor st specified */ in l3dss1_parse_facility()
237 l3_debug(st, "qd_len == 0"); in l3dss1_parse_facility()
241 l3_debug(st, "supplementary service != 0x11"); in l3dss1_parse_facility()
249 l3_debug(st, "qd_len < 2"); in l3dss1_parse_facility()
255 l3_debug(st, "class and form != 0xA0"); in l3dss1_parse_facility()
264 { l3_debug(st, "qd_len < 1"); in l3dss1_parse_facility()
272 { l3_debug(st, "length format error or not implemented"); in l3dss1_parse_facility()
282 { l3_debug(st, "length format indefinite error"); in l3dss1_parse_facility()
293 { l3_debug(st, "qd_len < nlen"); in l3dss1_parse_facility()
299 { l3_debug(st, "nlen < 2"); in l3dss1_parse_facility()
304 l3_debug(st, "invoke identifier tag !=0x02"); in l3dss1_parse_facility()
311 l3_debug(st, "invoke id length format 2"); in l3dss1_parse_facility()
317 { l3_debug(st, "ilen > nlen || ilen == 0"); in l3dss1_parse_facility()
330 l3_debug(st, "nlen < 2 22"); in l3dss1_parse_facility()
334 l3_debug(st, "operation value !=0x02"); in l3dss1_parse_facility()
342 l3_debug(st, "ilen > nlen || ilen == 0 22"); in l3dss1_parse_facility()
353 { l3dss1_dummy_invoke(st, cr, id, ident, p, nlen); in l3dss1_parse_facility()
363 l3_debug(st, "FOO1 nlen < ilen+2"); \ in l3dss1_parse_facility()
387 st->l3.l3l4(st, CC_CHARGE | INDICATION, pc); in l3dss1_parse_facility()
389 if (st->l3.debug & L3_DEB_CHARGE) { in l3dss1_parse_facility()
391 l3_debug(st, "charging info during %d", pc->para.chargeinfo); in l3dss1_parse_facility()
394 l3_debug(st, "charging info final %d", pc->para.chargeinfo); in l3dss1_parse_facility()
410 st->l3.l3l4(st, CC_CHARGE | INDICATION, pc); in l3dss1_parse_facility()
412 if (st->l3.debug & L3_DEB_CHARGE) { in l3dss1_parse_facility()
413 l3_debug(st, "charging info final %d", pc->para.chargeinfo); in l3dss1_parse_facility()
419 l3_debug(st, "invoke break invalid ident %02x", ident); in l3dss1_parse_facility()
426 l3_debug(st, "invoke break"); in l3dss1_parse_facility()
433 l3dss1_dummy_return_result(st, id, p, nlen); in l3dss1_parse_facility()
438 free_invoke_id(st, pc->prot.dss1.invoke_id); in l3dss1_parse_facility()
442st->l3.l3l4(st, CC_REDIR | INDICATION, pc); } /* Diversion succes… in l3dss1_parse_facility()
444 l3_debug(st, "return error unknown identifier"); in l3dss1_parse_facility()
449 { l3_debug(st, "return error nlen < 2"); in l3dss1_parse_facility()
454 l3_debug(st, "invoke error tag !=0x02"); in l3dss1_parse_facility()
461 l3_debug(st, "invoke return errlen > 4 "); in l3dss1_parse_facility()
467 { l3_debug(st, "error return ilen > nlen || ilen == 0"); in l3dss1_parse_facility()
478 l3dss1_dummy_error_return(st, id, err_ret); in l3dss1_parse_facility()
483 free_invoke_id(st, pc->prot.dss1.invoke_id); in l3dss1_parse_facility()
487 st->l3.l3l4(st, CC_REDIR | INDICATION, pc); in l3dss1_parse_facility()
490 l3_debug(st, "return result unknown identifier"); in l3dss1_parse_facility()
493 l3_debug(st, "facility default break tag=0x%02x", cp_tag); in l3dss1_parse_facility()
508 l3_msg(pc->st, DL_DATA | REQUEST, skb); in l3dss1_message()
529 l3_msg(pc->st, DL_DATA | REQUEST, skb); in l3dss1_message_cause()
555 l3_msg(pc->st, DL_DATA | REQUEST, skb); in l3dss1_status_send()
591 l3_msg(pc->st, DL_DATA | REQUEST, skb); in l3dss1_msg_without_setup()
740 l3_debug(pc->st, "check IE shift%scodeset %d->%d", in check_infoelements()
772 l3_debug(pc->st, "check IE shift back codeset %d->%d", in check_infoelements()
780 l3_debug(pc->st, "check IE MT(%x) %d/%d/%d/%d", in check_infoelements()
823 l3_debug(pc->st, "l3dss1_check_messagetype_validity mt(%x) OK", mt); in l3dss1_check_messagetype_validity()
829 l3_debug(pc->st, "l3dss1_check_messagetype_validity mt(%x) fail", mt); in l3dss1_check_messagetype_validity()
841 l3_debug(pc->st, "check_infoelements ret %d", ret); in l3dss1_std_ie_err()
872 l3_debug(pc->st, "wrong chid len %d", *p); in l3dss1_get_channel_id()
878 l3_debug(pc->st, "wrong chid %x", *p); in l3dss1_get_channel_id()
948 l3_msg(pc->st, DL_DATA | REQUEST, skb); in l3dss1_msg_with_uus()
971 l3_debug(pc->st, "RELCMPL get_cause ret(%d)", ret); in l3dss1_release_cmpl()
976 pc->st->l3.l3l4(pc->st, CC_RELEASE | CONFIRM, pc); in l3dss1_release_cmpl()
1302 l3_debug(pc->st, "Wrong MSN Code"); in l3dss1_setup_req()
1427 l3_msg(pc->st, DL_DATA | REQUEST, skb); in l3dss1_setup_req()
1439 l3_debug(pc->st, "setup answer with wrong chid %x", id); in l3dss1_call_proc()
1447 l3_debug(pc->st, "setup answer wrong chid (ret %d)", id); in l3dss1_call_proc()
1466 pc->st->l3.l3l4(pc->st, CC_PROCEEDING | INDICATION, pc); in l3dss1_call_proc()
1478 l3_debug(pc->st, "setup answer with wrong chid %x", id); in l3dss1_setup_ack()
1486 l3_debug(pc->st, "setup answer wrong chid (ret %d)", id); in l3dss1_setup_ack()
1505 pc->st->l3.l3l4(pc->st, CC_MORE_INFO | INDICATION, pc); in l3dss1_setup_ack()
1519 l3_debug(pc->st, "DISC get_cause ret(%d)", ret); in l3dss1_disconnect()
1526 l3dss1_parse_facility(pc->st, pc, pc->callref, p); in l3dss1_disconnect()
1537 pc->st->l3.l3l4(pc->st, CC_DISCONNECT | INDICATION, pc); in l3dss1_disconnect()
1563 pc->st->l3.l3l4(pc->st, CC_SETUP | CONFIRM, pc); in l3dss1_connect()
1581 pc->st->l3.l3l4(pc->st, CC_ALERTING | INDICATION, pc); in l3dss1_alerting()
1649 l3_debug(pc->st, "SI=%d, AI=%d", in l3dss1_setup()
1653 l3_debug(pc->st, "setup with wrong bearer(l=%d:%x,%x)", in l3dss1_setup()
1661 l3_debug(pc->st, "setup without bearer capabilities"); in l3dss1_setup()
1674 l3_debug(pc->st, "setup with wrong chid %x", in l3dss1_setup()
1683 l3_debug(pc->st, "setup without bchannel, call waiting"); in l3dss1_setup()
1688 l3_debug(pc->st, "setup with wrong chid ret %d", id); in l3dss1_setup()
1717 l3_debug(pc->st, "wrong called subaddress"); in l3dss1_setup()
1742 l3_debug(pc->st, "wrong calling subaddress"); in l3dss1_setup()
1747 pc->st->l3.l3l4(pc->st, CC_SETUP | INDICATION, pc); in l3dss1_setup()
1791 l3_msg(pc->st, DL_DATA | REQUEST, skb); in l3dss1_disconnect_req()
1801 l3_debug(pc->st, "D-chan connect for waiting call"); in l3dss1_setup_rsp()
1826 pc->st->l3.l3l4(pc->st, CC_SETUP_COMPL | INDICATION, pc); in l3dss1_connect_ack()
1852 l3_msg(pc->st, DL_DATA | REQUEST, skb); in l3dss1_reject_req()
1853 pc->st->l3.l3l4(pc->st, CC_RELEASE | INDICATION, pc); in l3dss1_reject_req()
1868 l3_debug(pc->st, "REL get_cause ret(%d)", ret); in l3dss1_release()
1872 l3dss1_parse_facility(pc->st, pc, pc->callref, p); in l3dss1_release()
1887 pc->st->l3.l3l4(pc->st, CC_RELEASE | INDICATION, pc); in l3dss1_release()
1909 pc->st->l3.l3l4(pc->st, CC_PROCEED_SEND | INDICATION, pc); in l3dss1_proceed_req()
1941 cs = pc->st->l1.hardware; in l3dss1_deliver_display()
1993 l3_debug(pc->st, "progress error %d", err); in l3dss1_progress()
2002 pc->st->l3.l3l4(pc->st, CC_PROGRESS | INDICATION, pc); in l3dss1_progress()
2034 l3_debug(pc->st, "notify error %d", err); in l3dss1_notify()
2043 pc->st->l3.l3l4(pc->st, CC_NOTIFY | INDICATION, pc); in l3dss1_notify()
2075 pc->st->l3.l3l4(pc->st, CC_MORE_INFO | INDICATION, pc); in l3dss1_information()
2103 free_invoke_id(pc->st, pc->prot.dss1.invoke_id); in l3dss1_redir_req()
2105 if (!(pc->prot.dss1.invoke_id = new_invoke_id(pc->st))) in l3dss1_redir_req()
2150 l3_msg(pc->st, DL_DATA | REQUEST, skb); in l3dss1_redir_req()
2167 static int l3dss1_cmd_global(struct PStack *st, isdn_ctrl *ic) in l3dss1_cmd_global() argument
2185 if (!(id = new_invoke_id(st))) in l3dss1_cmd_global()
2207 if (!(pc = dss1_new_l3_process(st, -1))) in l3dss1_cmd_global()
2208 { free_invoke_id(st, id); in l3dss1_cmd_global()
2215 { free_invoke_id(st, id); in l3dss1_cmd_global()
2226 l3_msg(st, DL_DATA | REQUEST, skb); in l3dss1_cmd_global()
2231 if ((pc = l3dss1_search_dummy_proc(st, ic->parm.dss1_io.hl_id))) in l3dss1_cmd_global()
2237 { l3_debug(st, "l3dss1_cmd_global abort unknown id"); in l3dss1_cmd_global()
2243 l3_debug(st, "l3dss1_cmd_global unknown cmd 0x%lx", ic->arg); in l3dss1_cmd_global()
2252 struct IsdnCardState *cs = pc->st->l1.hardware; in l3dss1_io_timer()
2265 free_invoke_id(pc->st, pc->prot.dss1.invoke_id); in l3dss1_io_timer()
2290 pc->st->l3.l3l4(pc->st, CC_RELEASE | INDICATION, pc); in l3dss1_release_ind()
2294 pc->st->l3.l3l4(pc->st, CC_IGNORE | INDICATION, pc); in l3dss1_release_ind()
2310 pc->st->l3.l3l4(pc->st, CC_SETUP_ERR, pc); in l3dss1_t302()
2323 pc->st->l3.l3l4(pc->st, CC_NOSETUP_RSP, pc); in l3dss1_t303()
2335 pc->st->l3.l3l4(pc->st, CC_SETUP_ERR, pc); in l3dss1_t304()
2364 l3_msg(pc->st, DL_DATA | REQUEST, skb); in l3dss1_t305()
2375 pc->st->l3.l3l4(pc->st, CC_SETUP_ERR, pc); in l3dss1_t310()
2385 pc->st->l3.l3l4(pc->st, CC_CONNECT_ERR, pc); in l3dss1_t313()
2401 pc->st->l3.l3l4(pc->st, CC_RELEASE_ERR, pc); in l3dss1_t308_2()
2411 pc->st->l3.l3l4(pc->st, CC_RESUME_ERR, pc); in l3dss1_t318()
2423 pc->st->l3.l3l4(pc->st, CC_SUSPEND_ERR, pc); in l3dss1_t319()
2431 pc->st->l3.l3l4(pc->st, CC_RELEASE | INDICATION, pc); in l3dss1_restart()
2445 l3_debug(pc->st, "STATUS get_cause ret(%d)", ret); in l3dss1_status()
2472 l3_debug(pc->st, "STATUS error(%d/%d)", ret, cause); in l3dss1_status()
2487 pc->st->l3.l3l4(pc->st, CC_RELEASE | INDICATION, pc); in l3dss1_status()
2504 l3dss1_parse_facility(pc->st, pc, pc->callref, p); in l3dss1_facility()
2525 l3_debug(pc->st, "SUS wrong CALL_ID len %d", l); in l3dss1_suspend_req()
2532 l3_msg(pc->st, DL_DATA | REQUEST, skb); in l3dss1_suspend_req()
2546 pc->st->l3.l3l4(pc->st, CC_SUSPEND | CONFIRM, pc); in l3dss1_suspend_ack()
2550 l3_debug(pc->st, "SUSPACK check ie(%d)", ret); in l3dss1_suspend_ack()
2562 l3_debug(pc->st, "SUSP_REJ get_cause ret(%d)", ret); in l3dss1_suspend_rej()
2576 pc->st->l3.l3l4(pc->st, CC_SUSPEND_ERR, pc); in l3dss1_suspend_rej()
2600 l3_debug(pc->st, "RES wrong CALL_ID len %d", l); in l3dss1_resume_req()
2607 l3_msg(pc->st, DL_DATA | REQUEST, skb); in l3dss1_resume_req()
2621 l3_debug(pc->st, "resume ack with wrong chid %x", id); in l3dss1_resume_ack()
2629 l3_debug(pc->st, "resume ack without chid (ret %d)", id); in l3dss1_resume_ack()
2640 pc->st->l3.l3l4(pc->st, CC_RESUME | CONFIRM, pc); in l3dss1_resume_ack()
2654 l3_debug(pc->st, "RES_REJ get_cause ret(%d)", ret); in l3dss1_resume_rej()
2668 pc->st->l3.l3l4(pc->st, CC_RESUME_ERR, pc); in l3dss1_resume_rej()
2690 l3_debug(pc->st, "Restart %x", ri); in l3dss1_global_restart()
2692 l3_debug(pc->st, "Restart without restart IE"); in l3dss1_global_restart()
2699 if (pc->st->l3.debug) in l3dss1_global_restart()
2700 l3_debug(pc->st, "Restart for channel %d", chan); in l3dss1_global_restart()
2703 up = pc->st->l3.proc; in l3dss1_global_restart()
2706 up->st->lli.l4l3(up->st, CC_RESTART | REQUEST, up); in l3dss1_global_restart()
2708 up->st->lli.l4l3(up->st, CC_RESTART | REQUEST, up); in l3dss1_global_restart()
2726 l3_msg(pc->st, DL_DATA | REQUEST, skb); in l3dss1_global_restart()
2735 pc->st->l3.l3l4(pc->st, CC_SETUP_ERR, pc); in l3dss1_dl_reset()
2744 pc->st->l3.l3l4(pc->st, CC_RELEASE | INDICATION, pc); in l3dss1_dl_release()
2753 l3_msg(pc->st, DL_ESTABLISH | REQUEST, NULL); in l3dss1_dl_reestablish()
2903 global_handler(struct PStack *st, int mt, struct sk_buff *skb) in global_handler() argument
2909 struct l3_process *proc = st->l3.global; in global_handler()
2917 if (st->l3.debug & L3_DEB_STATE) { in global_handler()
2918 l3_debug(st, "dss1 global state %d mt %x unhandled", in global_handler()
2933 l3_msg(proc->st, DL_DATA | REQUEST, skb); in global_handler()
2935 if (st->l3.debug & L3_DEB_STATE) { in global_handler()
2936 l3_debug(st, "dss1 global %d mt %x", in global_handler()
2944 dss1up(struct PStack *st, int pr, void *arg) in dss1up() argument
2960 l3_msg(st, pr, arg); in dss1up()
2968 l3_debug(st, "dss1up frame too short(%d)", skb->len); in dss1up()
2974 if (st->l3.debug & L3_DEB_PROTERR) { in dss1up()
2975 l3_debug(st, "dss1up%sunexpected discriminator %x message len %d", in dss1up()
2984 l3_debug(st, "dss1up frame too short(%d)", skb->len); in dss1up()
2989 if (st->l3.debug & L3_DEB_STATE) in dss1up()
2990 l3_debug(st, "dss1up cr %d", cr); in dss1up()
2992 if (st->l3.debug & L3_DEB_WARN) in dss1up()
2993 l3_debug(st, "dss1up wrong Callref"); in dss1up()
2999 l3dss1_parse_facility(st, NULL, in dss1up()
3004 if (st->l3.debug & L3_DEB_WARN) in dss1up()
3005 l3_debug(st, "dss1up dummy Callref (no facility msg or ie)"); in dss1up()
3010 if (st->l3.debug & L3_DEB_STATE) in dss1up()
3011 l3_debug(st, "dss1up Global CallRef"); in dss1up()
3012 global_handler(st, mt, skb); in dss1up()
3015 } else if (!(proc = getl3proc(st, cr))) { in dss1up()
3023 if (st->l3.debug & L3_DEB_STATE) in dss1up()
3024 l3_debug(st, "dss1up wrong CRef flag"); in dss1up()
3028 if (!(proc = dss1_new_l3_process(st, cr))) { in dss1up()
3060 if ((proc = dss1_new_l3_process(st, cr))) { in dss1up()
3076 if ((proc = dss1_new_l3_process(st, cr))) { in dss1up()
3094 if (st->l3.debug & L3_DEB_STATE) { in dss1up()
3095 l3_debug(st, "dss1up%sstate %d mt %#x unhandled", in dss1up()
3104 if (st->l3.debug & L3_DEB_STATE) { in dss1up()
3105 l3_debug(st, "dss1up%sstate %d mt %x", in dss1up()
3116 dss1down(struct PStack *st, int pr, void *arg) in dss1down() argument
3123 l3_msg(st, pr, NULL); in dss1down()
3129 if ((proc = dss1_new_l3_process(st, cr))) { in dss1down()
3153 if (st->l3.debug & L3_DEB_STATE) { in dss1down()
3154 l3_debug(st, "dss1down state %d prim %#x unhandled", in dss1down()
3158 if (st->l3.debug & L3_DEB_STATE) { in dss1down()
3159 l3_debug(st, "dss1down state %d prim %#x", in dss1down()
3167 dss1man(struct PStack *st, int pr, void *arg) in dss1man() argument
3181 if (st->l3.debug & L3_DEB_STATE) { in dss1man()
3182 l3_debug(st, "cr %d dss1man state %d prim %#x unhandled", in dss1man()
3186 if (st->l3.debug & L3_DEB_STATE) { in dss1man()
3187 l3_debug(st, "cr %d dss1man state %d prim %#x", in dss1man()
3195 setstack_dss1(struct PStack *st) in setstack_dss1() argument
3200 st->lli.l4l3 = dss1down; in setstack_dss1()
3201 st->lli.l4l3_proto = l3dss1_cmd_global; in setstack_dss1()
3202 st->l2.l2l3 = dss1up; in setstack_dss1()
3203 st->l3.l3ml3 = dss1man; in setstack_dss1()
3204 st->l3.N303 = 1; in setstack_dss1()
3205 st->prot.dss1.last_invoke_id = 0; in setstack_dss1()
3206 st->prot.dss1.invoke_used[0] = 1; /* Bit 0 must always be set to 1 */ in setstack_dss1()
3209 st->prot.dss1.invoke_used[i++] = 0; in setstack_dss1()
3211 if (!(st->l3.global = kmalloc(sizeof(struct l3_process), GFP_ATOMIC))) { in setstack_dss1()
3214 st->l3.global->state = 0; in setstack_dss1()
3215 st->l3.global->callref = 0; in setstack_dss1()
3216 st->l3.global->next = NULL; in setstack_dss1()
3217 st->l3.global->debug = L3_DEB_WARN; in setstack_dss1()
3218 st->l3.global->st = st; in setstack_dss1()
3219 st->l3.global->N303 = 1; in setstack_dss1()
3220 st->l3.global->prot.dss1.invoke_id = 0; in setstack_dss1()
3222 L3InitTimer(st->l3.global, &st->l3.global->timer); in setstack_dss1()