FreeCalypso > hg > freecalypso-sw
comparison gsm-fw/g23m-gsm/rr/rr_pei.c @ 744:20bb8855c015
rr_pei.c compiles
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Sun, 05 Oct 2014 22:29:40 +0000 |
parents | 2f7df7a314f8 |
children |
comparison
equal
deleted
inserted
replaced
743:5d0fe9c9fcc6 | 744:20bb8855c015 |
---|---|
1 /* | 1 /* |
2 +----------------------------------------------------------------------------- | 2 +----------------------------------------------------------------------------- |
3 | Project : | 3 | Project : |
4 | Modul : | 4 | Modul : |
5 +----------------------------------------------------------------------------- | 5 +----------------------------------------------------------------------------- |
6 | Copyright 2002 Texas Instruments Berlin, AG | 6 | Copyright 2002 Texas Instruments Berlin, AG |
20 */ | 20 */ |
21 | 21 |
22 #ifndef RR_PEI_C | 22 #ifndef RR_PEI_C |
23 #define RR_PEI_C | 23 #define RR_PEI_C |
24 | 24 |
25 #include "config.h" | |
26 #include "fixedconf.h" | |
27 #include "condat-features.h" | |
28 | |
25 #define ENTITY_RR | 29 #define ENTITY_RR |
26 | 30 |
27 /*==== INCLUDES ===================================================*/ | 31 /*==== INCLUDES ===================================================*/ |
28 | 32 |
29 #include <string.h> | 33 #include <string.h> |
45 #include "rr.h" | 49 #include "rr.h" |
46 #include "rr_em.h" | 50 #include "rr_em.h" |
47 #include "cl_shrd.h" | 51 #include "cl_shrd.h" |
48 | 52 |
49 #if !defined(_SIMULATION_) | 53 #if !defined(_SIMULATION_) |
50 #include "ffs/ffs.h" | 54 #include "../../services/ffs/ffs.h" |
51 #include "ffs_coat.h" | 55 #include "ffs_coat.h" |
52 #endif /* !_SIMULATION_ */ | 56 #endif /* !_SIMULATION_ */ |
53 | 57 |
54 /*==== EXPORT =====================================================*/ | 58 /*==== EXPORT =====================================================*/ |
55 /* | 59 /* |
76 #ifdef FF_WAP | 80 #ifdef FF_WAP |
77 GLOBAL T_HANDLE hCommWAP = VSI_ERROR; /* FMM-WAP Communication */ | 81 GLOBAL T_HANDLE hCommWAP = VSI_ERROR; /* FMM-WAP Communication */ |
78 #endif | 82 #endif |
79 | 83 |
80 #endif /* TI_PS_HCOMM_CHANGE */ | 84 #endif /* TI_PS_HCOMM_CHANGE */ |
81 | |
82 | |
83 | 85 |
84 static UBYTE stop_reg = FALSE; | 86 static UBYTE stop_reg = FALSE; |
85 | 87 |
86 GLOBAL T_RR_DATA rr_data_base; | 88 GLOBAL T_RR_DATA rr_data_base; |
87 | 89 |
494 if ((hCommWAP = vsi_c_open (VSI_CALLER WAP_NAME)) < VSI_OK) | 496 if ((hCommWAP = vsi_c_open (VSI_CALLER WAP_NAME)) < VSI_OK) |
495 return PEI_ERROR; | 497 return PEI_ERROR; |
496 } | 498 } |
497 #endif | 499 #endif |
498 | 500 |
499 | |
500 if (hCommMMI < VSI_OK) | 501 if (hCommMMI < VSI_OK) |
501 { | 502 { |
502 /* | 503 /* |
503 * Open MMI (Layer 4) | 504 * Open MMI (Layer 4) |
504 */ | 505 */ |
505 | 506 |
506 if ((hCommMMI = vsi_c_open (VSI_CALLER ACI_NAME)) < VSI_OK) | 507 if ((hCommMMI = vsi_c_open (VSI_CALLER ACI_NAME)) < VSI_OK) |
507 return PEI_ERROR; | 508 return PEI_ERROR; |
508 } | 509 } |
509 #endif /* TI_PS_HCOMM_CHANGE */ | 510 #endif /* TI_PS_HCOMM_CHANGE */ |
511 | |
510 rr_data->ms_data.multislot_class_configured = FALSE; | 512 rr_data->ms_data.multislot_class_configured = FALSE; |
511 rr_data->ms_data.cmsp_configured = FALSE; | 513 rr_data->ms_data.cmsp_configured = FALSE; |
512 /* | 514 /* |
513 * Initialize Condat Coder Decoder and | 515 * Initialize Condat Coder Decoder and |
514 * processes | 516 * processes |
784 case SCR: /* slow cell reselection */ | 786 case SCR: /* slow cell reselection */ |
785 TRACE_EVENT ("[PEI_CONFIG]: SLOW CELL RESELECTION"); | 787 TRACE_EVENT ("[PEI_CONFIG]: SLOW CELL RESELECTION"); |
786 rr_data->dyn_config.scr = 1; | 788 rr_data->dyn_config.scr = 1; |
787 break; | 789 break; |
788 | 790 |
789 | |
790 case DLE: /* downlink error */ | 791 case DLE: /* downlink error */ |
791 { | 792 { |
792 PALLOC (error_ind, MPH_ERROR_IND); | 793 PALLOC (error_ind, MPH_ERROR_IND); |
793 | 794 |
794 TRACE_EVENT ("[PEI_CONFIG]: DOWNLINK ERROR"); | 795 TRACE_EVENT ("[PEI_CONFIG]: DOWNLINK ERROR"); |
1059 else | 1060 else |
1060 { | 1061 { |
1061 TRACE_ERROR ("[PEI_CONFIG]: TNORMAL_CS-Wrong Number of Parameters"); | 1062 TRACE_ERROR ("[PEI_CONFIG]: TNORMAL_CS-Wrong Number of Parameters"); |
1062 } | 1063 } |
1063 break; | 1064 break; |
1064 | |
1065 | |
1066 #endif | 1065 #endif |
1067 | 1066 |
1068 #if defined (_SIMULATION_) | 1067 #if defined (_SIMULATION_) |
1069 case RR_MT_CALL: | 1068 case RR_MT_CALL: |
1070 /* | 1069 /* |
1213 #endif /* _SIMULATION_ */ | 1212 #endif /* _SIMULATION_ */ |
1214 #if defined(_SIMULATION_FFS_) | 1213 #if defined(_SIMULATION_FFS_) |
1215 case SHIELD: | 1214 case SHIELD: |
1216 if(!valno) | 1215 if(!valno) |
1217 { | 1216 { |
1218 memset(&rr_data->dyn_config.mcc_shield,0,sizeof(T_shield_mcc)); | 1217 memset(&rr_data->dyn_config.mcc_shield,0,sizeof(T_shield_mcc)); |
1219 } | 1218 } |
1220 else | 1219 else |
1221 { | 1220 { |
1222 rr_data->dyn_config.mcc_shield.enabled = TRUE; | 1221 rr_data->dyn_config.mcc_shield.enabled = TRUE; |
1223 if(valno > MAX_MCC_SHIELD) | 1222 if(valno > MAX_MCC_SHIELD) |
1248 index++; | 1247 index++; |
1249 } | 1248 } |
1250 } | 1249 } |
1251 } | 1250 } |
1252 rr_data->dyn_config.mcc_shield.index = index; | 1251 rr_data->dyn_config.mcc_shield.index = index; |
1253 | |
1254 } | 1252 } |
1255 rr_csf_write_mcc_shield_to_ffs(); | 1253 rr_csf_write_mcc_shield_to_ffs(); |
1256 break; | 1254 break; |
1257 #endif /* defined(_SIMULATION_FFS_)*/ | 1255 #endif /* defined(_SIMULATION_FFS_)*/ |
1258 case ID_MULTISLOT_CLASS: | 1256 case ID_MULTISLOT_CLASS: |
1410 else | 1408 else |
1411 { | 1409 { |
1412 SHORT plmn = atoi (val[0]); | 1410 SHORT plmn = atoi (val[0]); |
1413 /* copy MCC */ | 1411 /* copy MCC */ |
1414 rr_data->cs_data.white_list.last_sc_lac.mcc[0] = (plmn/100); | 1412 rr_data->cs_data.white_list.last_sc_lac.mcc[0] = (plmn/100); |
1415 rr_data->cs_data.white_list.last_sc_lac.mcc[1] = (plmn/10)%10; | 1413 rr_data->cs_data.white_list.last_sc_lac.mcc[1] = (plmn/10)%10; |
1416 rr_data->cs_data.white_list.last_sc_lac.mcc[2] = (plmn % 10); | 1414 rr_data->cs_data.white_list.last_sc_lac.mcc[2] = (plmn % 10); |
1417 | 1415 |
1418 /* Copy MNC */ | 1416 /* Copy MNC */ |
1419 plmn = atoi (val[1]); | 1417 plmn = atoi (val[1]); |
1420 rr_data->cs_data.white_list.last_sc_lac.mnc[0] = (plmn/100); | 1418 rr_data->cs_data.white_list.last_sc_lac.mnc[0] = (plmn/100); |
1421 rr_data->cs_data.white_list.last_sc_lac.mnc[1] = (plmn/10)%10; | 1419 rr_data->cs_data.white_list.last_sc_lac.mnc[1] = (plmn/10)%10; |
1422 rr_data->cs_data.white_list.last_sc_lac.mnc[2] = (plmn % 10); | 1420 rr_data->cs_data.white_list.last_sc_lac.mnc[2] = (plmn % 10); |
1423 | 1421 |
1424 if(!rr_data->cs_data.white_list.last_sc_lac.mnc[2]) | 1422 if(!rr_data->cs_data.white_list.last_sc_lac.mnc[2]) |
1425 rr_data->cs_data.white_list.last_sc_lac.mnc[2] = 0x0f; | 1423 rr_data->cs_data.white_list.last_sc_lac.mnc[2] = 0x0f; |
1426 | 1424 |
1429 rr_data->cs_data.white_list.last_sc_lac.mcc[1], | 1427 rr_data->cs_data.white_list.last_sc_lac.mcc[1], |
1430 rr_data->cs_data.white_list.last_sc_lac.mcc[2], | 1428 rr_data->cs_data.white_list.last_sc_lac.mcc[2], |
1431 rr_data->cs_data.white_list.last_sc_lac.mnc[0], | 1429 rr_data->cs_data.white_list.last_sc_lac.mnc[0], |
1432 rr_data->cs_data.white_list.last_sc_lac.mnc[1], | 1430 rr_data->cs_data.white_list.last_sc_lac.mnc[1], |
1433 rr_data->cs_data.white_list.last_sc_lac.mnc[2]); | 1431 rr_data->cs_data.white_list.last_sc_lac.mnc[2]); |
1434 | |
1435 } | 1432 } |
1436 break; | 1433 break; |
1437 case SET_NPS_DELAY: | 1434 case SET_NPS_DELAY: |
1438 if(valno) | 1435 if(valno) |
1439 { | 1436 { |