FreeCalypso > hg > tcs211-l1-reconst
comparison g23m/condat/ms/src/aci/psa_pktios.c @ 0:509db1a7b7b8
initial import: leo2moko-r1
author | Space Falcon <falcon@ivan.Harhan.ORG> |
---|---|
date | Mon, 01 Jun 2015 03:24:05 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:509db1a7b7b8 |
---|---|
1 /* | |
2 +------------------------------------------------------------------------------ | |
3 | File: psa_pktios.c | |
4 +------------------------------------------------------------------------------ | |
5 | Copyright 2002 Texas Instruments Berlin, AG | |
6 | All rights reserved. | |
7 | | |
8 | This file is confidential and a trade secret of Texas | |
9 | Instruments Berlin, AG | |
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 Berlin, AG. | |
15 +------------------------------------------------------------------------------ | |
16 | Purpose: This module defines the signalling functions of the | |
17 | protocol stack adapter for packet i/o managment (MNPKTIO) | |
18 +------------------------------------------------------------------------------ | |
19 */ | |
20 | |
21 #ifdef GPRS | |
22 #ifdef FF_PKTIO | |
23 #ifndef PSA_PKTIOS_C | |
24 #define PSA_PKTIOS_C | |
25 #endif | |
26 | |
27 #include "aci_all.h" | |
28 /*==== INCLUDES ===================================================*/ | |
29 #include "dti.h" /* functionality of the dti library */ | |
30 #include "aci_cmh.h" | |
31 #include "ati_cmd.h" | |
32 #include "aci_cmd.h" | |
33 #include "aci_lst.h" | |
34 #include "aci.h" | |
35 #include "psa.h" | |
36 #include "dti_conn_mng.h" | |
37 #include "dti_cntrl_mng.h" | |
38 #include "psa_pktio.h" | |
39 #include "cmh.h" | |
40 | |
41 | |
42 /*==== CONSTANTS ==================================================*/ | |
43 | |
44 | |
45 /*==== TYPES ======================================================*/ | |
46 | |
47 | |
48 /*==== EXPORT =====================================================*/ | |
49 | |
50 /*==== VARIABLES ==================================================*/ | |
51 | |
52 | |
53 /*==== FUNCTIONS ==================================================*/ | |
54 | |
55 /* | |
56 +-------------------------------------------------------------------+ | |
57 | PROJECT : GPRS (8441) MODULE : PSA_PKTIOS | | |
58 | STATE : finished ROUTINE : psaPKT_ConnectRej | | |
59 +-------------------------------------------------------------------+ | |
60 | |
61 PURPOSE : Indicates that ACI can not handle a DTI connection with PKTIO | |
62 | |
63 */ | |
64 GLOBAL void psaPKT_ConnectRej ( UBYTE device_no) | |
65 { | |
66 TRACE_FUNCTION ("psaPKT_ConnectRej()"); | |
67 { | |
68 PALLOC ( pkt_connect_rej, PKT_CONNECT_REJ); | |
69 pkt_connect_rej->device_no = device_no; | |
70 PSEND (hCommPKTIO, pkt_connect_rej); | |
71 } | |
72 } | |
73 | |
74 /* | |
75 +-------------------------------------------------------------------+ | |
76 | PROJECT : GPRS (8441) MODULE : PSA_PKTIOS | | |
77 | STATE : finished ROUTINE : psaPKT_ConnectRes | | |
78 +-------------------------------------------------------------------+ | |
79 | |
80 PURPOSE : Response to PKT_CONNECT_IND sent by PKTIO with confirmed | |
81 DIO capabilities | |
82 | |
83 */ | |
84 GLOBAL void psaPKT_ConnectRes ( UBYTE device_no, | |
85 T_ACI_PKTIO_CAP * pktio_cap) | |
86 { | |
87 TRACE_FUNCTION ("psaPKT_ConnectRes()"); | |
88 { | |
89 PALLOC ( pkt_connect_res, PKT_CONNECT_RES); | |
90 memcpy(&pkt_connect_res->dio_dcb,pktio_cap,sizeof(T_ACI_PKTIO_CAP)); | |
91 pkt_connect_res->device_no = device_no; | |
92 PSEND (hCommPKTIO, pkt_connect_res); | |
93 } | |
94 } | |
95 | |
96 | |
97 /* | |
98 +-------------------------------------------------------------------+ | |
99 | PROJECT : GPRS (8441) MODULE : PSA_PKTIOS | | |
100 | STATE : finished ROUTINE : psaPKT_DTICloseReq | | |
101 +-------------------------------------------------------------------+ | |
102 | |
103 PURPOSE : Request closing of DTI connection with PKTIO | |
104 | |
105 */ | |
106 GLOBAL void psaPKT_DTICloseReq ( UBYTE device_no) | |
107 { | |
108 TRACE_FUNCTION ("psaPKT_DTICloseReq()"); | |
109 { | |
110 PALLOC ( pkt_dti_close_req, PKT_DTI_CLOSE_REQ); | |
111 pkt_dti_close_req->device_no = device_no; | |
112 PSEND (hCommPKTIO, pkt_dti_close_req); | |
113 } | |
114 } | |
115 | |
116 /* | |
117 +-------------------------------------------------------------------+ | |
118 | PROJECT : GPRS (8441) MODULE : PSA_PKTIOS | | |
119 | STATE : finished ROUTINE : psaPKT_DTIOpenReq | | |
120 +-------------------------------------------------------------------+ | |
121 | |
122 PURPOSE : Request opening of DTI connection with PKTIO | |
123 | |
124 */ | |
125 GLOBAL void psaPKT_DTIOpenReq ( UBYTE device_no, const char * peer_name, | |
126 ULONG link_id, UBYTE dti_direction) | |
127 { | |
128 TRACE_FUNCTION ("psaPKT_DTIOpenReq()"); | |
129 { | |
130 PALLOC ( pkt_dti_open_req, PKT_DTI_OPEN_REQ); | |
131 pkt_dti_open_req->device_no = device_no; | |
132 pkt_dti_open_req->peer = (ULONG)peer_name; | |
133 pkt_dti_open_req->link_id = link_id; | |
134 pkt_dti_open_req->dti_direction = dti_direction; | |
135 | |
136 PSEND (hCommPKTIO, pkt_dti_open_req); | |
137 } | |
138 } | |
139 | |
140 /* | |
141 +-------------------------------------------------------------------+ | |
142 | PROJECT : GPRS (8441) MODULE : PSA_PKTIOS | | |
143 | STATE : finished ROUTINE : psaPKT_ModifyReq | | |
144 +-------------------------------------------------------------------+ | |
145 | |
146 PURPOSE : Request modification of channel parameter | |
147 !!Attention!! currently not used | |
148 */ | |
149 GLOBAL void psaPKT_ModifyReq ( UBYTE device_no, | |
150 T_ACI_PKTIO_CAP * pktio_cap) | |
151 { | |
152 TRACE_FUNCTION ("psaPKT_ModifyReq()"); | |
153 { | |
154 PALLOC ( pkt_modify_req, PKT_MODIFY_REQ); | |
155 pkt_modify_req->device_no = device_no; | |
156 memcpy(&pkt_modify_req->dio_dcb,pktio_cap,sizeof(T_ACI_PKTIO_CAP)); | |
157 PSEND (hCommPKTIO, pkt_modify_req); | |
158 } | |
159 } | |
160 | |
161 /* | |
162 +-------------------------------------------------------------------+ | |
163 | PROJECT : GPRS (8441) MODULE : PSA_PKTIOS | | |
164 | STATE : finished ROUTINE : psaPKT_Dti_Req | | |
165 +-------------------------------------------------------------------+ | |
166 | |
167 PURPOSE : Request for DTI connection by DTI managment | |
168 | |
169 */ | |
170 GLOBAL void psaPKT_Dti_Req ( ULONG link_id, UBYTE peer, | |
171 T_DTI_MNG_PKT_MODE con_mode) | |
172 { | |
173 UBYTE device_no; | |
174 T_DTI_CNTRL device_info; | |
175 | |
176 TRACE_FUNCTION ("psaPKT_Dti_Req()"); | |
177 | |
178 dti_cntrl_get_info_from_dti_id(EXTRACT_DTI_ID(link_id), &device_info); | |
179 device_no = device_info.dev_no; | |
180 if(con_mode EQ PKT_CONNECT_DTI) | |
181 { | |
182 dti_cntrl_set_conn_parms((T_DTI_CONN_LINK_ID)link_id, DTI_ENTITY_PKTIO, | |
183 device_info.dev_no, device_info.sub_no); | |
184 | |
185 psaPKT_DTIOpenReq (device_no,dti_entity_name[peer].name, | |
186 link_id, DTI_CHANNEL_TO_LOWER_LAYER); | |
187 } | |
188 else | |
189 { | |
190 psaPKT_DTICloseReq(device_no); | |
191 } | |
192 } | |
193 | |
194 | |
195 #endif /* FF_PKTIO */ | |
196 #endif /* GPRS */ | |
197 /*==== EOF ========================================================*/ | |
198 |