llc_c_st.c 152 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947
  1. /*
  2. * llc_c_st.c - This module contains state transition of connection component.
  3. *
  4. * Description of event functions and actions there is in 802.2 LLC standard,
  5. * or in "llc_c_ac.c" and "llc_c_ev.c" modules.
  6. *
  7. * Copyright (c) 1997 by Procom Technology, Inc.
  8. * 2001-2003 by Arnaldo Carvalho de Melo <acme@conectiva.com.br>
  9. *
  10. * This program can be redistributed or modified under the terms of the
  11. * GNU General Public License as published by the Free Software Foundation.
  12. * This program is distributed without any warranty or implied warranty
  13. * of merchantability or fitness for a particular purpose.
  14. *
  15. * See the GNU General Public License for more details.
  16. */
  17. #include <linux/types.h>
  18. #include <net/llc_if.h>
  19. #include <net/llc_sap.h>
  20. #include <net/llc_c_ev.h>
  21. #include <net/llc_c_ac.h>
  22. #include <net/llc_c_st.h>
  23. #define NONE NULL
  24. /* COMMON CONNECTION STATE transitions
  25. * Common transitions for
  26. * LLC_CONN_STATE_NORMAL,
  27. * LLC_CONN_STATE_BUSY,
  28. * LLC_CONN_STATE_REJ,
  29. * LLC_CONN_STATE_AWAIT,
  30. * LLC_CONN_STATE_AWAIT_BUSY and
  31. * LLC_CONN_STATE_AWAIT_REJ states
  32. */
  33. /* State transitions for LLC_CONN_EV_DISC_REQ event */
  34. static const llc_conn_action_t llc_common_actions_1[] = {
  35. [0] = llc_conn_ac_send_disc_cmd_p_set_x,
  36. [1] = llc_conn_ac_start_ack_timer,
  37. [2] = llc_conn_ac_stop_other_timers,
  38. [3] = llc_conn_ac_set_retry_cnt_0,
  39. [4] = llc_conn_ac_set_cause_flag_1,
  40. [5] = NULL,
  41. };
  42. static struct llc_conn_state_trans llc_common_state_trans_1 = {
  43. .ev = llc_conn_ev_disc_req,
  44. .next_state = LLC_CONN_STATE_D_CONN,
  45. .ev_qualifiers = NONE,
  46. .ev_actions = llc_common_actions_1,
  47. };
  48. /* State transitions for LLC_CONN_EV_RESET_REQ event */
  49. static const llc_conn_action_t llc_common_actions_2[] = {
  50. [0] = llc_conn_ac_send_sabme_cmd_p_set_x,
  51. [1] = llc_conn_ac_start_ack_timer,
  52. [2] = llc_conn_ac_stop_other_timers,
  53. [3] = llc_conn_ac_set_retry_cnt_0,
  54. [4] = llc_conn_ac_set_cause_flag_1,
  55. [5] = NULL,
  56. };
  57. static struct llc_conn_state_trans llc_common_state_trans_2 = {
  58. .ev = llc_conn_ev_rst_req,
  59. .next_state = LLC_CONN_STATE_RESET,
  60. .ev_qualifiers = NONE,
  61. .ev_actions = llc_common_actions_2,
  62. };
  63. /* State transitions for LLC_CONN_EV_RX_SABME_CMD_Pbit_SET_X event */
  64. static const llc_conn_action_t llc_common_actions_3[] = {
  65. [0] = llc_conn_ac_stop_all_timers,
  66. [1] = llc_conn_ac_set_vs_0,
  67. [2] = llc_conn_ac_set_vr_0,
  68. [3] = llc_conn_ac_send_ua_rsp_f_set_p,
  69. [4] = llc_conn_ac_rst_ind,
  70. [5] = llc_conn_ac_set_p_flag_0,
  71. [6] = llc_conn_ac_set_remote_busy_0,
  72. [7] = llc_conn_reset,
  73. [8] = NULL,
  74. };
  75. static struct llc_conn_state_trans llc_common_state_trans_3 = {
  76. .ev = llc_conn_ev_rx_sabme_cmd_pbit_set_x,
  77. .next_state = LLC_CONN_STATE_NORMAL,
  78. .ev_qualifiers = NONE,
  79. .ev_actions = llc_common_actions_3,
  80. };
  81. /* State transitions for LLC_CONN_EV_RX_DISC_CMD_Pbit_SET_X event */
  82. static const llc_conn_action_t llc_common_actions_4[] = {
  83. [0] = llc_conn_ac_stop_all_timers,
  84. [1] = llc_conn_ac_send_ua_rsp_f_set_p,
  85. [2] = llc_conn_ac_disc_ind,
  86. [3] = llc_conn_disc,
  87. [4] = NULL,
  88. };
  89. static struct llc_conn_state_trans llc_common_state_trans_4 = {
  90. .ev = llc_conn_ev_rx_disc_cmd_pbit_set_x,
  91. .next_state = LLC_CONN_STATE_ADM,
  92. .ev_qualifiers = NONE,
  93. .ev_actions = llc_common_actions_4,
  94. };
  95. /* State transitions for LLC_CONN_EV_RX_FRMR_RSP_Fbit_SET_X event */
  96. static const llc_conn_action_t llc_common_actions_5[] = {
  97. [0] = llc_conn_ac_send_sabme_cmd_p_set_x,
  98. [1] = llc_conn_ac_start_ack_timer,
  99. [2] = llc_conn_ac_stop_other_timers,
  100. [3] = llc_conn_ac_set_retry_cnt_0,
  101. [4] = llc_conn_ac_rst_ind,
  102. [5] = llc_conn_ac_set_cause_flag_0,
  103. [6] = llc_conn_reset,
  104. [7] = NULL,
  105. };
  106. static struct llc_conn_state_trans llc_common_state_trans_5 = {
  107. .ev = llc_conn_ev_rx_frmr_rsp_fbit_set_x,
  108. .next_state = LLC_CONN_STATE_RESET,
  109. .ev_qualifiers = NONE,
  110. .ev_actions = llc_common_actions_5,
  111. };
  112. /* State transitions for LLC_CONN_EV_RX_DM_RSP_Fbit_SET_X event */
  113. static const llc_conn_action_t llc_common_actions_6[] = {
  114. [0] = llc_conn_ac_disc_ind,
  115. [1] = llc_conn_ac_stop_all_timers,
  116. [2] = llc_conn_disc,
  117. [3] = NULL,
  118. };
  119. static struct llc_conn_state_trans llc_common_state_trans_6 = {
  120. .ev = llc_conn_ev_rx_dm_rsp_fbit_set_x,
  121. .next_state = LLC_CONN_STATE_ADM,
  122. .ev_qualifiers = NONE,
  123. .ev_actions = llc_common_actions_6,
  124. };
  125. /* State transitions for LLC_CONN_EV_RX_ZZZ_CMD_Pbit_SET_X_INVAL_Nr event */
  126. static const llc_conn_action_t llc_common_actions_7a[] = {
  127. [0] = llc_conn_ac_send_frmr_rsp_f_set_x,
  128. [1] = llc_conn_ac_start_ack_timer,
  129. [2] = llc_conn_ac_stop_other_timers,
  130. [3] = llc_conn_ac_set_retry_cnt_0,
  131. [4] = NULL,
  132. };
  133. static struct llc_conn_state_trans llc_common_state_trans_7a = {
  134. .ev = llc_conn_ev_rx_zzz_cmd_pbit_set_x_inval_nr,
  135. .next_state = LLC_CONN_STATE_ERROR,
  136. .ev_qualifiers = NONE,
  137. .ev_actions = llc_common_actions_7a,
  138. };
  139. /* State transitions for LLC_CONN_EV_RX_I_CMD_Pbit_SET_X_INVAL_Ns event */
  140. static const llc_conn_action_t llc_common_actions_7b[] = {
  141. [0] = llc_conn_ac_send_frmr_rsp_f_set_x,
  142. [1] = llc_conn_ac_start_ack_timer,
  143. [2] = llc_conn_ac_stop_other_timers,
  144. [3] = llc_conn_ac_set_retry_cnt_0,
  145. [4] = NULL,
  146. };
  147. static struct llc_conn_state_trans llc_common_state_trans_7b = {
  148. .ev = llc_conn_ev_rx_i_cmd_pbit_set_x_inval_ns,
  149. .next_state = LLC_CONN_STATE_ERROR,
  150. .ev_qualifiers = NONE,
  151. .ev_actions = llc_common_actions_7b,
  152. };
  153. /* State transitions for LLC_CONN_EV_RX_ZZZ_RSP_Fbit_SET_X_INVAL_Nr event */
  154. static const llc_conn_action_t llc_common_actions_8a[] = {
  155. [0] = llc_conn_ac_send_frmr_rsp_f_set_x,
  156. [1] = llc_conn_ac_start_ack_timer,
  157. [2] = llc_conn_ac_stop_other_timers,
  158. [3] = llc_conn_ac_set_retry_cnt_0,
  159. [4] = NULL,
  160. };
  161. static struct llc_conn_state_trans llc_common_state_trans_8a = {
  162. .ev = llc_conn_ev_rx_zzz_rsp_fbit_set_x_inval_nr,
  163. .next_state = LLC_CONN_STATE_ERROR,
  164. .ev_qualifiers = NONE,
  165. .ev_actions = llc_common_actions_8a,
  166. };
  167. /* State transitions for LLC_CONN_EV_RX_I_RSP_Fbit_SET_X_INVAL_Ns event */
  168. static const llc_conn_action_t llc_common_actions_8b[] = {
  169. [0] = llc_conn_ac_send_frmr_rsp_f_set_x,
  170. [1] = llc_conn_ac_start_ack_timer,
  171. [2] = llc_conn_ac_stop_other_timers,
  172. [3] = llc_conn_ac_set_retry_cnt_0,
  173. [4] = NULL,
  174. };
  175. static struct llc_conn_state_trans llc_common_state_trans_8b = {
  176. .ev = llc_conn_ev_rx_i_rsp_fbit_set_x_inval_ns,
  177. .next_state = LLC_CONN_STATE_ERROR,
  178. .ev_qualifiers = NONE,
  179. .ev_actions = llc_common_actions_8b,
  180. };
  181. /* State transitions for LLC_CONN_EV_RX_BAD_PDU event */
  182. static const llc_conn_action_t llc_common_actions_8c[] = {
  183. [0] = llc_conn_ac_send_frmr_rsp_f_set_x,
  184. [1] = llc_conn_ac_start_ack_timer,
  185. [2] = llc_conn_ac_stop_other_timers,
  186. [3] = llc_conn_ac_set_retry_cnt_0,
  187. [4] = NULL,
  188. };
  189. static struct llc_conn_state_trans llc_common_state_trans_8c = {
  190. .ev = llc_conn_ev_rx_bad_pdu,
  191. .next_state = LLC_CONN_STATE_ERROR,
  192. .ev_qualifiers = NONE,
  193. .ev_actions = llc_common_actions_8c,
  194. };
  195. /* State transitions for LLC_CONN_EV_RX_UA_RSP_Fbit_SET_X event */
  196. static const llc_conn_action_t llc_common_actions_9[] = {
  197. [0] = llc_conn_ac_send_frmr_rsp_f_set_x,
  198. [1] = llc_conn_ac_start_ack_timer,
  199. [2] = llc_conn_ac_stop_other_timers,
  200. [3] = llc_conn_ac_set_retry_cnt_0,
  201. [4] = NULL,
  202. };
  203. static struct llc_conn_state_trans llc_common_state_trans_9 = {
  204. .ev = llc_conn_ev_rx_ua_rsp_fbit_set_x,
  205. .next_state = LLC_CONN_STATE_ERROR,
  206. .ev_qualifiers = NONE,
  207. .ev_actions = llc_common_actions_9,
  208. };
  209. /* State transitions for LLC_CONN_EV_RX_XXX_RSP_Fbit_SET_1 event */
  210. #if 0
  211. static const llc_conn_ev_qfyr_t llc_common_ev_qfyrs_10[] = {
  212. [0] = llc_conn_ev_qlfy_p_flag_eq_0,
  213. [1] = NULL,
  214. };
  215. static const llc_conn_action_t llc_common_actions_10[] = {
  216. [0] = llc_conn_ac_send_frmr_rsp_f_set_x,
  217. [1] = llc_conn_ac_start_ack_timer,
  218. [2] = llc_conn_ac_stop_other_timers,
  219. [3] = llc_conn_ac_set_retry_cnt_0,
  220. [4] = NULL,
  221. };
  222. static struct llc_conn_state_trans llc_common_state_trans_10 = {
  223. .ev = llc_conn_ev_rx_xxx_rsp_fbit_set_1,
  224. .next_state = LLC_CONN_STATE_ERROR,
  225. .ev_qualifiers = llc_common_ev_qfyrs_10,
  226. .ev_actions = llc_common_actions_10,
  227. };
  228. #endif
  229. /* State transitions for LLC_CONN_EV_P_TMR_EXP event */
  230. static const llc_conn_ev_qfyr_t llc_common_ev_qfyrs_11a[] = {
  231. [0] = llc_conn_ev_qlfy_retry_cnt_gte_n2,
  232. [1] = NULL,
  233. };
  234. static const llc_conn_action_t llc_common_actions_11a[] = {
  235. [0] = llc_conn_ac_send_sabme_cmd_p_set_x,
  236. [1] = llc_conn_ac_start_ack_timer,
  237. [2] = llc_conn_ac_stop_other_timers,
  238. [3] = llc_conn_ac_set_retry_cnt_0,
  239. [4] = llc_conn_ac_set_cause_flag_0,
  240. [5] = NULL,
  241. };
  242. static struct llc_conn_state_trans llc_common_state_trans_11a = {
  243. .ev = llc_conn_ev_p_tmr_exp,
  244. .next_state = LLC_CONN_STATE_RESET,
  245. .ev_qualifiers = llc_common_ev_qfyrs_11a,
  246. .ev_actions = llc_common_actions_11a,
  247. };
  248. /* State transitions for LLC_CONN_EV_ACK_TMR_EXP event */
  249. static const llc_conn_ev_qfyr_t llc_common_ev_qfyrs_11b[] = {
  250. [0] = llc_conn_ev_qlfy_retry_cnt_gte_n2,
  251. [1] = NULL,
  252. };
  253. static const llc_conn_action_t llc_common_actions_11b[] = {
  254. [0] = llc_conn_ac_send_sabme_cmd_p_set_x,
  255. [1] = llc_conn_ac_start_ack_timer,
  256. [2] = llc_conn_ac_stop_other_timers,
  257. [3] = llc_conn_ac_set_retry_cnt_0,
  258. [4] = llc_conn_ac_set_cause_flag_0,
  259. [5] = NULL,
  260. };
  261. static struct llc_conn_state_trans llc_common_state_trans_11b = {
  262. .ev = llc_conn_ev_ack_tmr_exp,
  263. .next_state = LLC_CONN_STATE_RESET,
  264. .ev_qualifiers = llc_common_ev_qfyrs_11b,
  265. .ev_actions = llc_common_actions_11b,
  266. };
  267. /* State transitions for LLC_CONN_EV_REJ_TMR_EXP event */
  268. static const llc_conn_ev_qfyr_t llc_common_ev_qfyrs_11c[] = {
  269. [0] = llc_conn_ev_qlfy_retry_cnt_gte_n2,
  270. [1] = NULL,
  271. };
  272. static const llc_conn_action_t llc_common_actions_11c[] = {
  273. [0] = llc_conn_ac_send_sabme_cmd_p_set_x,
  274. [1] = llc_conn_ac_start_ack_timer,
  275. [2] = llc_conn_ac_stop_other_timers,
  276. [3] = llc_conn_ac_set_retry_cnt_0,
  277. [4] = llc_conn_ac_set_cause_flag_0,
  278. [5] = NULL,
  279. };
  280. static struct llc_conn_state_trans llc_common_state_trans_11c = {
  281. .ev = llc_conn_ev_rej_tmr_exp,
  282. .next_state = LLC_CONN_STATE_RESET,
  283. .ev_qualifiers = llc_common_ev_qfyrs_11c,
  284. .ev_actions = llc_common_actions_11c,
  285. };
  286. /* State transitions for LLC_CONN_EV_BUSY_TMR_EXP event */
  287. static const llc_conn_ev_qfyr_t llc_common_ev_qfyrs_11d[] = {
  288. [0] = llc_conn_ev_qlfy_retry_cnt_gte_n2,
  289. [1] = NULL,
  290. };
  291. static const llc_conn_action_t llc_common_actions_11d[] = {
  292. [0] = llc_conn_ac_send_sabme_cmd_p_set_x,
  293. [1] = llc_conn_ac_start_ack_timer,
  294. [2] = llc_conn_ac_stop_other_timers,
  295. [3] = llc_conn_ac_set_retry_cnt_0,
  296. [4] = llc_conn_ac_set_cause_flag_0,
  297. [5] = NULL,
  298. };
  299. static struct llc_conn_state_trans llc_common_state_trans_11d = {
  300. .ev = llc_conn_ev_busy_tmr_exp,
  301. .next_state = LLC_CONN_STATE_RESET,
  302. .ev_qualifiers = llc_common_ev_qfyrs_11d,
  303. .ev_actions = llc_common_actions_11d,
  304. };
  305. /*
  306. * Common dummy state transition; must be last entry for all state
  307. * transition groups - it'll be on .bss, so will be zeroed.
  308. */
  309. static struct llc_conn_state_trans llc_common_state_trans_end;
  310. /* LLC_CONN_STATE_ADM transitions */
  311. /* State transitions for LLC_CONN_EV_CONN_REQ event */
  312. static const llc_conn_action_t llc_adm_actions_1[] = {
  313. [0] = llc_conn_ac_send_sabme_cmd_p_set_x,
  314. [1] = llc_conn_ac_start_ack_timer,
  315. [2] = llc_conn_ac_set_retry_cnt_0,
  316. [3] = llc_conn_ac_set_s_flag_0,
  317. [4] = NULL,
  318. };
  319. static struct llc_conn_state_trans llc_adm_state_trans_1 = {
  320. .ev = llc_conn_ev_conn_req,
  321. .next_state = LLC_CONN_STATE_SETUP,
  322. .ev_qualifiers = NONE,
  323. .ev_actions = llc_adm_actions_1,
  324. };
  325. /* State transitions for LLC_CONN_EV_RX_SABME_CMD_Pbit_SET_X event */
  326. static const llc_conn_action_t llc_adm_actions_2[] = {
  327. [0] = llc_conn_ac_send_ua_rsp_f_set_p,
  328. [1] = llc_conn_ac_set_vs_0,
  329. [2] = llc_conn_ac_set_vr_0,
  330. [3] = llc_conn_ac_set_retry_cnt_0,
  331. [4] = llc_conn_ac_set_p_flag_0,
  332. [5] = llc_conn_ac_set_remote_busy_0,
  333. [6] = llc_conn_ac_conn_ind,
  334. [7] = NULL,
  335. };
  336. static struct llc_conn_state_trans llc_adm_state_trans_2 = {
  337. .ev = llc_conn_ev_rx_sabme_cmd_pbit_set_x,
  338. .next_state = LLC_CONN_STATE_NORMAL,
  339. .ev_qualifiers = NONE,
  340. .ev_actions = llc_adm_actions_2,
  341. };
  342. /* State transitions for LLC_CONN_EV_RX_DISC_CMD_Pbit_SET_X event */
  343. static const llc_conn_action_t llc_adm_actions_3[] = {
  344. [0] = llc_conn_ac_send_dm_rsp_f_set_p,
  345. [1] = llc_conn_disc,
  346. [2] = NULL,
  347. };
  348. static struct llc_conn_state_trans llc_adm_state_trans_3 = {
  349. .ev = llc_conn_ev_rx_disc_cmd_pbit_set_x,
  350. .next_state = LLC_CONN_STATE_ADM,
  351. .ev_qualifiers = NONE,
  352. .ev_actions = llc_adm_actions_3,
  353. };
  354. /* State transitions for LLC_CONN_EV_RX_XXX_CMD_Pbit_SET_1 event */
  355. static const llc_conn_action_t llc_adm_actions_4[] = {
  356. [0] = llc_conn_ac_send_dm_rsp_f_set_1,
  357. [1] = llc_conn_disc,
  358. [2] = NULL,
  359. };
  360. static struct llc_conn_state_trans llc_adm_state_trans_4 = {
  361. .ev = llc_conn_ev_rx_xxx_cmd_pbit_set_1,
  362. .next_state = LLC_CONN_STATE_ADM,
  363. .ev_qualifiers = NONE,
  364. .ev_actions = llc_adm_actions_4,
  365. };
  366. /* State transitions for LLC_CONN_EV_RX_XXX_YYY event */
  367. static const llc_conn_action_t llc_adm_actions_5[] = {
  368. [0] = llc_conn_disc,
  369. [1] = NULL,
  370. };
  371. static struct llc_conn_state_trans llc_adm_state_trans_5 = {
  372. .ev = llc_conn_ev_rx_any_frame,
  373. .next_state = LLC_CONN_OUT_OF_SVC,
  374. .ev_qualifiers = NONE,
  375. .ev_actions = llc_adm_actions_5,
  376. };
  377. /*
  378. * Array of pointers;
  379. * one to each transition
  380. */
  381. static struct llc_conn_state_trans *llc_adm_state_transitions[] = {
  382. [0] = &llc_adm_state_trans_1, /* Request */
  383. [1] = &llc_common_state_trans_end,
  384. [2] = &llc_common_state_trans_end, /* local_busy */
  385. [3] = &llc_common_state_trans_end, /* init_pf_cycle */
  386. [4] = &llc_common_state_trans_end, /* timer */
  387. [5] = &llc_adm_state_trans_2, /* Receive frame */
  388. [6] = &llc_adm_state_trans_3,
  389. [7] = &llc_adm_state_trans_4,
  390. [8] = &llc_adm_state_trans_5,
  391. [9] = &llc_common_state_trans_end,
  392. };
  393. /* LLC_CONN_STATE_SETUP transitions */
  394. /* State transitions for LLC_CONN_EV_RX_SABME_CMD_Pbit_SET_X event */
  395. static const llc_conn_action_t llc_setup_actions_1[] = {
  396. [0] = llc_conn_ac_send_ua_rsp_f_set_p,
  397. [1] = llc_conn_ac_set_vs_0,
  398. [2] = llc_conn_ac_set_vr_0,
  399. [3] = llc_conn_ac_set_s_flag_1,
  400. [4] = NULL,
  401. };
  402. static struct llc_conn_state_trans llc_setup_state_trans_1 = {
  403. .ev = llc_conn_ev_rx_sabme_cmd_pbit_set_x,
  404. .next_state = LLC_CONN_STATE_SETUP,
  405. .ev_qualifiers = NONE,
  406. .ev_actions = llc_setup_actions_1,
  407. };
  408. /* State transitions for LLC_CONN_EV_RX_UA_RSP_Fbit_SET_X event */
  409. static const llc_conn_ev_qfyr_t llc_setup_ev_qfyrs_2[] = {
  410. [0] = llc_conn_ev_qlfy_p_flag_eq_f,
  411. [1] = llc_conn_ev_qlfy_set_status_conn,
  412. [2] = NULL,
  413. };
  414. static const llc_conn_action_t llc_setup_actions_2[] = {
  415. [0] = llc_conn_ac_stop_ack_timer,
  416. [1] = llc_conn_ac_set_vs_0,
  417. [2] = llc_conn_ac_set_vr_0,
  418. [3] = llc_conn_ac_upd_p_flag,
  419. [4] = llc_conn_ac_set_remote_busy_0,
  420. [5] = llc_conn_ac_conn_confirm,
  421. [6] = NULL,
  422. };
  423. static struct llc_conn_state_trans llc_setup_state_trans_2 = {
  424. .ev = llc_conn_ev_rx_ua_rsp_fbit_set_x,
  425. .next_state = LLC_CONN_STATE_NORMAL,
  426. .ev_qualifiers = llc_setup_ev_qfyrs_2,
  427. .ev_actions = llc_setup_actions_2,
  428. };
  429. /* State transitions for LLC_CONN_EV_ACK_TMR_EXP event */
  430. static const llc_conn_ev_qfyr_t llc_setup_ev_qfyrs_3[] = {
  431. [0] = llc_conn_ev_qlfy_s_flag_eq_1,
  432. [1] = llc_conn_ev_qlfy_set_status_conn,
  433. [2] = NULL,
  434. };
  435. static const llc_conn_action_t llc_setup_actions_3[] = {
  436. [0] = llc_conn_ac_set_p_flag_0,
  437. [1] = llc_conn_ac_set_remote_busy_0,
  438. [2] = llc_conn_ac_conn_confirm,
  439. [3] = NULL,
  440. };
  441. static struct llc_conn_state_trans llc_setup_state_trans_3 = {
  442. .ev = llc_conn_ev_ack_tmr_exp,
  443. .next_state = LLC_CONN_STATE_NORMAL,
  444. .ev_qualifiers = llc_setup_ev_qfyrs_3,
  445. .ev_actions = llc_setup_actions_3,
  446. };
  447. /* State transitions for LLC_CONN_EV_RX_DISC_CMD_Pbit_SET_X event */
  448. static const llc_conn_ev_qfyr_t llc_setup_ev_qfyrs_4[] = {
  449. [0] = llc_conn_ev_qlfy_set_status_disc,
  450. [1] = NULL,
  451. };
  452. static const llc_conn_action_t llc_setup_actions_4[] = {
  453. [0] = llc_conn_ac_send_dm_rsp_f_set_p,
  454. [1] = llc_conn_ac_stop_ack_timer,
  455. [2] = llc_conn_ac_conn_confirm,
  456. [3] = llc_conn_disc,
  457. [4] = NULL,
  458. };
  459. static struct llc_conn_state_trans llc_setup_state_trans_4 = {
  460. .ev = llc_conn_ev_rx_disc_cmd_pbit_set_x,
  461. .next_state = LLC_CONN_STATE_ADM,
  462. .ev_qualifiers = llc_setup_ev_qfyrs_4,
  463. .ev_actions = llc_setup_actions_4,
  464. };
  465. /* State transitions for LLC_CONN_EV_RX_DM_RSP_Fbit_SET_X event */
  466. static const llc_conn_ev_qfyr_t llc_setup_ev_qfyrs_5[] = {
  467. [0] = llc_conn_ev_qlfy_set_status_disc,
  468. [1] = NULL,
  469. };
  470. static const llc_conn_action_t llc_setup_actions_5[] = {
  471. [0] = llc_conn_ac_stop_ack_timer,
  472. [1] = llc_conn_ac_conn_confirm,
  473. [2] = llc_conn_disc,
  474. [3] = NULL,
  475. };
  476. static struct llc_conn_state_trans llc_setup_state_trans_5 = {
  477. .ev = llc_conn_ev_rx_dm_rsp_fbit_set_x,
  478. .next_state = LLC_CONN_STATE_ADM,
  479. .ev_qualifiers = llc_setup_ev_qfyrs_5,
  480. .ev_actions = llc_setup_actions_5,
  481. };
  482. /* State transitions for LLC_CONN_EV_ACK_TMR_EXP event */
  483. static const llc_conn_ev_qfyr_t llc_setup_ev_qfyrs_7[] = {
  484. [0] = llc_conn_ev_qlfy_retry_cnt_lt_n2,
  485. [1] = llc_conn_ev_qlfy_s_flag_eq_0,
  486. [2] = NULL,
  487. };
  488. static const llc_conn_action_t llc_setup_actions_7[] = {
  489. [0] = llc_conn_ac_send_sabme_cmd_p_set_x,
  490. [1] = llc_conn_ac_start_ack_timer,
  491. [2] = llc_conn_ac_inc_retry_cnt_by_1,
  492. [3] = NULL,
  493. };
  494. static struct llc_conn_state_trans llc_setup_state_trans_7 = {
  495. .ev = llc_conn_ev_ack_tmr_exp,
  496. .next_state = LLC_CONN_STATE_SETUP,
  497. .ev_qualifiers = llc_setup_ev_qfyrs_7,
  498. .ev_actions = llc_setup_actions_7,
  499. };
  500. /* State transitions for LLC_CONN_EV_ACK_TMR_EXP event */
  501. static const llc_conn_ev_qfyr_t llc_setup_ev_qfyrs_8[] = {
  502. [0] = llc_conn_ev_qlfy_retry_cnt_gte_n2,
  503. [1] = llc_conn_ev_qlfy_s_flag_eq_0,
  504. [2] = llc_conn_ev_qlfy_set_status_failed,
  505. [3] = NULL,
  506. };
  507. static const llc_conn_action_t llc_setup_actions_8[] = {
  508. [0] = llc_conn_ac_conn_confirm,
  509. [1] = llc_conn_disc,
  510. [2] = NULL,
  511. };
  512. static struct llc_conn_state_trans llc_setup_state_trans_8 = {
  513. .ev = llc_conn_ev_ack_tmr_exp,
  514. .next_state = LLC_CONN_STATE_ADM,
  515. .ev_qualifiers = llc_setup_ev_qfyrs_8,
  516. .ev_actions = llc_setup_actions_8,
  517. };
  518. /*
  519. * Array of pointers;
  520. * one to each transition
  521. */
  522. static struct llc_conn_state_trans *llc_setup_state_transitions[] = {
  523. [0] = &llc_common_state_trans_end, /* Request */
  524. [1] = &llc_common_state_trans_end, /* local busy */
  525. [2] = &llc_common_state_trans_end, /* init_pf_cycle */
  526. [3] = &llc_setup_state_trans_3, /* Timer */
  527. [4] = &llc_setup_state_trans_7,
  528. [5] = &llc_setup_state_trans_8,
  529. [6] = &llc_common_state_trans_end,
  530. [7] = &llc_setup_state_trans_1, /* Receive frame */
  531. [8] = &llc_setup_state_trans_2,
  532. [9] = &llc_setup_state_trans_4,
  533. [10] = &llc_setup_state_trans_5,
  534. [11] = &llc_common_state_trans_end,
  535. };
  536. /* LLC_CONN_STATE_NORMAL transitions */
  537. /* State transitions for LLC_CONN_EV_DATA_REQ event */
  538. static const llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_1[] = {
  539. [0] = llc_conn_ev_qlfy_remote_busy_eq_0,
  540. [1] = llc_conn_ev_qlfy_p_flag_eq_0,
  541. [2] = llc_conn_ev_qlfy_last_frame_eq_0,
  542. [3] = NULL,
  543. };
  544. static const llc_conn_action_t llc_normal_actions_1[] = {
  545. [0] = llc_conn_ac_send_i_as_ack,
  546. [1] = llc_conn_ac_start_ack_tmr_if_not_running,
  547. [2] = NULL,
  548. };
  549. static struct llc_conn_state_trans llc_normal_state_trans_1 = {
  550. .ev = llc_conn_ev_data_req,
  551. .next_state = LLC_CONN_STATE_NORMAL,
  552. .ev_qualifiers = llc_normal_ev_qfyrs_1,
  553. .ev_actions = llc_normal_actions_1,
  554. };
  555. /* State transitions for LLC_CONN_EV_DATA_REQ event */
  556. static const llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_2[] = {
  557. [0] = llc_conn_ev_qlfy_remote_busy_eq_0,
  558. [1] = llc_conn_ev_qlfy_p_flag_eq_0,
  559. [2] = llc_conn_ev_qlfy_last_frame_eq_1,
  560. [3] = NULL,
  561. };
  562. static const llc_conn_action_t llc_normal_actions_2[] = {
  563. [0] = llc_conn_ac_send_i_cmd_p_set_1,
  564. [1] = llc_conn_ac_start_p_timer,
  565. [2] = NULL,
  566. };
  567. static struct llc_conn_state_trans llc_normal_state_trans_2 = {
  568. .ev = llc_conn_ev_data_req,
  569. .next_state = LLC_CONN_STATE_NORMAL,
  570. .ev_qualifiers = llc_normal_ev_qfyrs_2,
  571. .ev_actions = llc_normal_actions_2,
  572. };
  573. /* State transitions for LLC_CONN_EV_DATA_REQ event */
  574. static const llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_2_1[] = {
  575. [0] = llc_conn_ev_qlfy_remote_busy_eq_1,
  576. [1] = llc_conn_ev_qlfy_set_status_remote_busy,
  577. [2] = NULL,
  578. };
  579. /* just one member, NULL, .bss zeroes it */
  580. static const llc_conn_action_t llc_normal_actions_2_1[1];
  581. static struct llc_conn_state_trans llc_normal_state_trans_2_1 = {
  582. .ev = llc_conn_ev_data_req,
  583. .next_state = LLC_CONN_STATE_NORMAL,
  584. .ev_qualifiers = llc_normal_ev_qfyrs_2_1,
  585. .ev_actions = llc_normal_actions_2_1,
  586. };
  587. /* State transitions for LLC_CONN_EV_LOCAL_BUSY_DETECTED event */
  588. static const llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_3[] = {
  589. [0] = llc_conn_ev_qlfy_p_flag_eq_0,
  590. [1] = NULL,
  591. };
  592. static const llc_conn_action_t llc_normal_actions_3[] = {
  593. [0] = llc_conn_ac_rst_sendack_flag,
  594. [1] = llc_conn_ac_send_rnr_xxx_x_set_0,
  595. [2] = llc_conn_ac_set_data_flag_0,
  596. [3] = NULL,
  597. };
  598. static struct llc_conn_state_trans llc_normal_state_trans_3 = {
  599. .ev = llc_conn_ev_local_busy_detected,
  600. .next_state = LLC_CONN_STATE_BUSY,
  601. .ev_qualifiers = llc_normal_ev_qfyrs_3,
  602. .ev_actions = llc_normal_actions_3,
  603. };
  604. /* State transitions for LLC_CONN_EV_LOCAL_BUSY_DETECTED event */
  605. static const llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_4[] = {
  606. [0] = llc_conn_ev_qlfy_p_flag_eq_1,
  607. [1] = NULL,
  608. };
  609. static const llc_conn_action_t llc_normal_actions_4[] = {
  610. [0] = llc_conn_ac_rst_sendack_flag,
  611. [1] = llc_conn_ac_send_rnr_xxx_x_set_0,
  612. [2] = llc_conn_ac_set_data_flag_0,
  613. [3] = NULL,
  614. };
  615. static struct llc_conn_state_trans llc_normal_state_trans_4 = {
  616. .ev = llc_conn_ev_local_busy_detected,
  617. .next_state = LLC_CONN_STATE_BUSY,
  618. .ev_qualifiers = llc_normal_ev_qfyrs_4,
  619. .ev_actions = llc_normal_actions_4,
  620. };
  621. /* State transitions for LLC_CONN_EV_RX_I_CMD_Pbit_SET_0_UNEXPD_Ns event */
  622. static const llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_5a[] = {
  623. [0] = llc_conn_ev_qlfy_p_flag_eq_0,
  624. [1] = NULL,
  625. };
  626. static const llc_conn_action_t llc_normal_actions_5a[] = {
  627. [0] = llc_conn_ac_rst_sendack_flag,
  628. [1] = llc_conn_ac_send_rej_xxx_x_set_0,
  629. [2] = llc_conn_ac_upd_nr_received,
  630. [3] = llc_conn_ac_upd_p_flag,
  631. [4] = llc_conn_ac_start_rej_timer,
  632. [5] = llc_conn_ac_clear_remote_busy_if_f_eq_1,
  633. [6] = NULL,
  634. };
  635. static struct llc_conn_state_trans llc_normal_state_trans_5a = {
  636. .ev = llc_conn_ev_rx_i_cmd_pbit_set_0_unexpd_ns,
  637. .next_state = LLC_CONN_STATE_REJ,
  638. .ev_qualifiers = llc_normal_ev_qfyrs_5a,
  639. .ev_actions = llc_normal_actions_5a,
  640. };
  641. /* State transitions for LLC_CONN_EV_RX_I_RSP_Fbit_SET_0_UNEXPD_Ns event */
  642. static const llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_5b[] = {
  643. [0] = llc_conn_ev_qlfy_p_flag_eq_0,
  644. [1] = NULL,
  645. };
  646. static const llc_conn_action_t llc_normal_actions_5b[] = {
  647. [0] = llc_conn_ac_rst_sendack_flag,
  648. [1] = llc_conn_ac_send_rej_xxx_x_set_0,
  649. [2] = llc_conn_ac_upd_nr_received,
  650. [3] = llc_conn_ac_upd_p_flag,
  651. [4] = llc_conn_ac_start_rej_timer,
  652. [5] = llc_conn_ac_clear_remote_busy_if_f_eq_1,
  653. [6] = NULL,
  654. };
  655. static struct llc_conn_state_trans llc_normal_state_trans_5b = {
  656. .ev = llc_conn_ev_rx_i_rsp_fbit_set_0_unexpd_ns,
  657. .next_state = LLC_CONN_STATE_REJ,
  658. .ev_qualifiers = llc_normal_ev_qfyrs_5b,
  659. .ev_actions = llc_normal_actions_5b,
  660. };
  661. /* State transitions for LLC_CONN_EV_RX_I_RSP_Fbit_SET_1_UNEXPD_Ns event */
  662. static const llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_5c[] = {
  663. [0] = llc_conn_ev_qlfy_p_flag_eq_1,
  664. [1] = NULL,
  665. };
  666. static const llc_conn_action_t llc_normal_actions_5c[] = {
  667. [0] = llc_conn_ac_rst_sendack_flag,
  668. [1] = llc_conn_ac_send_rej_xxx_x_set_0,
  669. [2] = llc_conn_ac_upd_nr_received,
  670. [3] = llc_conn_ac_upd_p_flag,
  671. [4] = llc_conn_ac_start_rej_timer,
  672. [5] = llc_conn_ac_clear_remote_busy_if_f_eq_1,
  673. [6] = NULL,
  674. };
  675. static struct llc_conn_state_trans llc_normal_state_trans_5c = {
  676. .ev = llc_conn_ev_rx_i_rsp_fbit_set_1_unexpd_ns,
  677. .next_state = LLC_CONN_STATE_REJ,
  678. .ev_qualifiers = llc_normal_ev_qfyrs_5c,
  679. .ev_actions = llc_normal_actions_5c,
  680. };
  681. /* State transitions for LLC_CONN_EV_RX_I_CMD_Pbit_SET_0_UNEXPD_Ns event */
  682. static const llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_6a[] = {
  683. [0] = llc_conn_ev_qlfy_p_flag_eq_1,
  684. [1] = NULL,
  685. };
  686. static const llc_conn_action_t llc_normal_actions_6a[] = {
  687. [0] = llc_conn_ac_rst_sendack_flag,
  688. [1] = llc_conn_ac_send_rej_xxx_x_set_0,
  689. [2] = llc_conn_ac_upd_nr_received,
  690. [3] = llc_conn_ac_start_rej_timer,
  691. [4] = NULL,
  692. };
  693. static struct llc_conn_state_trans llc_normal_state_trans_6a = {
  694. .ev = llc_conn_ev_rx_i_cmd_pbit_set_0_unexpd_ns,
  695. .next_state = LLC_CONN_STATE_REJ,
  696. .ev_qualifiers = llc_normal_ev_qfyrs_6a,
  697. .ev_actions = llc_normal_actions_6a,
  698. };
  699. /* State transitions for LLC_CONN_EV_RX_I_RSP_Fbit_SET_0_UNEXPD_Ns event */
  700. static const llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_6b[] = {
  701. [0] = llc_conn_ev_qlfy_p_flag_eq_1,
  702. [1] = NULL,
  703. };
  704. static const llc_conn_action_t llc_normal_actions_6b[] = {
  705. [0] = llc_conn_ac_rst_sendack_flag,
  706. [1] = llc_conn_ac_send_rej_xxx_x_set_0,
  707. [2] = llc_conn_ac_upd_nr_received,
  708. [3] = llc_conn_ac_start_rej_timer,
  709. [4] = NULL,
  710. };
  711. static struct llc_conn_state_trans llc_normal_state_trans_6b = {
  712. .ev = llc_conn_ev_rx_i_rsp_fbit_set_0_unexpd_ns,
  713. .next_state = LLC_CONN_STATE_REJ,
  714. .ev_qualifiers = llc_normal_ev_qfyrs_6b,
  715. .ev_actions = llc_normal_actions_6b,
  716. };
  717. /* State transitions for LLC_CONN_EV_RX_I_CMD_Pbit_SET_1_UNEXPD_Ns event */
  718. static const llc_conn_action_t llc_normal_actions_7[] = {
  719. [0] = llc_conn_ac_rst_sendack_flag,
  720. [1] = llc_conn_ac_send_rej_rsp_f_set_1,
  721. [2] = llc_conn_ac_upd_nr_received,
  722. [3] = llc_conn_ac_start_rej_timer,
  723. [4] = NULL,
  724. };
  725. static struct llc_conn_state_trans llc_normal_state_trans_7 = {
  726. .ev = llc_conn_ev_rx_i_cmd_pbit_set_1_unexpd_ns,
  727. .next_state = LLC_CONN_STATE_REJ,
  728. .ev_qualifiers = NONE,
  729. .ev_actions = llc_normal_actions_7,
  730. };
  731. /* State transitions for LLC_CONN_EV_RX_I_RSP_Fbit_SET_X event */
  732. static const llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_8a[] = {
  733. [0] = llc_conn_ev_qlfy_p_flag_eq_f,
  734. [1] = NULL,
  735. };
  736. static const llc_conn_action_t llc_normal_actions_8[] = {
  737. [0] = llc_conn_ac_inc_vr_by_1,
  738. [1] = llc_conn_ac_data_ind,
  739. [2] = llc_conn_ac_upd_p_flag,
  740. [3] = llc_conn_ac_upd_nr_received,
  741. [4] = llc_conn_ac_clear_remote_busy_if_f_eq_1,
  742. [5] = llc_conn_ac_send_ack_if_needed,
  743. [6] = NULL,
  744. };
  745. static struct llc_conn_state_trans llc_normal_state_trans_8a = {
  746. .ev = llc_conn_ev_rx_i_rsp_fbit_set_x,
  747. .next_state = LLC_CONN_STATE_NORMAL,
  748. .ev_qualifiers = llc_normal_ev_qfyrs_8a,
  749. .ev_actions = llc_normal_actions_8,
  750. };
  751. /* State transitions for LLC_CONN_EV_RX_I_CMD_Pbit_SET_0 event */
  752. static const llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_8b[] = {
  753. [0] = llc_conn_ev_qlfy_p_flag_eq_0,
  754. [1] = NULL,
  755. };
  756. static struct llc_conn_state_trans llc_normal_state_trans_8b = {
  757. .ev = llc_conn_ev_rx_i_cmd_pbit_set_0,
  758. .next_state = LLC_CONN_STATE_NORMAL,
  759. .ev_qualifiers = llc_normal_ev_qfyrs_8b,
  760. .ev_actions = llc_normal_actions_8,
  761. };
  762. /* State transitions for LLC_CONN_EV_RX_I_RSP_Fbit_SET_0 event */
  763. static const llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_9a[] = {
  764. [0] = llc_conn_ev_qlfy_p_flag_eq_1,
  765. [1] = NULL,
  766. };
  767. static const llc_conn_action_t llc_normal_actions_9a[] = {
  768. [0] = llc_conn_ac_inc_vr_by_1,
  769. [1] = llc_conn_ac_upd_nr_received,
  770. [2] = llc_conn_ac_data_ind,
  771. [3] = llc_conn_ac_send_ack_if_needed,
  772. [4] = NULL,
  773. };
  774. static struct llc_conn_state_trans llc_normal_state_trans_9a = {
  775. .ev = llc_conn_ev_rx_i_rsp_fbit_set_0,
  776. .next_state = LLC_CONN_STATE_NORMAL,
  777. .ev_qualifiers = llc_normal_ev_qfyrs_9a,
  778. .ev_actions = llc_normal_actions_9a,
  779. };
  780. /* State transitions for LLC_CONN_EV_RX_I_CMD_Pbit_SET_0 event */
  781. static const llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_9b[] = {
  782. [0] = llc_conn_ev_qlfy_p_flag_eq_1,
  783. [1] = NULL,
  784. };
  785. static const llc_conn_action_t llc_normal_actions_9b[] = {
  786. [0] = llc_conn_ac_inc_vr_by_1,
  787. [1] = llc_conn_ac_upd_nr_received,
  788. [2] = llc_conn_ac_data_ind,
  789. [3] = llc_conn_ac_send_ack_if_needed,
  790. [4] = NULL,
  791. };
  792. static struct llc_conn_state_trans llc_normal_state_trans_9b = {
  793. .ev = llc_conn_ev_rx_i_cmd_pbit_set_0,
  794. .next_state = LLC_CONN_STATE_NORMAL,
  795. .ev_qualifiers = llc_normal_ev_qfyrs_9b,
  796. .ev_actions = llc_normal_actions_9b,
  797. };
  798. /* State transitions for LLC_CONN_EV_RX_I_CMD_Pbit_SET_1 event */
  799. static const llc_conn_action_t llc_normal_actions_10[] = {
  800. [0] = llc_conn_ac_inc_vr_by_1,
  801. [1] = llc_conn_ac_send_ack_rsp_f_set_1,
  802. [2] = llc_conn_ac_rst_sendack_flag,
  803. [3] = llc_conn_ac_upd_nr_received,
  804. [4] = llc_conn_ac_data_ind,
  805. [5] = NULL,
  806. };
  807. static struct llc_conn_state_trans llc_normal_state_trans_10 = {
  808. .ev = llc_conn_ev_rx_i_cmd_pbit_set_1,
  809. .next_state = LLC_CONN_STATE_NORMAL,
  810. .ev_qualifiers = NONE,
  811. .ev_actions = llc_normal_actions_10,
  812. };
  813. /* State transitions for * LLC_CONN_EV_RX_RR_CMD_Pbit_SET_0 event */
  814. static const llc_conn_action_t llc_normal_actions_11a[] = {
  815. [0] = llc_conn_ac_upd_p_flag,
  816. [1] = llc_conn_ac_upd_nr_received,
  817. [2] = llc_conn_ac_clear_remote_busy,
  818. [3] = NULL,
  819. };
  820. static struct llc_conn_state_trans llc_normal_state_trans_11a = {
  821. .ev = llc_conn_ev_rx_rr_cmd_pbit_set_0,
  822. .next_state = LLC_CONN_STATE_NORMAL,
  823. .ev_qualifiers = NONE,
  824. .ev_actions = llc_normal_actions_11a,
  825. };
  826. /* State transitions for LLC_CONN_EV_RX_RR_RSP_Fbit_SET_0 event */
  827. static const llc_conn_action_t llc_normal_actions_11b[] = {
  828. [0] = llc_conn_ac_upd_p_flag,
  829. [1] = llc_conn_ac_upd_nr_received,
  830. [2] = llc_conn_ac_clear_remote_busy,
  831. [3] = NULL,
  832. };
  833. static struct llc_conn_state_trans llc_normal_state_trans_11b = {
  834. .ev = llc_conn_ev_rx_rr_rsp_fbit_set_0,
  835. .next_state = LLC_CONN_STATE_NORMAL,
  836. .ev_qualifiers = NONE,
  837. .ev_actions = llc_normal_actions_11b,
  838. };
  839. /* State transitions for LLC_CONN_EV_RX_RR_RSP_Fbit_SET_1 event */
  840. static const llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_11c[] = {
  841. [0] = llc_conn_ev_qlfy_p_flag_eq_1,
  842. [1] = NULL,
  843. };
  844. static const llc_conn_action_t llc_normal_actions_11c[] = {
  845. [0] = llc_conn_ac_upd_p_flag,
  846. [1] = llc_conn_ac_upd_nr_received,
  847. [2] = llc_conn_ac_inc_tx_win_size,
  848. [3] = llc_conn_ac_clear_remote_busy,
  849. [4] = NULL,
  850. };
  851. static struct llc_conn_state_trans llc_normal_state_trans_11c = {
  852. .ev = llc_conn_ev_rx_rr_rsp_fbit_set_1,
  853. .next_state = LLC_CONN_STATE_NORMAL,
  854. .ev_qualifiers = llc_normal_ev_qfyrs_11c,
  855. .ev_actions = llc_normal_actions_11c,
  856. };
  857. /* State transitions for LLC_CONN_EV_RX_RR_CMD_Pbit_SET_1 event */
  858. static const llc_conn_action_t llc_normal_actions_12[] = {
  859. [0] = llc_conn_ac_send_ack_rsp_f_set_1,
  860. [1] = llc_conn_ac_upd_nr_received,
  861. [2] = llc_conn_ac_adjust_npta_by_rr,
  862. [3] = llc_conn_ac_rst_sendack_flag,
  863. [4] = llc_conn_ac_clear_remote_busy,
  864. [5] = NULL,
  865. };
  866. static struct llc_conn_state_trans llc_normal_state_trans_12 = {
  867. .ev = llc_conn_ev_rx_rr_cmd_pbit_set_1,
  868. .next_state = LLC_CONN_STATE_NORMAL,
  869. .ev_qualifiers = NONE,
  870. .ev_actions = llc_normal_actions_12,
  871. };
  872. /* State transitions for LLC_CONN_EV_RX_RNR_CMD_Pbit_SET_0 event */
  873. static const llc_conn_action_t llc_normal_actions_13a[] = {
  874. [0] = llc_conn_ac_upd_p_flag,
  875. [1] = llc_conn_ac_upd_nr_received,
  876. [2] = llc_conn_ac_set_remote_busy,
  877. [3] = NULL,
  878. };
  879. static struct llc_conn_state_trans llc_normal_state_trans_13a = {
  880. .ev = llc_conn_ev_rx_rnr_cmd_pbit_set_0,
  881. .next_state = LLC_CONN_STATE_NORMAL,
  882. .ev_qualifiers = NONE,
  883. .ev_actions = llc_normal_actions_13a,
  884. };
  885. /* State transitions for LLC_CONN_EV_RX_RNR_RSP_Fbit_SET_0 event */
  886. static const llc_conn_action_t llc_normal_actions_13b[] = {
  887. [0] = llc_conn_ac_upd_p_flag,
  888. [1] = llc_conn_ac_upd_nr_received,
  889. [2] = llc_conn_ac_set_remote_busy,
  890. [3] = NULL,
  891. };
  892. static struct llc_conn_state_trans llc_normal_state_trans_13b = {
  893. .ev = llc_conn_ev_rx_rnr_rsp_fbit_set_0,
  894. .next_state = LLC_CONN_STATE_NORMAL,
  895. .ev_qualifiers = NONE,
  896. .ev_actions = llc_normal_actions_13b,
  897. };
  898. /* State transitions for LLC_CONN_EV_RX_RNR_RSP_Fbit_SET_1 event */
  899. static const llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_13c[] = {
  900. [0] = llc_conn_ev_qlfy_p_flag_eq_1,
  901. [1] = NULL,
  902. };
  903. static const llc_conn_action_t llc_normal_actions_13c[] = {
  904. [0] = llc_conn_ac_upd_p_flag,
  905. [1] = llc_conn_ac_upd_nr_received,
  906. [2] = llc_conn_ac_set_remote_busy,
  907. [3] = NULL,
  908. };
  909. static struct llc_conn_state_trans llc_normal_state_trans_13c = {
  910. .ev = llc_conn_ev_rx_rnr_rsp_fbit_set_1,
  911. .next_state = LLC_CONN_STATE_NORMAL,
  912. .ev_qualifiers = llc_normal_ev_qfyrs_13c,
  913. .ev_actions = llc_normal_actions_13c,
  914. };
  915. /* State transitions for LLC_CONN_EV_RX_RNR_CMD_Pbit_SET_1 event */
  916. static const llc_conn_action_t llc_normal_actions_14[] = {
  917. [0] = llc_conn_ac_send_rr_rsp_f_set_1,
  918. [1] = llc_conn_ac_upd_nr_received,
  919. [2] = llc_conn_ac_adjust_npta_by_rnr,
  920. [3] = llc_conn_ac_rst_sendack_flag,
  921. [4] = llc_conn_ac_set_remote_busy,
  922. [5] = NULL,
  923. };
  924. static struct llc_conn_state_trans llc_normal_state_trans_14 = {
  925. .ev = llc_conn_ev_rx_rnr_cmd_pbit_set_1,
  926. .next_state = LLC_CONN_STATE_NORMAL,
  927. .ev_qualifiers = NONE,
  928. .ev_actions = llc_normal_actions_14,
  929. };
  930. /* State transitions for LLC_CONN_EV_RX_REJ_CMD_Pbit_SET_0 event */
  931. static const llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_15a[] = {
  932. [0] = llc_conn_ev_qlfy_p_flag_eq_0,
  933. [1] = NULL,
  934. };
  935. static const llc_conn_action_t llc_normal_actions_15a[] = {
  936. [0] = llc_conn_ac_set_vs_nr,
  937. [1] = llc_conn_ac_upd_nr_received,
  938. [2] = llc_conn_ac_upd_p_flag,
  939. [3] = llc_conn_ac_dec_tx_win_size,
  940. [4] = llc_conn_ac_resend_i_xxx_x_set_0,
  941. [5] = llc_conn_ac_clear_remote_busy,
  942. [6] = NULL,
  943. };
  944. static struct llc_conn_state_trans llc_normal_state_trans_15a = {
  945. .ev = llc_conn_ev_rx_rej_cmd_pbit_set_0,
  946. .next_state = LLC_CONN_STATE_NORMAL,
  947. .ev_qualifiers = llc_normal_ev_qfyrs_15a,
  948. .ev_actions = llc_normal_actions_15a,
  949. };
  950. /* State transitions for LLC_CONN_EV_RX_REJ_RSP_Fbit_SET_X event */
  951. static const llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_15b[] = {
  952. [0] = llc_conn_ev_qlfy_p_flag_eq_f,
  953. [1] = NULL,
  954. };
  955. static const llc_conn_action_t llc_normal_actions_15b[] = {
  956. [0] = llc_conn_ac_set_vs_nr,
  957. [1] = llc_conn_ac_upd_nr_received,
  958. [2] = llc_conn_ac_upd_p_flag,
  959. [3] = llc_conn_ac_dec_tx_win_size,
  960. [4] = llc_conn_ac_resend_i_xxx_x_set_0,
  961. [5] = llc_conn_ac_clear_remote_busy,
  962. [6] = NULL,
  963. };
  964. static struct llc_conn_state_trans llc_normal_state_trans_15b = {
  965. .ev = llc_conn_ev_rx_rej_rsp_fbit_set_x,
  966. .next_state = LLC_CONN_STATE_NORMAL,
  967. .ev_qualifiers = llc_normal_ev_qfyrs_15b,
  968. .ev_actions = llc_normal_actions_15b,
  969. };
  970. /* State transitions for LLC_CONN_EV_RX_REJ_CMD_Pbit_SET_0 event */
  971. static const llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_16a[] = {
  972. [0] = llc_conn_ev_qlfy_p_flag_eq_1,
  973. [1] = NULL,
  974. };
  975. static const llc_conn_action_t llc_normal_actions_16a[] = {
  976. [0] = llc_conn_ac_set_vs_nr,
  977. [1] = llc_conn_ac_upd_nr_received,
  978. [2] = llc_conn_ac_dec_tx_win_size,
  979. [3] = llc_conn_ac_resend_i_xxx_x_set_0,
  980. [4] = llc_conn_ac_clear_remote_busy,
  981. [5] = NULL,
  982. };
  983. static struct llc_conn_state_trans llc_normal_state_trans_16a = {
  984. .ev = llc_conn_ev_rx_rej_cmd_pbit_set_0,
  985. .next_state = LLC_CONN_STATE_NORMAL,
  986. .ev_qualifiers = llc_normal_ev_qfyrs_16a,
  987. .ev_actions = llc_normal_actions_16a,
  988. };
  989. /* State transitions for LLC_CONN_EV_RX_REJ_RSP_Fbit_SET_0 event */
  990. static const llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_16b[] = {
  991. [0] = llc_conn_ev_qlfy_p_flag_eq_1,
  992. [1] = NULL,
  993. };
  994. static const llc_conn_action_t llc_normal_actions_16b[] = {
  995. [0] = llc_conn_ac_set_vs_nr,
  996. [1] = llc_conn_ac_upd_nr_received,
  997. [2] = llc_conn_ac_dec_tx_win_size,
  998. [3] = llc_conn_ac_resend_i_xxx_x_set_0,
  999. [4] = llc_conn_ac_clear_remote_busy,
  1000. [5] = NULL,
  1001. };
  1002. static struct llc_conn_state_trans llc_normal_state_trans_16b = {
  1003. .ev = llc_conn_ev_rx_rej_rsp_fbit_set_0,
  1004. .next_state = LLC_CONN_STATE_NORMAL,
  1005. .ev_qualifiers = llc_normal_ev_qfyrs_16b,
  1006. .ev_actions = llc_normal_actions_16b,
  1007. };
  1008. /* State transitions for LLC_CONN_EV_RX_REJ_CMD_Pbit_SET_1 event */
  1009. static const llc_conn_action_t llc_normal_actions_17[] = {
  1010. [0] = llc_conn_ac_set_vs_nr,
  1011. [1] = llc_conn_ac_upd_nr_received,
  1012. [2] = llc_conn_ac_dec_tx_win_size,
  1013. [3] = llc_conn_ac_resend_i_rsp_f_set_1,
  1014. [4] = llc_conn_ac_clear_remote_busy,
  1015. [5] = NULL,
  1016. };
  1017. static struct llc_conn_state_trans llc_normal_state_trans_17 = {
  1018. .ev = llc_conn_ev_rx_rej_cmd_pbit_set_1,
  1019. .next_state = LLC_CONN_STATE_NORMAL,
  1020. .ev_qualifiers = NONE,
  1021. .ev_actions = llc_normal_actions_17,
  1022. };
  1023. /* State transitions for LLC_CONN_EV_INIT_P_F_CYCLE event */
  1024. static const llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_18[] = {
  1025. [0] = llc_conn_ev_qlfy_p_flag_eq_0,
  1026. [1] = NULL,
  1027. };
  1028. static const llc_conn_action_t llc_normal_actions_18[] = {
  1029. [0] = llc_conn_ac_send_rr_cmd_p_set_1,
  1030. [1] = llc_conn_ac_start_p_timer,
  1031. [2] = NULL,
  1032. };
  1033. static struct llc_conn_state_trans llc_normal_state_trans_18 = {
  1034. .ev = llc_conn_ev_init_p_f_cycle,
  1035. .next_state = LLC_CONN_STATE_NORMAL,
  1036. .ev_qualifiers = llc_normal_ev_qfyrs_18,
  1037. .ev_actions = llc_normal_actions_18,
  1038. };
  1039. /* State transitions for LLC_CONN_EV_P_TMR_EXP event */
  1040. static const llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_19[] = {
  1041. [0] = llc_conn_ev_qlfy_retry_cnt_lt_n2,
  1042. [1] = NULL,
  1043. };
  1044. static const llc_conn_action_t llc_normal_actions_19[] = {
  1045. [0] = llc_conn_ac_rst_sendack_flag,
  1046. [1] = llc_conn_ac_send_rr_cmd_p_set_1,
  1047. [2] = llc_conn_ac_rst_vs,
  1048. [3] = llc_conn_ac_start_p_timer,
  1049. [4] = llc_conn_ac_inc_retry_cnt_by_1,
  1050. [5] = NULL,
  1051. };
  1052. static struct llc_conn_state_trans llc_normal_state_trans_19 = {
  1053. .ev = llc_conn_ev_p_tmr_exp,
  1054. .next_state = LLC_CONN_STATE_AWAIT,
  1055. .ev_qualifiers = llc_normal_ev_qfyrs_19,
  1056. .ev_actions = llc_normal_actions_19,
  1057. };
  1058. /* State transitions for LLC_CONN_EV_ACK_TMR_EXP event */
  1059. static const llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_20a[] = {
  1060. [0] = llc_conn_ev_qlfy_p_flag_eq_0,
  1061. [1] = llc_conn_ev_qlfy_retry_cnt_lt_n2,
  1062. [2] = NULL,
  1063. };
  1064. static const llc_conn_action_t llc_normal_actions_20a[] = {
  1065. [0] = llc_conn_ac_rst_sendack_flag,
  1066. [1] = llc_conn_ac_send_rr_cmd_p_set_1,
  1067. [2] = llc_conn_ac_rst_vs,
  1068. [3] = llc_conn_ac_start_p_timer,
  1069. [4] = llc_conn_ac_inc_retry_cnt_by_1,
  1070. [5] = NULL,
  1071. };
  1072. static struct llc_conn_state_trans llc_normal_state_trans_20a = {
  1073. .ev = llc_conn_ev_ack_tmr_exp,
  1074. .next_state = LLC_CONN_STATE_AWAIT,
  1075. .ev_qualifiers = llc_normal_ev_qfyrs_20a,
  1076. .ev_actions = llc_normal_actions_20a,
  1077. };
  1078. /* State transitions for LLC_CONN_EV_BUSY_TMR_EXP event */
  1079. static const llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_20b[] = {
  1080. [0] = llc_conn_ev_qlfy_p_flag_eq_0,
  1081. [1] = llc_conn_ev_qlfy_retry_cnt_lt_n2,
  1082. [2] = NULL,
  1083. };
  1084. static const llc_conn_action_t llc_normal_actions_20b[] = {
  1085. [0] = llc_conn_ac_rst_sendack_flag,
  1086. [1] = llc_conn_ac_send_rr_cmd_p_set_1,
  1087. [2] = llc_conn_ac_rst_vs,
  1088. [3] = llc_conn_ac_start_p_timer,
  1089. [4] = llc_conn_ac_inc_retry_cnt_by_1,
  1090. [5] = NULL,
  1091. };
  1092. static struct llc_conn_state_trans llc_normal_state_trans_20b = {
  1093. .ev = llc_conn_ev_busy_tmr_exp,
  1094. .next_state = LLC_CONN_STATE_AWAIT,
  1095. .ev_qualifiers = llc_normal_ev_qfyrs_20b,
  1096. .ev_actions = llc_normal_actions_20b,
  1097. };
  1098. /* State transitions for LLC_CONN_EV_TX_BUFF_FULL event */
  1099. static const llc_conn_ev_qfyr_t llc_normal_ev_qfyrs_21[] = {
  1100. [0] = llc_conn_ev_qlfy_p_flag_eq_0,
  1101. [1] = NULL,
  1102. };
  1103. static const llc_conn_action_t llc_normal_actions_21[] = {
  1104. [0] = llc_conn_ac_send_rr_cmd_p_set_1,
  1105. [1] = llc_conn_ac_start_p_timer,
  1106. [2] = NULL,
  1107. };
  1108. static struct llc_conn_state_trans llc_normal_state_trans_21 = {
  1109. .ev = llc_conn_ev_tx_buffer_full,
  1110. .next_state = LLC_CONN_STATE_NORMAL,
  1111. .ev_qualifiers = llc_normal_ev_qfyrs_21,
  1112. .ev_actions = llc_normal_actions_21,
  1113. };
  1114. /*
  1115. * Array of pointers;
  1116. * one to each transition
  1117. */
  1118. static struct llc_conn_state_trans *llc_normal_state_transitions[] = {
  1119. [0] = &llc_normal_state_trans_1, /* Requests */
  1120. [1] = &llc_normal_state_trans_2,
  1121. [2] = &llc_normal_state_trans_2_1,
  1122. [3] = &llc_common_state_trans_1,
  1123. [4] = &llc_common_state_trans_2,
  1124. [5] = &llc_common_state_trans_end,
  1125. [6] = &llc_normal_state_trans_21,
  1126. [7] = &llc_normal_state_trans_3, /* Local busy */
  1127. [8] = &llc_normal_state_trans_4,
  1128. [9] = &llc_common_state_trans_end,
  1129. [10] = &llc_normal_state_trans_18, /* Init pf cycle */
  1130. [11] = &llc_common_state_trans_end,
  1131. [12] = &llc_common_state_trans_11a, /* Timers */
  1132. [13] = &llc_common_state_trans_11b,
  1133. [14] = &llc_common_state_trans_11c,
  1134. [15] = &llc_common_state_trans_11d,
  1135. [16] = &llc_normal_state_trans_19,
  1136. [17] = &llc_normal_state_trans_20a,
  1137. [18] = &llc_normal_state_trans_20b,
  1138. [19] = &llc_common_state_trans_end,
  1139. [20] = &llc_normal_state_trans_8b, /* Receive frames */
  1140. [21] = &llc_normal_state_trans_9b,
  1141. [22] = &llc_normal_state_trans_10,
  1142. [23] = &llc_normal_state_trans_11b,
  1143. [24] = &llc_normal_state_trans_11c,
  1144. [25] = &llc_normal_state_trans_5a,
  1145. [26] = &llc_normal_state_trans_5b,
  1146. [27] = &llc_normal_state_trans_5c,
  1147. [28] = &llc_normal_state_trans_6a,
  1148. [29] = &llc_normal_state_trans_6b,
  1149. [30] = &llc_normal_state_trans_7,
  1150. [31] = &llc_normal_state_trans_8a,
  1151. [32] = &llc_normal_state_trans_9a,
  1152. [33] = &llc_normal_state_trans_11a,
  1153. [34] = &llc_normal_state_trans_12,
  1154. [35] = &llc_normal_state_trans_13a,
  1155. [36] = &llc_normal_state_trans_13b,
  1156. [37] = &llc_normal_state_trans_13c,
  1157. [38] = &llc_normal_state_trans_14,
  1158. [39] = &llc_normal_state_trans_15a,
  1159. [40] = &llc_normal_state_trans_15b,
  1160. [41] = &llc_normal_state_trans_16a,
  1161. [42] = &llc_normal_state_trans_16b,
  1162. [43] = &llc_normal_state_trans_17,
  1163. [44] = &llc_common_state_trans_3,
  1164. [45] = &llc_common_state_trans_4,
  1165. [46] = &llc_common_state_trans_5,
  1166. [47] = &llc_common_state_trans_6,
  1167. [48] = &llc_common_state_trans_7a,
  1168. [49] = &llc_common_state_trans_7b,
  1169. [50] = &llc_common_state_trans_8a,
  1170. [51] = &llc_common_state_trans_8b,
  1171. [52] = &llc_common_state_trans_8c,
  1172. [53] = &llc_common_state_trans_9,
  1173. /* [54] = &llc_common_state_trans_10, */
  1174. [54] = &llc_common_state_trans_end,
  1175. };
  1176. /* LLC_CONN_STATE_BUSY transitions */
  1177. /* State transitions for LLC_CONN_EV_DATA_REQ event */
  1178. static const llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_1[] = {
  1179. [0] = llc_conn_ev_qlfy_remote_busy_eq_0,
  1180. [1] = llc_conn_ev_qlfy_p_flag_eq_0,
  1181. [2] = NULL,
  1182. };
  1183. static const llc_conn_action_t llc_busy_actions_1[] = {
  1184. [0] = llc_conn_ac_send_i_xxx_x_set_0,
  1185. [1] = llc_conn_ac_start_ack_tmr_if_not_running,
  1186. [2] = NULL,
  1187. };
  1188. static struct llc_conn_state_trans llc_busy_state_trans_1 = {
  1189. .ev = llc_conn_ev_data_req,
  1190. .next_state = LLC_CONN_STATE_BUSY,
  1191. .ev_qualifiers = llc_busy_ev_qfyrs_1,
  1192. .ev_actions = llc_busy_actions_1,
  1193. };
  1194. /* State transitions for LLC_CONN_EV_DATA_REQ event */
  1195. static const llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_2[] = {
  1196. [0] = llc_conn_ev_qlfy_remote_busy_eq_0,
  1197. [1] = llc_conn_ev_qlfy_p_flag_eq_1,
  1198. [2] = NULL,
  1199. };
  1200. static const llc_conn_action_t llc_busy_actions_2[] = {
  1201. [0] = llc_conn_ac_send_i_xxx_x_set_0,
  1202. [1] = llc_conn_ac_start_ack_tmr_if_not_running,
  1203. [2] = NULL,
  1204. };
  1205. static struct llc_conn_state_trans llc_busy_state_trans_2 = {
  1206. .ev = llc_conn_ev_data_req,
  1207. .next_state = LLC_CONN_STATE_BUSY,
  1208. .ev_qualifiers = llc_busy_ev_qfyrs_2,
  1209. .ev_actions = llc_busy_actions_2,
  1210. };
  1211. /* State transitions for LLC_CONN_EV_DATA_REQ event */
  1212. static const llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_2_1[] = {
  1213. [0] = llc_conn_ev_qlfy_remote_busy_eq_1,
  1214. [1] = llc_conn_ev_qlfy_set_status_remote_busy,
  1215. [2] = NULL,
  1216. };
  1217. /* just one member, NULL, .bss zeroes it */
  1218. static const llc_conn_action_t llc_busy_actions_2_1[1];
  1219. static struct llc_conn_state_trans llc_busy_state_trans_2_1 = {
  1220. .ev = llc_conn_ev_data_req,
  1221. .next_state = LLC_CONN_STATE_BUSY,
  1222. .ev_qualifiers = llc_busy_ev_qfyrs_2_1,
  1223. .ev_actions = llc_busy_actions_2_1,
  1224. };
  1225. /* State transitions for LLC_CONN_EV_LOCAL_BUSY_CLEARED event */
  1226. static const llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_3[] = {
  1227. [0] = llc_conn_ev_qlfy_data_flag_eq_1,
  1228. [1] = llc_conn_ev_qlfy_p_flag_eq_0,
  1229. [2] = NULL,
  1230. };
  1231. static const llc_conn_action_t llc_busy_actions_3[] = {
  1232. [0] = llc_conn_ac_send_rej_xxx_x_set_0,
  1233. [1] = llc_conn_ac_start_rej_timer,
  1234. [2] = NULL,
  1235. };
  1236. static struct llc_conn_state_trans llc_busy_state_trans_3 = {
  1237. .ev = llc_conn_ev_local_busy_cleared,
  1238. .next_state = LLC_CONN_STATE_REJ,
  1239. .ev_qualifiers = llc_busy_ev_qfyrs_3,
  1240. .ev_actions = llc_busy_actions_3,
  1241. };
  1242. /* State transitions for LLC_CONN_EV_LOCAL_BUSY_CLEARED event */
  1243. static const llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_4[] = {
  1244. [0] = llc_conn_ev_qlfy_data_flag_eq_1,
  1245. [1] = llc_conn_ev_qlfy_p_flag_eq_1,
  1246. [2] = NULL,
  1247. };
  1248. static const llc_conn_action_t llc_busy_actions_4[] = {
  1249. [0] = llc_conn_ac_send_rej_xxx_x_set_0,
  1250. [1] = llc_conn_ac_start_rej_timer,
  1251. [2] = NULL,
  1252. };
  1253. static struct llc_conn_state_trans llc_busy_state_trans_4 = {
  1254. .ev = llc_conn_ev_local_busy_cleared,
  1255. .next_state = LLC_CONN_STATE_REJ,
  1256. .ev_qualifiers = llc_busy_ev_qfyrs_4,
  1257. .ev_actions = llc_busy_actions_4,
  1258. };
  1259. /* State transitions for LLC_CONN_EV_LOCAL_BUSY_CLEARED event */
  1260. static const llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_5[] = {
  1261. [0] = llc_conn_ev_qlfy_data_flag_eq_0,
  1262. [1] = llc_conn_ev_qlfy_p_flag_eq_0,
  1263. [2] = NULL,
  1264. };
  1265. static const llc_conn_action_t llc_busy_actions_5[] = {
  1266. [0] = llc_conn_ac_send_rr_xxx_x_set_0,
  1267. [1] = NULL,
  1268. };
  1269. static struct llc_conn_state_trans llc_busy_state_trans_5 = {
  1270. .ev = llc_conn_ev_local_busy_cleared,
  1271. .next_state = LLC_CONN_STATE_NORMAL,
  1272. .ev_qualifiers = llc_busy_ev_qfyrs_5,
  1273. .ev_actions = llc_busy_actions_5,
  1274. };
  1275. /* State transitions for LLC_CONN_EV_LOCAL_BUSY_CLEARED event */
  1276. static const llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_6[] = {
  1277. [0] = llc_conn_ev_qlfy_data_flag_eq_0,
  1278. [1] = llc_conn_ev_qlfy_p_flag_eq_1,
  1279. [2] = NULL,
  1280. };
  1281. static const llc_conn_action_t llc_busy_actions_6[] = {
  1282. [0] = llc_conn_ac_send_rr_xxx_x_set_0,
  1283. [1] = NULL,
  1284. };
  1285. static struct llc_conn_state_trans llc_busy_state_trans_6 = {
  1286. .ev = llc_conn_ev_local_busy_cleared,
  1287. .next_state = LLC_CONN_STATE_NORMAL,
  1288. .ev_qualifiers = llc_busy_ev_qfyrs_6,
  1289. .ev_actions = llc_busy_actions_6,
  1290. };
  1291. /* State transitions for LLC_CONN_EV_LOCAL_BUSY_CLEARED event */
  1292. static const llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_7[] = {
  1293. [0] = llc_conn_ev_qlfy_data_flag_eq_2,
  1294. [1] = llc_conn_ev_qlfy_p_flag_eq_0,
  1295. [2] = NULL,
  1296. };
  1297. static const llc_conn_action_t llc_busy_actions_7[] = {
  1298. [0] = llc_conn_ac_send_rr_xxx_x_set_0,
  1299. [1] = NULL,
  1300. };
  1301. static struct llc_conn_state_trans llc_busy_state_trans_7 = {
  1302. .ev = llc_conn_ev_local_busy_cleared,
  1303. .next_state = LLC_CONN_STATE_REJ,
  1304. .ev_qualifiers = llc_busy_ev_qfyrs_7,
  1305. .ev_actions = llc_busy_actions_7,
  1306. };
  1307. /* State transitions for LLC_CONN_EV_LOCAL_BUSY_CLEARED event */
  1308. static const llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_8[] = {
  1309. [0] = llc_conn_ev_qlfy_data_flag_eq_2,
  1310. [1] = llc_conn_ev_qlfy_p_flag_eq_1,
  1311. [2] = NULL,
  1312. };
  1313. static const llc_conn_action_t llc_busy_actions_8[] = {
  1314. [0] = llc_conn_ac_send_rr_xxx_x_set_0,
  1315. [1] = NULL,
  1316. };
  1317. static struct llc_conn_state_trans llc_busy_state_trans_8 = {
  1318. .ev = llc_conn_ev_local_busy_cleared,
  1319. .next_state = LLC_CONN_STATE_REJ,
  1320. .ev_qualifiers = llc_busy_ev_qfyrs_8,
  1321. .ev_actions = llc_busy_actions_8,
  1322. };
  1323. /* State transitions for LLC_CONN_EV_RX_I_RSP_Fbit_SET_X_UNEXPD_Ns event */
  1324. static const llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_9a[] = {
  1325. [0] = llc_conn_ev_qlfy_p_flag_eq_f,
  1326. [1] = NULL,
  1327. };
  1328. static const llc_conn_action_t llc_busy_actions_9a[] = {
  1329. [0] = llc_conn_ac_opt_send_rnr_xxx_x_set_0,
  1330. [1] = llc_conn_ac_upd_p_flag,
  1331. [2] = llc_conn_ac_upd_nr_received,
  1332. [3] = llc_conn_ac_set_data_flag_1_if_data_flag_eq_0,
  1333. [4] = llc_conn_ac_clear_remote_busy_if_f_eq_1,
  1334. [5] = NULL,
  1335. };
  1336. static struct llc_conn_state_trans llc_busy_state_trans_9a = {
  1337. .ev = llc_conn_ev_rx_i_rsp_fbit_set_x_unexpd_ns,
  1338. .next_state = LLC_CONN_STATE_BUSY,
  1339. .ev_qualifiers = llc_busy_ev_qfyrs_9a,
  1340. .ev_actions = llc_busy_actions_9a,
  1341. };
  1342. /* State transitions for LLC_CONN_EV_RX_I_CMD_Pbit_SET_0_UNEXPD_Ns event */
  1343. static const llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_9b[] = {
  1344. [0] = llc_conn_ev_qlfy_p_flag_eq_0,
  1345. [1] = NULL,
  1346. };
  1347. static const llc_conn_action_t llc_busy_actions_9b[] = {
  1348. [0] = llc_conn_ac_opt_send_rnr_xxx_x_set_0,
  1349. [1] = llc_conn_ac_upd_p_flag,
  1350. [2] = llc_conn_ac_upd_nr_received,
  1351. [3] = llc_conn_ac_set_data_flag_1_if_data_flag_eq_0,
  1352. [4] = llc_conn_ac_clear_remote_busy_if_f_eq_1,
  1353. [5] = NULL,
  1354. };
  1355. static struct llc_conn_state_trans llc_busy_state_trans_9b = {
  1356. .ev = llc_conn_ev_rx_i_cmd_pbit_set_0_unexpd_ns,
  1357. .next_state = LLC_CONN_STATE_BUSY,
  1358. .ev_qualifiers = llc_busy_ev_qfyrs_9b,
  1359. .ev_actions = llc_busy_actions_9b,
  1360. };
  1361. /* State transitions for LLC_CONN_EV_RX_I_RSP_Fbit_SET_0_UNEXPD_Ns event */
  1362. static const llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_10a[] = {
  1363. [0] = llc_conn_ev_qlfy_p_flag_eq_1,
  1364. [1] = NULL,
  1365. };
  1366. static const llc_conn_action_t llc_busy_actions_10a[] = {
  1367. [0] = llc_conn_ac_opt_send_rnr_xxx_x_set_0,
  1368. [1] = llc_conn_ac_upd_nr_received,
  1369. [2] = llc_conn_ac_set_data_flag_1_if_data_flag_eq_0,
  1370. [3] = NULL,
  1371. };
  1372. static struct llc_conn_state_trans llc_busy_state_trans_10a = {
  1373. .ev = llc_conn_ev_rx_i_rsp_fbit_set_0_unexpd_ns,
  1374. .next_state = LLC_CONN_STATE_BUSY,
  1375. .ev_qualifiers = llc_busy_ev_qfyrs_10a,
  1376. .ev_actions = llc_busy_actions_10a,
  1377. };
  1378. /* State transitions for LLC_CONN_EV_RX_I_CMD_Pbit_SET_0_UNEXPD_Ns event */
  1379. static const llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_10b[] = {
  1380. [0] = llc_conn_ev_qlfy_p_flag_eq_1,
  1381. [1] = NULL,
  1382. };
  1383. static const llc_conn_action_t llc_busy_actions_10b[] = {
  1384. [0] = llc_conn_ac_opt_send_rnr_xxx_x_set_0,
  1385. [1] = llc_conn_ac_upd_nr_received,
  1386. [2] = llc_conn_ac_set_data_flag_1_if_data_flag_eq_0,
  1387. [3] = NULL,
  1388. };
  1389. static struct llc_conn_state_trans llc_busy_state_trans_10b = {
  1390. .ev = llc_conn_ev_rx_i_cmd_pbit_set_0_unexpd_ns,
  1391. .next_state = LLC_CONN_STATE_BUSY,
  1392. .ev_qualifiers = llc_busy_ev_qfyrs_10b,
  1393. .ev_actions = llc_busy_actions_10b,
  1394. };
  1395. /* State transitions for LLC_CONN_EV_RX_I_CMD_Pbit_SET_1_UNEXPD_Ns event */
  1396. static const llc_conn_action_t llc_busy_actions_11[] = {
  1397. [0] = llc_conn_ac_send_rnr_rsp_f_set_1,
  1398. [1] = llc_conn_ac_upd_nr_received,
  1399. [2] = llc_conn_ac_set_data_flag_1_if_data_flag_eq_0,
  1400. [3] = NULL,
  1401. };
  1402. static struct llc_conn_state_trans llc_busy_state_trans_11 = {
  1403. .ev = llc_conn_ev_rx_i_cmd_pbit_set_1_unexpd_ns,
  1404. .next_state = LLC_CONN_STATE_BUSY,
  1405. .ev_qualifiers = NONE,
  1406. .ev_actions = llc_busy_actions_11,
  1407. };
  1408. /* State transitions for LLC_CONN_EV_RX_I_CMD_Pbit_SET_1 event */
  1409. static const llc_conn_action_t llc_busy_actions_12[] = {
  1410. [0] = llc_conn_ac_inc_vr_by_1,
  1411. [1] = llc_conn_ac_data_ind,
  1412. [2] = llc_conn_ac_send_rnr_rsp_f_set_1,
  1413. [3] = llc_conn_ac_upd_nr_received,
  1414. [4] = llc_conn_ac_stop_rej_tmr_if_data_flag_eq_2,
  1415. [5] = llc_conn_ac_set_data_flag_0,
  1416. [6] = NULL,
  1417. };
  1418. static struct llc_conn_state_trans llc_busy_state_trans_12 = {
  1419. .ev = llc_conn_ev_rx_i_cmd_pbit_set_1,
  1420. .next_state = LLC_CONN_STATE_BUSY,
  1421. .ev_qualifiers = NONE,
  1422. .ev_actions = llc_busy_actions_12,
  1423. };
  1424. /* State transitions for LLC_CONN_EV_RX_I_RSP_Fbit_SET_X event */
  1425. static const llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_13a[] = {
  1426. [0] = llc_conn_ev_qlfy_p_flag_eq_f,
  1427. [1] = NULL,
  1428. };
  1429. static const llc_conn_action_t llc_busy_actions_13a[] = {
  1430. [0] = llc_conn_ac_inc_vr_by_1,
  1431. [1] = llc_conn_ac_data_ind,
  1432. [2] = llc_conn_ac_upd_p_flag,
  1433. [3] = llc_conn_ac_opt_send_rnr_xxx_x_set_0,
  1434. [4] = llc_conn_ac_upd_nr_received,
  1435. [5] = llc_conn_ac_stop_rej_tmr_if_data_flag_eq_2,
  1436. [6] = llc_conn_ac_set_data_flag_0,
  1437. [7] = llc_conn_ac_clear_remote_busy_if_f_eq_1,
  1438. [8] = NULL,
  1439. };
  1440. static struct llc_conn_state_trans llc_busy_state_trans_13a = {
  1441. .ev = llc_conn_ev_rx_i_rsp_fbit_set_x,
  1442. .next_state = LLC_CONN_STATE_BUSY,
  1443. .ev_qualifiers = llc_busy_ev_qfyrs_13a,
  1444. .ev_actions = llc_busy_actions_13a,
  1445. };
  1446. /* State transitions for LLC_CONN_EV_RX_I_CMD_Pbit_SET_0 event */
  1447. static const llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_13b[] = {
  1448. [0] = llc_conn_ev_qlfy_p_flag_eq_0,
  1449. [1] = NULL,
  1450. };
  1451. static const llc_conn_action_t llc_busy_actions_13b[] = {
  1452. [0] = llc_conn_ac_inc_vr_by_1,
  1453. [1] = llc_conn_ac_data_ind,
  1454. [2] = llc_conn_ac_upd_p_flag,
  1455. [3] = llc_conn_ac_opt_send_rnr_xxx_x_set_0,
  1456. [4] = llc_conn_ac_upd_nr_received,
  1457. [5] = llc_conn_ac_stop_rej_tmr_if_data_flag_eq_2,
  1458. [6] = llc_conn_ac_set_data_flag_0,
  1459. [7] = llc_conn_ac_clear_remote_busy_if_f_eq_1,
  1460. [8] = NULL,
  1461. };
  1462. static struct llc_conn_state_trans llc_busy_state_trans_13b = {
  1463. .ev = llc_conn_ev_rx_i_cmd_pbit_set_0,
  1464. .next_state = LLC_CONN_STATE_BUSY,
  1465. .ev_qualifiers = llc_busy_ev_qfyrs_13b,
  1466. .ev_actions = llc_busy_actions_13b,
  1467. };
  1468. /* State transitions for LLC_CONN_EV_RX_I_RSP_Fbit_SET_0 event */
  1469. static const llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_14a[] = {
  1470. [0] = llc_conn_ev_qlfy_p_flag_eq_1,
  1471. [1] = NULL,
  1472. };
  1473. static const llc_conn_action_t llc_busy_actions_14a[] = {
  1474. [0] = llc_conn_ac_inc_vr_by_1,
  1475. [1] = llc_conn_ac_data_ind,
  1476. [2] = llc_conn_ac_opt_send_rnr_xxx_x_set_0,
  1477. [3] = llc_conn_ac_upd_nr_received,
  1478. [4] = llc_conn_ac_stop_rej_tmr_if_data_flag_eq_2,
  1479. [5] = llc_conn_ac_set_data_flag_0,
  1480. [6] = NULL,
  1481. };
  1482. static struct llc_conn_state_trans llc_busy_state_trans_14a = {
  1483. .ev = llc_conn_ev_rx_i_rsp_fbit_set_0,
  1484. .next_state = LLC_CONN_STATE_BUSY,
  1485. .ev_qualifiers = llc_busy_ev_qfyrs_14a,
  1486. .ev_actions = llc_busy_actions_14a,
  1487. };
  1488. /* State transitions for LLC_CONN_EV_RX_I_CMD_Pbit_SET_0 event */
  1489. static const llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_14b[] = {
  1490. [0] = llc_conn_ev_qlfy_p_flag_eq_1,
  1491. [1] = NULL,
  1492. };
  1493. static const llc_conn_action_t llc_busy_actions_14b[] = {
  1494. [0] = llc_conn_ac_inc_vr_by_1,
  1495. [1] = llc_conn_ac_data_ind,
  1496. [2] = llc_conn_ac_opt_send_rnr_xxx_x_set_0,
  1497. [3] = llc_conn_ac_upd_nr_received,
  1498. [4] = llc_conn_ac_stop_rej_tmr_if_data_flag_eq_2,
  1499. [5] = llc_conn_ac_set_data_flag_0,
  1500. [6] = NULL,
  1501. };
  1502. static struct llc_conn_state_trans llc_busy_state_trans_14b = {
  1503. .ev = llc_conn_ev_rx_i_cmd_pbit_set_0,
  1504. .next_state = LLC_CONN_STATE_BUSY,
  1505. .ev_qualifiers = llc_busy_ev_qfyrs_14b,
  1506. .ev_actions = llc_busy_actions_14b,
  1507. };
  1508. /* State transitions for LLC_CONN_EV_RX_RR_CMD_Pbit_SET_0 event */
  1509. static const llc_conn_action_t llc_busy_actions_15a[] = {
  1510. [0] = llc_conn_ac_upd_p_flag,
  1511. [1] = llc_conn_ac_upd_nr_received,
  1512. [2] = llc_conn_ac_clear_remote_busy,
  1513. [3] = NULL,
  1514. };
  1515. static struct llc_conn_state_trans llc_busy_state_trans_15a = {
  1516. .ev = llc_conn_ev_rx_rr_cmd_pbit_set_0,
  1517. .next_state = LLC_CONN_STATE_BUSY,
  1518. .ev_qualifiers = NONE,
  1519. .ev_actions = llc_busy_actions_15a,
  1520. };
  1521. /* State transitions for LLC_CONN_EV_RX_RR_RSP_Fbit_SET_0 event */
  1522. static const llc_conn_action_t llc_busy_actions_15b[] = {
  1523. [0] = llc_conn_ac_upd_p_flag,
  1524. [1] = llc_conn_ac_upd_nr_received,
  1525. [2] = llc_conn_ac_clear_remote_busy,
  1526. [3] = NULL,
  1527. };
  1528. static struct llc_conn_state_trans llc_busy_state_trans_15b = {
  1529. .ev = llc_conn_ev_rx_rr_rsp_fbit_set_0,
  1530. .next_state = LLC_CONN_STATE_BUSY,
  1531. .ev_qualifiers = NONE,
  1532. .ev_actions = llc_busy_actions_15b,
  1533. };
  1534. /* State transitions for LLC_CONN_EV_RX_RR_RSP_Fbit_SET_1 event */
  1535. static const llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_15c[] = {
  1536. [0] = llc_conn_ev_qlfy_p_flag_eq_1,
  1537. [1] = NULL,
  1538. };
  1539. static const llc_conn_action_t llc_busy_actions_15c[] = {
  1540. [0] = llc_conn_ac_upd_p_flag,
  1541. [1] = llc_conn_ac_upd_nr_received,
  1542. [2] = llc_conn_ac_clear_remote_busy,
  1543. [3] = NULL,
  1544. };
  1545. static struct llc_conn_state_trans llc_busy_state_trans_15c = {
  1546. .ev = llc_conn_ev_rx_rr_rsp_fbit_set_1,
  1547. .next_state = LLC_CONN_STATE_BUSY,
  1548. .ev_qualifiers = llc_busy_ev_qfyrs_15c,
  1549. .ev_actions = llc_busy_actions_15c,
  1550. };
  1551. /* State transitions for LLC_CONN_EV_RX_RR_CMD_Pbit_SET_1 event */
  1552. static const llc_conn_action_t llc_busy_actions_16[] = {
  1553. [0] = llc_conn_ac_send_rnr_rsp_f_set_1,
  1554. [1] = llc_conn_ac_upd_nr_received,
  1555. [2] = llc_conn_ac_clear_remote_busy,
  1556. [3] = NULL,
  1557. };
  1558. static struct llc_conn_state_trans llc_busy_state_trans_16 = {
  1559. .ev = llc_conn_ev_rx_rr_cmd_pbit_set_1,
  1560. .next_state = LLC_CONN_STATE_BUSY,
  1561. .ev_qualifiers = NONE,
  1562. .ev_actions = llc_busy_actions_16,
  1563. };
  1564. /* State transitions for LLC_CONN_EV_RX_RNR_CMD_Pbit_SET_0 event */
  1565. static const llc_conn_action_t llc_busy_actions_17a[] = {
  1566. [0] = llc_conn_ac_upd_p_flag,
  1567. [1] = llc_conn_ac_upd_nr_received,
  1568. [2] = llc_conn_ac_set_remote_busy,
  1569. [3] = NULL,
  1570. };
  1571. static struct llc_conn_state_trans llc_busy_state_trans_17a = {
  1572. .ev = llc_conn_ev_rx_rnr_cmd_pbit_set_0,
  1573. .next_state = LLC_CONN_STATE_BUSY,
  1574. .ev_qualifiers = NONE,
  1575. .ev_actions = llc_busy_actions_17a,
  1576. };
  1577. /* State transitions for LLC_CONN_EV_RX_RNR_RSP_Fbit_SET_0 event */
  1578. static const llc_conn_action_t llc_busy_actions_17b[] = {
  1579. [0] = llc_conn_ac_upd_p_flag,
  1580. [1] = llc_conn_ac_upd_nr_received,
  1581. [2] = llc_conn_ac_set_remote_busy,
  1582. [3] = NULL,
  1583. };
  1584. static struct llc_conn_state_trans llc_busy_state_trans_17b = {
  1585. .ev = llc_conn_ev_rx_rnr_rsp_fbit_set_0,
  1586. .next_state = LLC_CONN_STATE_BUSY,
  1587. .ev_qualifiers = NONE,
  1588. .ev_actions = llc_busy_actions_17b,
  1589. };
  1590. /* State transitions for LLC_CONN_EV_RX_RNR_RSP_Fbit_SET_1 event */
  1591. static const llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_17c[] = {
  1592. [0] = llc_conn_ev_qlfy_p_flag_eq_1,
  1593. [1] = NULL,
  1594. };
  1595. static const llc_conn_action_t llc_busy_actions_17c[] = {
  1596. [0] = llc_conn_ac_upd_p_flag,
  1597. [1] = llc_conn_ac_upd_nr_received,
  1598. [2] = llc_conn_ac_set_remote_busy,
  1599. [3] = NULL,
  1600. };
  1601. static struct llc_conn_state_trans llc_busy_state_trans_17c = {
  1602. .ev = llc_conn_ev_rx_rnr_rsp_fbit_set_1,
  1603. .next_state = LLC_CONN_STATE_BUSY,
  1604. .ev_qualifiers = llc_busy_ev_qfyrs_17c,
  1605. .ev_actions = llc_busy_actions_17c,
  1606. };
  1607. /* State transitions for LLC_CONN_EV_RX_RNR_CMD_Pbit_SET_1 event */
  1608. static const llc_conn_action_t llc_busy_actions_18[] = {
  1609. [0] = llc_conn_ac_send_rnr_rsp_f_set_1,
  1610. [1] = llc_conn_ac_upd_nr_received,
  1611. [2] = llc_conn_ac_set_remote_busy,
  1612. [3] = NULL,
  1613. };
  1614. static struct llc_conn_state_trans llc_busy_state_trans_18 = {
  1615. .ev = llc_conn_ev_rx_rnr_cmd_pbit_set_1,
  1616. .next_state = LLC_CONN_STATE_BUSY,
  1617. .ev_qualifiers = NONE,
  1618. .ev_actions = llc_busy_actions_18,
  1619. };
  1620. /* State transitions for LLC_CONN_EV_RX_REJ_CMD_Pbit_SET_0 event */
  1621. static const llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_19a[] = {
  1622. [0] = llc_conn_ev_qlfy_p_flag_eq_0,
  1623. [1] = NULL,
  1624. };
  1625. static const llc_conn_action_t llc_busy_actions_19a[] = {
  1626. [0] = llc_conn_ac_set_vs_nr,
  1627. [1] = llc_conn_ac_upd_nr_received,
  1628. [2] = llc_conn_ac_upd_p_flag,
  1629. [3] = llc_conn_ac_resend_i_xxx_x_set_0,
  1630. [4] = llc_conn_ac_clear_remote_busy,
  1631. [5] = NULL,
  1632. };
  1633. static struct llc_conn_state_trans llc_busy_state_trans_19a = {
  1634. .ev = llc_conn_ev_rx_rej_cmd_pbit_set_0,
  1635. .next_state = LLC_CONN_STATE_BUSY,
  1636. .ev_qualifiers = llc_busy_ev_qfyrs_19a,
  1637. .ev_actions = llc_busy_actions_19a,
  1638. };
  1639. /* State transitions for LLC_CONN_EV_RX_REJ_RSP_Fbit_SET_X event */
  1640. static const llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_19b[] = {
  1641. [0] = llc_conn_ev_qlfy_p_flag_eq_f,
  1642. [1] = NULL,
  1643. };
  1644. static const llc_conn_action_t llc_busy_actions_19b[] = {
  1645. [0] = llc_conn_ac_set_vs_nr,
  1646. [1] = llc_conn_ac_upd_nr_received,
  1647. [2] = llc_conn_ac_upd_p_flag,
  1648. [3] = llc_conn_ac_resend_i_xxx_x_set_0,
  1649. [4] = llc_conn_ac_clear_remote_busy,
  1650. [5] = NULL,
  1651. };
  1652. static struct llc_conn_state_trans llc_busy_state_trans_19b = {
  1653. .ev = llc_conn_ev_rx_rej_rsp_fbit_set_x,
  1654. .next_state = LLC_CONN_STATE_BUSY,
  1655. .ev_qualifiers = llc_busy_ev_qfyrs_19b,
  1656. .ev_actions = llc_busy_actions_19b,
  1657. };
  1658. /* State transitions for LLC_CONN_EV_RX_REJ_CMD_Pbit_SET_0 event */
  1659. static const llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_20a[] = {
  1660. [0] = llc_conn_ev_qlfy_p_flag_eq_1,
  1661. [1] = NULL,
  1662. };
  1663. static const llc_conn_action_t llc_busy_actions_20a[] = {
  1664. [0] = llc_conn_ac_set_vs_nr,
  1665. [1] = llc_conn_ac_upd_nr_received,
  1666. [2] = llc_conn_ac_resend_i_xxx_x_set_0,
  1667. [3] = llc_conn_ac_clear_remote_busy,
  1668. [4] = NULL,
  1669. };
  1670. static struct llc_conn_state_trans llc_busy_state_trans_20a = {
  1671. .ev = llc_conn_ev_rx_rej_cmd_pbit_set_0,
  1672. .next_state = LLC_CONN_STATE_BUSY,
  1673. .ev_qualifiers = llc_busy_ev_qfyrs_20a,
  1674. .ev_actions = llc_busy_actions_20a,
  1675. };
  1676. /* State transitions for LLC_CONN_EV_RX_REJ_RSP_Fbit_SET_0 event */
  1677. static const llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_20b[] = {
  1678. [0] = llc_conn_ev_qlfy_p_flag_eq_1,
  1679. [1] = NULL,
  1680. };
  1681. static const llc_conn_action_t llc_busy_actions_20b[] = {
  1682. [0] = llc_conn_ac_set_vs_nr,
  1683. [1] = llc_conn_ac_upd_nr_received,
  1684. [2] = llc_conn_ac_resend_i_xxx_x_set_0,
  1685. [3] = llc_conn_ac_clear_remote_busy,
  1686. [4] = NULL,
  1687. };
  1688. static struct llc_conn_state_trans llc_busy_state_trans_20b = {
  1689. .ev = llc_conn_ev_rx_rej_rsp_fbit_set_0,
  1690. .next_state = LLC_CONN_STATE_BUSY,
  1691. .ev_qualifiers = llc_busy_ev_qfyrs_20b,
  1692. .ev_actions = llc_busy_actions_20b,
  1693. };
  1694. /* State transitions for LLC_CONN_EV_RX_REJ_CMD_Pbit_SET_1 event */
  1695. static const llc_conn_action_t llc_busy_actions_21[] = {
  1696. [0] = llc_conn_ac_set_vs_nr,
  1697. [1] = llc_conn_ac_upd_nr_received,
  1698. [2] = llc_conn_ac_send_rnr_rsp_f_set_1,
  1699. [3] = llc_conn_ac_resend_i_xxx_x_set_0,
  1700. [4] = llc_conn_ac_clear_remote_busy,
  1701. [5] = NULL,
  1702. };
  1703. static struct llc_conn_state_trans llc_busy_state_trans_21 = {
  1704. .ev = llc_conn_ev_rx_rej_cmd_pbit_set_1,
  1705. .next_state = LLC_CONN_STATE_BUSY,
  1706. .ev_qualifiers = NONE,
  1707. .ev_actions = llc_busy_actions_21,
  1708. };
  1709. /* State transitions for LLC_CONN_EV_INIT_P_F_CYCLE event */
  1710. static const llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_22[] = {
  1711. [0] = llc_conn_ev_qlfy_p_flag_eq_0,
  1712. [1] = NULL,
  1713. };
  1714. static const llc_conn_action_t llc_busy_actions_22[] = {
  1715. [0] = llc_conn_ac_send_rnr_cmd_p_set_1,
  1716. [1] = llc_conn_ac_start_p_timer,
  1717. [2] = NULL,
  1718. };
  1719. static struct llc_conn_state_trans llc_busy_state_trans_22 = {
  1720. .ev = llc_conn_ev_init_p_f_cycle,
  1721. .next_state = LLC_CONN_STATE_BUSY,
  1722. .ev_qualifiers = llc_busy_ev_qfyrs_22,
  1723. .ev_actions = llc_busy_actions_22,
  1724. };
  1725. /* State transitions for LLC_CONN_EV_P_TMR_EXP event */
  1726. static const llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_23[] = {
  1727. [0] = llc_conn_ev_qlfy_retry_cnt_lt_n2,
  1728. [1] = NULL,
  1729. };
  1730. static const llc_conn_action_t llc_busy_actions_23[] = {
  1731. [0] = llc_conn_ac_send_rnr_cmd_p_set_1,
  1732. [1] = llc_conn_ac_rst_vs,
  1733. [2] = llc_conn_ac_start_p_timer,
  1734. [3] = llc_conn_ac_inc_retry_cnt_by_1,
  1735. [4] = NULL,
  1736. };
  1737. static struct llc_conn_state_trans llc_busy_state_trans_23 = {
  1738. .ev = llc_conn_ev_p_tmr_exp,
  1739. .next_state = LLC_CONN_STATE_AWAIT_BUSY,
  1740. .ev_qualifiers = llc_busy_ev_qfyrs_23,
  1741. .ev_actions = llc_busy_actions_23,
  1742. };
  1743. /* State transitions for LLC_CONN_EV_ACK_TMR_EXP event */
  1744. static const llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_24a[] = {
  1745. [0] = llc_conn_ev_qlfy_p_flag_eq_0,
  1746. [1] = llc_conn_ev_qlfy_retry_cnt_lt_n2,
  1747. [2] = NULL,
  1748. };
  1749. static const llc_conn_action_t llc_busy_actions_24a[] = {
  1750. [0] = llc_conn_ac_send_rnr_cmd_p_set_1,
  1751. [1] = llc_conn_ac_start_p_timer,
  1752. [2] = llc_conn_ac_inc_retry_cnt_by_1,
  1753. [3] = llc_conn_ac_rst_vs,
  1754. [4] = NULL,
  1755. };
  1756. static struct llc_conn_state_trans llc_busy_state_trans_24a = {
  1757. .ev = llc_conn_ev_ack_tmr_exp,
  1758. .next_state = LLC_CONN_STATE_AWAIT_BUSY,
  1759. .ev_qualifiers = llc_busy_ev_qfyrs_24a,
  1760. .ev_actions = llc_busy_actions_24a,
  1761. };
  1762. /* State transitions for LLC_CONN_EV_BUSY_TMR_EXP event */
  1763. static const llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_24b[] = {
  1764. [0] = llc_conn_ev_qlfy_p_flag_eq_0,
  1765. [1] = llc_conn_ev_qlfy_retry_cnt_lt_n2,
  1766. [2] = NULL,
  1767. };
  1768. static const llc_conn_action_t llc_busy_actions_24b[] = {
  1769. [0] = llc_conn_ac_send_rnr_cmd_p_set_1,
  1770. [1] = llc_conn_ac_start_p_timer,
  1771. [2] = llc_conn_ac_inc_retry_cnt_by_1,
  1772. [3] = llc_conn_ac_rst_vs,
  1773. [4] = NULL,
  1774. };
  1775. static struct llc_conn_state_trans llc_busy_state_trans_24b = {
  1776. .ev = llc_conn_ev_busy_tmr_exp,
  1777. .next_state = LLC_CONN_STATE_AWAIT_BUSY,
  1778. .ev_qualifiers = llc_busy_ev_qfyrs_24b,
  1779. .ev_actions = llc_busy_actions_24b,
  1780. };
  1781. /* State transitions for LLC_CONN_EV_REJ_TMR_EXP event */
  1782. static const llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_25[] = {
  1783. [0] = llc_conn_ev_qlfy_p_flag_eq_0,
  1784. [1] = llc_conn_ev_qlfy_retry_cnt_lt_n2,
  1785. [2] = NULL,
  1786. };
  1787. static const llc_conn_action_t llc_busy_actions_25[] = {
  1788. [0] = llc_conn_ac_send_rnr_cmd_p_set_1,
  1789. [1] = llc_conn_ac_start_p_timer,
  1790. [2] = llc_conn_ac_inc_retry_cnt_by_1,
  1791. [3] = llc_conn_ac_rst_vs,
  1792. [4] = llc_conn_ac_set_data_flag_1,
  1793. [5] = NULL,
  1794. };
  1795. static struct llc_conn_state_trans llc_busy_state_trans_25 = {
  1796. .ev = llc_conn_ev_rej_tmr_exp,
  1797. .next_state = LLC_CONN_STATE_AWAIT_BUSY,
  1798. .ev_qualifiers = llc_busy_ev_qfyrs_25,
  1799. .ev_actions = llc_busy_actions_25,
  1800. };
  1801. /* State transitions for LLC_CONN_EV_REJ_TMR_EXP event */
  1802. static const llc_conn_ev_qfyr_t llc_busy_ev_qfyrs_26[] = {
  1803. [0] = llc_conn_ev_qlfy_p_flag_eq_1,
  1804. [1] = llc_conn_ev_qlfy_retry_cnt_lt_n2,
  1805. [2] = NULL,
  1806. };
  1807. static const llc_conn_action_t llc_busy_actions_26[] = {
  1808. [0] = llc_conn_ac_set_data_flag_1,
  1809. [1] = NULL,
  1810. };
  1811. static struct llc_conn_state_trans llc_busy_state_trans_26 = {
  1812. .ev = llc_conn_ev_rej_tmr_exp,
  1813. .next_state = LLC_CONN_STATE_BUSY,
  1814. .ev_qualifiers = llc_busy_ev_qfyrs_26,
  1815. .ev_actions = llc_busy_actions_26,
  1816. };
  1817. /*
  1818. * Array of pointers;
  1819. * one to each transition
  1820. */
  1821. static struct llc_conn_state_trans *llc_busy_state_transitions[] = {
  1822. [0] = &llc_common_state_trans_1, /* Request */
  1823. [1] = &llc_common_state_trans_2,
  1824. [2] = &llc_busy_state_trans_1,
  1825. [3] = &llc_busy_state_trans_2,
  1826. [4] = &llc_busy_state_trans_2_1,
  1827. [5] = &llc_common_state_trans_end,
  1828. [6] = &llc_busy_state_trans_3, /* Local busy */
  1829. [7] = &llc_busy_state_trans_4,
  1830. [8] = &llc_busy_state_trans_5,
  1831. [9] = &llc_busy_state_trans_6,
  1832. [10] = &llc_busy_state_trans_7,
  1833. [11] = &llc_busy_state_trans_8,
  1834. [12] = &llc_common_state_trans_end,
  1835. [13] = &llc_busy_state_trans_22, /* Initiate PF cycle */
  1836. [14] = &llc_common_state_trans_end,
  1837. [15] = &llc_common_state_trans_11a, /* Timer */
  1838. [16] = &llc_common_state_trans_11b,
  1839. [17] = &llc_common_state_trans_11c,
  1840. [18] = &llc_common_state_trans_11d,
  1841. [19] = &llc_busy_state_trans_23,
  1842. [20] = &llc_busy_state_trans_24a,
  1843. [21] = &llc_busy_state_trans_24b,
  1844. [22] = &llc_busy_state_trans_25,
  1845. [23] = &llc_busy_state_trans_26,
  1846. [24] = &llc_common_state_trans_end,
  1847. [25] = &llc_busy_state_trans_9a, /* Receive frame */
  1848. [26] = &llc_busy_state_trans_9b,
  1849. [27] = &llc_busy_state_trans_10a,
  1850. [28] = &llc_busy_state_trans_10b,
  1851. [29] = &llc_busy_state_trans_11,
  1852. [30] = &llc_busy_state_trans_12,
  1853. [31] = &llc_busy_state_trans_13a,
  1854. [32] = &llc_busy_state_trans_13b,
  1855. [33] = &llc_busy_state_trans_14a,
  1856. [34] = &llc_busy_state_trans_14b,
  1857. [35] = &llc_busy_state_trans_15a,
  1858. [36] = &llc_busy_state_trans_15b,
  1859. [37] = &llc_busy_state_trans_15c,
  1860. [38] = &llc_busy_state_trans_16,
  1861. [39] = &llc_busy_state_trans_17a,
  1862. [40] = &llc_busy_state_trans_17b,
  1863. [41] = &llc_busy_state_trans_17c,
  1864. [42] = &llc_busy_state_trans_18,
  1865. [43] = &llc_busy_state_trans_19a,
  1866. [44] = &llc_busy_state_trans_19b,
  1867. [45] = &llc_busy_state_trans_20a,
  1868. [46] = &llc_busy_state_trans_20b,
  1869. [47] = &llc_busy_state_trans_21,
  1870. [48] = &llc_common_state_trans_3,
  1871. [49] = &llc_common_state_trans_4,
  1872. [50] = &llc_common_state_trans_5,
  1873. [51] = &llc_common_state_trans_6,
  1874. [52] = &llc_common_state_trans_7a,
  1875. [53] = &llc_common_state_trans_7b,
  1876. [54] = &llc_common_state_trans_8a,
  1877. [55] = &llc_common_state_trans_8b,
  1878. [56] = &llc_common_state_trans_8c,
  1879. [57] = &llc_common_state_trans_9,
  1880. /* [58] = &llc_common_state_trans_10, */
  1881. [58] = &llc_common_state_trans_end,
  1882. };
  1883. /* LLC_CONN_STATE_REJ transitions */
  1884. /* State transitions for LLC_CONN_EV_DATA_REQ event */
  1885. static const llc_conn_ev_qfyr_t llc_reject_ev_qfyrs_1[] = {
  1886. [0] = llc_conn_ev_qlfy_remote_busy_eq_0,
  1887. [1] = llc_conn_ev_qlfy_p_flag_eq_0,
  1888. [2] = NULL,
  1889. };
  1890. static const llc_conn_action_t llc_reject_actions_1[] = {
  1891. [0] = llc_conn_ac_send_i_xxx_x_set_0,
  1892. [1] = NULL,
  1893. };
  1894. static struct llc_conn_state_trans llc_reject_state_trans_1 = {
  1895. .ev = llc_conn_ev_data_req,
  1896. .next_state = LLC_CONN_STATE_REJ,
  1897. .ev_qualifiers = llc_reject_ev_qfyrs_1,
  1898. .ev_actions = llc_reject_actions_1,
  1899. };
  1900. /* State transitions for LLC_CONN_EV_DATA_REQ event */
  1901. static const llc_conn_ev_qfyr_t llc_reject_ev_qfyrs_2[] = {
  1902. [0] = llc_conn_ev_qlfy_remote_busy_eq_0,
  1903. [1] = llc_conn_ev_qlfy_p_flag_eq_1,
  1904. [2] = NULL,
  1905. };
  1906. static const llc_conn_action_t llc_reject_actions_2[] = {
  1907. [0] = llc_conn_ac_send_i_xxx_x_set_0,
  1908. [1] = NULL,
  1909. };
  1910. static struct llc_conn_state_trans llc_reject_state_trans_2 = {
  1911. .ev = llc_conn_ev_data_req,
  1912. .next_state = LLC_CONN_STATE_REJ,
  1913. .ev_qualifiers = llc_reject_ev_qfyrs_2,
  1914. .ev_actions = llc_reject_actions_2,
  1915. };
  1916. /* State transitions for LLC_CONN_EV_DATA_REQ event */
  1917. static const llc_conn_ev_qfyr_t llc_reject_ev_qfyrs_2_1[] = {
  1918. [0] = llc_conn_ev_qlfy_remote_busy_eq_1,
  1919. [1] = llc_conn_ev_qlfy_set_status_remote_busy,
  1920. [2] = NULL,
  1921. };
  1922. /* just one member, NULL, .bss zeroes it */
  1923. static const llc_conn_action_t llc_reject_actions_2_1[1];
  1924. static struct llc_conn_state_trans llc_reject_state_trans_2_1 = {
  1925. .ev = llc_conn_ev_data_req,
  1926. .next_state = LLC_CONN_STATE_REJ,
  1927. .ev_qualifiers = llc_reject_ev_qfyrs_2_1,
  1928. .ev_actions = llc_reject_actions_2_1,
  1929. };
  1930. /* State transitions for LLC_CONN_EV_LOCAL_BUSY_DETECTED event */
  1931. static const llc_conn_ev_qfyr_t llc_reject_ev_qfyrs_3[] = {
  1932. [0] = llc_conn_ev_qlfy_p_flag_eq_0,
  1933. [1] = NULL,
  1934. };
  1935. static const llc_conn_action_t llc_reject_actions_3[] = {
  1936. [0] = llc_conn_ac_send_rnr_xxx_x_set_0,
  1937. [1] = llc_conn_ac_set_data_flag_2,
  1938. [2] = NULL,
  1939. };
  1940. static struct llc_conn_state_trans llc_reject_state_trans_3 = {
  1941. .ev = llc_conn_ev_local_busy_detected,
  1942. .next_state = LLC_CONN_STATE_BUSY,
  1943. .ev_qualifiers = llc_reject_ev_qfyrs_3,
  1944. .ev_actions = llc_reject_actions_3,
  1945. };
  1946. /* State transitions for LLC_CONN_EV_LOCAL_BUSY_DETECTED event */
  1947. static const llc_conn_ev_qfyr_t llc_reject_ev_qfyrs_4[] = {
  1948. [0] = llc_conn_ev_qlfy_p_flag_eq_1,
  1949. [1] = NULL,
  1950. };
  1951. static const llc_conn_action_t llc_reject_actions_4[] = {
  1952. [0] = llc_conn_ac_send_rnr_xxx_x_set_0,
  1953. [1] = llc_conn_ac_set_data_flag_2,
  1954. [2] = NULL,
  1955. };
  1956. static struct llc_conn_state_trans llc_reject_state_trans_4 = {
  1957. .ev = llc_conn_ev_local_busy_detected,
  1958. .next_state = LLC_CONN_STATE_BUSY,
  1959. .ev_qualifiers = llc_reject_ev_qfyrs_4,
  1960. .ev_actions = llc_reject_actions_4,
  1961. };
  1962. /* State transitions for LLC_CONN_EV_RX_I_CMD_Pbit_SET_0_UNEXPD_Ns event */
  1963. static const llc_conn_action_t llc_reject_actions_5a[] = {
  1964. [0] = llc_conn_ac_upd_nr_received,
  1965. [1] = llc_conn_ac_upd_p_flag,
  1966. [2] = llc_conn_ac_clear_remote_busy_if_f_eq_1,
  1967. [3] = NULL,
  1968. };
  1969. static struct llc_conn_state_trans llc_reject_state_trans_5a = {
  1970. .ev = llc_conn_ev_rx_i_cmd_pbit_set_0_unexpd_ns,
  1971. .next_state = LLC_CONN_STATE_REJ,
  1972. .ev_qualifiers = NONE,
  1973. .ev_actions = llc_reject_actions_5a,
  1974. };
  1975. /* State transitions for LLC_CONN_EV_RX_I_RSP_Fbit_SET_0_UNEXPD_Ns event */
  1976. static const llc_conn_action_t llc_reject_actions_5b[] = {
  1977. [0] = llc_conn_ac_upd_nr_received,
  1978. [1] = llc_conn_ac_upd_p_flag,
  1979. [2] = llc_conn_ac_clear_remote_busy_if_f_eq_1,
  1980. [3] = NULL,
  1981. };
  1982. static struct llc_conn_state_trans llc_reject_state_trans_5b = {
  1983. .ev = llc_conn_ev_rx_i_rsp_fbit_set_0_unexpd_ns,
  1984. .next_state = LLC_CONN_STATE_REJ,
  1985. .ev_qualifiers = NONE,
  1986. .ev_actions = llc_reject_actions_5b,
  1987. };
  1988. /* State transitions for LLC_CONN_EV_RX_I_RSP_Fbit_SET_1_UNEXPD_Ns event */
  1989. static const llc_conn_ev_qfyr_t llc_reject_ev_qfyrs_5c[] = {
  1990. [0] = llc_conn_ev_qlfy_p_flag_eq_1,
  1991. [1] = NULL,
  1992. };
  1993. static const llc_conn_action_t llc_reject_actions_5c[] = {
  1994. [0] = llc_conn_ac_upd_nr_received,
  1995. [1] = llc_conn_ac_upd_p_flag,
  1996. [2] = llc_conn_ac_clear_remote_busy_if_f_eq_1,
  1997. [3] = NULL,
  1998. };
  1999. static struct llc_conn_state_trans llc_reject_state_trans_5c = {
  2000. .ev = llc_conn_ev_rx_i_rsp_fbit_set_1_unexpd_ns,
  2001. .next_state = LLC_CONN_STATE_REJ,
  2002. .ev_qualifiers = llc_reject_ev_qfyrs_5c,
  2003. .ev_actions = llc_reject_actions_5c,
  2004. };
  2005. /* State transitions for LLC_CONN_EV_RX_I_CMD_Pbit_SET_1_UNEXPD_Ns event */
  2006. static const llc_conn_action_t llc_reject_actions_6[] = {
  2007. [0] = llc_conn_ac_send_rr_rsp_f_set_1,
  2008. [1] = llc_conn_ac_upd_nr_received,
  2009. [2] = NULL,
  2010. };
  2011. static struct llc_conn_state_trans llc_reject_state_trans_6 = {
  2012. .ev = llc_conn_ev_rx_i_cmd_pbit_set_1_unexpd_ns,
  2013. .next_state = LLC_CONN_STATE_REJ,
  2014. .ev_qualifiers = NONE,
  2015. .ev_actions = llc_reject_actions_6,
  2016. };
  2017. /* State transitions for LLC_CONN_EV_RX_I_RSP_Fbit_SET_X event */
  2018. static const llc_conn_ev_qfyr_t llc_reject_ev_qfyrs_7a[] = {
  2019. [0] = llc_conn_ev_qlfy_p_flag_eq_f,
  2020. [1] = NULL,
  2021. };
  2022. static const llc_conn_action_t llc_reject_actions_7a[] = {
  2023. [0] = llc_conn_ac_inc_vr_by_1,
  2024. [1] = llc_conn_ac_data_ind,
  2025. [2] = llc_conn_ac_upd_p_flag,
  2026. [3] = llc_conn_ac_send_ack_xxx_x_set_0,
  2027. [4] = llc_conn_ac_upd_nr_received,
  2028. [5] = llc_conn_ac_clear_remote_busy_if_f_eq_1,
  2029. [6] = llc_conn_ac_stop_rej_timer,
  2030. [7] = NULL,
  2031. };
  2032. static struct llc_conn_state_trans llc_reject_state_trans_7a = {
  2033. .ev = llc_conn_ev_rx_i_rsp_fbit_set_x,
  2034. .next_state = LLC_CONN_STATE_NORMAL,
  2035. .ev_qualifiers = llc_reject_ev_qfyrs_7a,
  2036. .ev_actions = llc_reject_actions_7a,
  2037. };
  2038. /* State transitions for LLC_CONN_EV_RX_I_CMD_Pbit_SET_0 event */
  2039. static const llc_conn_ev_qfyr_t llc_reject_ev_qfyrs_7b[] = {
  2040. [0] = llc_conn_ev_qlfy_p_flag_eq_0,
  2041. [1] = NULL,
  2042. };
  2043. static const llc_conn_action_t llc_reject_actions_7b[] = {
  2044. [0] = llc_conn_ac_inc_vr_by_1,
  2045. [1] = llc_conn_ac_data_ind,
  2046. [2] = llc_conn_ac_upd_p_flag,
  2047. [3] = llc_conn_ac_send_ack_xxx_x_set_0,
  2048. [4] = llc_conn_ac_upd_nr_received,
  2049. [5] = llc_conn_ac_clear_remote_busy_if_f_eq_1,
  2050. [6] = llc_conn_ac_stop_rej_timer,
  2051. [7] = NULL,
  2052. };
  2053. static struct llc_conn_state_trans llc_reject_state_trans_7b = {
  2054. .ev = llc_conn_ev_rx_i_cmd_pbit_set_0,
  2055. .next_state = LLC_CONN_STATE_NORMAL,
  2056. .ev_qualifiers = llc_reject_ev_qfyrs_7b,
  2057. .ev_actions = llc_reject_actions_7b,
  2058. };
  2059. /* State transitions for LLC_CONN_EV_RX_I_RSP_Fbit_SET_0 event */
  2060. static const llc_conn_ev_qfyr_t llc_reject_ev_qfyrs_8a[] = {
  2061. [0] = llc_conn_ev_qlfy_p_flag_eq_1,
  2062. [1] = NULL,
  2063. };
  2064. static const llc_conn_action_t llc_reject_actions_8a[] = {
  2065. [0] = llc_conn_ac_inc_vr_by_1,
  2066. [1] = llc_conn_ac_data_ind,
  2067. [2] = llc_conn_ac_send_ack_xxx_x_set_0,
  2068. [3] = llc_conn_ac_upd_nr_received,
  2069. [4] = llc_conn_ac_stop_rej_timer,
  2070. [5] = NULL,
  2071. };
  2072. static struct llc_conn_state_trans llc_reject_state_trans_8a = {
  2073. .ev = llc_conn_ev_rx_i_rsp_fbit_set_0,
  2074. .next_state = LLC_CONN_STATE_NORMAL,
  2075. .ev_qualifiers = llc_reject_ev_qfyrs_8a,
  2076. .ev_actions = llc_reject_actions_8a,
  2077. };
  2078. /* State transitions for LLC_CONN_EV_RX_I_CMD_Pbit_SET_0 event */
  2079. static const llc_conn_ev_qfyr_t llc_reject_ev_qfyrs_8b[] = {
  2080. [0] = llc_conn_ev_qlfy_p_flag_eq_1,
  2081. [1] = NULL,
  2082. };
  2083. static const llc_conn_action_t llc_reject_actions_8b[] = {
  2084. [0] = llc_conn_ac_inc_vr_by_1,
  2085. [1] = llc_conn_ac_data_ind,
  2086. [2] = llc_conn_ac_send_ack_xxx_x_set_0,
  2087. [3] = llc_conn_ac_upd_nr_received,
  2088. [4] = llc_conn_ac_stop_rej_timer,
  2089. [5] = NULL,
  2090. };
  2091. static struct llc_conn_state_trans llc_reject_state_trans_8b = {
  2092. .ev = llc_conn_ev_rx_i_cmd_pbit_set_0,
  2093. .next_state = LLC_CONN_STATE_NORMAL,
  2094. .ev_qualifiers = llc_reject_ev_qfyrs_8b,
  2095. .ev_actions = llc_reject_actions_8b,
  2096. };
  2097. /* State transitions for LLC_CONN_EV_RX_I_CMD_Pbit_SET_1 event */
  2098. static const llc_conn_action_t llc_reject_actions_9[] = {
  2099. [0] = llc_conn_ac_inc_vr_by_1,
  2100. [1] = llc_conn_ac_data_ind,
  2101. [2] = llc_conn_ac_send_ack_rsp_f_set_1,
  2102. [3] = llc_conn_ac_upd_nr_received,
  2103. [4] = llc_conn_ac_stop_rej_timer,
  2104. [5] = NULL,
  2105. };
  2106. static struct llc_conn_state_trans llc_reject_state_trans_9 = {
  2107. .ev = llc_conn_ev_rx_i_cmd_pbit_set_1,
  2108. .next_state = LLC_CONN_STATE_NORMAL,
  2109. .ev_qualifiers = NONE,
  2110. .ev_actions = llc_reject_actions_9,
  2111. };
  2112. /* State transitions for LLC_CONN_EV_RX_RR_CMD_Pbit_SET_0 event */
  2113. static const llc_conn_action_t llc_reject_actions_10a[] = {
  2114. [0] = llc_conn_ac_upd_p_flag,
  2115. [1] = llc_conn_ac_upd_nr_received,
  2116. [2] = llc_conn_ac_clear_remote_busy,
  2117. [3] = NULL,
  2118. };
  2119. static struct llc_conn_state_trans llc_reject_state_trans_10a = {
  2120. .ev = llc_conn_ev_rx_rr_cmd_pbit_set_0,
  2121. .next_state = LLC_CONN_STATE_REJ,
  2122. .ev_qualifiers = NONE,
  2123. .ev_actions = llc_reject_actions_10a,
  2124. };
  2125. /* State transitions for LLC_CONN_EV_RX_RR_RSP_Fbit_SET_0 event */
  2126. static const llc_conn_action_t llc_reject_actions_10b[] = {
  2127. [0] = llc_conn_ac_upd_p_flag,
  2128. [1] = llc_conn_ac_upd_nr_received,
  2129. [2] = llc_conn_ac_clear_remote_busy,
  2130. [3] = NULL,
  2131. };
  2132. static struct llc_conn_state_trans llc_reject_state_trans_10b = {
  2133. .ev = llc_conn_ev_rx_rr_rsp_fbit_set_0,
  2134. .next_state = LLC_CONN_STATE_REJ,
  2135. .ev_qualifiers = NONE,
  2136. .ev_actions = llc_reject_actions_10b,
  2137. };
  2138. /* State transitions for LLC_CONN_EV_RX_RR_RSP_Fbit_SET_1 event */
  2139. static const llc_conn_ev_qfyr_t llc_reject_ev_qfyrs_10c[] = {
  2140. [0] = llc_conn_ev_qlfy_p_flag_eq_1,
  2141. [1] = NULL,
  2142. };
  2143. static const llc_conn_action_t llc_reject_actions_10c[] = {
  2144. [0] = llc_conn_ac_upd_p_flag,
  2145. [1] = llc_conn_ac_upd_nr_received,
  2146. [2] = llc_conn_ac_clear_remote_busy,
  2147. [3] = NULL,
  2148. };
  2149. static struct llc_conn_state_trans llc_reject_state_trans_10c = {
  2150. .ev = llc_conn_ev_rx_rr_rsp_fbit_set_1,
  2151. .next_state = LLC_CONN_STATE_REJ,
  2152. .ev_qualifiers = llc_reject_ev_qfyrs_10c,
  2153. .ev_actions = llc_reject_actions_10c,
  2154. };
  2155. /* State transitions for LLC_CONN_EV_RX_RR_CMD_Pbit_SET_1 event */
  2156. static const llc_conn_action_t llc_reject_actions_11[] = {
  2157. [0] = llc_conn_ac_send_ack_rsp_f_set_1,
  2158. [1] = llc_conn_ac_upd_nr_received,
  2159. [2] = llc_conn_ac_clear_remote_busy,
  2160. [3] = NULL,
  2161. };
  2162. static struct llc_conn_state_trans llc_reject_state_trans_11 = {
  2163. .ev = llc_conn_ev_rx_rr_cmd_pbit_set_1,
  2164. .next_state = LLC_CONN_STATE_REJ,
  2165. .ev_qualifiers = NONE,
  2166. .ev_actions = llc_reject_actions_11,
  2167. };
  2168. /* State transitions for LLC_CONN_EV_RX_RNR_CMD_Pbit_SET_0 event */
  2169. static const llc_conn_action_t llc_reject_actions_12a[] = {
  2170. [0] = llc_conn_ac_upd_p_flag,
  2171. [1] = llc_conn_ac_upd_nr_received,
  2172. [2] = llc_conn_ac_set_remote_busy,
  2173. [3] = NULL,
  2174. };
  2175. static struct llc_conn_state_trans llc_reject_state_trans_12a = {
  2176. .ev = llc_conn_ev_rx_rnr_cmd_pbit_set_0,
  2177. .next_state = LLC_CONN_STATE_REJ,
  2178. .ev_qualifiers = NONE,
  2179. .ev_actions = llc_reject_actions_12a,
  2180. };
  2181. /* State transitions for LLC_CONN_EV_RX_RNR_RSP_Fbit_SET_0 event */
  2182. static const llc_conn_action_t llc_reject_actions_12b[] = {
  2183. [0] = llc_conn_ac_upd_p_flag,
  2184. [1] = llc_conn_ac_upd_nr_received,
  2185. [2] = llc_conn_ac_set_remote_busy,
  2186. [3] = NULL,
  2187. };
  2188. static struct llc_conn_state_trans llc_reject_state_trans_12b = {
  2189. .ev = llc_conn_ev_rx_rnr_rsp_fbit_set_0,
  2190. .next_state = LLC_CONN_STATE_REJ,
  2191. .ev_qualifiers = NONE,
  2192. .ev_actions = llc_reject_actions_12b,
  2193. };
  2194. /* State transitions for LLC_CONN_EV_RX_RNR_RSP_Fbit_SET_1 event */
  2195. static const llc_conn_ev_qfyr_t llc_reject_ev_qfyrs_12c[] = {
  2196. [0] = llc_conn_ev_qlfy_p_flag_eq_1,
  2197. [1] = NULL,
  2198. };
  2199. static const llc_conn_action_t llc_reject_actions_12c[] = {
  2200. [0] = llc_conn_ac_upd_p_flag,
  2201. [1] = llc_conn_ac_upd_nr_received,
  2202. [2] = llc_conn_ac_set_remote_busy,
  2203. [3] = NULL,
  2204. };
  2205. static struct llc_conn_state_trans llc_reject_state_trans_12c = {
  2206. .ev = llc_conn_ev_rx_rnr_rsp_fbit_set_1,
  2207. .next_state = LLC_CONN_STATE_REJ,
  2208. .ev_qualifiers = llc_reject_ev_qfyrs_12c,
  2209. .ev_actions = llc_reject_actions_12c,
  2210. };
  2211. /* State transitions for LLC_CONN_EV_RX_RNR_CMD_Pbit_SET_1 event */
  2212. static const llc_conn_action_t llc_reject_actions_13[] = {
  2213. [0] = llc_conn_ac_send_rr_rsp_f_set_1,
  2214. [1] = llc_conn_ac_upd_nr_received,
  2215. [2] = llc_conn_ac_set_remote_busy,
  2216. [3] = NULL,
  2217. };
  2218. static struct llc_conn_state_trans llc_reject_state_trans_13 = {
  2219. .ev = llc_conn_ev_rx_rnr_cmd_pbit_set_1,
  2220. .next_state = LLC_CONN_STATE_REJ,
  2221. .ev_qualifiers = NONE,
  2222. .ev_actions = llc_reject_actions_13,
  2223. };
  2224. /* State transitions for LLC_CONN_EV_RX_REJ_CMD_Pbit_SET_0 event */
  2225. static const llc_conn_ev_qfyr_t llc_reject_ev_qfyrs_14a[] = {
  2226. [0] = llc_conn_ev_qlfy_p_flag_eq_0,
  2227. [1] = NULL,
  2228. };
  2229. static const llc_conn_action_t llc_reject_actions_14a[] = {
  2230. [0] = llc_conn_ac_set_vs_nr,
  2231. [1] = llc_conn_ac_upd_nr_received,
  2232. [2] = llc_conn_ac_upd_p_flag,
  2233. [3] = llc_conn_ac_resend_i_xxx_x_set_0,
  2234. [4] = llc_conn_ac_clear_remote_busy,
  2235. [5] = NULL,
  2236. };
  2237. static struct llc_conn_state_trans llc_reject_state_trans_14a = {
  2238. .ev = llc_conn_ev_rx_rej_cmd_pbit_set_0,
  2239. .next_state = LLC_CONN_STATE_REJ,
  2240. .ev_qualifiers = llc_reject_ev_qfyrs_14a,
  2241. .ev_actions = llc_reject_actions_14a,
  2242. };
  2243. /* State transitions for LLC_CONN_EV_RX_REJ_RSP_Fbit_SET_X event */
  2244. static const llc_conn_ev_qfyr_t llc_reject_ev_qfyrs_14b[] = {
  2245. [0] = llc_conn_ev_qlfy_p_flag_eq_f,
  2246. [1] = NULL,
  2247. };
  2248. static const llc_conn_action_t llc_reject_actions_14b[] = {
  2249. [0] = llc_conn_ac_set_vs_nr,
  2250. [1] = llc_conn_ac_upd_nr_received,
  2251. [2] = llc_conn_ac_upd_p_flag,
  2252. [3] = llc_conn_ac_resend_i_xxx_x_set_0,
  2253. [4] = llc_conn_ac_clear_remote_busy,
  2254. [5] = NULL,
  2255. };
  2256. static struct llc_conn_state_trans llc_reject_state_trans_14b = {
  2257. .ev = llc_conn_ev_rx_rej_rsp_fbit_set_x,
  2258. .next_state = LLC_CONN_STATE_REJ,
  2259. .ev_qualifiers = llc_reject_ev_qfyrs_14b,
  2260. .ev_actions = llc_reject_actions_14b,
  2261. };
  2262. /* State transitions for LLC_CONN_EV_RX_REJ_CMD_Pbit_SET_0 event */
  2263. static const llc_conn_ev_qfyr_t llc_reject_ev_qfyrs_15a[] = {
  2264. [0] = llc_conn_ev_qlfy_p_flag_eq_1,
  2265. [1] = NULL,
  2266. };
  2267. static const llc_conn_action_t llc_reject_actions_15a[] = {
  2268. [0] = llc_conn_ac_set_vs_nr,
  2269. [1] = llc_conn_ac_upd_nr_received,
  2270. [2] = llc_conn_ac_resend_i_xxx_x_set_0,
  2271. [3] = llc_conn_ac_clear_remote_busy,
  2272. [4] = NULL,
  2273. };
  2274. static struct llc_conn_state_trans llc_reject_state_trans_15a = {
  2275. .ev = llc_conn_ev_rx_rej_cmd_pbit_set_0,
  2276. .next_state = LLC_CONN_STATE_REJ,
  2277. .ev_qualifiers = llc_reject_ev_qfyrs_15a,
  2278. .ev_actions = llc_reject_actions_15a,
  2279. };
  2280. /* State transitions for LLC_CONN_EV_RX_REJ_RSP_Fbit_SET_0 event */
  2281. static const llc_conn_ev_qfyr_t llc_reject_ev_qfyrs_15b[] = {
  2282. [0] = llc_conn_ev_qlfy_p_flag_eq_1,
  2283. [1] = NULL,
  2284. };
  2285. static const llc_conn_action_t llc_reject_actions_15b[] = {
  2286. [0] = llc_conn_ac_set_vs_nr,
  2287. [1] = llc_conn_ac_upd_nr_received,
  2288. [2] = llc_conn_ac_resend_i_xxx_x_set_0,
  2289. [3] = llc_conn_ac_clear_remote_busy,
  2290. [4] = NULL,
  2291. };
  2292. static struct llc_conn_state_trans llc_reject_state_trans_15b = {
  2293. .ev = llc_conn_ev_rx_rej_rsp_fbit_set_0,
  2294. .next_state = LLC_CONN_STATE_REJ,
  2295. .ev_qualifiers = llc_reject_ev_qfyrs_15b,
  2296. .ev_actions = llc_reject_actions_15b,
  2297. };
  2298. /* State transitions for LLC_CONN_EV_RX_REJ_CMD_Pbit_SET_1 event */
  2299. static const llc_conn_action_t llc_reject_actions_16[] = {
  2300. [0] = llc_conn_ac_set_vs_nr,
  2301. [1] = llc_conn_ac_upd_nr_received,
  2302. [2] = llc_conn_ac_resend_i_rsp_f_set_1,
  2303. [3] = llc_conn_ac_clear_remote_busy,
  2304. [4] = NULL,
  2305. };
  2306. static struct llc_conn_state_trans llc_reject_state_trans_16 = {
  2307. .ev = llc_conn_ev_rx_rej_cmd_pbit_set_1,
  2308. .next_state = LLC_CONN_STATE_REJ,
  2309. .ev_qualifiers = NONE,
  2310. .ev_actions = llc_reject_actions_16,
  2311. };
  2312. /* State transitions for LLC_CONN_EV_INIT_P_F_CYCLE event */
  2313. static const llc_conn_ev_qfyr_t llc_reject_ev_qfyrs_17[] = {
  2314. [0] = llc_conn_ev_qlfy_p_flag_eq_0,
  2315. [1] = NULL,
  2316. };
  2317. static const llc_conn_action_t llc_reject_actions_17[] = {
  2318. [0] = llc_conn_ac_send_rr_cmd_p_set_1,
  2319. [1] = llc_conn_ac_start_p_timer,
  2320. [2] = NULL,
  2321. };
  2322. static struct llc_conn_state_trans llc_reject_state_trans_17 = {
  2323. .ev = llc_conn_ev_init_p_f_cycle,
  2324. .next_state = LLC_CONN_STATE_REJ,
  2325. .ev_qualifiers = llc_reject_ev_qfyrs_17,
  2326. .ev_actions = llc_reject_actions_17,
  2327. };
  2328. /* State transitions for LLC_CONN_EV_REJ_TMR_EXP event */
  2329. static const llc_conn_ev_qfyr_t llc_reject_ev_qfyrs_18[] = {
  2330. [0] = llc_conn_ev_qlfy_p_flag_eq_0,
  2331. [1] = llc_conn_ev_qlfy_retry_cnt_lt_n2,
  2332. [2] = NULL,
  2333. };
  2334. static const llc_conn_action_t llc_reject_actions_18[] = {
  2335. [0] = llc_conn_ac_send_rej_cmd_p_set_1,
  2336. [1] = llc_conn_ac_start_p_timer,
  2337. [2] = llc_conn_ac_start_rej_timer,
  2338. [3] = llc_conn_ac_inc_retry_cnt_by_1,
  2339. [4] = NULL,
  2340. };
  2341. static struct llc_conn_state_trans llc_reject_state_trans_18 = {
  2342. .ev = llc_conn_ev_rej_tmr_exp,
  2343. .next_state = LLC_CONN_STATE_REJ,
  2344. .ev_qualifiers = llc_reject_ev_qfyrs_18,
  2345. .ev_actions = llc_reject_actions_18,
  2346. };
  2347. /* State transitions for LLC_CONN_EV_P_TMR_EXP event */
  2348. static const llc_conn_ev_qfyr_t llc_reject_ev_qfyrs_19[] = {
  2349. [0] = llc_conn_ev_qlfy_retry_cnt_lt_n2,
  2350. [1] = NULL,
  2351. };
  2352. static const llc_conn_action_t llc_reject_actions_19[] = {
  2353. [0] = llc_conn_ac_send_rr_cmd_p_set_1,
  2354. [1] = llc_conn_ac_start_p_timer,
  2355. [2] = llc_conn_ac_start_rej_timer,
  2356. [3] = llc_conn_ac_inc_retry_cnt_by_1,
  2357. [4] = llc_conn_ac_rst_vs,
  2358. [5] = NULL,
  2359. };
  2360. static struct llc_conn_state_trans llc_reject_state_trans_19 = {
  2361. .ev = llc_conn_ev_p_tmr_exp,
  2362. .next_state = LLC_CONN_STATE_AWAIT_REJ,
  2363. .ev_qualifiers = llc_reject_ev_qfyrs_19,
  2364. .ev_actions = llc_reject_actions_19,
  2365. };
  2366. /* State transitions for LLC_CONN_EV_ACK_TMR_EXP event */
  2367. static const llc_conn_ev_qfyr_t llc_reject_ev_qfyrs_20a[] = {
  2368. [0] = llc_conn_ev_qlfy_p_flag_eq_0,
  2369. [1] = llc_conn_ev_qlfy_retry_cnt_lt_n2,
  2370. [2] = NULL,
  2371. };
  2372. static const llc_conn_action_t llc_reject_actions_20a[] = {
  2373. [0] = llc_conn_ac_send_rr_cmd_p_set_1,
  2374. [1] = llc_conn_ac_start_p_timer,
  2375. [2] = llc_conn_ac_start_rej_timer,
  2376. [3] = llc_conn_ac_inc_retry_cnt_by_1,
  2377. [4] = llc_conn_ac_rst_vs,
  2378. [5] = NULL,
  2379. };
  2380. static struct llc_conn_state_trans llc_reject_state_trans_20a = {
  2381. .ev = llc_conn_ev_ack_tmr_exp,
  2382. .next_state = LLC_CONN_STATE_AWAIT_REJ,
  2383. .ev_qualifiers = llc_reject_ev_qfyrs_20a,
  2384. .ev_actions = llc_reject_actions_20a,
  2385. };
  2386. /* State transitions for LLC_CONN_EV_BUSY_TMR_EXP event */
  2387. static const llc_conn_ev_qfyr_t llc_reject_ev_qfyrs_20b[] = {
  2388. [0] = llc_conn_ev_qlfy_p_flag_eq_0,
  2389. [1] = llc_conn_ev_qlfy_retry_cnt_lt_n2,
  2390. [2] = NULL,
  2391. };
  2392. static const llc_conn_action_t llc_reject_actions_20b[] = {
  2393. [0] = llc_conn_ac_send_rr_cmd_p_set_1,
  2394. [1] = llc_conn_ac_start_p_timer,
  2395. [2] = llc_conn_ac_start_rej_timer,
  2396. [3] = llc_conn_ac_inc_retry_cnt_by_1,
  2397. [4] = llc_conn_ac_rst_vs,
  2398. [5] = NULL,
  2399. };
  2400. static struct llc_conn_state_trans llc_reject_state_trans_20b = {
  2401. .ev = llc_conn_ev_busy_tmr_exp,
  2402. .next_state = LLC_CONN_STATE_AWAIT_REJ,
  2403. .ev_qualifiers = llc_reject_ev_qfyrs_20b,
  2404. .ev_actions = llc_reject_actions_20b,
  2405. };
  2406. /*
  2407. * Array of pointers;
  2408. * one to each transition
  2409. */
  2410. static struct llc_conn_state_trans *llc_reject_state_transitions[] = {
  2411. [0] = &llc_common_state_trans_1, /* Request */
  2412. [1] = &llc_common_state_trans_2,
  2413. [2] = &llc_common_state_trans_end,
  2414. [3] = &llc_reject_state_trans_1,
  2415. [4] = &llc_reject_state_trans_2,
  2416. [5] = &llc_reject_state_trans_2_1,
  2417. [6] = &llc_reject_state_trans_3, /* Local busy */
  2418. [7] = &llc_reject_state_trans_4,
  2419. [8] = &llc_common_state_trans_end,
  2420. [9] = &llc_reject_state_trans_17, /* Initiate PF cycle */
  2421. [10] = &llc_common_state_trans_end,
  2422. [11] = &llc_common_state_trans_11a, /* Timer */
  2423. [12] = &llc_common_state_trans_11b,
  2424. [13] = &llc_common_state_trans_11c,
  2425. [14] = &llc_common_state_trans_11d,
  2426. [15] = &llc_reject_state_trans_18,
  2427. [16] = &llc_reject_state_trans_19,
  2428. [17] = &llc_reject_state_trans_20a,
  2429. [18] = &llc_reject_state_trans_20b,
  2430. [19] = &llc_common_state_trans_end,
  2431. [20] = &llc_common_state_trans_3, /* Receive frame */
  2432. [21] = &llc_common_state_trans_4,
  2433. [22] = &llc_common_state_trans_5,
  2434. [23] = &llc_common_state_trans_6,
  2435. [24] = &llc_common_state_trans_7a,
  2436. [25] = &llc_common_state_trans_7b,
  2437. [26] = &llc_common_state_trans_8a,
  2438. [27] = &llc_common_state_trans_8b,
  2439. [28] = &llc_common_state_trans_8c,
  2440. [29] = &llc_common_state_trans_9,
  2441. /* [30] = &llc_common_state_trans_10, */
  2442. [30] = &llc_reject_state_trans_5a,
  2443. [31] = &llc_reject_state_trans_5b,
  2444. [32] = &llc_reject_state_trans_5c,
  2445. [33] = &llc_reject_state_trans_6,
  2446. [34] = &llc_reject_state_trans_7a,
  2447. [35] = &llc_reject_state_trans_7b,
  2448. [36] = &llc_reject_state_trans_8a,
  2449. [37] = &llc_reject_state_trans_8b,
  2450. [38] = &llc_reject_state_trans_9,
  2451. [39] = &llc_reject_state_trans_10a,
  2452. [40] = &llc_reject_state_trans_10b,
  2453. [41] = &llc_reject_state_trans_10c,
  2454. [42] = &llc_reject_state_trans_11,
  2455. [43] = &llc_reject_state_trans_12a,
  2456. [44] = &llc_reject_state_trans_12b,
  2457. [45] = &llc_reject_state_trans_12c,
  2458. [46] = &llc_reject_state_trans_13,
  2459. [47] = &llc_reject_state_trans_14a,
  2460. [48] = &llc_reject_state_trans_14b,
  2461. [49] = &llc_reject_state_trans_15a,
  2462. [50] = &llc_reject_state_trans_15b,
  2463. [51] = &llc_reject_state_trans_16,
  2464. [52] = &llc_common_state_trans_end,
  2465. };
  2466. /* LLC_CONN_STATE_AWAIT transitions */
  2467. /* State transitions for LLC_CONN_EV_DATA_REQ event */
  2468. static const llc_conn_ev_qfyr_t llc_await_ev_qfyrs_1_0[] = {
  2469. [0] = llc_conn_ev_qlfy_set_status_refuse,
  2470. [1] = NULL,
  2471. };
  2472. /* just one member, NULL, .bss zeroes it */
  2473. static const llc_conn_action_t llc_await_actions_1_0[1];
  2474. static struct llc_conn_state_trans llc_await_state_trans_1_0 = {
  2475. .ev = llc_conn_ev_data_req,
  2476. .next_state = LLC_CONN_STATE_AWAIT,
  2477. .ev_qualifiers = llc_await_ev_qfyrs_1_0,
  2478. .ev_actions = llc_await_actions_1_0,
  2479. };
  2480. /* State transitions for LLC_CONN_EV_LOCAL_BUSY_DETECTED event */
  2481. static const llc_conn_action_t llc_await_actions_1[] = {
  2482. [0] = llc_conn_ac_send_rnr_xxx_x_set_0,
  2483. [1] = llc_conn_ac_set_data_flag_0,
  2484. [2] = NULL,
  2485. };
  2486. static struct llc_conn_state_trans llc_await_state_trans_1 = {
  2487. .ev = llc_conn_ev_local_busy_detected,
  2488. .next_state = LLC_CONN_STATE_AWAIT_BUSY,
  2489. .ev_qualifiers = NONE,
  2490. .ev_actions = llc_await_actions_1,
  2491. };
  2492. /* State transitions for LLC_CONN_EV_RX_I_RSP_Fbit_SET_1_UNEXPD_Ns event */
  2493. static const llc_conn_action_t llc_await_actions_2[] = {
  2494. [0] = llc_conn_ac_send_rej_xxx_x_set_0,
  2495. [1] = llc_conn_ac_upd_nr_received,
  2496. [2] = llc_conn_ac_upd_vs,
  2497. [3] = llc_conn_ac_stop_p_timer,
  2498. [4] = llc_conn_ac_resend_i_xxx_x_set_0,
  2499. [5] = llc_conn_ac_start_rej_timer,
  2500. [6] = llc_conn_ac_clear_remote_busy,
  2501. [7] = NULL,
  2502. };
  2503. static struct llc_conn_state_trans llc_await_state_trans_2 = {
  2504. .ev = llc_conn_ev_rx_i_rsp_fbit_set_1_unexpd_ns,
  2505. .next_state = LLC_CONN_STATE_REJ,
  2506. .ev_qualifiers = NONE,
  2507. .ev_actions = llc_await_actions_2,
  2508. };
  2509. /* State transitions for LLC_CONN_EV_RX_I_CMD_Pbit_SET_0_UNEXPD_Ns event */
  2510. static const llc_conn_action_t llc_await_actions_3a[] = {
  2511. [0] = llc_conn_ac_send_rej_xxx_x_set_0,
  2512. [1] = llc_conn_ac_upd_nr_received,
  2513. [2] = llc_conn_ac_upd_vs,
  2514. [3] = llc_conn_ac_start_rej_timer,
  2515. [4] = NULL,
  2516. };
  2517. static struct llc_conn_state_trans llc_await_state_trans_3a = {
  2518. .ev = llc_conn_ev_rx_i_cmd_pbit_set_0_unexpd_ns,
  2519. .next_state = LLC_CONN_STATE_AWAIT_REJ,
  2520. .ev_qualifiers = NONE,
  2521. .ev_actions = llc_await_actions_3a,
  2522. };
  2523. /* State transitions for LLC_CONN_EV_RX_I_RSP_Fbit_SET_0_UNEXPD_Ns event */
  2524. static const llc_conn_action_t llc_await_actions_3b[] = {
  2525. [0] = llc_conn_ac_send_rej_xxx_x_set_0,
  2526. [1] = llc_conn_ac_upd_nr_received,
  2527. [2] = llc_conn_ac_upd_vs,
  2528. [3] = llc_conn_ac_start_rej_timer,
  2529. [4] = NULL,
  2530. };
  2531. static struct llc_conn_state_trans llc_await_state_trans_3b = {
  2532. .ev = llc_conn_ev_rx_i_rsp_fbit_set_0_unexpd_ns,
  2533. .next_state = LLC_CONN_STATE_AWAIT_REJ,
  2534. .ev_qualifiers = NONE,
  2535. .ev_actions = llc_await_actions_3b,
  2536. };
  2537. /* State transitions for LLC_CONN_EV_RX_I_CMD_Pbit_SET_1_UNEXPD_Ns event */
  2538. static const llc_conn_action_t llc_await_actions_4[] = {
  2539. [0] = llc_conn_ac_send_rej_rsp_f_set_1,
  2540. [1] = llc_conn_ac_upd_nr_received,
  2541. [2] = llc_conn_ac_upd_vs,
  2542. [3] = llc_conn_ac_start_rej_timer,
  2543. [4] = llc_conn_ac_start_p_timer,
  2544. [5] = NULL,
  2545. };
  2546. static struct llc_conn_state_trans llc_await_state_trans_4 = {
  2547. .ev = llc_conn_ev_rx_i_cmd_pbit_set_1_unexpd_ns,
  2548. .next_state = LLC_CONN_STATE_AWAIT_REJ,
  2549. .ev_qualifiers = NONE,
  2550. .ev_actions = llc_await_actions_4,
  2551. };
  2552. /* State transitions for LLC_CONN_EV_RX_I_RSP_Fbit_SET_1 event */
  2553. static const llc_conn_action_t llc_await_actions_5[] = {
  2554. [0] = llc_conn_ac_inc_vr_by_1,
  2555. [1] = llc_conn_ac_data_ind,
  2556. [2] = llc_conn_ac_stop_p_timer,
  2557. [3] = llc_conn_ac_upd_nr_received,
  2558. [4] = llc_conn_ac_upd_vs,
  2559. [5] = llc_conn_ac_resend_i_xxx_x_set_0_or_send_rr,
  2560. [6] = llc_conn_ac_clear_remote_busy,
  2561. [7] = NULL,
  2562. };
  2563. static struct llc_conn_state_trans llc_await_state_trans_5 = {
  2564. .ev = llc_conn_ev_rx_i_rsp_fbit_set_1,
  2565. .next_state = LLC_CONN_STATE_NORMAL,
  2566. .ev_qualifiers = NONE,
  2567. .ev_actions = llc_await_actions_5,
  2568. };
  2569. /* State transitions for LLC_CONN_EV_RX_I_RSP_Fbit_SET_0 event */
  2570. static const llc_conn_action_t llc_await_actions_6a[] = {
  2571. [0] = llc_conn_ac_inc_vr_by_1,
  2572. [1] = llc_conn_ac_data_ind,
  2573. [2] = llc_conn_ac_send_rr_xxx_x_set_0,
  2574. [3] = llc_conn_ac_upd_nr_received,
  2575. [4] = llc_conn_ac_upd_vs,
  2576. [5] = NULL,
  2577. };
  2578. static struct llc_conn_state_trans llc_await_state_trans_6a = {
  2579. .ev = llc_conn_ev_rx_i_rsp_fbit_set_0,
  2580. .next_state = LLC_CONN_STATE_AWAIT,
  2581. .ev_qualifiers = NONE,
  2582. .ev_actions = llc_await_actions_6a,
  2583. };
  2584. /* State transitions for LLC_CONN_EV_RX_I_CMD_Pbit_SET_0 event */
  2585. static const llc_conn_action_t llc_await_actions_6b[] = {
  2586. [0] = llc_conn_ac_inc_vr_by_1,
  2587. [1] = llc_conn_ac_data_ind,
  2588. [2] = llc_conn_ac_send_rr_xxx_x_set_0,
  2589. [3] = llc_conn_ac_upd_nr_received,
  2590. [4] = llc_conn_ac_upd_vs,
  2591. [5] = NULL,
  2592. };
  2593. static struct llc_conn_state_trans llc_await_state_trans_6b = {
  2594. .ev = llc_conn_ev_rx_i_cmd_pbit_set_0,
  2595. .next_state = LLC_CONN_STATE_AWAIT,
  2596. .ev_qualifiers = NONE,
  2597. .ev_actions = llc_await_actions_6b,
  2598. };
  2599. /* State transitions for LLC_CONN_EV_RX_I_CMD_Pbit_SET_1 event */
  2600. static const llc_conn_action_t llc_await_actions_7[] = {
  2601. [0] = llc_conn_ac_inc_vr_by_1,
  2602. [1] = llc_conn_ac_data_ind,
  2603. [2] = llc_conn_ac_send_rr_rsp_f_set_1,
  2604. [3] = llc_conn_ac_upd_nr_received,
  2605. [4] = llc_conn_ac_upd_vs,
  2606. [5] = NULL,
  2607. };
  2608. static struct llc_conn_state_trans llc_await_state_trans_7 = {
  2609. .ev = llc_conn_ev_rx_i_cmd_pbit_set_1,
  2610. .next_state = LLC_CONN_STATE_AWAIT,
  2611. .ev_qualifiers = NONE,
  2612. .ev_actions = llc_await_actions_7,
  2613. };
  2614. /* State transitions for LLC_CONN_EV_RX_RR_RSP_Fbit_SET_1 event */
  2615. static const llc_conn_action_t llc_await_actions_8a[] = {
  2616. [0] = llc_conn_ac_upd_nr_received,
  2617. [1] = llc_conn_ac_upd_vs,
  2618. [2] = llc_conn_ac_stop_p_timer,
  2619. [3] = llc_conn_ac_resend_i_xxx_x_set_0,
  2620. [4] = llc_conn_ac_clear_remote_busy,
  2621. [5] = NULL,
  2622. };
  2623. static struct llc_conn_state_trans llc_await_state_trans_8a = {
  2624. .ev = llc_conn_ev_rx_rr_rsp_fbit_set_1,
  2625. .next_state = LLC_CONN_STATE_NORMAL,
  2626. .ev_qualifiers = NONE,
  2627. .ev_actions = llc_await_actions_8a,
  2628. };
  2629. /* State transitions for LLC_CONN_EV_RX_REJ_RSP_Fbit_SET_1 event */
  2630. static const llc_conn_action_t llc_await_actions_8b[] = {
  2631. [0] = llc_conn_ac_upd_nr_received,
  2632. [1] = llc_conn_ac_upd_vs,
  2633. [2] = llc_conn_ac_stop_p_timer,
  2634. [3] = llc_conn_ac_resend_i_xxx_x_set_0,
  2635. [4] = llc_conn_ac_clear_remote_busy,
  2636. [5] = NULL,
  2637. };
  2638. static struct llc_conn_state_trans llc_await_state_trans_8b = {
  2639. .ev = llc_conn_ev_rx_rej_rsp_fbit_set_1,
  2640. .next_state = LLC_CONN_STATE_NORMAL,
  2641. .ev_qualifiers = NONE,
  2642. .ev_actions = llc_await_actions_8b,
  2643. };
  2644. /* State transitions for LLC_CONN_EV_RX_RR_CMD_Pbit_SET_0 event */
  2645. static const llc_conn_action_t llc_await_actions_9a[] = {
  2646. [0] = llc_conn_ac_upd_nr_received,
  2647. [1] = llc_conn_ac_upd_vs,
  2648. [2] = llc_conn_ac_clear_remote_busy,
  2649. [3] = NULL,
  2650. };
  2651. static struct llc_conn_state_trans llc_await_state_trans_9a = {
  2652. .ev = llc_conn_ev_rx_rr_cmd_pbit_set_0,
  2653. .next_state = LLC_CONN_STATE_AWAIT,
  2654. .ev_qualifiers = NONE,
  2655. .ev_actions = llc_await_actions_9a,
  2656. };
  2657. /* State transitions for LLC_CONN_EV_RX_RR_RSP_Fbit_SET_0 event */
  2658. static const llc_conn_action_t llc_await_actions_9b[] = {
  2659. [0] = llc_conn_ac_upd_nr_received,
  2660. [1] = llc_conn_ac_upd_vs,
  2661. [2] = llc_conn_ac_clear_remote_busy,
  2662. [3] = NULL,
  2663. };
  2664. static struct llc_conn_state_trans llc_await_state_trans_9b = {
  2665. .ev = llc_conn_ev_rx_rr_rsp_fbit_set_0,
  2666. .next_state = LLC_CONN_STATE_AWAIT,
  2667. .ev_qualifiers = NONE,
  2668. .ev_actions = llc_await_actions_9b,
  2669. };
  2670. /* State transitions for LLC_CONN_EV_RX_REJ_CMD_Pbit_SET_0 event */
  2671. static const llc_conn_action_t llc_await_actions_9c[] = {
  2672. [0] = llc_conn_ac_upd_nr_received,
  2673. [1] = llc_conn_ac_upd_vs,
  2674. [2] = llc_conn_ac_clear_remote_busy,
  2675. [3] = NULL,
  2676. };
  2677. static struct llc_conn_state_trans llc_await_state_trans_9c = {
  2678. .ev = llc_conn_ev_rx_rej_cmd_pbit_set_0,
  2679. .next_state = LLC_CONN_STATE_AWAIT,
  2680. .ev_qualifiers = NONE,
  2681. .ev_actions = llc_await_actions_9c,
  2682. };
  2683. /* State transitions for LLC_CONN_EV_RX_REJ_RSP_Fbit_SET_0 event */
  2684. static const llc_conn_action_t llc_await_actions_9d[] = {
  2685. [0] = llc_conn_ac_upd_nr_received,
  2686. [1] = llc_conn_ac_upd_vs,
  2687. [2] = llc_conn_ac_clear_remote_busy,
  2688. [3] = NULL,
  2689. };
  2690. static struct llc_conn_state_trans llc_await_state_trans_9d = {
  2691. .ev = llc_conn_ev_rx_rej_rsp_fbit_set_0,
  2692. .next_state = LLC_CONN_STATE_AWAIT,
  2693. .ev_qualifiers = NONE,
  2694. .ev_actions = llc_await_actions_9d,
  2695. };
  2696. /* State transitions for LLC_CONN_EV_RX_RR_CMD_Pbit_SET_1 event */
  2697. static const llc_conn_action_t llc_await_actions_10a[] = {
  2698. [0] = llc_conn_ac_send_rr_rsp_f_set_1,
  2699. [1] = llc_conn_ac_upd_nr_received,
  2700. [2] = llc_conn_ac_upd_vs,
  2701. [3] = llc_conn_ac_clear_remote_busy,
  2702. [4] = NULL,
  2703. };
  2704. static struct llc_conn_state_trans llc_await_state_trans_10a = {
  2705. .ev = llc_conn_ev_rx_rr_cmd_pbit_set_1,
  2706. .next_state = LLC_CONN_STATE_AWAIT,
  2707. .ev_qualifiers = NONE,
  2708. .ev_actions = llc_await_actions_10a,
  2709. };
  2710. /* State transitions for LLC_CONN_EV_RX_REJ_CMD_Pbit_SET_1 event */
  2711. static const llc_conn_action_t llc_await_actions_10b[] = {
  2712. [0] = llc_conn_ac_send_rr_rsp_f_set_1,
  2713. [1] = llc_conn_ac_upd_nr_received,
  2714. [2] = llc_conn_ac_upd_vs,
  2715. [3] = llc_conn_ac_clear_remote_busy,
  2716. [4] = NULL,
  2717. };
  2718. static struct llc_conn_state_trans llc_await_state_trans_10b = {
  2719. .ev = llc_conn_ev_rx_rej_cmd_pbit_set_1,
  2720. .next_state = LLC_CONN_STATE_AWAIT,
  2721. .ev_qualifiers = NONE,
  2722. .ev_actions = llc_await_actions_10b,
  2723. };
  2724. /* State transitions for LLC_CONN_EV_RX_RNR_RSP_Fbit_SET_1 event */
  2725. static const llc_conn_action_t llc_await_actions_11[] = {
  2726. [0] = llc_conn_ac_upd_nr_received,
  2727. [1] = llc_conn_ac_upd_vs,
  2728. [2] = llc_conn_ac_stop_p_timer,
  2729. [3] = llc_conn_ac_set_remote_busy,
  2730. [4] = NULL,
  2731. };
  2732. static struct llc_conn_state_trans llc_await_state_trans_11 = {
  2733. .ev = llc_conn_ev_rx_rnr_rsp_fbit_set_1,
  2734. .next_state = LLC_CONN_STATE_NORMAL,
  2735. .ev_qualifiers = NONE,
  2736. .ev_actions = llc_await_actions_11,
  2737. };
  2738. /* State transitions for LLC_CONN_EV_RX_RNR_CMD_Pbit_SET_0 event */
  2739. static const llc_conn_action_t llc_await_actions_12a[] = {
  2740. [0] = llc_conn_ac_upd_nr_received,
  2741. [1] = llc_conn_ac_upd_vs,
  2742. [2] = llc_conn_ac_set_remote_busy,
  2743. [3] = NULL,
  2744. };
  2745. static struct llc_conn_state_trans llc_await_state_trans_12a = {
  2746. .ev = llc_conn_ev_rx_rnr_cmd_pbit_set_0,
  2747. .next_state = LLC_CONN_STATE_AWAIT,
  2748. .ev_qualifiers = NONE,
  2749. .ev_actions = llc_await_actions_12a,
  2750. };
  2751. /* State transitions for LLC_CONN_EV_RX_RNR_RSP_Fbit_SET_0 event */
  2752. static const llc_conn_action_t llc_await_actions_12b[] = {
  2753. [0] = llc_conn_ac_upd_nr_received,
  2754. [1] = llc_conn_ac_upd_vs,
  2755. [2] = llc_conn_ac_set_remote_busy,
  2756. [3] = NULL,
  2757. };
  2758. static struct llc_conn_state_trans llc_await_state_trans_12b = {
  2759. .ev = llc_conn_ev_rx_rnr_rsp_fbit_set_0,
  2760. .next_state = LLC_CONN_STATE_AWAIT,
  2761. .ev_qualifiers = NONE,
  2762. .ev_actions = llc_await_actions_12b,
  2763. };
  2764. /* State transitions for LLC_CONN_EV_RX_RNR_CMD_Pbit_SET_1 event */
  2765. static const llc_conn_action_t llc_await_actions_13[] = {
  2766. [0] = llc_conn_ac_send_rr_rsp_f_set_1,
  2767. [1] = llc_conn_ac_upd_nr_received,
  2768. [2] = llc_conn_ac_upd_vs,
  2769. [3] = llc_conn_ac_set_remote_busy,
  2770. [4] = NULL,
  2771. };
  2772. static struct llc_conn_state_trans llc_await_state_trans_13 = {
  2773. .ev = llc_conn_ev_rx_rnr_cmd_pbit_set_1,
  2774. .next_state = LLC_CONN_STATE_AWAIT,
  2775. .ev_qualifiers = NONE,
  2776. .ev_actions = llc_await_actions_13,
  2777. };
  2778. /* State transitions for LLC_CONN_EV_P_TMR_EXP event */
  2779. static const llc_conn_ev_qfyr_t llc_await_ev_qfyrs_14[] = {
  2780. [0] = llc_conn_ev_qlfy_retry_cnt_lt_n2,
  2781. [1] = NULL,
  2782. };
  2783. static const llc_conn_action_t llc_await_actions_14[] = {
  2784. [0] = llc_conn_ac_send_rr_cmd_p_set_1,
  2785. [1] = llc_conn_ac_start_p_timer,
  2786. [2] = llc_conn_ac_inc_retry_cnt_by_1,
  2787. [3] = NULL,
  2788. };
  2789. static struct llc_conn_state_trans llc_await_state_trans_14 = {
  2790. .ev = llc_conn_ev_p_tmr_exp,
  2791. .next_state = LLC_CONN_STATE_AWAIT,
  2792. .ev_qualifiers = llc_await_ev_qfyrs_14,
  2793. .ev_actions = llc_await_actions_14,
  2794. };
  2795. /*
  2796. * Array of pointers;
  2797. * one to each transition
  2798. */
  2799. static struct llc_conn_state_trans *llc_await_state_transitions[] = {
  2800. [0] = &llc_common_state_trans_1, /* Request */
  2801. [1] = &llc_common_state_trans_2,
  2802. [2] = &llc_await_state_trans_1_0,
  2803. [3] = &llc_common_state_trans_end,
  2804. [4] = &llc_await_state_trans_1, /* Local busy */
  2805. [5] = &llc_common_state_trans_end,
  2806. [6] = &llc_common_state_trans_end, /* Initiate PF Cycle */
  2807. [7] = &llc_common_state_trans_11a, /* Timer */
  2808. [8] = &llc_common_state_trans_11b,
  2809. [9] = &llc_common_state_trans_11c,
  2810. [10] = &llc_common_state_trans_11d,
  2811. [11] = &llc_await_state_trans_14,
  2812. [12] = &llc_common_state_trans_end,
  2813. [13] = &llc_common_state_trans_3, /* Receive frame */
  2814. [14] = &llc_common_state_trans_4,
  2815. [15] = &llc_common_state_trans_5,
  2816. [16] = &llc_common_state_trans_6,
  2817. [17] = &llc_common_state_trans_7a,
  2818. [18] = &llc_common_state_trans_7b,
  2819. [19] = &llc_common_state_trans_8a,
  2820. [20] = &llc_common_state_trans_8b,
  2821. [21] = &llc_common_state_trans_8c,
  2822. [22] = &llc_common_state_trans_9,
  2823. /* [23] = &llc_common_state_trans_10, */
  2824. [23] = &llc_await_state_trans_2,
  2825. [24] = &llc_await_state_trans_3a,
  2826. [25] = &llc_await_state_trans_3b,
  2827. [26] = &llc_await_state_trans_4,
  2828. [27] = &llc_await_state_trans_5,
  2829. [28] = &llc_await_state_trans_6a,
  2830. [29] = &llc_await_state_trans_6b,
  2831. [30] = &llc_await_state_trans_7,
  2832. [31] = &llc_await_state_trans_8a,
  2833. [32] = &llc_await_state_trans_8b,
  2834. [33] = &llc_await_state_trans_9a,
  2835. [34] = &llc_await_state_trans_9b,
  2836. [35] = &llc_await_state_trans_9c,
  2837. [36] = &llc_await_state_trans_9d,
  2838. [37] = &llc_await_state_trans_10a,
  2839. [38] = &llc_await_state_trans_10b,
  2840. [39] = &llc_await_state_trans_11,
  2841. [40] = &llc_await_state_trans_12a,
  2842. [41] = &llc_await_state_trans_12b,
  2843. [42] = &llc_await_state_trans_13,
  2844. [43] = &llc_common_state_trans_end,
  2845. };
  2846. /* LLC_CONN_STATE_AWAIT_BUSY transitions */
  2847. /* State transitions for LLC_CONN_EV_DATA_CONN_REQ event */
  2848. static const llc_conn_ev_qfyr_t llc_await_busy_ev_qfyrs_1_0[] = {
  2849. [0] = llc_conn_ev_qlfy_set_status_refuse,
  2850. [1] = NULL,
  2851. };
  2852. /* just one member, NULL, .bss zeroes it */
  2853. static const llc_conn_action_t llc_await_busy_actions_1_0[1];
  2854. static struct llc_conn_state_trans llc_await_busy_state_trans_1_0 = {
  2855. .ev = llc_conn_ev_data_req,
  2856. .next_state = LLC_CONN_STATE_AWAIT_BUSY,
  2857. .ev_qualifiers = llc_await_busy_ev_qfyrs_1_0,
  2858. .ev_actions = llc_await_busy_actions_1_0,
  2859. };
  2860. /* State transitions for LLC_CONN_EV_LOCAL_BUSY_CLEARED event */
  2861. static const llc_conn_ev_qfyr_t llc_await_busy_ev_qfyrs_1[] = {
  2862. [0] = llc_conn_ev_qlfy_data_flag_eq_1,
  2863. [1] = NULL,
  2864. };
  2865. static const llc_conn_action_t llc_await_busy_actions_1[] = {
  2866. [0] = llc_conn_ac_send_rej_xxx_x_set_0,
  2867. [1] = llc_conn_ac_start_rej_timer,
  2868. [2] = NULL,
  2869. };
  2870. static struct llc_conn_state_trans llc_await_busy_state_trans_1 = {
  2871. .ev = llc_conn_ev_local_busy_cleared,
  2872. .next_state = LLC_CONN_STATE_AWAIT_REJ,
  2873. .ev_qualifiers = llc_await_busy_ev_qfyrs_1,
  2874. .ev_actions = llc_await_busy_actions_1,
  2875. };
  2876. /* State transitions for LLC_CONN_EV_LOCAL_BUSY_CLEARED event */
  2877. static const llc_conn_ev_qfyr_t llc_await_busy_ev_qfyrs_2[] = {
  2878. [0] = llc_conn_ev_qlfy_data_flag_eq_0,
  2879. [1] = NULL,
  2880. };
  2881. static const llc_conn_action_t llc_await_busy_actions_2[] = {
  2882. [0] = llc_conn_ac_send_rr_xxx_x_set_0,
  2883. [1] = NULL,
  2884. };
  2885. static struct llc_conn_state_trans llc_await_busy_state_trans_2 = {
  2886. .ev = llc_conn_ev_local_busy_cleared,
  2887. .next_state = LLC_CONN_STATE_AWAIT,
  2888. .ev_qualifiers = llc_await_busy_ev_qfyrs_2,
  2889. .ev_actions = llc_await_busy_actions_2,
  2890. };
  2891. /* State transitions for LLC_CONN_EV_LOCAL_BUSY_CLEARED event */
  2892. static const llc_conn_ev_qfyr_t llc_await_busy_ev_qfyrs_3[] = {
  2893. [0] = llc_conn_ev_qlfy_data_flag_eq_2,
  2894. [1] = NULL,
  2895. };
  2896. static const llc_conn_action_t llc_await_busy_actions_3[] = {
  2897. [0] = llc_conn_ac_send_rr_xxx_x_set_0,
  2898. [1] = NULL,
  2899. };
  2900. static struct llc_conn_state_trans llc_await_busy_state_trans_3 = {
  2901. .ev = llc_conn_ev_local_busy_cleared,
  2902. .next_state = LLC_CONN_STATE_AWAIT_REJ,
  2903. .ev_qualifiers = llc_await_busy_ev_qfyrs_3,
  2904. .ev_actions = llc_await_busy_actions_3,
  2905. };
  2906. /* State transitions for LLC_CONN_EV_RX_I_RSP_Fbit_SET_1_UNEXPD_Ns event */
  2907. static const llc_conn_action_t llc_await_busy_actions_4[] = {
  2908. [0] = llc_conn_ac_opt_send_rnr_xxx_x_set_0,
  2909. [1] = llc_conn_ac_upd_nr_received,
  2910. [2] = llc_conn_ac_upd_vs,
  2911. [3] = llc_conn_ac_stop_p_timer,
  2912. [4] = llc_conn_ac_set_data_flag_1,
  2913. [5] = llc_conn_ac_clear_remote_busy,
  2914. [6] = llc_conn_ac_resend_i_xxx_x_set_0,
  2915. [7] = NULL,
  2916. };
  2917. static struct llc_conn_state_trans llc_await_busy_state_trans_4 = {
  2918. .ev = llc_conn_ev_rx_i_rsp_fbit_set_1_unexpd_ns,
  2919. .next_state = LLC_CONN_STATE_BUSY,
  2920. .ev_qualifiers = NONE,
  2921. .ev_actions = llc_await_busy_actions_4,
  2922. };
  2923. /* State transitions for LLC_CONN_EV_RX_I_CMD_Pbit_SET_0_UNEXPD_Ns event */
  2924. static const llc_conn_action_t llc_await_busy_actions_5a[] = {
  2925. [0] = llc_conn_ac_opt_send_rnr_xxx_x_set_0,
  2926. [1] = llc_conn_ac_upd_nr_received,
  2927. [2] = llc_conn_ac_upd_vs,
  2928. [3] = llc_conn_ac_set_data_flag_1,
  2929. [4] = NULL,
  2930. };
  2931. static struct llc_conn_state_trans llc_await_busy_state_trans_5a = {
  2932. .ev = llc_conn_ev_rx_i_cmd_pbit_set_0_unexpd_ns,
  2933. .next_state = LLC_CONN_STATE_AWAIT_BUSY,
  2934. .ev_qualifiers = NONE,
  2935. .ev_actions = llc_await_busy_actions_5a,
  2936. };
  2937. /* State transitions for LLC_CONN_EV_RX_I_RSP_Fbit_SET_0_UNEXPD_Ns event */
  2938. static const llc_conn_action_t llc_await_busy_actions_5b[] = {
  2939. [0] = llc_conn_ac_opt_send_rnr_xxx_x_set_0,
  2940. [1] = llc_conn_ac_upd_nr_received,
  2941. [2] = llc_conn_ac_upd_vs,
  2942. [3] = llc_conn_ac_set_data_flag_1,
  2943. [4] = NULL,
  2944. };
  2945. static struct llc_conn_state_trans llc_await_busy_state_trans_5b = {
  2946. .ev = llc_conn_ev_rx_i_rsp_fbit_set_0_unexpd_ns,
  2947. .next_state = LLC_CONN_STATE_AWAIT_BUSY,
  2948. .ev_qualifiers = NONE,
  2949. .ev_actions = llc_await_busy_actions_5b,
  2950. };
  2951. /* State transitions for LLC_CONN_EV_RX_I_CMD_Pbit_SET_1_UNEXPD_Ns event */
  2952. static const llc_conn_action_t llc_await_busy_actions_6[] = {
  2953. [0] = llc_conn_ac_send_rnr_rsp_f_set_1,
  2954. [1] = llc_conn_ac_upd_nr_received,
  2955. [2] = llc_conn_ac_upd_vs,
  2956. [3] = llc_conn_ac_set_data_flag_1,
  2957. [4] = NULL,
  2958. };
  2959. static struct llc_conn_state_trans llc_await_busy_state_trans_6 = {
  2960. .ev = llc_conn_ev_rx_i_cmd_pbit_set_1_unexpd_ns,
  2961. .next_state = LLC_CONN_STATE_AWAIT_BUSY,
  2962. .ev_qualifiers = NONE,
  2963. .ev_actions = llc_await_busy_actions_6,
  2964. };
  2965. /* State transitions for LLC_CONN_EV_RX_I_RSP_Fbit_SET_1 event */
  2966. static const llc_conn_action_t llc_await_busy_actions_7[] = {
  2967. [0] = llc_conn_ac_opt_send_rnr_xxx_x_set_0,
  2968. [1] = llc_conn_ac_inc_vr_by_1,
  2969. [2] = llc_conn_ac_data_ind,
  2970. [3] = llc_conn_ac_stop_p_timer,
  2971. [4] = llc_conn_ac_upd_nr_received,
  2972. [5] = llc_conn_ac_upd_vs,
  2973. [6] = llc_conn_ac_set_data_flag_0,
  2974. [7] = llc_conn_ac_clear_remote_busy,
  2975. [8] = llc_conn_ac_resend_i_xxx_x_set_0,
  2976. [9] = NULL,
  2977. };
  2978. static struct llc_conn_state_trans llc_await_busy_state_trans_7 = {
  2979. .ev = llc_conn_ev_rx_i_rsp_fbit_set_1,
  2980. .next_state = LLC_CONN_STATE_BUSY,
  2981. .ev_qualifiers = NONE,
  2982. .ev_actions = llc_await_busy_actions_7,
  2983. };
  2984. /* State transitions for LLC_CONN_EV_RX_I_RSP_Fbit_SET_0 event */
  2985. static const llc_conn_action_t llc_await_busy_actions_8a[] = {
  2986. [0] = llc_conn_ac_opt_send_rnr_xxx_x_set_0,
  2987. [1] = llc_conn_ac_inc_vr_by_1,
  2988. [2] = llc_conn_ac_data_ind,
  2989. [3] = llc_conn_ac_upd_nr_received,
  2990. [4] = llc_conn_ac_upd_vs,
  2991. [5] = llc_conn_ac_set_data_flag_0,
  2992. [6] = NULL,
  2993. };
  2994. static struct llc_conn_state_trans llc_await_busy_state_trans_8a = {
  2995. .ev = llc_conn_ev_rx_i_rsp_fbit_set_0,
  2996. .next_state = LLC_CONN_STATE_AWAIT_BUSY,
  2997. .ev_qualifiers = NONE,
  2998. .ev_actions = llc_await_busy_actions_8a,
  2999. };
  3000. /* State transitions for LLC_CONN_EV_RX_I_CMD_Pbit_SET_0 event */
  3001. static const llc_conn_action_t llc_await_busy_actions_8b[] = {
  3002. [0] = llc_conn_ac_opt_send_rnr_xxx_x_set_0,
  3003. [1] = llc_conn_ac_inc_vr_by_1,
  3004. [2] = llc_conn_ac_data_ind,
  3005. [3] = llc_conn_ac_upd_nr_received,
  3006. [4] = llc_conn_ac_upd_vs,
  3007. [5] = llc_conn_ac_set_data_flag_0,
  3008. [6] = NULL,
  3009. };
  3010. static struct llc_conn_state_trans llc_await_busy_state_trans_8b = {
  3011. .ev = llc_conn_ev_rx_i_cmd_pbit_set_0,
  3012. .next_state = LLC_CONN_STATE_AWAIT_BUSY,
  3013. .ev_qualifiers = NONE,
  3014. .ev_actions = llc_await_busy_actions_8b,
  3015. };
  3016. /* State transitions for LLC_CONN_EV_RX_I_CMD_Pbit_SET_1 event */
  3017. static const llc_conn_action_t llc_await_busy_actions_9[] = {
  3018. [0] = llc_conn_ac_send_rnr_rsp_f_set_1,
  3019. [1] = llc_conn_ac_inc_vr_by_1,
  3020. [2] = llc_conn_ac_data_ind,
  3021. [3] = llc_conn_ac_upd_nr_received,
  3022. [4] = llc_conn_ac_upd_vs,
  3023. [5] = llc_conn_ac_set_data_flag_0,
  3024. [6] = NULL,
  3025. };
  3026. static struct llc_conn_state_trans llc_await_busy_state_trans_9 = {
  3027. .ev = llc_conn_ev_rx_i_cmd_pbit_set_1,
  3028. .next_state = LLC_CONN_STATE_AWAIT_BUSY,
  3029. .ev_qualifiers = NONE,
  3030. .ev_actions = llc_await_busy_actions_9,
  3031. };
  3032. /* State transitions for LLC_CONN_EV_RX_RR_RSP_Fbit_SET_1 event */
  3033. static const llc_conn_action_t llc_await_busy_actions_10a[] = {
  3034. [0] = llc_conn_ac_upd_nr_received,
  3035. [1] = llc_conn_ac_upd_vs,
  3036. [2] = llc_conn_ac_stop_p_timer,
  3037. [3] = llc_conn_ac_resend_i_xxx_x_set_0,
  3038. [4] = llc_conn_ac_clear_remote_busy,
  3039. [5] = NULL,
  3040. };
  3041. static struct llc_conn_state_trans llc_await_busy_state_trans_10a = {
  3042. .ev = llc_conn_ev_rx_rr_rsp_fbit_set_1,
  3043. .next_state = LLC_CONN_STATE_BUSY,
  3044. .ev_qualifiers = NONE,
  3045. .ev_actions = llc_await_busy_actions_10a,
  3046. };
  3047. /* State transitions for LLC_CONN_EV_RX_REJ_RSP_Fbit_SET_1 event */
  3048. static const llc_conn_action_t llc_await_busy_actions_10b[] = {
  3049. [0] = llc_conn_ac_upd_nr_received,
  3050. [1] = llc_conn_ac_upd_vs,
  3051. [2] = llc_conn_ac_stop_p_timer,
  3052. [3] = llc_conn_ac_resend_i_xxx_x_set_0,
  3053. [4] = llc_conn_ac_clear_remote_busy,
  3054. [5] = NULL,
  3055. };
  3056. static struct llc_conn_state_trans llc_await_busy_state_trans_10b = {
  3057. .ev = llc_conn_ev_rx_rej_rsp_fbit_set_1,
  3058. .next_state = LLC_CONN_STATE_BUSY,
  3059. .ev_qualifiers = NONE,
  3060. .ev_actions = llc_await_busy_actions_10b,
  3061. };
  3062. /* State transitions for LLC_CONN_EV_RX_RR_CMD_Pbit_SET_0 event */
  3063. static const llc_conn_action_t llc_await_busy_actions_11a[] = {
  3064. [0] = llc_conn_ac_upd_nr_received,
  3065. [1] = llc_conn_ac_upd_vs,
  3066. [2] = llc_conn_ac_clear_remote_busy,
  3067. [3] = NULL,
  3068. };
  3069. static struct llc_conn_state_trans llc_await_busy_state_trans_11a = {
  3070. .ev = llc_conn_ev_rx_rr_cmd_pbit_set_0,
  3071. .next_state = LLC_CONN_STATE_AWAIT_BUSY,
  3072. .ev_qualifiers = NONE,
  3073. .ev_actions = llc_await_busy_actions_11a,
  3074. };
  3075. /* State transitions for LLC_CONN_EV_RX_RR_RSP_Fbit_SET_0 event */
  3076. static const llc_conn_action_t llc_await_busy_actions_11b[] = {
  3077. [0] = llc_conn_ac_upd_nr_received,
  3078. [1] = llc_conn_ac_upd_vs,
  3079. [2] = llc_conn_ac_clear_remote_busy,
  3080. [3] = NULL,
  3081. };
  3082. static struct llc_conn_state_trans llc_await_busy_state_trans_11b = {
  3083. .ev = llc_conn_ev_rx_rr_rsp_fbit_set_0,
  3084. .next_state = LLC_CONN_STATE_AWAIT_BUSY,
  3085. .ev_qualifiers = NONE,
  3086. .ev_actions = llc_await_busy_actions_11b,
  3087. };
  3088. /* State transitions for LLC_CONN_EV_RX_REJ_CMD_Pbit_SET_0 event */
  3089. static const llc_conn_action_t llc_await_busy_actions_11c[] = {
  3090. [0] = llc_conn_ac_upd_nr_received,
  3091. [1] = llc_conn_ac_upd_vs,
  3092. [2] = llc_conn_ac_clear_remote_busy,
  3093. [3] = NULL,
  3094. };
  3095. static struct llc_conn_state_trans llc_await_busy_state_trans_11c = {
  3096. .ev = llc_conn_ev_rx_rej_cmd_pbit_set_0,
  3097. .next_state = LLC_CONN_STATE_AWAIT_BUSY,
  3098. .ev_qualifiers = NONE,
  3099. .ev_actions = llc_await_busy_actions_11c,
  3100. };
  3101. /* State transitions for LLC_CONN_EV_RX_REJ_RSP_Fbit_SET_0 event */
  3102. static const llc_conn_action_t llc_await_busy_actions_11d[] = {
  3103. [0] = llc_conn_ac_upd_nr_received,
  3104. [1] = llc_conn_ac_upd_vs,
  3105. [2] = llc_conn_ac_clear_remote_busy,
  3106. [3] = NULL,
  3107. };
  3108. static struct llc_conn_state_trans llc_await_busy_state_trans_11d = {
  3109. .ev = llc_conn_ev_rx_rej_rsp_fbit_set_0,
  3110. .next_state = LLC_CONN_STATE_AWAIT_BUSY,
  3111. .ev_qualifiers = NONE,
  3112. .ev_actions = llc_await_busy_actions_11d,
  3113. };
  3114. /* State transitions for LLC_CONN_EV_RX_RR_CMD_Pbit_SET_1 event */
  3115. static const llc_conn_action_t llc_await_busy_actions_12a[] = {
  3116. [0] = llc_conn_ac_send_rnr_rsp_f_set_1,
  3117. [1] = llc_conn_ac_upd_nr_received,
  3118. [2] = llc_conn_ac_upd_vs,
  3119. [3] = llc_conn_ac_clear_remote_busy,
  3120. [4] = NULL,
  3121. };
  3122. static struct llc_conn_state_trans llc_await_busy_state_trans_12a = {
  3123. .ev = llc_conn_ev_rx_rr_cmd_pbit_set_1,
  3124. .next_state = LLC_CONN_STATE_AWAIT_BUSY,
  3125. .ev_qualifiers = NONE,
  3126. .ev_actions = llc_await_busy_actions_12a,
  3127. };
  3128. /* State transitions for LLC_CONN_EV_RX_REJ_CMD_Pbit_SET_1 event */
  3129. static const llc_conn_action_t llc_await_busy_actions_12b[] = {
  3130. [0] = llc_conn_ac_send_rnr_rsp_f_set_1,
  3131. [1] = llc_conn_ac_upd_nr_received,
  3132. [2] = llc_conn_ac_upd_vs,
  3133. [3] = llc_conn_ac_clear_remote_busy,
  3134. [4] = NULL,
  3135. };
  3136. static struct llc_conn_state_trans llc_await_busy_state_trans_12b = {
  3137. .ev = llc_conn_ev_rx_rej_cmd_pbit_set_1,
  3138. .next_state = LLC_CONN_STATE_AWAIT_BUSY,
  3139. .ev_qualifiers = NONE,
  3140. .ev_actions = llc_await_busy_actions_12b,
  3141. };
  3142. /* State transitions for LLC_CONN_EV_RX_RNR_RSP_Fbit_SET_1 event */
  3143. static const llc_conn_action_t llc_await_busy_actions_13[] = {
  3144. [0] = llc_conn_ac_upd_nr_received,
  3145. [1] = llc_conn_ac_upd_vs,
  3146. [2] = llc_conn_ac_stop_p_timer,
  3147. [3] = llc_conn_ac_set_remote_busy,
  3148. [4] = NULL,
  3149. };
  3150. static struct llc_conn_state_trans llc_await_busy_state_trans_13 = {
  3151. .ev = llc_conn_ev_rx_rnr_rsp_fbit_set_1,
  3152. .next_state = LLC_CONN_STATE_BUSY,
  3153. .ev_qualifiers = NONE,
  3154. .ev_actions = llc_await_busy_actions_13,
  3155. };
  3156. /* State transitions for LLC_CONN_EV_RX_RNR_CMD_Pbit_SET_0 event */
  3157. static const llc_conn_action_t llc_await_busy_actions_14a[] = {
  3158. [0] = llc_conn_ac_upd_nr_received,
  3159. [1] = llc_conn_ac_upd_vs,
  3160. [2] = llc_conn_ac_set_remote_busy,
  3161. [3] = NULL,
  3162. };
  3163. static struct llc_conn_state_trans llc_await_busy_state_trans_14a = {
  3164. .ev = llc_conn_ev_rx_rnr_cmd_pbit_set_0,
  3165. .next_state = LLC_CONN_STATE_AWAIT_BUSY,
  3166. .ev_qualifiers = NONE,
  3167. .ev_actions = llc_await_busy_actions_14a,
  3168. };
  3169. /* State transitions for LLC_CONN_EV_RX_RNR_RSP_Fbit_SET_0 event */
  3170. static const llc_conn_action_t llc_await_busy_actions_14b[] = {
  3171. [0] = llc_conn_ac_upd_nr_received,
  3172. [1] = llc_conn_ac_upd_vs,
  3173. [2] = llc_conn_ac_set_remote_busy,
  3174. [3] = NULL,
  3175. };
  3176. static struct llc_conn_state_trans llc_await_busy_state_trans_14b = {
  3177. .ev = llc_conn_ev_rx_rnr_rsp_fbit_set_0,
  3178. .next_state = LLC_CONN_STATE_AWAIT_BUSY,
  3179. .ev_qualifiers = NONE,
  3180. .ev_actions = llc_await_busy_actions_14b,
  3181. };
  3182. /* State transitions for LLC_CONN_EV_RX_RNR_CMD_Pbit_SET_1 event */
  3183. static const llc_conn_action_t llc_await_busy_actions_15[] = {
  3184. [0] = llc_conn_ac_send_rnr_rsp_f_set_1,
  3185. [1] = llc_conn_ac_upd_nr_received,
  3186. [2] = llc_conn_ac_upd_vs,
  3187. [3] = llc_conn_ac_set_remote_busy,
  3188. [4] = NULL,
  3189. };
  3190. static struct llc_conn_state_trans llc_await_busy_state_trans_15 = {
  3191. .ev = llc_conn_ev_rx_rnr_cmd_pbit_set_1,
  3192. .next_state = LLC_CONN_STATE_AWAIT_BUSY,
  3193. .ev_qualifiers = NONE,
  3194. .ev_actions = llc_await_busy_actions_15,
  3195. };
  3196. /* State transitions for LLC_CONN_EV_P_TMR_EXP event */
  3197. static const llc_conn_ev_qfyr_t llc_await_busy_ev_qfyrs_16[] = {
  3198. [0] = llc_conn_ev_qlfy_retry_cnt_lt_n2,
  3199. [1] = NULL,
  3200. };
  3201. static const llc_conn_action_t llc_await_busy_actions_16[] = {
  3202. [0] = llc_conn_ac_send_rnr_cmd_p_set_1,
  3203. [1] = llc_conn_ac_start_p_timer,
  3204. [2] = llc_conn_ac_inc_retry_cnt_by_1,
  3205. [3] = NULL,
  3206. };
  3207. static struct llc_conn_state_trans llc_await_busy_state_trans_16 = {
  3208. .ev = llc_conn_ev_p_tmr_exp,
  3209. .next_state = LLC_CONN_STATE_AWAIT_BUSY,
  3210. .ev_qualifiers = llc_await_busy_ev_qfyrs_16,
  3211. .ev_actions = llc_await_busy_actions_16,
  3212. };
  3213. /*
  3214. * Array of pointers;
  3215. * one to each transition
  3216. */
  3217. static struct llc_conn_state_trans *llc_await_busy_state_transitions[] = {
  3218. [0] = &llc_common_state_trans_1, /* Request */
  3219. [1] = &llc_common_state_trans_2,
  3220. [2] = &llc_await_busy_state_trans_1_0,
  3221. [3] = &llc_common_state_trans_end,
  3222. [4] = &llc_await_busy_state_trans_1, /* Local busy */
  3223. [5] = &llc_await_busy_state_trans_2,
  3224. [6] = &llc_await_busy_state_trans_3,
  3225. [7] = &llc_common_state_trans_end,
  3226. [8] = &llc_common_state_trans_end, /* Initiate PF cycle */
  3227. [9] = &llc_common_state_trans_11a, /* Timer */
  3228. [10] = &llc_common_state_trans_11b,
  3229. [11] = &llc_common_state_trans_11c,
  3230. [12] = &llc_common_state_trans_11d,
  3231. [13] = &llc_await_busy_state_trans_16,
  3232. [14] = &llc_common_state_trans_end,
  3233. [15] = &llc_await_busy_state_trans_4, /* Receive frame */
  3234. [16] = &llc_await_busy_state_trans_5a,
  3235. [17] = &llc_await_busy_state_trans_5b,
  3236. [18] = &llc_await_busy_state_trans_6,
  3237. [19] = &llc_await_busy_state_trans_7,
  3238. [20] = &llc_await_busy_state_trans_8a,
  3239. [21] = &llc_await_busy_state_trans_8b,
  3240. [22] = &llc_await_busy_state_trans_9,
  3241. [23] = &llc_await_busy_state_trans_10a,
  3242. [24] = &llc_await_busy_state_trans_10b,
  3243. [25] = &llc_await_busy_state_trans_11a,
  3244. [26] = &llc_await_busy_state_trans_11b,
  3245. [27] = &llc_await_busy_state_trans_11c,
  3246. [28] = &llc_await_busy_state_trans_11d,
  3247. [29] = &llc_await_busy_state_trans_12a,
  3248. [30] = &llc_await_busy_state_trans_12b,
  3249. [31] = &llc_await_busy_state_trans_13,
  3250. [32] = &llc_await_busy_state_trans_14a,
  3251. [33] = &llc_await_busy_state_trans_14b,
  3252. [34] = &llc_await_busy_state_trans_15,
  3253. [35] = &llc_common_state_trans_3,
  3254. [36] = &llc_common_state_trans_4,
  3255. [37] = &llc_common_state_trans_5,
  3256. [38] = &llc_common_state_trans_6,
  3257. [39] = &llc_common_state_trans_7a,
  3258. [40] = &llc_common_state_trans_7b,
  3259. [41] = &llc_common_state_trans_8a,
  3260. [42] = &llc_common_state_trans_8b,
  3261. [43] = &llc_common_state_trans_8c,
  3262. [44] = &llc_common_state_trans_9,
  3263. /* [45] = &llc_common_state_trans_10, */
  3264. [45] = &llc_common_state_trans_end,
  3265. };
  3266. /* ----------------- LLC_CONN_STATE_AWAIT_REJ transitions --------------- */
  3267. /* State transitions for LLC_CONN_EV_DATA_CONN_REQ event */
  3268. static const llc_conn_ev_qfyr_t llc_await_reject_ev_qfyrs_1_0[] = {
  3269. [0] = llc_conn_ev_qlfy_set_status_refuse,
  3270. [1] = NULL,
  3271. };
  3272. /* just one member, NULL, .bss zeroes it */
  3273. static const llc_conn_action_t llc_await_reject_actions_1_0[1];
  3274. static struct llc_conn_state_trans llc_await_reject_state_trans_1_0 = {
  3275. .ev = llc_conn_ev_data_req,
  3276. .next_state = LLC_CONN_STATE_AWAIT_REJ,
  3277. .ev_qualifiers = llc_await_reject_ev_qfyrs_1_0,
  3278. .ev_actions = llc_await_reject_actions_1_0,
  3279. };
  3280. /* State transitions for LLC_CONN_EV_LOCAL_BUSY_DETECTED event */
  3281. static const llc_conn_action_t llc_await_rejct_actions_1[] = {
  3282. [0] = llc_conn_ac_send_rnr_xxx_x_set_0,
  3283. [1] = llc_conn_ac_set_data_flag_2,
  3284. [2] = NULL
  3285. };
  3286. static struct llc_conn_state_trans llc_await_rejct_state_trans_1 = {
  3287. .ev = llc_conn_ev_local_busy_detected,
  3288. .next_state = LLC_CONN_STATE_AWAIT_BUSY,
  3289. .ev_qualifiers = NONE,
  3290. .ev_actions = llc_await_rejct_actions_1,
  3291. };
  3292. /* State transitions for LLC_CONN_EV_RX_I_CMD_Pbit_SET_0_UNEXPD_Ns event */
  3293. static const llc_conn_action_t llc_await_rejct_actions_2a[] = {
  3294. [0] = llc_conn_ac_upd_nr_received,
  3295. [1] = llc_conn_ac_upd_vs,
  3296. [2] = NULL
  3297. };
  3298. static struct llc_conn_state_trans llc_await_rejct_state_trans_2a = {
  3299. .ev = llc_conn_ev_rx_i_cmd_pbit_set_0_unexpd_ns,
  3300. .next_state = LLC_CONN_STATE_AWAIT_REJ,
  3301. .ev_qualifiers = NONE,
  3302. .ev_actions = llc_await_rejct_actions_2a,
  3303. };
  3304. /* State transitions for LLC_CONN_EV_RX_I_RSP_Fbit_SET_0_UNEXPD_Ns event */
  3305. static const llc_conn_action_t llc_await_rejct_actions_2b[] = {
  3306. [0] = llc_conn_ac_upd_nr_received,
  3307. [1] = llc_conn_ac_upd_vs,
  3308. [2] = NULL
  3309. };
  3310. static struct llc_conn_state_trans llc_await_rejct_state_trans_2b = {
  3311. .ev = llc_conn_ev_rx_i_rsp_fbit_set_0_unexpd_ns,
  3312. .next_state = LLC_CONN_STATE_AWAIT_REJ,
  3313. .ev_qualifiers = NONE,
  3314. .ev_actions = llc_await_rejct_actions_2b,
  3315. };
  3316. /* State transitions for LLC_CONN_EV_RX_I_CMD_Pbit_SET_1_UNEXPD_Ns event */
  3317. static const llc_conn_action_t llc_await_rejct_actions_3[] = {
  3318. [0] = llc_conn_ac_send_rr_rsp_f_set_1,
  3319. [1] = llc_conn_ac_upd_nr_received,
  3320. [2] = llc_conn_ac_upd_vs,
  3321. [3] = NULL
  3322. };
  3323. static struct llc_conn_state_trans llc_await_rejct_state_trans_3 = {
  3324. .ev = llc_conn_ev_rx_i_cmd_pbit_set_1_unexpd_ns,
  3325. .next_state = LLC_CONN_STATE_AWAIT_REJ,
  3326. .ev_qualifiers = NONE,
  3327. .ev_actions = llc_await_rejct_actions_3,
  3328. };
  3329. /* State transitions for LLC_CONN_EV_RX_I_RSP_Fbit_SET_1 event */
  3330. static const llc_conn_action_t llc_await_rejct_actions_4[] = {
  3331. [0] = llc_conn_ac_inc_vr_by_1,
  3332. [1] = llc_conn_ac_data_ind,
  3333. [2] = llc_conn_ac_stop_p_timer,
  3334. [3] = llc_conn_ac_stop_rej_timer,
  3335. [4] = llc_conn_ac_upd_nr_received,
  3336. [5] = llc_conn_ac_upd_vs,
  3337. [6] = llc_conn_ac_resend_i_xxx_x_set_0_or_send_rr,
  3338. [7] = llc_conn_ac_clear_remote_busy,
  3339. [8] = NULL,
  3340. };
  3341. static struct llc_conn_state_trans llc_await_rejct_state_trans_4 = {
  3342. .ev = llc_conn_ev_rx_i_rsp_fbit_set_1,
  3343. .next_state = LLC_CONN_STATE_NORMAL,
  3344. .ev_qualifiers = NONE,
  3345. .ev_actions = llc_await_rejct_actions_4,
  3346. };
  3347. /* State transitions for LLC_CONN_EV_RX_I_RSP_Fbit_SET_0 event */
  3348. static const llc_conn_action_t llc_await_rejct_actions_5a[] = {
  3349. [0] = llc_conn_ac_inc_vr_by_1,
  3350. [1] = llc_conn_ac_data_ind,
  3351. [2] = llc_conn_ac_send_rr_xxx_x_set_0,
  3352. [3] = llc_conn_ac_stop_rej_timer,
  3353. [4] = llc_conn_ac_upd_nr_received,
  3354. [5] = llc_conn_ac_upd_vs,
  3355. [6] = NULL,
  3356. };
  3357. static struct llc_conn_state_trans llc_await_rejct_state_trans_5a = {
  3358. .ev = llc_conn_ev_rx_i_rsp_fbit_set_0,
  3359. .next_state = LLC_CONN_STATE_AWAIT,
  3360. .ev_qualifiers = NONE,
  3361. .ev_actions = llc_await_rejct_actions_5a,
  3362. };
  3363. /* State transitions for LLC_CONN_EV_RX_I_CMD_Pbit_SET_0 event */
  3364. static const llc_conn_action_t llc_await_rejct_actions_5b[] = {
  3365. [0] = llc_conn_ac_inc_vr_by_1,
  3366. [1] = llc_conn_ac_data_ind,
  3367. [2] = llc_conn_ac_send_rr_xxx_x_set_0,
  3368. [3] = llc_conn_ac_stop_rej_timer,
  3369. [4] = llc_conn_ac_upd_nr_received,
  3370. [5] = llc_conn_ac_upd_vs,
  3371. [6] = NULL,
  3372. };
  3373. static struct llc_conn_state_trans llc_await_rejct_state_trans_5b = {
  3374. .ev = llc_conn_ev_rx_i_cmd_pbit_set_0,
  3375. .next_state = LLC_CONN_STATE_AWAIT,
  3376. .ev_qualifiers = NONE,
  3377. .ev_actions = llc_await_rejct_actions_5b,
  3378. };
  3379. /* State transitions for LLC_CONN_EV_RX_I_CMD_Pbit_SET_1 event */
  3380. static const llc_conn_action_t llc_await_rejct_actions_6[] = {
  3381. [0] = llc_conn_ac_inc_vr_by_1,
  3382. [1] = llc_conn_ac_data_ind,
  3383. [2] = llc_conn_ac_send_rr_rsp_f_set_1,
  3384. [3] = llc_conn_ac_stop_rej_timer,
  3385. [4] = llc_conn_ac_upd_nr_received,
  3386. [5] = llc_conn_ac_upd_vs,
  3387. [6] = NULL,
  3388. };
  3389. static struct llc_conn_state_trans llc_await_rejct_state_trans_6 = {
  3390. .ev = llc_conn_ev_rx_i_cmd_pbit_set_1,
  3391. .next_state = LLC_CONN_STATE_AWAIT,
  3392. .ev_qualifiers = NONE,
  3393. .ev_actions = llc_await_rejct_actions_6,
  3394. };
  3395. /* State transitions for LLC_CONN_EV_RX_RR_RSP_Fbit_SET_1 event */
  3396. static const llc_conn_action_t llc_await_rejct_actions_7a[] = {
  3397. [0] = llc_conn_ac_upd_nr_received,
  3398. [1] = llc_conn_ac_upd_vs,
  3399. [2] = llc_conn_ac_stop_p_timer,
  3400. [3] = llc_conn_ac_resend_i_xxx_x_set_0,
  3401. [4] = llc_conn_ac_clear_remote_busy,
  3402. [5] = NULL,
  3403. };
  3404. static struct llc_conn_state_trans llc_await_rejct_state_trans_7a = {
  3405. .ev = llc_conn_ev_rx_rr_rsp_fbit_set_1,
  3406. .next_state = LLC_CONN_STATE_REJ,
  3407. .ev_qualifiers = NONE,
  3408. .ev_actions = llc_await_rejct_actions_7a,
  3409. };
  3410. /* State transitions for LLC_CONN_EV_RX_REJ_RSP_Fbit_SET_1 event */
  3411. static const llc_conn_action_t llc_await_rejct_actions_7b[] = {
  3412. [0] = llc_conn_ac_upd_nr_received,
  3413. [1] = llc_conn_ac_upd_vs,
  3414. [2] = llc_conn_ac_stop_p_timer,
  3415. [3] = llc_conn_ac_resend_i_xxx_x_set_0,
  3416. [4] = llc_conn_ac_clear_remote_busy,
  3417. [5] = NULL,
  3418. };
  3419. static struct llc_conn_state_trans llc_await_rejct_state_trans_7b = {
  3420. .ev = llc_conn_ev_rx_rej_rsp_fbit_set_1,
  3421. .next_state = LLC_CONN_STATE_REJ,
  3422. .ev_qualifiers = NONE,
  3423. .ev_actions = llc_await_rejct_actions_7b,
  3424. };
  3425. /* State transitions for LLC_CONN_EV_RX_I_RSP_Fbit_SET_1_UNEXPD_Ns event */
  3426. static const llc_conn_action_t llc_await_rejct_actions_7c[] = {
  3427. [0] = llc_conn_ac_upd_nr_received,
  3428. [1] = llc_conn_ac_upd_vs,
  3429. [2] = llc_conn_ac_stop_p_timer,
  3430. [3] = llc_conn_ac_resend_i_xxx_x_set_0,
  3431. [4] = llc_conn_ac_clear_remote_busy,
  3432. [5] = NULL,
  3433. };
  3434. static struct llc_conn_state_trans llc_await_rejct_state_trans_7c = {
  3435. .ev = llc_conn_ev_rx_i_rsp_fbit_set_1_unexpd_ns,
  3436. .next_state = LLC_CONN_STATE_REJ,
  3437. .ev_qualifiers = NONE,
  3438. .ev_actions = llc_await_rejct_actions_7c,
  3439. };
  3440. /* State transitions for LLC_CONN_EV_RX_RR_CMD_Pbit_SET_0 event */
  3441. static const llc_conn_action_t llc_await_rejct_actions_8a[] = {
  3442. [0] = llc_conn_ac_upd_nr_received,
  3443. [1] = llc_conn_ac_upd_vs,
  3444. [2] = llc_conn_ac_clear_remote_busy,
  3445. [3] = NULL,
  3446. };
  3447. static struct llc_conn_state_trans llc_await_rejct_state_trans_8a = {
  3448. .ev = llc_conn_ev_rx_rr_cmd_pbit_set_0,
  3449. .next_state = LLC_CONN_STATE_AWAIT_REJ,
  3450. .ev_qualifiers = NONE,
  3451. .ev_actions = llc_await_rejct_actions_8a,
  3452. };
  3453. /* State transitions for LLC_CONN_EV_RX_RR_RSP_Fbit_SET_0 event */
  3454. static const llc_conn_action_t llc_await_rejct_actions_8b[] = {
  3455. [0] = llc_conn_ac_upd_nr_received,
  3456. [1] = llc_conn_ac_upd_vs,
  3457. [2] = llc_conn_ac_clear_remote_busy,
  3458. [3] = NULL,
  3459. };
  3460. static struct llc_conn_state_trans llc_await_rejct_state_trans_8b = {
  3461. .ev = llc_conn_ev_rx_rr_rsp_fbit_set_0,
  3462. .next_state = LLC_CONN_STATE_AWAIT_REJ,
  3463. .ev_qualifiers = NONE,
  3464. .ev_actions = llc_await_rejct_actions_8b,
  3465. };
  3466. /* State transitions for LLC_CONN_EV_RX_REJ_CMD_Pbit_SET_0 event */
  3467. static const llc_conn_action_t llc_await_rejct_actions_8c[] = {
  3468. [0] = llc_conn_ac_upd_nr_received,
  3469. [1] = llc_conn_ac_upd_vs,
  3470. [2] = llc_conn_ac_clear_remote_busy,
  3471. [3] = NULL,
  3472. };
  3473. static struct llc_conn_state_trans llc_await_rejct_state_trans_8c = {
  3474. .ev = llc_conn_ev_rx_rej_cmd_pbit_set_0,
  3475. .next_state = LLC_CONN_STATE_AWAIT_REJ,
  3476. .ev_qualifiers = NONE,
  3477. .ev_actions = llc_await_rejct_actions_8c,
  3478. };
  3479. /* State transitions for LLC_CONN_EV_RX_REJ_RSP_Fbit_SET_0 event */
  3480. static const llc_conn_action_t llc_await_rejct_actions_8d[] = {
  3481. [0] = llc_conn_ac_upd_nr_received,
  3482. [1] = llc_conn_ac_upd_vs,
  3483. [2] = llc_conn_ac_clear_remote_busy,
  3484. [3] = NULL,
  3485. };
  3486. static struct llc_conn_state_trans llc_await_rejct_state_trans_8d = {
  3487. .ev = llc_conn_ev_rx_rej_rsp_fbit_set_0,
  3488. .next_state = LLC_CONN_STATE_AWAIT_REJ,
  3489. .ev_qualifiers = NONE,
  3490. .ev_actions = llc_await_rejct_actions_8d,
  3491. };
  3492. /* State transitions for LLC_CONN_EV_RX_RR_CMD_Pbit_SET_1 event */
  3493. static const llc_conn_action_t llc_await_rejct_actions_9a[] = {
  3494. [0] = llc_conn_ac_send_rr_rsp_f_set_1,
  3495. [1] = llc_conn_ac_upd_nr_received,
  3496. [2] = llc_conn_ac_upd_vs,
  3497. [3] = llc_conn_ac_clear_remote_busy,
  3498. [4] = NULL,
  3499. };
  3500. static struct llc_conn_state_trans llc_await_rejct_state_trans_9a = {
  3501. .ev = llc_conn_ev_rx_rr_cmd_pbit_set_1,
  3502. .next_state = LLC_CONN_STATE_AWAIT_REJ,
  3503. .ev_qualifiers = NONE,
  3504. .ev_actions = llc_await_rejct_actions_9a,
  3505. };
  3506. /* State transitions for LLC_CONN_EV_RX_REJ_CMD_Pbit_SET_1 event */
  3507. static const llc_conn_action_t llc_await_rejct_actions_9b[] = {
  3508. [0] = llc_conn_ac_send_rr_rsp_f_set_1,
  3509. [1] = llc_conn_ac_upd_nr_received,
  3510. [2] = llc_conn_ac_upd_vs,
  3511. [3] = llc_conn_ac_clear_remote_busy,
  3512. [4] = NULL,
  3513. };
  3514. static struct llc_conn_state_trans llc_await_rejct_state_trans_9b = {
  3515. .ev = llc_conn_ev_rx_rej_cmd_pbit_set_1,
  3516. .next_state = LLC_CONN_STATE_AWAIT_REJ,
  3517. .ev_qualifiers = NONE,
  3518. .ev_actions = llc_await_rejct_actions_9b,
  3519. };
  3520. /* State transitions for LLC_CONN_EV_RX_RNR_RSP_Fbit_SET_1 event */
  3521. static const llc_conn_action_t llc_await_rejct_actions_10[] = {
  3522. [0] = llc_conn_ac_upd_nr_received,
  3523. [1] = llc_conn_ac_upd_vs,
  3524. [2] = llc_conn_ac_stop_p_timer,
  3525. [3] = llc_conn_ac_set_remote_busy,
  3526. [4] = NULL,
  3527. };
  3528. static struct llc_conn_state_trans llc_await_rejct_state_trans_10 = {
  3529. .ev = llc_conn_ev_rx_rnr_rsp_fbit_set_1,
  3530. .next_state = LLC_CONN_STATE_REJ,
  3531. .ev_qualifiers = NONE,
  3532. .ev_actions = llc_await_rejct_actions_10,
  3533. };
  3534. /* State transitions for LLC_CONN_EV_RX_RNR_CMD_Pbit_SET_0 event */
  3535. static const llc_conn_action_t llc_await_rejct_actions_11a[] = {
  3536. [0] = llc_conn_ac_upd_nr_received,
  3537. [1] = llc_conn_ac_upd_vs,
  3538. [2] = llc_conn_ac_set_remote_busy,
  3539. [3] = NULL,
  3540. };
  3541. static struct llc_conn_state_trans llc_await_rejct_state_trans_11a = {
  3542. .ev = llc_conn_ev_rx_rnr_cmd_pbit_set_0,
  3543. .next_state = LLC_CONN_STATE_AWAIT_REJ,
  3544. .ev_qualifiers = NONE,
  3545. .ev_actions = llc_await_rejct_actions_11a,
  3546. };
  3547. /* State transitions for LLC_CONN_EV_RX_RNR_RSP_Fbit_SET_0 event */
  3548. static const llc_conn_action_t llc_await_rejct_actions_11b[] = {
  3549. [0] = llc_conn_ac_upd_nr_received,
  3550. [1] = llc_conn_ac_upd_vs,
  3551. [2] = llc_conn_ac_set_remote_busy,
  3552. [3] = NULL,
  3553. };
  3554. static struct llc_conn_state_trans llc_await_rejct_state_trans_11b = {
  3555. .ev = llc_conn_ev_rx_rnr_rsp_fbit_set_0,
  3556. .next_state = LLC_CONN_STATE_AWAIT_REJ,
  3557. .ev_qualifiers = NONE,
  3558. .ev_actions = llc_await_rejct_actions_11b,
  3559. };
  3560. /* State transitions for LLC_CONN_EV_RX_RNR_CMD_Pbit_SET_1 event */
  3561. static const llc_conn_action_t llc_await_rejct_actions_12[] = {
  3562. [0] = llc_conn_ac_send_rr_rsp_f_set_1,
  3563. [1] = llc_conn_ac_upd_nr_received,
  3564. [2] = llc_conn_ac_upd_vs,
  3565. [3] = llc_conn_ac_set_remote_busy,
  3566. [4] = NULL,
  3567. };
  3568. static struct llc_conn_state_trans llc_await_rejct_state_trans_12 = {
  3569. .ev = llc_conn_ev_rx_rnr_cmd_pbit_set_1,
  3570. .next_state = LLC_CONN_STATE_AWAIT_REJ,
  3571. .ev_qualifiers = NONE,
  3572. .ev_actions = llc_await_rejct_actions_12,
  3573. };
  3574. /* State transitions for LLC_CONN_EV_P_TMR_EXP event */
  3575. static const llc_conn_ev_qfyr_t llc_await_rejct_ev_qfyrs_13[] = {
  3576. [0] = llc_conn_ev_qlfy_retry_cnt_lt_n2,
  3577. [1] = NULL,
  3578. };
  3579. static const llc_conn_action_t llc_await_rejct_actions_13[] = {
  3580. [0] = llc_conn_ac_send_rej_cmd_p_set_1,
  3581. [1] = llc_conn_ac_stop_p_timer,
  3582. [2] = llc_conn_ac_inc_retry_cnt_by_1,
  3583. [3] = NULL,
  3584. };
  3585. static struct llc_conn_state_trans llc_await_rejct_state_trans_13 = {
  3586. .ev = llc_conn_ev_p_tmr_exp,
  3587. .next_state = LLC_CONN_STATE_AWAIT_REJ,
  3588. .ev_qualifiers = llc_await_rejct_ev_qfyrs_13,
  3589. .ev_actions = llc_await_rejct_actions_13,
  3590. };
  3591. /*
  3592. * Array of pointers;
  3593. * one to each transition
  3594. */
  3595. static struct llc_conn_state_trans *llc_await_rejct_state_transitions[] = {
  3596. [0] = &llc_await_reject_state_trans_1_0,
  3597. [1] = &llc_common_state_trans_1, /* requests */
  3598. [2] = &llc_common_state_trans_2,
  3599. [3] = &llc_common_state_trans_end,
  3600. [4] = &llc_await_rejct_state_trans_1, /* local busy */
  3601. [5] = &llc_common_state_trans_end,
  3602. [6] = &llc_common_state_trans_end, /* Initiate PF cycle */
  3603. [7] = &llc_await_rejct_state_trans_13, /* timers */
  3604. [8] = &llc_common_state_trans_11a,
  3605. [9] = &llc_common_state_trans_11b,
  3606. [10] = &llc_common_state_trans_11c,
  3607. [11] = &llc_common_state_trans_11d,
  3608. [12] = &llc_common_state_trans_end,
  3609. [13] = &llc_await_rejct_state_trans_2a, /* receive frames */
  3610. [14] = &llc_await_rejct_state_trans_2b,
  3611. [15] = &llc_await_rejct_state_trans_3,
  3612. [16] = &llc_await_rejct_state_trans_4,
  3613. [17] = &llc_await_rejct_state_trans_5a,
  3614. [18] = &llc_await_rejct_state_trans_5b,
  3615. [19] = &llc_await_rejct_state_trans_6,
  3616. [20] = &llc_await_rejct_state_trans_7a,
  3617. [21] = &llc_await_rejct_state_trans_7b,
  3618. [22] = &llc_await_rejct_state_trans_7c,
  3619. [23] = &llc_await_rejct_state_trans_8a,
  3620. [24] = &llc_await_rejct_state_trans_8b,
  3621. [25] = &llc_await_rejct_state_trans_8c,
  3622. [26] = &llc_await_rejct_state_trans_8d,
  3623. [27] = &llc_await_rejct_state_trans_9a,
  3624. [28] = &llc_await_rejct_state_trans_9b,
  3625. [29] = &llc_await_rejct_state_trans_10,
  3626. [30] = &llc_await_rejct_state_trans_11a,
  3627. [31] = &llc_await_rejct_state_trans_11b,
  3628. [32] = &llc_await_rejct_state_trans_12,
  3629. [33] = &llc_common_state_trans_3,
  3630. [34] = &llc_common_state_trans_4,
  3631. [35] = &llc_common_state_trans_5,
  3632. [36] = &llc_common_state_trans_6,
  3633. [37] = &llc_common_state_trans_7a,
  3634. [38] = &llc_common_state_trans_7b,
  3635. [39] = &llc_common_state_trans_8a,
  3636. [40] = &llc_common_state_trans_8b,
  3637. [41] = &llc_common_state_trans_8c,
  3638. [42] = &llc_common_state_trans_9,
  3639. /* [43] = &llc_common_state_trans_10, */
  3640. [43] = &llc_common_state_trans_end,
  3641. };
  3642. /* LLC_CONN_STATE_D_CONN transitions */
  3643. /* State transitions for LLC_CONN_EV_RX_SABME_CMD_Pbit_SET_X event,
  3644. * cause_flag = 1 */
  3645. static const llc_conn_ev_qfyr_t llc_d_conn_ev_qfyrs_1[] = {
  3646. [0] = llc_conn_ev_qlfy_cause_flag_eq_1,
  3647. [1] = llc_conn_ev_qlfy_set_status_conflict,
  3648. [2] = NULL,
  3649. };
  3650. static const llc_conn_action_t llc_d_conn_actions_1[] = {
  3651. [0] = llc_conn_ac_send_dm_rsp_f_set_p,
  3652. [1] = llc_conn_ac_stop_ack_timer,
  3653. [2] = llc_conn_ac_disc_confirm,
  3654. [3] = llc_conn_disc,
  3655. [4] = NULL,
  3656. };
  3657. static struct llc_conn_state_trans llc_d_conn_state_trans_1 = {
  3658. .ev = llc_conn_ev_rx_sabme_cmd_pbit_set_x,
  3659. .next_state = LLC_CONN_STATE_ADM,
  3660. .ev_qualifiers = llc_d_conn_ev_qfyrs_1,
  3661. .ev_actions = llc_d_conn_actions_1,
  3662. };
  3663. /* State transitions for LLC_CONN_EV_RX_SABME_CMD_Pbit_SET_X event,
  3664. * cause_flag = 0
  3665. */
  3666. static const llc_conn_ev_qfyr_t llc_d_conn_ev_qfyrs_1_1[] = {
  3667. [0] = llc_conn_ev_qlfy_cause_flag_eq_0,
  3668. [1] = llc_conn_ev_qlfy_set_status_conflict,
  3669. [2] = NULL,
  3670. };
  3671. static const llc_conn_action_t llc_d_conn_actions_1_1[] = {
  3672. [0] = llc_conn_ac_send_dm_rsp_f_set_p,
  3673. [1] = llc_conn_ac_stop_ack_timer,
  3674. [2] = llc_conn_disc,
  3675. [3] = NULL,
  3676. };
  3677. static struct llc_conn_state_trans llc_d_conn_state_trans_1_1 = {
  3678. .ev = llc_conn_ev_rx_sabme_cmd_pbit_set_x,
  3679. .next_state = LLC_CONN_STATE_ADM,
  3680. .ev_qualifiers = llc_d_conn_ev_qfyrs_1_1,
  3681. .ev_actions = llc_d_conn_actions_1_1,
  3682. };
  3683. /* State transitions for LLC_CONN_EV_RX_UA_RSP_Fbit_SET_X event,
  3684. * cause_flag = 1
  3685. */
  3686. static const llc_conn_ev_qfyr_t llc_d_conn_ev_qfyrs_2[] = {
  3687. [0] = llc_conn_ev_qlfy_p_flag_eq_f,
  3688. [1] = llc_conn_ev_qlfy_cause_flag_eq_1,
  3689. [2] = llc_conn_ev_qlfy_set_status_disc,
  3690. [3] = NULL,
  3691. };
  3692. static const llc_conn_action_t llc_d_conn_actions_2[] = {
  3693. [0] = llc_conn_ac_stop_ack_timer,
  3694. [1] = llc_conn_ac_disc_confirm,
  3695. [2] = llc_conn_disc,
  3696. [3] = NULL,
  3697. };
  3698. static struct llc_conn_state_trans llc_d_conn_state_trans_2 = {
  3699. .ev = llc_conn_ev_rx_ua_rsp_fbit_set_x,
  3700. .next_state = LLC_CONN_STATE_ADM,
  3701. .ev_qualifiers = llc_d_conn_ev_qfyrs_2,
  3702. .ev_actions = llc_d_conn_actions_2,
  3703. };
  3704. /* State transitions for LLC_CONN_EV_RX_UA_RSP_Fbit_SET_X event,
  3705. * cause_flag = 0
  3706. */
  3707. static const llc_conn_ev_qfyr_t llc_d_conn_ev_qfyrs_2_1[] = {
  3708. [0] = llc_conn_ev_qlfy_p_flag_eq_f,
  3709. [1] = llc_conn_ev_qlfy_cause_flag_eq_0,
  3710. [2] = llc_conn_ev_qlfy_set_status_disc,
  3711. [3] = NULL,
  3712. };
  3713. static const llc_conn_action_t llc_d_conn_actions_2_1[] = {
  3714. [0] = llc_conn_ac_stop_ack_timer,
  3715. [1] = llc_conn_disc,
  3716. [2] = NULL,
  3717. };
  3718. static struct llc_conn_state_trans llc_d_conn_state_trans_2_1 = {
  3719. .ev = llc_conn_ev_rx_ua_rsp_fbit_set_x,
  3720. .next_state = LLC_CONN_STATE_ADM,
  3721. .ev_qualifiers = llc_d_conn_ev_qfyrs_2_1,
  3722. .ev_actions = llc_d_conn_actions_2_1,
  3723. };
  3724. /* State transitions for LLC_CONN_EV_RX_DISC_CMD_Pbit_SET_X event */
  3725. static const llc_conn_action_t llc_d_conn_actions_3[] = {
  3726. [0] = llc_conn_ac_send_ua_rsp_f_set_p,
  3727. [1] = NULL,
  3728. };
  3729. static struct llc_conn_state_trans llc_d_conn_state_trans_3 = {
  3730. .ev = llc_conn_ev_rx_disc_cmd_pbit_set_x,
  3731. .next_state = LLC_CONN_STATE_D_CONN,
  3732. .ev_qualifiers = NONE,
  3733. .ev_actions = llc_d_conn_actions_3,
  3734. };
  3735. /* State transitions for LLC_CONN_EV_RX_DM_RSP_Fbit_SET_X event,
  3736. * cause_flag = 1
  3737. */
  3738. static const llc_conn_ev_qfyr_t llc_d_conn_ev_qfyrs_4[] = {
  3739. [0] = llc_conn_ev_qlfy_cause_flag_eq_1,
  3740. [1] = llc_conn_ev_qlfy_set_status_disc,
  3741. [2] = NULL,
  3742. };
  3743. static const llc_conn_action_t llc_d_conn_actions_4[] = {
  3744. [0] = llc_conn_ac_stop_ack_timer,
  3745. [1] = llc_conn_ac_disc_confirm,
  3746. [2] = llc_conn_disc,
  3747. [3] = NULL,
  3748. };
  3749. static struct llc_conn_state_trans llc_d_conn_state_trans_4 = {
  3750. .ev = llc_conn_ev_rx_dm_rsp_fbit_set_x,
  3751. .next_state = LLC_CONN_STATE_ADM,
  3752. .ev_qualifiers = llc_d_conn_ev_qfyrs_4,
  3753. .ev_actions = llc_d_conn_actions_4,
  3754. };
  3755. /* State transitions for LLC_CONN_EV_RX_DM_RSP_Fbit_SET_X event,
  3756. * cause_flag = 0
  3757. */
  3758. static const llc_conn_ev_qfyr_t llc_d_conn_ev_qfyrs_4_1[] = {
  3759. [0] = llc_conn_ev_qlfy_cause_flag_eq_0,
  3760. [1] = llc_conn_ev_qlfy_set_status_disc,
  3761. [2] = NULL,
  3762. };
  3763. static const llc_conn_action_t llc_d_conn_actions_4_1[] = {
  3764. [0] = llc_conn_ac_stop_ack_timer,
  3765. [1] = llc_conn_disc,
  3766. [2] = NULL,
  3767. };
  3768. static struct llc_conn_state_trans llc_d_conn_state_trans_4_1 = {
  3769. .ev = llc_conn_ev_rx_dm_rsp_fbit_set_x,
  3770. .next_state = LLC_CONN_STATE_ADM,
  3771. .ev_qualifiers = llc_d_conn_ev_qfyrs_4_1,
  3772. .ev_actions = llc_d_conn_actions_4_1,
  3773. };
  3774. /*
  3775. * State transition for
  3776. * LLC_CONN_EV_DATA_CONN_REQ event
  3777. */
  3778. static const llc_conn_ev_qfyr_t llc_d_conn_ev_qfyrs_5[] = {
  3779. [0] = llc_conn_ev_qlfy_set_status_refuse,
  3780. [1] = NULL,
  3781. };
  3782. /* just one member, NULL, .bss zeroes it */
  3783. static const llc_conn_action_t llc_d_conn_actions_5[1];
  3784. static struct llc_conn_state_trans llc_d_conn_state_trans_5 = {
  3785. .ev = llc_conn_ev_data_req,
  3786. .next_state = LLC_CONN_STATE_D_CONN,
  3787. .ev_qualifiers = llc_d_conn_ev_qfyrs_5,
  3788. .ev_actions = llc_d_conn_actions_5,
  3789. };
  3790. /* State transitions for LLC_CONN_EV_ACK_TMR_EXP event */
  3791. static const llc_conn_ev_qfyr_t llc_d_conn_ev_qfyrs_6[] = {
  3792. [0] = llc_conn_ev_qlfy_retry_cnt_lt_n2,
  3793. [1] = NULL,
  3794. };
  3795. static const llc_conn_action_t llc_d_conn_actions_6[] = {
  3796. [0] = llc_conn_ac_send_disc_cmd_p_set_x,
  3797. [1] = llc_conn_ac_start_ack_timer,
  3798. [2] = llc_conn_ac_inc_retry_cnt_by_1,
  3799. [3] = NULL,
  3800. };
  3801. static struct llc_conn_state_trans llc_d_conn_state_trans_6 = {
  3802. .ev = llc_conn_ev_ack_tmr_exp,
  3803. .next_state = LLC_CONN_STATE_D_CONN,
  3804. .ev_qualifiers = llc_d_conn_ev_qfyrs_6,
  3805. .ev_actions = llc_d_conn_actions_6,
  3806. };
  3807. /* State transitions for LLC_CONN_EV_ACK_TMR_EXP event, cause_flag = 1 */
  3808. static const llc_conn_ev_qfyr_t llc_d_conn_ev_qfyrs_7[] = {
  3809. [0] = llc_conn_ev_qlfy_retry_cnt_gte_n2,
  3810. [1] = llc_conn_ev_qlfy_cause_flag_eq_1,
  3811. [2] = llc_conn_ev_qlfy_set_status_failed,
  3812. [3] = NULL,
  3813. };
  3814. static const llc_conn_action_t llc_d_conn_actions_7[] = {
  3815. [0] = llc_conn_ac_disc_confirm,
  3816. [1] = llc_conn_disc,
  3817. [2] = NULL,
  3818. };
  3819. static struct llc_conn_state_trans llc_d_conn_state_trans_7 = {
  3820. .ev = llc_conn_ev_ack_tmr_exp,
  3821. .next_state = LLC_CONN_STATE_ADM,
  3822. .ev_qualifiers = llc_d_conn_ev_qfyrs_7,
  3823. .ev_actions = llc_d_conn_actions_7,
  3824. };
  3825. /* State transitions for LLC_CONN_EV_ACK_TMR_EXP event, cause_flag = 0 */
  3826. static const llc_conn_ev_qfyr_t llc_d_conn_ev_qfyrs_8[] = {
  3827. [0] = llc_conn_ev_qlfy_retry_cnt_gte_n2,
  3828. [1] = llc_conn_ev_qlfy_cause_flag_eq_0,
  3829. [2] = llc_conn_ev_qlfy_set_status_failed,
  3830. [3] = NULL,
  3831. };
  3832. static const llc_conn_action_t llc_d_conn_actions_8[] = {
  3833. [0] = llc_conn_disc,
  3834. [1] = NULL,
  3835. };
  3836. static struct llc_conn_state_trans llc_d_conn_state_trans_8 = {
  3837. .ev = llc_conn_ev_ack_tmr_exp,
  3838. .next_state = LLC_CONN_STATE_ADM,
  3839. .ev_qualifiers = llc_d_conn_ev_qfyrs_8,
  3840. .ev_actions = llc_d_conn_actions_8,
  3841. };
  3842. /*
  3843. * Array of pointers;
  3844. * one to each transition
  3845. */
  3846. static struct llc_conn_state_trans *llc_d_conn_state_transitions[] = {
  3847. [0] = &llc_d_conn_state_trans_5, /* Request */
  3848. [1] = &llc_common_state_trans_end,
  3849. [2] = &llc_common_state_trans_end, /* Local busy */
  3850. [3] = &llc_common_state_trans_end, /* Initiate PF cycle */
  3851. [4] = &llc_d_conn_state_trans_6, /* Timer */
  3852. [5] = &llc_d_conn_state_trans_7,
  3853. [6] = &llc_d_conn_state_trans_8,
  3854. [7] = &llc_common_state_trans_end,
  3855. [8] = &llc_d_conn_state_trans_1, /* Receive frame */
  3856. [9] = &llc_d_conn_state_trans_1_1,
  3857. [10] = &llc_d_conn_state_trans_2,
  3858. [11] = &llc_d_conn_state_trans_2_1,
  3859. [12] = &llc_d_conn_state_trans_3,
  3860. [13] = &llc_d_conn_state_trans_4,
  3861. [14] = &llc_d_conn_state_trans_4_1,
  3862. [15] = &llc_common_state_trans_end,
  3863. };
  3864. /* LLC_CONN_STATE_RESET transitions */
  3865. /* State transitions for LLC_CONN_EV_RX_SABME_CMD_Pbit_SET_X event */
  3866. static const llc_conn_action_t llc_rst_actions_1[] = {
  3867. [0] = llc_conn_ac_set_vs_0,
  3868. [1] = llc_conn_ac_set_vr_0,
  3869. [2] = llc_conn_ac_set_s_flag_1,
  3870. [3] = llc_conn_ac_send_ua_rsp_f_set_p,
  3871. [4] = NULL,
  3872. };
  3873. static struct llc_conn_state_trans llc_rst_state_trans_1 = {
  3874. .ev = llc_conn_ev_rx_sabme_cmd_pbit_set_x,
  3875. .next_state = LLC_CONN_STATE_RESET,
  3876. .ev_qualifiers = NONE,
  3877. .ev_actions = llc_rst_actions_1,
  3878. };
  3879. /* State transitions for LLC_CONN_EV_RX_UA_RSP_Fbit_SET_X event,
  3880. * cause_flag = 1
  3881. */
  3882. static const llc_conn_ev_qfyr_t llc_rst_ev_qfyrs_2[] = {
  3883. [0] = llc_conn_ev_qlfy_p_flag_eq_f,
  3884. [1] = llc_conn_ev_qlfy_cause_flag_eq_1,
  3885. [2] = llc_conn_ev_qlfy_set_status_conn,
  3886. [3] = NULL,
  3887. };
  3888. static const llc_conn_action_t llc_rst_actions_2[] = {
  3889. [0] = llc_conn_ac_stop_ack_timer,
  3890. [1] = llc_conn_ac_set_vs_0,
  3891. [2] = llc_conn_ac_set_vr_0,
  3892. [3] = llc_conn_ac_upd_p_flag,
  3893. [4] = llc_conn_ac_rst_confirm,
  3894. [5] = llc_conn_ac_set_remote_busy_0,
  3895. [6] = llc_conn_reset,
  3896. [7] = NULL,
  3897. };
  3898. static struct llc_conn_state_trans llc_rst_state_trans_2 = {
  3899. .ev = llc_conn_ev_rx_ua_rsp_fbit_set_x,
  3900. .next_state = LLC_CONN_STATE_NORMAL,
  3901. .ev_qualifiers = llc_rst_ev_qfyrs_2,
  3902. .ev_actions = llc_rst_actions_2,
  3903. };
  3904. /* State transitions for LLC_CONN_EV_RX_UA_RSP_Fbit_SET_X event,
  3905. * cause_flag = 0
  3906. */
  3907. static const llc_conn_ev_qfyr_t llc_rst_ev_qfyrs_2_1[] = {
  3908. [0] = llc_conn_ev_qlfy_p_flag_eq_f,
  3909. [1] = llc_conn_ev_qlfy_cause_flag_eq_0,
  3910. [2] = llc_conn_ev_qlfy_set_status_rst_done,
  3911. [3] = NULL,
  3912. };
  3913. static const llc_conn_action_t llc_rst_actions_2_1[] = {
  3914. [0] = llc_conn_ac_stop_ack_timer,
  3915. [1] = llc_conn_ac_set_vs_0,
  3916. [2] = llc_conn_ac_set_vr_0,
  3917. [3] = llc_conn_ac_upd_p_flag,
  3918. [4] = llc_conn_ac_rst_confirm,
  3919. [5] = llc_conn_ac_set_remote_busy_0,
  3920. [6] = llc_conn_reset,
  3921. [7] = NULL,
  3922. };
  3923. static struct llc_conn_state_trans llc_rst_state_trans_2_1 = {
  3924. .ev = llc_conn_ev_rx_ua_rsp_fbit_set_x,
  3925. .next_state = LLC_CONN_STATE_NORMAL,
  3926. .ev_qualifiers = llc_rst_ev_qfyrs_2_1,
  3927. .ev_actions = llc_rst_actions_2_1,
  3928. };
  3929. /* State transitions for LLC_CONN_EV_ACK_TMR_EXP event */
  3930. static const llc_conn_ev_qfyr_t llc_rst_ev_qfyrs_3[] = {
  3931. [0] = llc_conn_ev_qlfy_s_flag_eq_1,
  3932. [1] = llc_conn_ev_qlfy_set_status_rst_done,
  3933. [2] = NULL,
  3934. };
  3935. static const llc_conn_action_t llc_rst_actions_3[] = {
  3936. [0] = llc_conn_ac_set_p_flag_0,
  3937. [1] = llc_conn_ac_set_remote_busy_0,
  3938. [2] = NULL,
  3939. };
  3940. static struct llc_conn_state_trans llc_rst_state_trans_3 = {
  3941. .ev = llc_conn_ev_ack_tmr_exp,
  3942. .next_state = LLC_CONN_STATE_NORMAL,
  3943. .ev_qualifiers = llc_rst_ev_qfyrs_3,
  3944. .ev_actions = llc_rst_actions_3,
  3945. };
  3946. /* State transitions for LLC_CONN_EV_RX_DISC_CMD_Pbit_SET_X event,
  3947. * cause_flag = 1
  3948. */
  3949. static const llc_conn_ev_qfyr_t llc_rst_ev_qfyrs_4[] = {
  3950. [0] = llc_conn_ev_qlfy_cause_flag_eq_1,
  3951. [1] = llc_conn_ev_qlfy_set_status_disc,
  3952. [2] = NULL,
  3953. };
  3954. static const llc_conn_action_t llc_rst_actions_4[] = {
  3955. [0] = llc_conn_ac_send_dm_rsp_f_set_p,
  3956. [1] = llc_conn_ac_disc_ind,
  3957. [2] = llc_conn_ac_stop_ack_timer,
  3958. [3] = llc_conn_disc,
  3959. [4] = NULL,
  3960. };
  3961. static struct llc_conn_state_trans llc_rst_state_trans_4 = {
  3962. .ev = llc_conn_ev_rx_disc_cmd_pbit_set_x,
  3963. .next_state = LLC_CONN_STATE_ADM,
  3964. .ev_qualifiers = llc_rst_ev_qfyrs_4,
  3965. .ev_actions = llc_rst_actions_4,
  3966. };
  3967. /* State transitions for LLC_CONN_EV_RX_DISC_CMD_Pbit_SET_X event,
  3968. * cause_flag = 0
  3969. */
  3970. static const llc_conn_ev_qfyr_t llc_rst_ev_qfyrs_4_1[] = {
  3971. [0] = llc_conn_ev_qlfy_cause_flag_eq_0,
  3972. [1] = llc_conn_ev_qlfy_set_status_refuse,
  3973. [2] = NULL,
  3974. };
  3975. static const llc_conn_action_t llc_rst_actions_4_1[] = {
  3976. [0] = llc_conn_ac_send_dm_rsp_f_set_p,
  3977. [1] = llc_conn_ac_stop_ack_timer,
  3978. [2] = llc_conn_disc,
  3979. [3] = NULL,
  3980. };
  3981. static struct llc_conn_state_trans llc_rst_state_trans_4_1 = {
  3982. .ev = llc_conn_ev_rx_disc_cmd_pbit_set_x,
  3983. .next_state = LLC_CONN_STATE_ADM,
  3984. .ev_qualifiers = llc_rst_ev_qfyrs_4_1,
  3985. .ev_actions = llc_rst_actions_4_1,
  3986. };
  3987. /* State transitions for LLC_CONN_EV_RX_DM_RSP_Fbit_SET_X event,
  3988. * cause_flag = 1
  3989. */
  3990. static const llc_conn_ev_qfyr_t llc_rst_ev_qfyrs_5[] = {
  3991. [0] = llc_conn_ev_qlfy_cause_flag_eq_1,
  3992. [1] = llc_conn_ev_qlfy_set_status_disc,
  3993. [2] = NULL,
  3994. };
  3995. static const llc_conn_action_t llc_rst_actions_5[] = {
  3996. [0] = llc_conn_ac_disc_ind,
  3997. [1] = llc_conn_ac_stop_ack_timer,
  3998. [2] = llc_conn_disc,
  3999. [3] = NULL,
  4000. };
  4001. static struct llc_conn_state_trans llc_rst_state_trans_5 = {
  4002. .ev = llc_conn_ev_rx_dm_rsp_fbit_set_x,
  4003. .next_state = LLC_CONN_STATE_ADM,
  4004. .ev_qualifiers = llc_rst_ev_qfyrs_5,
  4005. .ev_actions = llc_rst_actions_5,
  4006. };
  4007. /* State transitions for LLC_CONN_EV_RX_DM_RSP_Fbit_SET_X event,
  4008. * cause_flag = 0
  4009. */
  4010. static const llc_conn_ev_qfyr_t llc_rst_ev_qfyrs_5_1[] = {
  4011. [0] = llc_conn_ev_qlfy_cause_flag_eq_0,
  4012. [1] = llc_conn_ev_qlfy_set_status_refuse,
  4013. [2] = NULL,
  4014. };
  4015. static const llc_conn_action_t llc_rst_actions_5_1[] = {
  4016. [0] = llc_conn_ac_stop_ack_timer,
  4017. [1] = llc_conn_disc,
  4018. [2] = NULL,
  4019. };
  4020. static struct llc_conn_state_trans llc_rst_state_trans_5_1 = {
  4021. .ev = llc_conn_ev_rx_dm_rsp_fbit_set_x,
  4022. .next_state = LLC_CONN_STATE_ADM,
  4023. .ev_qualifiers = llc_rst_ev_qfyrs_5_1,
  4024. .ev_actions = llc_rst_actions_5_1,
  4025. };
  4026. /* State transitions for DATA_CONN_REQ event */
  4027. static const llc_conn_ev_qfyr_t llc_rst_ev_qfyrs_6[] = {
  4028. [0] = llc_conn_ev_qlfy_set_status_refuse,
  4029. [1] = NULL,
  4030. };
  4031. /* just one member, NULL, .bss zeroes it */
  4032. static const llc_conn_action_t llc_rst_actions_6[1];
  4033. static struct llc_conn_state_trans llc_rst_state_trans_6 = {
  4034. .ev = llc_conn_ev_data_req,
  4035. .next_state = LLC_CONN_STATE_RESET,
  4036. .ev_qualifiers = llc_rst_ev_qfyrs_6,
  4037. .ev_actions = llc_rst_actions_6,
  4038. };
  4039. /* State transitions for LLC_CONN_EV_ACK_TMR_EXP event */
  4040. static const llc_conn_ev_qfyr_t llc_rst_ev_qfyrs_7[] = {
  4041. [0] = llc_conn_ev_qlfy_retry_cnt_lt_n2,
  4042. [1] = llc_conn_ev_qlfy_s_flag_eq_0,
  4043. [2] = NULL,
  4044. };
  4045. static const llc_conn_action_t llc_rst_actions_7[] = {
  4046. [0] = llc_conn_ac_send_sabme_cmd_p_set_x,
  4047. [1] = llc_conn_ac_start_ack_timer,
  4048. [2] = llc_conn_ac_inc_retry_cnt_by_1,
  4049. [3] = NULL,
  4050. };
  4051. static struct llc_conn_state_trans llc_rst_state_trans_7 = {
  4052. .ev = llc_conn_ev_ack_tmr_exp,
  4053. .next_state = LLC_CONN_STATE_RESET,
  4054. .ev_qualifiers = llc_rst_ev_qfyrs_7,
  4055. .ev_actions = llc_rst_actions_7,
  4056. };
  4057. /* State transitions for LLC_CONN_EV_ACK_TMR_EXP event */
  4058. static const llc_conn_ev_qfyr_t llc_rst_ev_qfyrs_8[] = {
  4059. [0] = llc_conn_ev_qlfy_retry_cnt_gte_n2,
  4060. [1] = llc_conn_ev_qlfy_s_flag_eq_0,
  4061. [2] = llc_conn_ev_qlfy_cause_flag_eq_1,
  4062. [3] = llc_conn_ev_qlfy_set_status_failed,
  4063. [4] = NULL,
  4064. };
  4065. static const llc_conn_action_t llc_rst_actions_8[] = {
  4066. [0] = llc_conn_ac_disc_ind,
  4067. [1] = llc_conn_disc,
  4068. [2] = NULL,
  4069. };
  4070. static struct llc_conn_state_trans llc_rst_state_trans_8 = {
  4071. .ev = llc_conn_ev_ack_tmr_exp,
  4072. .next_state = LLC_CONN_STATE_ADM,
  4073. .ev_qualifiers = llc_rst_ev_qfyrs_8,
  4074. .ev_actions = llc_rst_actions_8,
  4075. };
  4076. /* State transitions for LLC_CONN_EV_ACK_TMR_EXP event */
  4077. static const llc_conn_ev_qfyr_t llc_rst_ev_qfyrs_8_1[] = {
  4078. [0] = llc_conn_ev_qlfy_retry_cnt_gte_n2,
  4079. [1] = llc_conn_ev_qlfy_s_flag_eq_0,
  4080. [2] = llc_conn_ev_qlfy_cause_flag_eq_0,
  4081. [3] = llc_conn_ev_qlfy_set_status_failed,
  4082. [4] = NULL,
  4083. };
  4084. static const llc_conn_action_t llc_rst_actions_8_1[] = {
  4085. [0] = llc_conn_ac_disc_ind,
  4086. [1] = llc_conn_disc,
  4087. [2] = NULL,
  4088. };
  4089. static struct llc_conn_state_trans llc_rst_state_trans_8_1 = {
  4090. .ev = llc_conn_ev_ack_tmr_exp,
  4091. .next_state = LLC_CONN_STATE_ADM,
  4092. .ev_qualifiers = llc_rst_ev_qfyrs_8_1,
  4093. .ev_actions = llc_rst_actions_8_1,
  4094. };
  4095. /*
  4096. * Array of pointers;
  4097. * one to each transition
  4098. */
  4099. static struct llc_conn_state_trans *llc_rst_state_transitions[] = {
  4100. [0] = &llc_rst_state_trans_6, /* Request */
  4101. [1] = &llc_common_state_trans_end,
  4102. [2] = &llc_common_state_trans_end, /* Local busy */
  4103. [3] = &llc_common_state_trans_end, /* Initiate PF cycle */
  4104. [4] = &llc_rst_state_trans_3, /* Timer */
  4105. [5] = &llc_rst_state_trans_7,
  4106. [6] = &llc_rst_state_trans_8,
  4107. [7] = &llc_rst_state_trans_8_1,
  4108. [8] = &llc_common_state_trans_end,
  4109. [9] = &llc_rst_state_trans_1, /* Receive frame */
  4110. [10] = &llc_rst_state_trans_2,
  4111. [11] = &llc_rst_state_trans_2_1,
  4112. [12] = &llc_rst_state_trans_4,
  4113. [13] = &llc_rst_state_trans_4_1,
  4114. [14] = &llc_rst_state_trans_5,
  4115. [15] = &llc_rst_state_trans_5_1,
  4116. [16] = &llc_common_state_trans_end,
  4117. };
  4118. /* LLC_CONN_STATE_ERROR transitions */
  4119. /* State transitions for LLC_CONN_EV_RX_SABME_CMD_Pbit_SET_X event */
  4120. static const llc_conn_action_t llc_error_actions_1[] = {
  4121. [0] = llc_conn_ac_set_vs_0,
  4122. [1] = llc_conn_ac_set_vr_0,
  4123. [2] = llc_conn_ac_send_ua_rsp_f_set_p,
  4124. [3] = llc_conn_ac_rst_ind,
  4125. [4] = llc_conn_ac_set_p_flag_0,
  4126. [5] = llc_conn_ac_set_remote_busy_0,
  4127. [6] = llc_conn_ac_stop_ack_timer,
  4128. [7] = llc_conn_reset,
  4129. [8] = NULL,
  4130. };
  4131. static struct llc_conn_state_trans llc_error_state_trans_1 = {
  4132. .ev = llc_conn_ev_rx_sabme_cmd_pbit_set_x,
  4133. .next_state = LLC_CONN_STATE_NORMAL,
  4134. .ev_qualifiers = NONE,
  4135. .ev_actions = llc_error_actions_1,
  4136. };
  4137. /* State transitions for LLC_CONN_EV_RX_DISC_CMD_Pbit_SET_X event */
  4138. static const llc_conn_action_t llc_error_actions_2[] = {
  4139. [0] = llc_conn_ac_send_ua_rsp_f_set_p,
  4140. [1] = llc_conn_ac_disc_ind,
  4141. [2] = llc_conn_ac_stop_ack_timer,
  4142. [3] = llc_conn_disc,
  4143. [4] = NULL,
  4144. };
  4145. static struct llc_conn_state_trans llc_error_state_trans_2 = {
  4146. .ev = llc_conn_ev_rx_disc_cmd_pbit_set_x,
  4147. .next_state = LLC_CONN_STATE_ADM,
  4148. .ev_qualifiers = NONE,
  4149. .ev_actions = llc_error_actions_2,
  4150. };
  4151. /* State transitions for LLC_CONN_EV_RX_DM_RSP_Fbit_SET_X event */
  4152. static const llc_conn_action_t llc_error_actions_3[] = {
  4153. [0] = llc_conn_ac_disc_ind,
  4154. [1] = llc_conn_ac_stop_ack_timer,
  4155. [2] = llc_conn_disc,
  4156. [3] = NULL,
  4157. };
  4158. static struct llc_conn_state_trans llc_error_state_trans_3 = {
  4159. .ev = llc_conn_ev_rx_dm_rsp_fbit_set_x,
  4160. .next_state = LLC_CONN_STATE_ADM,
  4161. .ev_qualifiers = NONE,
  4162. .ev_actions = llc_error_actions_3,
  4163. };
  4164. /* State transitions for LLC_CONN_EV_RX_FRMR_RSP_Fbit_SET_X event */
  4165. static const llc_conn_action_t llc_error_actions_4[] = {
  4166. [0] = llc_conn_ac_send_sabme_cmd_p_set_x,
  4167. [1] = llc_conn_ac_start_ack_timer,
  4168. [2] = llc_conn_ac_set_retry_cnt_0,
  4169. [3] = llc_conn_ac_set_cause_flag_0,
  4170. [4] = NULL,
  4171. };
  4172. static struct llc_conn_state_trans llc_error_state_trans_4 = {
  4173. .ev = llc_conn_ev_rx_frmr_rsp_fbit_set_x,
  4174. .next_state = LLC_CONN_STATE_RESET,
  4175. .ev_qualifiers = NONE,
  4176. .ev_actions = llc_error_actions_4,
  4177. };
  4178. /* State transitions for LLC_CONN_EV_RX_XXX_CMD_Pbit_SET_X event */
  4179. static const llc_conn_action_t llc_error_actions_5[] = {
  4180. [0] = llc_conn_ac_resend_frmr_rsp_f_set_p,
  4181. [1] = NULL,
  4182. };
  4183. static struct llc_conn_state_trans llc_error_state_trans_5 = {
  4184. .ev = llc_conn_ev_rx_xxx_cmd_pbit_set_x,
  4185. .next_state = LLC_CONN_STATE_ERROR,
  4186. .ev_qualifiers = NONE,
  4187. .ev_actions = llc_error_actions_5,
  4188. };
  4189. /* State transitions for LLC_CONN_EV_RX_XXX_RSP_Fbit_SET_X event */
  4190. static struct llc_conn_state_trans llc_error_state_trans_6 = {
  4191. .ev = llc_conn_ev_rx_xxx_rsp_fbit_set_x,
  4192. .next_state = LLC_CONN_STATE_ERROR,
  4193. .ev_qualifiers = NONE,
  4194. .ev_actions = NONE,
  4195. };
  4196. /* State transitions for LLC_CONN_EV_ACK_TMR_EXP event */
  4197. static const llc_conn_ev_qfyr_t llc_error_ev_qfyrs_7[] = {
  4198. [0] = llc_conn_ev_qlfy_retry_cnt_lt_n2,
  4199. [1] = NULL,
  4200. };
  4201. static const llc_conn_action_t llc_error_actions_7[] = {
  4202. [0] = llc_conn_ac_resend_frmr_rsp_f_set_0,
  4203. [1] = llc_conn_ac_start_ack_timer,
  4204. [2] = llc_conn_ac_inc_retry_cnt_by_1,
  4205. [3] = NULL,
  4206. };
  4207. static struct llc_conn_state_trans llc_error_state_trans_7 = {
  4208. .ev = llc_conn_ev_ack_tmr_exp,
  4209. .next_state = LLC_CONN_STATE_ERROR,
  4210. .ev_qualifiers = llc_error_ev_qfyrs_7,
  4211. .ev_actions = llc_error_actions_7,
  4212. };
  4213. /* State transitions for LLC_CONN_EV_ACK_TMR_EXP event */
  4214. static const llc_conn_ev_qfyr_t llc_error_ev_qfyrs_8[] = {
  4215. [0] = llc_conn_ev_qlfy_retry_cnt_gte_n2,
  4216. [1] = NULL,
  4217. };
  4218. static const llc_conn_action_t llc_error_actions_8[] = {
  4219. [0] = llc_conn_ac_send_sabme_cmd_p_set_x,
  4220. [1] = llc_conn_ac_set_s_flag_0,
  4221. [2] = llc_conn_ac_start_ack_timer,
  4222. [3] = llc_conn_ac_set_retry_cnt_0,
  4223. [4] = llc_conn_ac_set_cause_flag_0,
  4224. [5] = NULL,
  4225. };
  4226. static struct llc_conn_state_trans llc_error_state_trans_8 = {
  4227. .ev = llc_conn_ev_ack_tmr_exp,
  4228. .next_state = LLC_CONN_STATE_RESET,
  4229. .ev_qualifiers = llc_error_ev_qfyrs_8,
  4230. .ev_actions = llc_error_actions_8,
  4231. };
  4232. /* State transitions for LLC_CONN_EV_DATA_CONN_REQ event */
  4233. static const llc_conn_ev_qfyr_t llc_error_ev_qfyrs_9[] = {
  4234. [0] = llc_conn_ev_qlfy_set_status_refuse,
  4235. [1] = NULL,
  4236. };
  4237. /* just one member, NULL, .bss zeroes it */
  4238. static const llc_conn_action_t llc_error_actions_9[1];
  4239. static struct llc_conn_state_trans llc_error_state_trans_9 = {
  4240. .ev = llc_conn_ev_data_req,
  4241. .next_state = LLC_CONN_STATE_ERROR,
  4242. .ev_qualifiers = llc_error_ev_qfyrs_9,
  4243. .ev_actions = llc_error_actions_9,
  4244. };
  4245. /*
  4246. * Array of pointers;
  4247. * one to each transition
  4248. */
  4249. static struct llc_conn_state_trans *llc_error_state_transitions[] = {
  4250. [0] = &llc_error_state_trans_9, /* Request */
  4251. [1] = &llc_common_state_trans_end,
  4252. [2] = &llc_common_state_trans_end, /* Local busy */
  4253. [3] = &llc_common_state_trans_end, /* Initiate PF cycle */
  4254. [4] = &llc_error_state_trans_7, /* Timer */
  4255. [5] = &llc_error_state_trans_8,
  4256. [6] = &llc_common_state_trans_end,
  4257. [7] = &llc_error_state_trans_1, /* Receive frame */
  4258. [8] = &llc_error_state_trans_2,
  4259. [9] = &llc_error_state_trans_3,
  4260. [10] = &llc_error_state_trans_4,
  4261. [11] = &llc_error_state_trans_5,
  4262. [12] = &llc_error_state_trans_6,
  4263. [13] = &llc_common_state_trans_end,
  4264. };
  4265. /* LLC_CONN_STATE_TEMP transitions */
  4266. /* State transitions for LLC_CONN_EV_DISC_REQ event */
  4267. static const llc_conn_action_t llc_temp_actions_1[] = {
  4268. [0] = llc_conn_ac_stop_all_timers,
  4269. [1] = llc_conn_ac_send_disc_cmd_p_set_x,
  4270. [2] = llc_conn_disc,
  4271. [3] = NULL,
  4272. };
  4273. static struct llc_conn_state_trans llc_temp_state_trans_1 = {
  4274. .ev = llc_conn_ev_disc_req,
  4275. .next_state = LLC_CONN_STATE_ADM,
  4276. .ev_qualifiers = NONE,
  4277. .ev_actions = llc_temp_actions_1,
  4278. };
  4279. /*
  4280. * Array of pointers;
  4281. * one to each transition
  4282. */
  4283. static struct llc_conn_state_trans *llc_temp_state_transitions[] = {
  4284. [0] = &llc_temp_state_trans_1, /* requests */
  4285. [1] = &llc_common_state_trans_end,
  4286. [2] = &llc_common_state_trans_end, /* local busy */
  4287. [3] = &llc_common_state_trans_end, /* init_pf_cycle */
  4288. [4] = &llc_common_state_trans_end, /* timer */
  4289. [5] = &llc_common_state_trans_end, /* receive */
  4290. };
  4291. /* Connection State Transition Table */
  4292. struct llc_conn_state llc_conn_state_table[NBR_CONN_STATES] = {
  4293. [LLC_CONN_STATE_ADM - 1] = {
  4294. .current_state = LLC_CONN_STATE_ADM,
  4295. .transitions = llc_adm_state_transitions,
  4296. },
  4297. [LLC_CONN_STATE_SETUP - 1] = {
  4298. .current_state = LLC_CONN_STATE_SETUP,
  4299. .transitions = llc_setup_state_transitions,
  4300. },
  4301. [LLC_CONN_STATE_NORMAL - 1] = {
  4302. .current_state = LLC_CONN_STATE_NORMAL,
  4303. .transitions = llc_normal_state_transitions,
  4304. },
  4305. [LLC_CONN_STATE_BUSY - 1] = {
  4306. .current_state = LLC_CONN_STATE_BUSY,
  4307. .transitions = llc_busy_state_transitions,
  4308. },
  4309. [LLC_CONN_STATE_REJ - 1] = {
  4310. .current_state = LLC_CONN_STATE_REJ,
  4311. .transitions = llc_reject_state_transitions,
  4312. },
  4313. [LLC_CONN_STATE_AWAIT - 1] = {
  4314. .current_state = LLC_CONN_STATE_AWAIT,
  4315. .transitions = llc_await_state_transitions,
  4316. },
  4317. [LLC_CONN_STATE_AWAIT_BUSY - 1] = {
  4318. .current_state = LLC_CONN_STATE_AWAIT_BUSY,
  4319. .transitions = llc_await_busy_state_transitions,
  4320. },
  4321. [LLC_CONN_STATE_AWAIT_REJ - 1] = {
  4322. .current_state = LLC_CONN_STATE_AWAIT_REJ,
  4323. .transitions = llc_await_rejct_state_transitions,
  4324. },
  4325. [LLC_CONN_STATE_D_CONN - 1] = {
  4326. .current_state = LLC_CONN_STATE_D_CONN,
  4327. .transitions = llc_d_conn_state_transitions,
  4328. },
  4329. [LLC_CONN_STATE_RESET - 1] = {
  4330. .current_state = LLC_CONN_STATE_RESET,
  4331. .transitions = llc_rst_state_transitions,
  4332. },
  4333. [LLC_CONN_STATE_ERROR - 1] = {
  4334. .current_state = LLC_CONN_STATE_ERROR,
  4335. .transitions = llc_error_state_transitions,
  4336. },
  4337. [LLC_CONN_STATE_TEMP - 1] = {
  4338. .current_state = LLC_CONN_STATE_TEMP,
  4339. .transitions = llc_temp_state_transitions,
  4340. },
  4341. };