19 #include <linux/module.h>
20 #include <linux/slab.h>
29 static int init_b_st(
struct Channel *chanp,
int incoming);
30 static void release_b_st(
struct Channel *chanp);
32 static struct Fsm callcfsm;
36 #define ALERT_REJECT 0
47 #define DEFAULT_B_DELAY 300
56 static inline struct IsdnCardState *
57 hisax_findcard(
int driverid)
63 if (
cards[i].cs->myid == driverid)
65 return (
struct IsdnCardState *) 0;
75 sprintf(tmp,
"Ch%d %s ", chanp->chan,
76 direction ?
"LL->HL" :
"HL->LL");
98 #define STATE_COUNT (ST_IN_PROCEED_SEND + 1)
100 static char *strState[] =
106 "ST_IN_WAIT_CONN_ACK",
114 "ST_IN_PROCEED_SEND",
143 #define EVENT_COUNT (EV_REDIR + 1)
145 static char *strEvent[] =
178 ic.
driver = chanp->cs->myid;
180 ic.
arg = chanp->chan;
181 chanp->cs->iif.statcallb(&ic);
185 lli_deliver_cause(
struct Channel *chanp)
191 if (chanp->proc->para.cause == NO_CAUSE)
193 ic.
driver = chanp->cs->myid;
195 ic.
arg = chanp->chan;
198 chanp->proc->para.cause & 0x7f);
201 chanp->proc->para.cause & 0x7f);
202 chanp->cs->iif.statcallb(&ic);
212 chanp->cs->cardmsg(chanp->cs,
MDL_INFO_REL, (
void *) (
long)chanp->chan);
224 chanp->cs->cardmsg(chanp->cs,
MDL_INFO_SETUP, (
void *) (
long)chanp->chan);
226 if (chanp->debug & 1)
227 link_debug(chanp, 0,
"STAT_ICALL_LEASED");
228 ic.
driver = chanp->cs->myid;
230 ic.
arg = chanp->chan;
237 ret = chanp->cs->iif.statcallb(&ic);
238 if (chanp->debug & 1)
239 link_debug(chanp, 1,
"statcallb ret=%d", ret);
241 chanp->cs->cardmsg(chanp->cs,
MDL_INFO_REL, (
void *) (
long)chanp->chan);
251 lli_init_bchan_out(
struct FsmInst *fi,
int event,
void *arg)
256 if (chanp->debug & 1)
257 link_debug(chanp, 0,
"STAT_DCONN");
264 lli_prep_dialout(
struct FsmInst *fi,
int event,
void *arg)
270 chanp->l2_active_protocol = chanp->l2_protocol;
272 chanp->cs->cardmsg(chanp->cs,
MDL_INFO_SETUP, (
void *) (
long)chanp->chan);
274 lli_init_bchan_out(fi, event, arg);
282 lli_resume(
struct FsmInst *fi,
int event,
void *arg)
288 chanp->l2_active_protocol = chanp->l2_protocol;
290 chanp->cs->cardmsg(chanp->cs,
MDL_INFO_SETUP, (
void *) (
long)chanp->chan);
292 lli_init_bchan_out(fi, event, arg);
300 lli_go_active(
struct FsmInst *fi,
int event,
void *arg)
307 chanp->data_open = !0;
308 if (chanp->bcs->conmsg)
312 if (chanp->debug & 1)
313 link_debug(chanp, 0,
"STAT_BCONN %s", ic.
parm.
num);
314 ic.
driver = chanp->cs->myid;
316 ic.
arg = chanp->chan;
317 chanp->cs->iif.statcallb(&ic);
318 chanp->cs->cardmsg(chanp->cs,
MDL_INFO_CONN, (
void *) (
long)chanp->chan);
329 lli_deliver_call(
struct FsmInst *fi,
int event,
void *arg)
335 chanp->cs->cardmsg(chanp->cs,
MDL_INFO_SETUP, (
void *) (
long)chanp->chan);
343 if (chanp->debug & 1)
344 link_debug(chanp, 0, (chanp->chan < 2) ?
"STAT_ICALL" :
"STAT_ICALLW");
345 ic.
driver = chanp->cs->myid;
348 ic.
arg = chanp->chan;
354 ret = chanp->cs->iif.statcallb(&ic);
355 if (chanp->debug & 1)
356 link_debug(chanp, 1,
"statcallb ret=%d", ret);
383 chanp->cs->cardmsg(chanp->cs,
MDL_INFO_REL, (
void *) (
long)chanp->chan);
389 chanp->cs->cardmsg(chanp->cs,
MDL_INFO_REL, (
void *) (
long)chanp->chan);
394 lli_send_dconnect(
struct FsmInst *fi,
int event,
void *arg)
403 lli_send_alert(
struct FsmInst *fi,
int event,
void *arg)
412 lli_send_redir(
struct FsmInst *fi,
int event,
void *arg)
420 lli_init_bchan_in(
struct FsmInst *fi,
int event,
void *arg)
425 if (chanp->debug & 1)
426 link_debug(chanp, 0,
"STAT_DCONN");
428 chanp->l2_active_protocol = chanp->l2_protocol;
429 chanp->incoming = !0;
430 init_b_st(chanp, !0);
435 lli_setup_rsp(
struct FsmInst *fi,
int event,
void *arg)
440 lli_init_bchan_in(fi, event, arg);
453 lli_suspend(
struct FsmInst *fi,
int event,
void *arg)
467 ic.
driver = chanp->cs->myid;
469 ic.
arg = chanp->chan;
471 chanp->cs->iif.statcallb(&ic);
472 if (chanp->debug & 1)
473 link_debug(chanp, 0,
"STAT_DHUP");
479 lli_disconnect_req(
struct FsmInst *fi,
int event,
void *arg)
484 lli_leased_hup(fi, chanp);
488 chanp->proc->para.cause = 0x10;
495 lli_disconnect_reject(
struct FsmInst *fi,
int event,
void *arg)
500 lli_leased_hup(fi, chanp);
504 chanp->proc->para.cause = 0x15;
511 lli_dhup_close(
struct FsmInst *fi,
int event,
void *arg)
516 lli_leased_hup(fi, chanp);
518 if (chanp->debug & 1)
519 link_debug(chanp, 0,
"STAT_DHUP");
520 lli_deliver_cause(chanp);
527 lli_reject_req(
struct FsmInst *fi,
int event,
void *arg)
532 lli_leased_hup(fi, chanp);
537 chanp->proc->para.cause = 0x15;
539 lli_dhup_close(fi, event, arg);
548 lli_disconn_bchan(
struct FsmInst *fi,
int event,
void *arg)
552 chanp->data_open = 0;
558 lli_start_disc(
struct FsmInst *fi,
int event,
void *arg)
563 lli_leased_hup(fi, chanp);
565 lli_disconnect_req(fi, event, arg);
570 lli_rel_b_disc(
struct FsmInst *fi,
int event,
void *arg)
575 lli_start_disc(fi, event, arg);
579 lli_bhup_disc(
struct FsmInst *fi,
int event,
void *arg)
583 if (chanp->debug & 1)
584 link_debug(chanp, 0,
"STAT_BHUP");
586 lli_rel_b_disc(fi, event, arg);
590 lli_bhup_rel_b(
struct FsmInst *fi,
int event,
void *arg)
595 chanp->data_open = 0;
596 if (chanp->debug & 1)
597 link_debug(chanp, 0,
"STAT_BHUP");
603 lli_release_bchan(
struct FsmInst *fi,
int event,
void *arg)
607 chanp->data_open = 0;
614 lli_rel_b_dhup(
struct FsmInst *fi,
int event,
void *arg)
619 lli_dhup_close(fi, event, arg);
623 lli_bhup_dhup(
struct FsmInst *fi,
int event,
void *arg)
627 if (chanp->debug & 1)
628 link_debug(chanp, 0,
"STAT_BHUP");
630 lli_rel_b_dhup(fi, event, arg);
634 lli_abort(
struct FsmInst *fi,
int event,
void *arg)
638 chanp->data_open = 0;
640 lli_bhup_dhup(fi, event, arg);
644 lli_release_req(
struct FsmInst *fi,
int event,
void *arg)
649 lli_leased_hup(fi, chanp);
658 lli_rel_b_release_req(
struct FsmInst *fi,
int event,
void *arg)
663 lli_release_req(fi, event, arg);
667 lli_bhup_release_req(
struct FsmInst *fi,
int event,
void *arg)
671 if (chanp->debug & 1)
672 link_debug(chanp, 0,
"STAT_BHUP");
674 lli_rel_b_release_req(fi, event, arg);
680 lli_charge_info(
struct FsmInst *fi,
int event,
void *arg)
685 ic.
driver = chanp->cs->myid;
687 ic.
arg = chanp->chan;
689 chanp->cs->iif.statcallb(&ic);
695 lli_dchan_not_ready(
struct FsmInst *fi,
int event,
void *arg)
699 if (chanp->debug & 1)
700 link_debug(chanp, 0,
"STAT_DHUP");
705 lli_no_setup_rsp(
struct FsmInst *fi,
int event,
void *arg)
709 if (chanp->debug & 1)
710 link_debug(chanp, 0,
"STAT_DHUP");
716 lli_error(
struct FsmInst *fi,
int event,
void *arg)
722 lli_failure_l(
struct FsmInst *fi,
int event,
void *arg)
728 ic.
driver = chanp->cs->myid;
730 ic.
arg = chanp->chan;
732 chanp->cs->iif.statcallb(&ic);
735 chanp->cs->cardmsg(chanp->cs,
MDL_INFO_REL, (
void *) (
long)chanp->chan);
739 lli_rel_b_fail(
struct FsmInst *fi,
int event,
void *arg)
744 lli_failure_l(fi, event, arg);
748 lli_bhup_fail(
struct FsmInst *fi,
int event,
void *arg)
752 if (chanp->debug & 1)
753 link_debug(chanp, 0,
"STAT_BHUP");
755 lli_rel_b_fail(fi, event, arg);
759 lli_failure_a(
struct FsmInst *fi,
int event,
void *arg)
763 chanp->data_open = 0;
765 lli_bhup_fail(fi, event, arg);
842 callcfsm.strEvent = strEvent;
843 callcfsm.strState = strState;
854 release_b_st(
struct Channel *chanp)
856 struct PStack *
st = chanp->b_st;
859 chanp->bcs->BC_Close(chanp->bcs);
860 switch (chanp->l2_active_protocol) {
876 *selectfreechannel(
struct PStack *st,
int bch)
878 struct IsdnCardState *
cs = st->l1.hardware;
879 struct Channel *chanp = st->lli.userdata;
882 if (
test_bit(FLG_TWO_DCHAN, &cs->HW_Flags))
893 if (chanp->fi.state ==
ST_NULL)
901 chanp = st->lli.userdata;
904 if (chanp->fi.state ==
ST_NULL)
913 static void stat_redir_result(
struct IsdnCardState *cs,
int chan,
ulong result)
920 cs->iif.statcallb(&ic);
924 dchan_l3l4(
struct PStack *st,
int pr,
void *arg)
926 struct l3_process *
pc =
arg;
927 struct IsdnCardState *cs = st->l1.hardware;
934 if (!(chanp = selectfreechannel(pc->st, pc->para.bchannel))) {
935 pc->para.cause = 0x11;
944 if (!(chanp = pc->chan))
997 stat_redir_result(cs, chanp->chan, pc->redir_result);
1000 if (chanp->debug & 0x800) {
1002 "%d L3->L4 unknown primitiv %#x",
1009 dummy_pstack(
struct PStack *st,
int pr,
void *arg) {
1014 init_PStack(
struct PStack **stp) {
1018 (*stp)->next =
NULL;
1019 (*stp)->l1.l1l2 = dummy_pstack;
1020 (*stp)->l1.l1hw = dummy_pstack;
1021 (*stp)->l1.l1tei = dummy_pstack;
1022 (*stp)->l2.l2tei = dummy_pstack;
1023 (*stp)->l2.l2l1 = dummy_pstack;
1024 (*stp)->l2.l2l3 = dummy_pstack;
1025 (*stp)->l3.l3l2 = dummy_pstack;
1026 (*stp)->l3.l3ml3 = dummy_pstack;
1027 (*stp)->l3.l3l4 = dummy_pstack;
1028 (*stp)->lli.l4l3 = dummy_pstack;
1029 (*stp)->ma.layer = dummy_pstack;
1034 init_d_st(
struct Channel *chanp)
1037 struct IsdnCardState *cs = chanp->cs;
1041 err = init_PStack(&chanp->d_st);
1058 st->l2.T203 = 10000;
1059 if (
test_bit(FLG_TWO_DCHAN, &cs->HW_Flags))
1060 sprintf(tmp,
"DCh%d Q.921 ", chanp->chan);
1065 st->lli.userdata = chanp;
1066 st->l3.l3l4 = dchan_l3l4;
1075 struct Channel *chanp = fi->userdata;
1079 sprintf(tmp,
"Ch%d callc ", chanp->chan);
1085 init_chan(
int chan,
struct IsdnCardState *csta)
1087 struct Channel *chanp = csta->channel + chan;
1091 chanp->bcs = csta->bcs + chan;
1093 chanp->incoming = 0;
1097 err = init_PStack(&chanp->b_st);
1101 chanp->fi.fsm = &callcfsm;
1103 chanp->fi.debug = 0;
1104 chanp->fi.userdata = chanp;
1105 chanp->fi.printdebug = callc_debug;
1108 if (!chan || (
test_bit(FLG_TWO_DCHAN, &csta->HW_Flags) && chan < 2)) {
1109 err = init_d_st(chanp);
1113 chanp->d_st = csta->channel->d_st;
1115 chanp->data_open = 0;
1124 err = init_chan(0, csta);
1127 err = init_chan(1, csta);
1133 err = init_chan(i + 2, csta);
1140 csta->channel->d_st->lli.l4l3(csta->channel->d_st,
1147 release_d_st(
struct Channel *chanp)
1149 struct PStack *st = chanp->d_st;
1165 for (i = 0; i < 2; i++) {
1168 if (i ||
test_bit(FLG_TWO_DCHAN, &csta->HW_Flags))
1169 release_d_st(csta->channel + i);
1170 if (csta->channel[i].b_st) {
1171 release_b_st(csta->channel + i);
1172 kfree(csta->channel[i].b_st);
1173 csta->channel[
i].b_st =
NULL;
1176 if (i ||
test_bit(FLG_TWO_DCHAN, &csta->HW_Flags)) {
1177 release_d_st(csta->channel + i);
1179 csta->channel[
i].d_st =
NULL;
1184 lldata_handler(
struct PStack *st,
int pr,
void *arg)
1191 if (chanp->data_open) {
1192 if (chanp->debug & 0x800)
1193 link_debug(chanp, 0,
"lldata: %d",
skb->len);
1194 chanp->cs->iif.rcvcallb_skb(chanp->cs->myid, chanp->chan,
skb);
1196 link_debug(chanp, 0,
"lldata: channel not open");
1216 lltrans_handler(
struct PStack *st,
int pr,
void *arg)
1223 if (chanp->data_open) {
1224 if (chanp->debug & 0x800)
1225 link_debug(chanp, 0,
"lltrans: %d",
skb->len);
1226 chanp->cs->iif.rcvcallb_skb(chanp->cs->myid, chanp->chan,
skb);
1228 link_debug(chanp, 0,
"lltrans: channel not open");
1250 struct Channel *chanp = st->lli.userdata;
1253 if (chanp->debug & 0x800)
1254 link_debug(chanp, 0,
"llwakeup: %d", len);
1255 ic.
driver = chanp->cs->myid;
1257 ic.
arg = chanp->chan;
1259 chanp->cs->iif.statcallb(&ic);
1263 init_b_st(
struct Channel *chanp,
int incoming)
1265 struct PStack *st = chanp->b_st;
1266 struct IsdnCardState *cs = chanp->cs;
1269 st->l1.hardware =
cs;
1271 st->l1.bc = chanp->chan & 1;
1273 st->l1.bc = chanp->proc->para.bchannel - 1;
1274 switch (chanp->l2_active_protocol) {
1292 chanp->bcs->conmsg =
NULL;
1293 if (chanp->bcs->BC_SetStack(st, chanp->bcs))
1305 switch (chanp->l2_active_protocol) {
1307 sprintf(tmp,
"Ch%d X.75", chanp->chan);
1310 st->l2.l2l3 = lldata_handler;
1311 st->lli.userdata = chanp;
1314 st->l2.l2m.debug = chanp->debug & 16;
1315 st->l2.debug = chanp->debug & 64;
1322 st->l1.l1l2 = lltrans_handler;
1323 st->lli.userdata = chanp;
1335 leased_l4l3(
struct PStack *st,
int pr,
void *arg)
1342 link_debug(chanp, 0,
"leased line d-channel DATA");
1358 leased_l1l2(
struct PStack *st,
int pr,
void *arg)
1366 link_debug(chanp, 0,
"leased line d-channel DATA");
1374 if (
test_bit(FLG_TWO_DCHAN, &chanp->cs->HW_Flags))
1386 "transd_l1l2 unknown primitive %#x\n", pr);
1392 distr_debug(
struct IsdnCardState *csta,
int debugflags)
1395 struct Channel *chanp = csta->channel;
1398 chanp[
i].debug = debugflags;
1399 chanp[
i].fi.debug = debugflags & 2;
1400 chanp[
i].d_st->l2.l2m.debug = debugflags & 8;
1401 chanp[
i].b_st->l2.l2m.debug = debugflags & 0x10;
1402 chanp[
i].d_st->l2.debug = debugflags & 0x20;
1403 chanp[
i].b_st->l2.debug = debugflags & 0x40;
1404 chanp[
i].d_st->l3.l3m.debug = debugflags & 0x80;
1405 chanp[
i].b_st->l3.l3m.debug = debugflags & 0x100;
1406 chanp[
i].b_st->ma.tei_m.debug = debugflags & 0x200;
1407 chanp[
i].b_st->ma.debug = debugflags & 0x200;
1408 chanp[
i].d_st->l1.l1m.debug = debugflags & 0x1000;
1409 chanp[
i].b_st->l1.l1m.debug = debugflags & 0x2000;
1412 csta->debug |= DEB_DLOG_HEX;
1414 csta->debug &= ~DEB_DLOG_HEX;
1427 HiSax_putstatus(chanp->cs,
"Ch",
"%d CAPIMSG %s", chanp->chan, tmpbuf);
1432 if ((cm->
para[0] != 3) || (cm->
para[1] != 0))
1434 if (cm->
para[2] < 3)
1436 if (cm->
para[4] != 0)
1438 switch (cm->
para[3]) {
1445 if (chanp->fi.state ==
ST_NULL) {
1456 lli_got_manufacturer(
struct Channel *chanp,
struct IsdnCardState *cs,
capi_msg *cm) {
1459 if (cs->hw.elsa.MFlag) {
1470 set_channel_limit(
struct IsdnCardState *cs,
int chanmax)
1475 if ((chanmax < 0) || (chanmax > 2))
1478 for (ii = 0; ii < 2; ii++) {
1486 i = cs->iif.statcallb(&ic);
1497 struct IsdnCardState *csta = hisax_findcard(ic->
driver);
1505 "HiSax: if_command %d called with invalid driverId %d!\n",
1511 chanp = csta->channel + ic->
arg;
1514 chanp = csta->channel + (ic->
arg & 0xff);
1515 if (chanp->debug & 1)
1516 link_debug(chanp, 1,
"SETL2 card %d %ld",
1517 csta->cardnr + 1, ic->
arg >> 8);
1518 chanp->l2_protocol = ic->
arg >> 8;
1521 chanp = csta->channel + (ic->
arg & 0xff);
1522 if (chanp->debug & 1)
1523 link_debug(chanp, 1,
"SETL3 card %d %ld",
1524 csta->cardnr + 1, ic->
arg >> 8);
1525 chanp->l3_protocol = ic->
arg >> 8;
1528 chanp = csta->channel + (ic->
arg & 0xff);
1529 if (chanp->debug & 1)
1530 link_debug(chanp, 1,
"DIAL %s -> %s (%d,%d)",
1534 if (!
strcmp(chanp->setup.eazmsn,
"0"))
1535 chanp->setup.eazmsn[0] =
'\0';
1538 if (chanp->fi.state ==
ST_NULL) {
1546 chanp = csta->channel + ic->
arg;
1547 if (chanp->debug & 1)
1548 link_debug(chanp, 1,
"ACCEPTB");
1552 chanp = csta->channel + ic->
arg;
1554 if (chanp->debug & 1)
1555 link_debug(chanp, 1,
"ACCEPTD");
1559 chanp = csta->channel + ic->
arg;
1560 if (chanp->debug & 1)
1561 link_debug(chanp, 1,
"HANGUP");
1565 chanp = csta->channel + ic->
arg;
1566 if (chanp->debug & 1)
1573 lli_got_fac_req(chanp, &ic->
parm.
cmsg);
1577 lli_got_manufacturer(chanp, csta, &ic->
parm.
cmsg);
1586 num = *(
unsigned int *) ic->
parm.
num;
1590 num = *(
unsigned int *) ic->
parm.
num;
1591 distr_debug(csta, num);
1593 csta->cardnr + 1, num);
1595 "card %d set to %x", csta->cardnr + 1, num);
1598 num = *(
unsigned int *) ic->
parm.
num;
1599 csta->channel[0].b_st->l1.delay = num;
1600 csta->channel[1].b_st->l1.delay = num;
1602 csta->cardnr + 1, num);
1604 csta->cardnr + 1, num);
1607 num = *(
unsigned int *) ic->
parm.
num;
1608 if ((num < 1) || (num > 2)) {
1610 "wrong channel %d", num);
1615 chanp = csta->channel + num;
1618 "%d channel %d set leased mode\n",
1619 csta->cardnr + 1, num + 1);
1620 chanp->d_st->l1.l1l2 = leased_l1l2;
1621 chanp->d_st->lli.l4l3 = leased_l4l3;
1622 chanp->d_st->lli.l4l3(chanp->d_st,
1627 num = *(
unsigned int *) ic->
parm.
num;
1629 csta->stlist->l2.l2l1(csta->stlist,
1633 num = *(
unsigned int *) ic->
parm.
num;
1634 if (
test_bit(FLG_TWO_DCHAN, &csta->HW_Flags)) {
1639 csta->channel[0].d_st->l2.tei = 0;
1643 csta->channel[0].d_st->lli.l4l3(csta->channel[0].d_st,
1653 num = *(
unsigned int *)ic->
parm.
num;
1654 chanp = csta->channel + (num & 1);
1658 chanp->d_st->l2.tei = -1;
1663 chanp->d_st->l2.tei = num;
1668 chanp->d_st->lli.l4l3(chanp->d_st,
1672 num = csta->debug & DEB_DLOG_HEX;
1673 csta->debug = *(
unsigned int *) ic->
parm.
num;
1676 "flags card %d set to %x",
1677 csta->cardnr + 1, csta->debug);
1679 csta->cardnr + 1, csta->debug);
1682 csta->channel[0].d_st->l3.debug = *(
unsigned int *) ic->
parm.
num;
1683 csta->channel[1].d_st->l3.debug = *(
unsigned int *) ic->
parm.
num;
1685 "flags card %d set to %x\n", csta->cardnr + 1,
1686 *(
unsigned int *) ic->
parm.
num);
1688 csta->cardnr + 1, *(
unsigned int *) ic->
parm.
num);
1691 i = *(
unsigned int *) ic->
parm.
num;
1692 return (set_channel_limit(csta, i));
1695 return (csta->auxcmd(csta, ic));
1703 chanp = csta->channel + ic->
arg;
1704 if (chanp->debug & 1)
1705 link_debug(chanp, 1,
"PROCEED");
1710 chanp = csta->channel + ic->
arg;
1711 if (chanp->debug & 1)
1712 link_debug(chanp, 1,
"ALERT");
1717 chanp = csta->channel + ic->
arg;
1718 if (chanp->debug & 1)
1719 link_debug(chanp, 1,
"REDIR");
1726 for (st = csta->stlist; st; st = st->next)
1727 if (st->protocol == (ic->
arg & 0xFF))
1728 return (st->lli.l4l3_proto(st, ic));
1733 return (csta->auxcmd(csta, ic));
1742 struct IsdnCardState *csta = hisax_findcard(
id);
1750 "HiSax: if_sendbuf called with invalid driverId!\n");
1753 chanp = csta->channel + chan;
1755 if (!chanp->data_open) {
1756 link_debug(chanp, 1,
"writebuf: channel not open");
1760 link_debug(chanp, 1,
"writebuf: packet too large (%d bytes)", len);
1770 if (chanp->debug & 0x800)
1771 link_debug(chanp, 1,
"writebuf: no buffers for %d bytes", len);
1773 }
else if (chanp->debug & 0x800)
1774 link_debug(chanp, 1,
"writebuf %d/%d/%d", len, chanp->bcs->tx_cnt,
MAX_DATA_MEM);
1783 chanp->bcs->tx_cnt +=
len;