comparison gsm-fw/g23m-gsm/dl/dl_state.c @ 711:4ee3bc3fc540

dl_state.c compiles
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Fri, 03 Oct 2014 04:41:15 +0000
parents 2f7df7a314f8
children
comparison
equal deleted inserted replaced
710:857ded4ed2a1 711:4ee3bc3fc540
20 */ 20 */
21 21
22 #ifndef DL_STATE_C 22 #ifndef DL_STATE_C
23 #define DL_STATE_C 23 #define DL_STATE_C
24 24
25 #include "config.h"
26 #include "fixedconf.h"
27 #include "condat-features.h"
28
25 #define ENTITY_DL 29 #define ENTITY_DL
26 #define NEW_REJ_ACK /* Acknowledgement by valid reject frame 30 #define NEW_REJ_ACK /* Acknowledgement by valid reject frame
27 * in accordance with 3GPP 04.06, 5.5.3.1 31 * in accordance with 3GPP 04.06, 5.5.3.1
28 * "On receipt of a valid I frame or supervisory frame" 32 * "On receipt of a valid I frame or supervisory frame"
29 */ 33 */
41 #include "pei.h" 45 #include "pei.h"
42 #include "tok.h" 46 #include "tok.h"
43 #include "ccdapi.h" 47 #include "ccdapi.h"
44 #include "dl.h" 48 #include "dl.h"
45 #include "dl_em.h" 49 #include "dl_em.h"
46 #include "DL_trc.h" 50 #include "dl_trc.h"
47 51
48 /*==== TYPEDEFS ===================================================*/ 52 /*==== TYPEDEFS ===================================================*/
49 typedef struct 53 typedef struct
50 { 54 {
51 UBYTE channel; 55 UBYTE channel;
150 static UBYTE invalid = 0; 154 static UBYTE invalid = 0;
151 int ret = -2; 155 int ret = -2;
152 int cause; 156 int cause;
153 int l2_offset; 157 int l2_offset;
154 158
155 GET_INSTANCE_DATA; 159 GET_INSTANCE_DATA;
156 160
157 TRACE_EVENT_WIN_P1 ("downlink(): dcch0_ch_type:%s", 161 TRACE_EVENT_WIN_P1 ("downlink(): dcch0_ch_type:%s",
158 CH_TYPE_NAME[dl_data->dcch0_ch_type]); 162 CH_TYPE_NAME[dl_data->dcch0_ch_type]);
159 TRACE_EVENT_WIN_P6 ("DL: DCCH0=%s,%s vr=%u vs=%u va=%u T200=%u", 163 TRACE_EVENT_WIN_P6 ("DL: DCCH0=%s,%s vr=%u vs=%u va=%u T200=%u",
160 CH_TYPE_NAME[dl_data->cch[C_DCCH0].ch_type], 164 CH_TYPE_NAME[dl_data->cch[C_DCCH0].ch_type],
421 425
422 if (cch_i.mdl_error_ind) 426 if (cch_i.mdl_error_ind)
423 { 427 {
424 mdl_error_ind ( cch_i.mdl_error_ind, channel_type, frame_sapi); 428 mdl_error_ind ( cch_i.mdl_error_ind, channel_type, frame_sapi);
425 } 429 }
426
427 430
428 431
429 TRACE_EVENT_WIN_P4 ("downlink() out:%s SAPI=%u st=%u vtx=%s", 432 TRACE_EVENT_WIN_P4 ("downlink() out:%s SAPI=%u st=%u vtx=%s",
430 CH_TYPE_NAME[channel_type], cch_i.sapi, cch_i.state, 433 CH_TYPE_NAME[channel_type], cch_i.sapi, cch_i.state,
431 VTX_NAME[cch_i.pcch->vtx]); 434 VTX_NAME[cch_i.pcch->vtx]);
1578 else 1581 else
1579 pcch_i->dl_data_ind = FALSE;/* no indication if P bit set to "0" or message is incomplete */ 1582 pcch_i->dl_data_ind = FALSE;/* no indication if P bit set to "0" or message is incomplete */
1580 1583
1581 /* 1584 /*
1582 * GSM 04.06, 5.7.4 The data link shall remain in current state 1585 * GSM 04.06, 5.7.4 The data link shall remain in current state
1583 * until itīs release by layer 3 ??? 1586 * until it's release by layer 3 ???
1584 */ 1587 */
1585 pcch_i->mdl_error_ind = SEQUENCE_ERROR; /* send mdl error ind after sequence error */ 1588 pcch_i->mdl_error_ind = SEQUENCE_ERROR; /* send mdl error ind after sequence error */
1586 1589
1587 DL_EM_CHANNEL_FAILURE; 1590 DL_EM_CHANNEL_FAILURE;
1588 1591
2242 pcch->p_bit_flag = 0; 2245 pcch->p_bit_flag = 0;
2243 m_bit = queue->m_bit; /* remember last m bit */ 2246 m_bit = queue->m_bit; /* remember last m bit */
2244 TRACE_EVENT_WIN_P2 ("TIMER_RECOVERY state: decrement vs to %u, remember m=%u", pcch->vs, m_bit); 2247 TRACE_EVENT_WIN_P2 ("TIMER_RECOVERY state: decrement vs to %u, remember m=%u", pcch->vs, m_bit);
2245 } 2248 }
2246 2249
2247
2248 com_build_I_command (pcch->ch_type, sapi, pcch->vs, pcch->vr, 2250 com_build_I_command (pcch->ch_type, sapi, pcch->vs, pcch->vr,
2249 p_bit, m_bit, queue); 2251 p_bit, m_bit, queue);
2250 pcch->vs++; 2252 pcch->vs++;
2251 pcch->vs &= 7; 2253 pcch->vs &= 7;
2252 TRACE_EVENT_WIN_P4 ("%s SAPI=%u new vs=%u (pcch=%08x)", 2254 TRACE_EVENT_WIN_P4 ("%s SAPI=%u new vs=%u (pcch=%08x)",
2575 } 2577 }
2576 break; 2578 break;
2577 }/* endswitch channel */ 2579 }/* endswitch channel */
2578 break; 2580 break;
2579 }/* endswitch vtx */ 2581 }/* endswitch vtx */
2580
2581 2582
2582 return ret; 2583 return ret;
2583 }/* endfunc uplink_mfe */ 2584 }/* endfunc uplink_mfe */
2584 2585
2585 static int uplink_timer_recovery (UBYTE channel, UBYTE sapi, UBYTE no_signalling_mode) 2586 static int uplink_timer_recovery (UBYTE channel, UBYTE sapi, UBYTE no_signalling_mode)