FreeCalypso > hg > fc-magnetite
comparison src/g23m-gprs/upm/upm_mm_output_handler.c @ 197:2cf312e56ee7
src/g23m-gprs/upm: import from LoCosto source
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Fri, 14 Oct 2016 01:21:46 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
196:a04cde1fb771 | 197:2cf312e56ee7 |
---|---|
1 /*---------------------------------------------------------------------------- | |
2 | Project : 3G PS | |
3 | Module : UPM | |
4 +----------------------------------------------------------------------------- | |
5 | Copyright 2003 Texas Instruments. | |
6 | All rights reserved. | |
7 | | |
8 | This file is confidential and a trade secret of Texas | |
9 | Instruments . | |
10 | The receipt of or possession of this file does not convey | |
11 | any rights to reproduce or disclose its contents or to | |
12 | manufacture, use, or sell anything it may describe, in | |
13 | whole, or in part, without the specific written consent of | |
14 | Texas Instruments. | |
15 +----------------------------------------------------------------------------- | |
16 | Purpose: Output functions for primitives from UPM to the MM entity. | |
17 | For design details, see: | |
18 | 8010.939 UPM Detailed Specification | |
19 +---------------------------------------------------------------------------*/ | |
20 | |
21 /*==== DECLARATION CONTROL =================================================*/ | |
22 | |
23 /*==== INCLUDES ============================================================*/ | |
24 | |
25 #include "upm.h" | |
26 | |
27 #include "upm_mm_output_handler.h" | |
28 | |
29 /*==== CONSTS ===============================================================*/ | |
30 | |
31 /*==== TYPES ================================================================*/ | |
32 | |
33 /*==== LOCALS ===============================================================*/ | |
34 | |
35 /*==== PUBLIC FUNCTIONS =====================================================*/ | |
36 | |
37 /* | |
38 +------------------------------------------------------------------------------ | |
39 | Function : send_mmpm_reestablish_req | |
40 +------------------------------------------------------------------------------ | |
41 | Description : Allocate, pack and send MMPM_REESTABLISH_RES primitive. | |
42 | | |
43 | Parameters : None | |
44 +------------------------------------------------------------------------------ | |
45 */ | |
46 #ifdef TI_UMTS | |
47 void send_mmpm_reestablish_req(U8 most_demanding) | |
48 { | |
49 U8 establish_cause; | |
50 (void)TRACE_FUNCTION("send_mmpm_reestablish_req"); | |
51 | |
52 switch ((T_PS_tc)most_demanding) { | |
53 case PS_TC_CONV: | |
54 establish_cause = (U8)MMPM_CAUSE_ESTABL_ORIG_CONVERSATIONAL; | |
55 break; | |
56 case PS_TC_STREAM: | |
57 establish_cause = (U8)MMPM_CAUSE_ESTABL_ORIG_STREAMING; | |
58 break; | |
59 case PS_TC_INTER: | |
60 establish_cause = (U8)MMPM_CAUSE_ESTABL_ORIG_INTERACTIVE; | |
61 break; | |
62 case PS_TC_BG: | |
63 establish_cause = (U8)MMPM_CAUSE_ESTABL_ORIG_BACKGROUND; | |
64 break; | |
65 case PS_TC_SUB: | |
66 establish_cause = (U8)MMPM_CAUSE_ESTABL_ORIG_BACKGROUND; | |
67 break; | |
68 } | |
69 | |
70 { | |
71 PALLOC(prim, MMPM_REESTABLISH_REQ); | |
72 | |
73 prim->establish_cause = establish_cause; | |
74 | |
75 (void)PSEND(hCommMM, prim); | |
76 } | |
77 } | |
78 #endif /* TI_UMTS */ | |
79 | |
80 /* | |
81 +------------------------------------------------------------------------------ | |
82 | Function : send_mmpm_sequence_res | |
83 +------------------------------------------------------------------------------ | |
84 | Description : Allocate, pack and send MMPM_SEQUENCE_RES primitive. | |
85 | | |
86 | Parameters : sn_sequence_cnf - SN_SEQUENCE_CNF primitive | |
87 +------------------------------------------------------------------------------ | |
88 */ | |
89 #ifdef TI_GPRS | |
90 void send_mmpm_sequence_res(T_SN_SEQUENCE_CNF *sn_sequence_cnf) | |
91 { | |
92 U16 index; | |
93 (void)TRACE_FUNCTION("send_mmpm_sequence_res"); | |
94 { | |
95 PALLOC(prim, MMPM_SEQUENCE_RES); | |
96 | |
97 /*lint -e613 (Possible use of null pointer 'prim' in left argument to operator '->') */ | |
98 prim->c_npdu_list = sn_sequence_cnf->c_receive_no_list; | |
99 | |
100 memcpy(&prim->npdu_list, sn_sequence_cnf->receive_no_list, | |
101 (size_t)sn_sequence_cnf->c_receive_no_list * sizeof(T_MMPM_npdu_list)); | |
102 for (index = 0; index < (U16)sn_sequence_cnf->c_receive_no_list; index++) | |
103 { | |
104 prim->npdu_list[index].nsapi = sn_sequence_cnf->receive_no_list[index].nsapi; | |
105 prim->npdu_list[index].receive_n_pdu_number_val = sn_sequence_cnf->receive_no_list[index].receive_no; | |
106 } | |
107 /*lint +e613 (Possible use of null pointer 'prim' in left argument to operator '->') */ | |
108 (void)PSEND(hCommMM, prim); | |
109 } | |
110 } | |
111 #endif /* TI_GPRS */ | |
112 /*==== END OF FILE ==========================================================*/ |