llc_c_st.c 152 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946
  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. };