comparison g23m-gsm/dl/dl_pei.c @ 0:75a11d740a02

initial import of gsm-fw from freecalypso-sw rev 1033:5ab737ac3ad7
author Mychaela Falconia <falcon@freecalypso.org>
date Thu, 09 Jun 2016 00:02:41 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:75a11d740a02
1 /*
2 +-----------------------------------------------------------------------------
3 | Project :
4 | Modul :
5 +-----------------------------------------------------------------------------
6 | Copyright 2002 Texas Instruments Berlin, AG
7 | All rights reserved.
8 |
9 | This file is confidential and a trade secret of Texas
10 | Instruments Berlin, AG
11 | The receipt of or possession of this file does not convey
12 | any rights to reproduce or disclose its contents or to
13 | manufacture, use, or sell anything it may describe, in
14 | whole, or in part, without the specific written consent of
15 | Texas Instruments Berlin, AG.
16 +-----------------------------------------------------------------------------
17 | Purpose : This module implements the process body interface
18 | for the entity DL of the mobile station.
19 +-----------------------------------------------------------------------------
20 */
21
22 #ifndef DL_PEI_C
23 #define DL_PEI_C
24
25 #include "config.h"
26 #include "fixedconf.h"
27 #include "condat-features.h"
28
29 #define ENTITY_DL
30
31 /*==== INCLUDES ===================================================*/
32 #include "typedefs.h"
33 #include <string.h>
34 #include <stdlib.h>
35 #include <stddef.h>
36 #include "vsi.h"
37 #include "pconst.cdg"
38 #include "custom.h"
39 #include "gsm.h"
40 #include "mon_dl.h"
41 #include "prim.h"
42 #include "pei.h"
43 #include "tok.h"
44 #include "ccdapi.h"
45 #include "dl.h"
46 #include "dl_em.h"
47 #include "dl_trc.h"
48
49 /*==== EXPORT =====================================================*/
50 #ifdef TI_PS_HCOMM_CHANGE
51 #else
52 GLOBAL T_HANDLE hCommDL = VSI_ERROR; /* Self Communication */
53 GLOBAL T_HANDLE hCommRR = VSI_ERROR; /* RR Communication */
54 GLOBAL T_HANDLE hCommPL = VSI_ERROR; /* PL Communication */
55 #ifdef FF_EM_MODE
56 GLOBAL T_HANDLE hCommMMI = VSI_ERROR; /* EM Communication */
57 #endif /* FF_EM_MODE */
58 #endif
59 GLOBAL USHORT dl_handle;
60
61 /*==== PRIVATE ====================================================*/
62
63 LOCAL void pei_not_supported (void *data);
64 LOCAL int dl_process_signal (ULONG opc, void *signal_data);
65
66 LOCAL SHORT pei_signal (T_SIGNAL_OPC opc, void *signal_data);
67
68 /*==== VARIABLES ==================================================*/
69 #ifdef _SIMULATION_
70 static UBYTE first_access = TRUE;
71 #endif /* _SIMULATION_ */
72
73 static T_MONITOR dl_mon;
74
75 /*==== FUNCTIONS ==================================================*/
76 /* Please consider that the opc's are not necessarily sorted
77 * in sequential order.
78 * DL doesn't use the normal technique to get the primitive from the table.
79 * Instead it uses the direct search and compare:
80 * for (i=0; i<n; i++, table++)
81 * if (table->opc EQ opc)
82 * break;
83 */
84 LOCAL const T_FUNC dl_table[] = {
85 MAK_FUNC_S( drr_dl_establish_req , DL_ESTABLISH_REQ ), /* 0x80000003 */
86 MAK_FUNC_N( pei_not_supported , 0 ), /* 0x80010003 */
87 MAK_FUNC_0( drr_dl_release_req , DL_RELEASE_REQ ), /* 0x80020003 */
88 MAK_FUNC_N( pei_not_supported , 0 ), /* 0x80030003 */
89 MAK_FUNC_S( drr_dl_data_req , DL_DATA_REQ ), /* 0x80040003 */
90 MAK_FUNC_N( pei_not_supported , 0 ), /* 0x80050003 */
91 MAK_FUNC_S( drr_dl_unitdata_req , DL_UNITDATA_REQ ), /* 0x80060003 */
92 MAK_FUNC_N( pei_not_supported , 0 ), /* 0x80070003 */
93 MAK_FUNC_0( drr_dl_suspend_req , DL_SUSPEND_REQ ), /* 0x80080003 */
94 MAK_FUNC_N( pei_not_supported , 0 ), /* 0x80090003 */
95 MAK_FUNC_S( drr_dl_resume_req , DL_RESUME_REQ ), /* 0x800a0003 */
96 MAK_FUNC_N( pei_not_supported , 0 ), /* 0x800b0003 */
97 MAK_FUNC_S( drr_dl_reconnect_req , DL_RECONNECT_REQ ), /* 0x800c0003 */
98 MAK_FUNC_N( pei_not_supported , 0 ), /* 0x800d0003 */
99 #if defined (DL_TRACE_ENABLED) && !defined(DL_IMMEDIATE_TRACE)
100 MAK_FUNC_0( dl_trace_read_all , DL_TRACE_REQ ), /* 0x800e0003 */
101 #else
102 MAK_FUNC_N( pei_not_supported , 0 ), /* 0x800e0003 */
103 #endif /* DL_TRACE_ENABLED && !DL_IMMEDIATE_TRACE */
104 MAK_FUNC_N( pei_not_supported , 0 ), /* 0x800f0003 */
105 MAK_FUNC_S( drr_dl_short_unitdata_req , DL_SHORT_UNITDATA_REQ) /* 0x80100003 */
106 };
107
108 LOCAL const T_FUNC mphc_table[] = {
109 MAK_FUNC_0( dph_ph_data_ind, PH_DATA_IND ) /* 0x0000006d */
110 };
111
112
113 #if defined (DL_2TO1)
114 #if defined(_SIMULATION_)
115 LOCAL const T_FUNC l1_test_table[] = {
116 MAK_FUNC_0( l1test_call_mphc_read_dcch, L1TEST_CALL_MPHC_READ_DCCH ), /* 8000409b */
117 MAK_FUNC_N( pei_not_supported , 0 ) /* removed */
118 MAK_FUNC_N( pei_not_supported , 0 ) /* removed */
119 };
120 #endif /* _SIMULATION_ */
121 #else /* DL_2TO1 */
122
123 LOCAL const T_FUNC mdl_table[] = {
124 MAK_FUNC_0( drr_mdl_release_req , MDL_RELEASE_REQ ) /* 0x80004004 */
125 };
126
127 #if defined (_SIMULATION_) || (defined (DL_TRACE_ENABLED) && !defined(DL_IMMEDIATE_TRACE))
128 LOCAL const T_FUNC ph_table[] = {
129 #if defined(_SIMULATION_)
130 MAK_FUNC_0( dph_ph_ready_to_send , PH_READY_TO_SEND ), /* 0x4100 */
131 #else
132 MAK_FUNC_N( pei_not_supported , 0 ), /* 0x4100 */
133 #endif /* _SIMULATION_ */
134 MAK_FUNC_N( pei_not_supported , 0 ), /* 0x4101 */
135 #if defined (DL_TRACE_ENABLED) && !defined(DL_IMMEDIATE_TRACE)
136 MAK_FUNC_0( dl_trace_read , PH_TRACE_IND ) /* 0x4102 */
137 #else
138 MAK_FUNC_N( pei_not_supported , 0 ) /* 0x4102 */
139 #endif /* DL_TRACE_ENABLED && !DL_IMMEDIATE_TRACE*/
140 };
141 #endif /* _SIMULATION_||(DL_TRACE_ENABLED&& !DL_IMMEDIATE_TRACE) */
142 #endif /* DL_2TO1 */
143
144 #ifdef FF_EM_MODE
145 LOCAL const T_FUNC em_ul_table[] = {
146 MAK_FUNC_0( dl_em_dl_event_req , EM_DL_EVENT_REQ ), /* 0x3e0A*/
147 };
148 #endif /* FF_EM_MODE */
149
150
151 /*
152 +--------------------------------------------------------------------+
153 | PROJECT : GSM-PS (6147) MODULE : DL_PEI |
154 | STATE : code ROUTINE : pei_primitive |
155 +--------------------------------------------------------------------+
156
157 PURPOSE : Process protocol specific primitive.
158
159 */
160 LOCAL SHORT pei_primitive (void * ptr)
161 {
162 GET_INSTANCE_DATA;
163 T_PRIM *prim = (T_PRIM*)ptr;
164 /*
165 * | |
166 * DL MDL
167 * | |
168 * +------v------------v------+
169 * | |
170 * | DL |
171 * | |
172 * +-------------^------------+
173 * |
174 * MPHC/PH
175 * |
176 *
177 */
178
179 TRACE_FUNCTION ("pei_primitive()");
180
181 if (prim NEQ NULL)
182 {
183 ULONG opc = prim->custom.opc;
184 USHORT n;
185 const T_FUNC *table;
186
187 VSI_PPM_REC ((T_PRIM_HEADER*)prim, __FILE__, __LINE__);
188
189 PTRACE_IN (opc);
190
191 switch (SAP_NR(opc))
192 {
193 case SAP_NR(DL_UL): table = dl_table; n = TAB_SIZE (dl_table); break;
194 /*case SAP_NR(MPHC_UL):*/ /* same as MPHC_DL */
195 case SAP_NR(MPHC_DL):
196 table = mphc_table;
197 n = TAB_SIZE (mphc_table);
198 /*
199 * The opcodes for MPHC_DL start at 0x6d
200 */
201 opc -= 0x6d;
202 break;
203 #if defined (DL_2TO1)
204 #if defined(_SIMULATION_)
205 case SAP_NR(L1TEST_UL):
206 case SAP_NR(L1TEST_DL): table = l1_test_table; n = TAB_SIZE (l1_test_table); break;
207 #endif /* _SIMULATION_ */
208 #else /* DL_2TO1 */
209 case SAP_NR(MDL_DL): table = mdl_table; n = TAB_SIZE (mdl_table); break;
210 #if defined (_SIMULATION_) || (defined (DL_TRACE_ENABLED) && !defined(DL_IMMEDIATE_TRACE))
211 case SAP_NR(PH_UL):
212 case SAP_NR(PH_DL): table = ph_table; n = TAB_SIZE (ph_table); break;
213 #endif /* _SIMULATION_||(DL_TRACE_ENABLED&&!DL_IMMEDIATE_TRACE) */
214 #endif /* DL_2TO1 */
215
216 #ifdef FF_EM_MODE
217 case EM_Ul:
218 table = em_ul_table;
219 n = TAB_SIZE (em_ul_table);
220 /*
221 * The opcodes for EM_Ul start at 0x0a
222 */
223 opc -= 0x0a;
224 break;
225 #endif /* FF_EM_MODE*/
226 default : table = NULL; n = 0; break;
227 }
228 if (table)
229 {
230
231 #if defined (_SIMULATION_)
232 if (opc NEQ PH_READY_TO_SEND)
233 /*
234 * this simulates function call of layer 1 in the
235 * windows environment
236 */
237 #endif /* _SIMULATION_ */
238 dl_data->dl_active = TRUE;
239
240
241 if (PRIM_NR(opc)<n)
242 {
243 table += PRIM_NR(opc);
244 #ifdef PALLOC_TRANSITION
245 /*lint -e661 (Warning -- Possible access of out-of-bounds) */
246 P_SDU(prim) = table->soff ? (T_sdu*) (((char*)&prim->data) + table->soff) : 0;
247 /*lint +e661 (Warning -- Possible access of out-of-bounds) */
248 #ifndef NO_COPY_ROUTING
249 P_LEN(prim) = table->size + sizeof (T_PRIM_HEADER);
250 #endif /* NO_COPY_ROUTING */
251 #endif /* PALLOC_TRANSITION */
252
253 #if defined (DL_TRACE_ENABLED) && !defined(DL_2TO1)
254 if ((opc EQ DL_TRACE_REQ) OR (opc EQ PH_TRACE_IND))
255 /*lint -e661 (Warning -- Possible access of out-of-bounds) */
256 JUMP (table->func)();
257 /*lint +e661 (Warning -- Possible access of out-of-bounds) */
258 else
259 #endif /* DL_TRACE_ENABLED && !DL_2TO1 */
260 /*lint -e661 (Warning -- Possible access of out-of-bounds) */
261 JUMP (table->func) (P2D(prim));
262 /*lint +e661 (Warning -- Possible access of out-of-bounds) */
263 }
264 else
265 {
266 pei_not_supported (P2D(prim));
267 }
268 dl_data->dl_active = FALSE;
269
270 return PEI_OK;
271 }
272
273 #if defined (_SIMULATION_)
274 /* TDC is not able to send signals, therefore the redirection over primitives */
275 if (opc EQ DL_SIGNAL_EM_READ)
276 { /* test ACI read of EM buffer only */
277 return dl_process_signal(DL_SIGNAL_EM_READ, NULL);
278 }
279 #endif /* _SIMULATION_ */
280
281 /*
282 * Primitive is no GSM Primitive
283 * then forward to the environment
284 */
285
286 #ifdef GSM_ONLY
287 MY_PFREE (P2D(prim))
288
289 return PEI_ERROR;
290 #else
291 if (opc & SYS_MASK)
292 vsi_c_primitive (VSI_CALLER prim);
293 else
294 {
295 void* p = (void*)P2D(prim);
296 MY_PFREE (p);
297 return PEI_ERROR;
298 }
299 #endif
300 }
301 return PEI_OK;
302 }
303
304 /*
305 +--------------------------------------------------------------------+
306 | PROJECT : GSM-PS (6147) MODULE : DL_PEI |
307 | STATE : code ROUTINE : pei_not_supported |
308 +--------------------------------------------------------------------+
309
310 PURPOSE : An unsupported primitive is received.
311
312 */
313
314 LOCAL void pei_not_supported (void * data)
315 {
316 TRACE_FUNCTION ("pei_not_supported()");
317
318 MY_PFREE (data);
319 }
320
321
322 /*
323 +--------------------------------------------------------------------+
324 | PROJECT : GSM-PS (6147) MODULE : DL_PEI |
325 | STATE : code ROUTINE : pei_init |
326 +--------------------------------------------------------------------+
327
328 PURPOSE : Initialize Protocol Stack Entity
329
330 */
331
332 LOCAL SHORT pei_init (T_HANDLE handle)
333 {
334 dl_handle = handle;
335
336 TRACE_FUNCTION ("pei_init() " __DATE__ " " __TIME__);
337
338 #ifdef TI_PS_HCOMM_CHANGE
339 if (!cl_hcom_all_handles_open())
340 {
341 return PEI_ERROR;
342 }
343 #else /* for hCommHandles backward compatibility */
344 if (hCommDL < VSI_OK)
345 {
346 if ((hCommDL = vsi_c_open (VSI_CALLER DL_NAME)) < VSI_OK)
347 return PEI_ERROR;
348 }
349
350 if (hCommRR < VSI_OK)
351 {
352 if ((hCommRR = vsi_c_open (VSI_CALLER RR_NAME)) < VSI_OK)
353 return PEI_ERROR;
354 }
355
356
357 if (hCommPL < VSI_OK)
358 {
359 if ((hCommPL = vsi_c_open (VSI_CALLER PL_NAME)) < VSI_OK)
360 return PEI_ERROR;
361 }
362
363 #ifdef FF_EM_MODE
364 if (hCommMMI < VSI_OK)
365 {
366 if ((hCommMMI = vsi_c_open (VSI_CALLER ACI_NAME)) < VSI_OK)
367 return PEI_ERROR;
368 }
369 #endif /* FF_EM_MODE */
370 #endif
371
372 TRC_INIT ();
373
374 #if !defined(_SIMULATION_)
375 TRACE_EVENT (dl_version());
376 SYST_TRACE (dl_version());
377 #endif /* !_SIMULATION_ */
378
379 /*
380 * Initialize data base
381 */
382
383 #if defined(DL_TRACE_ENABLED) && !defined(DL_IMMEDIATE_TRACE)
384 dl_trace_init ();
385 #endif /* DL_TRACE_ENABLED && !DL_IMMEDIATE_TRACE*/
386
387 com_init_data ();
388 dcch0_init_dl_data ();
389 sacch0_init_dl_data ();
390
391 #ifdef FF_EM_MODE
392 /*
393 initialise event flags
394 */
395 em_init_dl_event_trace();
396 /*
397 initialise dl semaphor for EM event tracing
398 */
399 em_dl_sem_init();
400 #endif /* FF_EM_MODE */
401
402 return PEI_OK;
403 }
404
405 #ifdef _SIMULATION_
406 /*
407 +--------------------------------------------------------------------+
408 | PROJECT : GSM-PS (6147) MODULE : DL_PEI |
409 | STATE : code ROUTINE : pei_exit |
410 +--------------------------------------------------------------------+
411
412 PURPOSE : Close Resources and terminate
413
414 */
415 LOCAL SHORT pei_exit (void)
416 {
417 TRACE_FUNCTION ("pei_exit()");
418
419 #if defined(DL_TRACE_ENABLED) && !defined(DL_IMMEDIATE_TRACE)
420 dl_trace_exit ();
421 #endif /* DL_TRACE_ENABLED && !DL_IMMEDIATE_TRACE*/
422
423 #ifdef FF_EM_MODE
424 em_dl_sem_exit();
425 #endif /* FF_EM_MODE */
426
427 /*
428 * clean up communication
429 */
430 #ifdef TI_PS_HCOMM_CHANGE
431 #else /* for hCommHandles backward compatibility */
432 vsi_c_close (VSI_CALLER hCommDL);
433 hCommDL = VSI_ERROR;
434
435 vsi_c_close (VSI_CALLER hCommRR);
436 hCommRR = VSI_ERROR;
437
438 vsi_c_close (VSI_CALLER hCommPL);
439 hCommPL = VSI_ERROR;
440
441 #ifdef FF_EM_MODE
442 vsi_c_close (VSI_CALLER hCommMMI);
443 hCommMMI = VSI_ERROR;
444 #endif /* FF_EM_MODE */
445 #endif
446
447 TRC_EXIT ();
448
449 return PEI_OK;
450 }
451 #endif /* _SIMULATION_ */
452
453 /*
454 +--------------------------------------------------------------------+
455 | PROJECT : GSM-PS (6147) MODULE : DL_PEI |
456 | STATE : code ROUTINE : pei_config |
457 +--------------------------------------------------------------------+
458
459 PURPOSE : Dynamic Configuration
460
461 */
462
463 /* Implements Measure#36 */
464 #ifdef NCONFIG
465 #else /* NCONFIG */
466 LOCAL SHORT pei_config (T_PEI_CONFIG inString)
467 {
468 return PEI_OK;
469 }
470 #endif /* NCONFIG */
471
472 /*
473 +--------------------------------------------------------------------+
474 | PROJECT : GSM-PS (6147) MODULE : DL_PEI |
475 | STATE : code ROUTINE : dl_pei_config |
476 +--------------------------------------------------------------------+
477
478 PURPOSE : Dynamic Configuration
479
480 */
481 /* Implements Measure#36 */
482 #ifdef NCONFIG
483 #else /* NCONFIG */
484 GLOBAL T_PEI_RETURN dl_pei_config ( char * inString, char * dummy )
485 {
486 return pei_config ( inString );
487 }
488 #endif /* NCONFIG */
489
490 /*
491 +--------------------------------------------------------------------+
492 | PROJECT : GSM-PS (6147) MODULE : DL_PEI |
493 | STATE : code ROUTINE : pei_monitor |
494 +--------------------------------------------------------------------+
495
496 PURPOSE : Monitoring of physical Parameters
497
498 */
499
500 LOCAL SHORT pei_monitor (void ** monitor)
501 {
502 TRACE_FUNCTION ("pei_monitor()");
503
504 /* Implements Measure#32: Row 50 */
505
506 * monitor = &dl_mon;
507
508 return PEI_OK;
509 }
510
511 /*
512 +--------------------------------------------------------------------+
513 | PROJECT : GSM-PS (6147) MODULE : DL_PEI |
514 | STATE : code ROUTINE : pei_create |
515 +--------------------------------------------------------------------+
516
517 PURPOSE : Create the Protocol Stack Entity
518
519 */
520
521 /*
522 * New Frame
523 */
524 GLOBAL T_PEI_RETURN dl_pei_create (T_PEI_INFO **info)
525 {
526 static const T_PEI_INFO pei_info =
527 {
528 "DL",
529 {
530 pei_init,
531 #ifdef _SIMULATION_
532 pei_exit,
533 #else
534 NULL,
535 #endif
536 pei_primitive,
537 NULL, /* no timeout function */
538 pei_signal, /* signal function */
539 NULL, /* no run function */
540 /* Implements Measure#36 */
541 #ifdef NCONFIG
542 NULL, /* no pei_config function */
543 #else /* NCONFIG */
544 pei_config,
545 #endif /* NCONFIG */
546 pei_monitor,
547 },
548 #if defined (GPRS)
549 1536, /* Stack Size incresed for omaps00140330 */
550 #else
551 #if defined (FAX_AND_DATA)
552 1536, /* Stack Size incresed for omaps00140330 */
553 #else
554 1394, /* Stack Size incresed for omaps00140330 */
555 #endif
556 #endif
557 10+DL_SIGNAL_DATA_ELEMENTS, /* Queue Entries */
558 215, /* Priority */
559 0, /* number of timer */
560 /* flags */
561 #ifdef _TARGET_
562 #ifdef GPRS
563 PASSIVE_BODY|COPY_BY_REF|TRC_NO_SUSPEND|PRIM_NO_SUSPEND
564 #else
565 PASSIVE_BODY|COPY_BY_REF|TRC_NO_SUSPEND|PRIM_NO_SUSPEND
566 #endif
567 #else
568 PASSIVE_BODY|COPY_BY_REF
569 #endif
570
571 };
572
573 TRACE_FUNCTION ("pei_create");
574 /*
575 * Close Resources if open
576 */
577
578 #ifdef _SIMULATION_
579 if (first_access)
580 first_access = FALSE;
581 else
582 pei_exit ();
583 #endif
584
585 /*
586 * export startup configuration data
587 */
588 *info = (T_PEI_INFO *)&pei_info;
589 /*
590 * Initialize entity data
591 */
592
593 /*
594 * Initialize Condat Coder Decoder and
595 * processes
596 */
597
598
599 return PEI_OK;
600 }
601
602 /*
603 +--------------------------------------------------------------------+
604 | PROJECT : GSM-PS (6147) MODULE : DL_PEI |
605 | STATE : code ROUTINE : pei_signal |
606 +--------------------------------------------------------------------+
607
608 PURPOSE : Functional interface to signal a primitive.
609
610 */
611 LOCAL SHORT pei_signal (T_SIGNAL_OPC opc, void *signal_data)
612 {
613 #ifdef TRACE_FKT
614 {
615 char buf[24];
616 sprintf(buf, "pei_signal (0x%lx)", (ULONG)opc);
617 TRACE_FUNCTION (buf);
618 PTRACE_IN(opc);
619 }
620 #elif defined(_SIMULATION_)
621 TRACE_EVENT_WIN_P1 ("pei_signal (0x%lx)", (ULONG)opc);
622 #endif
623
624 dl_process_signal ((ULONG)opc, signal_data);
625
626 return PEI_OK;
627 }
628
629 LOCAL int dl_process_signal (ULONG opc, void *signal_data)
630 {
631 /*TRACE_FUNCTION ("pei_process_signal()");*/
632 GET_INSTANCE_DATA;
633 switch (opc)
634 {
635 #if defined(DL_TRACE_ENABLED) && !defined (DL_IMMEDIATE_TRACE) && !defined(DL_2TO1)
636 case DL_TRACE_REQ: /* RR -> DL */
637 SYST_TRACE("call dl_trace_read_all()");
638 dl_trace_read_all ();
639 break;
640 case PH_TRACE_IND: /* ALR/TIL -> DL */
641 dl_trace_read ();
642 break;
643 #endif /* DL_TRACE_ENABLED && !DL_IMMEDIATE_TRACE &6 !DL_2TO1 */
644 #if defined(INVOKE_SIGNAL)
645 case DL_SIGNAL_ESTABLISH_IND:
646 sig_handle_drr_dl_establish_ind ((T_DL_SIGNAL_DATA *) signal_data);
647 break;
648 case DL_SIGNAL_ESTABLISH_CNF:
649 sig_handle_drr_dl_establish_cnf ((T_DL_SIGNAL_DATA *) signal_data);
650 break;
651 case DL_SIGNAL_DATA_IND:
652 sig_handle_com_data_ind ((T_DL_SIGNAL_DATA *) signal_data);
653 break;
654 case DL_SIGNAL_DATA_CNF:
655 sig_handle_drr_dl_data_cnf ((T_DL_SIGNAL_DATA *) signal_data);
656 break;
657 #if 0 /* happens in primitive context only */
658 case DL_SIGNAL_UNITDATA_IND:
659 sig_handle_drr_dl_unitdata_ind (dl_data, (T_DL_SIGNAL_DATA *) signal_data);
660 break;
661 #endif /* 0 */
662 case DL_SIGNAL_SHORT_UNITDATA_IND:
663 sig_handle_drr_dl_short_unitdata_ind ((T_DL_SIGNAL_DATA *) signal_data);
664 break;
665 case DL_SIGNAL_RELEASE_IND:
666 sig_handle_drr_dl_release_ind ((T_DL_SIGNAL_DATA *) signal_data);
667 break;
668 case DL_SIGNAL_RELEASE_CNF:
669 sig_handle_drr_dl_release_cnf ((T_DL_SIGNAL_DATA *) signal_data);
670 break;
671 case DL_SIGNAL_ERROR_IND:
672 sig_handle_drr_error_ind ((T_DL_SIGNAL_DATA *) signal_data);
673 break;
674 case DL_SIGNAL_FREE_POINTER:
675 sig_handle_com_free_pointer ((T_DL_SIGNAL_DATA *) signal_data);
676 break;
677 case DL_SIGNAL_CONCATENATE:
678 sig_handle_com_concatenate((T_DL_SIGNAL_DATA *) signal_data);
679 break;
680 #if defined(DL_TRACE_ENABLED)
681 case DL_SIGNAL_L2TRACE:
682 sig_handle_com_l2trace ((T_DL_SIGNAL_DATA *) signal_data);
683 break;
684 #endif /*DL_TRACE_ENABLED*/
685 case DL_SIGNAL_L3TRACE:
686 sig_handle_com_l3trace((T_DL_SIGNAL_DATA *) signal_data);
687 break;
688 #if defined(FF_EM_MODE)
689 case DL_SIGNAL_EM_IND:
690 sig_handle_dl_em_first_event_check ();
691 break;
692 case DL_SIGNAL_EM_WRITE:
693 sig_handle_dl_em_write (dl_data, (T_DL_SIGNAL_DATA *) signal_data);
694 break;
695 #if defined(_SIMULATION_)
696 case DL_SIGNAL_EM_READ:
697 {
698 T_MONITOR *dummy;
699
700 em_dl_sem_read ();
701 em_dl_sem_reset ();
702 pei_monitor (&dummy);
703 TRACE_EVENT_WIN (dummy->version);
704 }
705 break;
706 #endif /* _SIMULATION_ */
707 #endif /* FF_EM_MODE */
708 #endif /* INVOKE_SIGNAL */
709 default:
710 break;
711 }
712
713 #if defined(INVOKE_SIGNAL)
714 if (signal_data)
715 {
716 TRACE_EVENT_WIN_P1 ("pei_process_signal(): set data with idx=%u to FREE",
717 ((T_DL_SIGNAL_DATA *)signal_data)->idx);
718
719 ((T_DL_SIGNAL_DATA *)signal_data)->busy = FALSE;
720 }
721 #endif /* INVOKE_SIGNAL */
722
723 return PEI_OK;
724 }/* dl_process_signal */
725
726 GLOBAL UBYTE * dl_get_sacch_buffer (void)
727 {
728 GET_INSTANCE_DATA;
729 return dl_data->sacch_act_buffer.buf;
730 }
731
732 #endif /* DL_PEI_C */