comparison gsm-fw/g23m-gsm/rr/rr_em.c @ 740:5148d3d2b986

rr_em.c compiles
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Sun, 05 Oct 2014 21:02:39 +0000
parents 2f7df7a314f8
children
comparison
equal deleted inserted replaced
739:e915a56954ae 740:5148d3d2b986
20 +----------------------------------------------------------------------------- 20 +-----------------------------------------------------------------------------
21 */ 21 */
22 22
23 #ifndef RR_EM_C 23 #ifndef RR_EM_C
24 #define RR_EM_C 24 #define RR_EM_C
25
26 #include "config.h"
27 #include "fixedconf.h"
28 #include "condat-features.h"
25 29
26 #define ENTITY_RR 30 #define ENTITY_RR
27 31
28 /*==== INCLUDES ===================================================*/ 32 /*==== INCLUDES ===================================================*/
29 33
361 if (rr_data->nc_data[SC_INDEX].bcch_status EQ DECODED) 365 if (rr_data->nc_data[SC_INDEX].bcch_status EQ DECODED)
362 { 366 {
363 memcpy(em_loc_pag_info_cnf->mcc, rr_data->nc_data[SC_INDEX].lai.mcc, SIZE_MCC); 367 memcpy(em_loc_pag_info_cnf->mcc, rr_data->nc_data[SC_INDEX].lai.mcc, SIZE_MCC);
364 368
365 /*check for MNC with 2 digits*/ 369 /*check for MNC with 2 digits*/
366 /* Fixed for Issue 21468 */ 370 /* Fixed for Issue 21468 */
367 if (rr_data->nc_data[SC_INDEX].lai.mnc[2] NEQ 0xF) /*defines a 3 digit NMC*/ 371 if (rr_data->nc_data[SC_INDEX].lai.mnc[2] NEQ 0xF) /*defines a 3 digit NMC*/
368 { 372 {
369 memcpy(em_loc_pag_info_cnf->mnc, rr_data->nc_data[SC_INDEX].lai.mnc, SIZE_MNC); 373 memcpy(em_loc_pag_info_cnf->mnc, rr_data->nc_data[SC_INDEX].lai.mnc, SIZE_MNC);
370 } 374 }
371 else /*2 digit -> leave the first value empty*/ 375 else /*2 digit -> leave the first value empty*/
435 439
436 /* Intialize to 0xffff. No hopping channels */ 440 /* Intialize to 0xffff. No hopping channels */
437 em_cip_hop_dtx_info_cnf->hop_chn.ma[0] = NOT_PRESENT_16BIT; 441 em_cip_hop_dtx_info_cnf->hop_chn.ma[0] = NOT_PRESENT_16BIT;
438 em_cip_hop_dtx_info_cnf->hop_chn2.ma[0] = NOT_PRESENT_16BIT; 442 em_cip_hop_dtx_info_cnf->hop_chn2.ma[0] = NOT_PRESENT_16BIT;
439 443
440 if((GET_STATE(STATE_ATT) EQ ATT_DEDICATED) AND 444 if ((GET_STATE(STATE_ATT) EQ ATT_DEDICATED) AND
441 (GET_STATE(STATE_DAT) EQ DAT_DEDICATED)) 445 (GET_STATE(STATE_DAT) EQ DAT_DEDICATED))
442 { 446 {
443 /* cipher status */ 447 /* cipher status */
444 em_cip_hop_dtx_info_cnf->ciph_stat = rr_data->sc_data.ciph_on; 448 em_cip_hop_dtx_info_cnf->ciph_stat = rr_data->sc_data.ciph_on;
445 449
446 /* Hopping status */ 450 /* Hopping status */
595 GLOBAL void dat_em_mobdata_version_info_req (T_EM_SW_VERSION_INFO_REQ *em_sw_version_info_req) 599 GLOBAL void dat_em_mobdata_version_info_req (T_EM_SW_VERSION_INFO_REQ *em_sw_version_info_req)
596 { 600 {
597 PALLOC(em_sw_version_info_cnf, EM_SW_VERSION_INFO_CNF); 601 PALLOC(em_sw_version_info_cnf, EM_SW_VERSION_INFO_CNF);
598 PFREE(em_sw_version_info_req); 602 PFREE(em_sw_version_info_req);
599 603
600
601 TRACE_FUNCTION ("dat_em_mobdata_version_info_req()"); 604 TRACE_FUNCTION ("dat_em_mobdata_version_info_req()");
602 605
603 memset (em_sw_version_info_cnf, 0, sizeof (T_EM_SW_VERSION_INFO_CNF)); 606 memset (em_sw_version_info_cnf, 0, sizeof (T_EM_SW_VERSION_INFO_CNF));
604 607
605 em_sw_version_info_cnf->v_mmi = 0xFF; 608 em_sw_version_info_cnf->v_mmi = 0xFF;
636 639
637 PFREE(em_amr_info_req); 640 PFREE(em_amr_info_req);
638 TRACE_FUNCTION ("dat_em_amr_info_req()"); 641 TRACE_FUNCTION ("dat_em_amr_info_req()");
639 642
640 /* AMR information is valid only in dedicated state, when chan mode is AMR */ 643 /* AMR information is valid only in dedicated state, when chan mode is AMR */
641 if((GET_STATE(STATE_ATT) EQ ATT_DEDICATED) AND 644 if ((GET_STATE(STATE_ATT) EQ ATT_DEDICATED) AND
642 (GET_STATE(STATE_DAT) EQ DAT_DEDICATED)) 645 (GET_STATE(STATE_DAT) EQ DAT_DEDICATED))
643 { 646 {
644 if(rr_data->sc_data.ch_mode EQ CM_AMR) 647 if(rr_data->sc_data.ch_mode EQ CM_AMR)
645 { 648 {
646 /* AMR vocoder type */ 649 /* AMR vocoder type */
647 em_amr_info_cnf->amr_vocoder = rr_data->sc_data.chan_desc.chan_type; 650 em_amr_info_cnf->amr_vocoder = rr_data->sc_data.chan_desc.chan_type;
1156 | 1159 |
1157 +------------------------------------------------------------------------------ 1160 +------------------------------------------------------------------------------
1158 */ 1161 */
1159 static void rr_semaphore_err (void) 1162 static void rr_semaphore_err (void)
1160 { 1163 {
1161 static UCHAR out = 0; 1164 static UCHAR out = 0;
1165
1162 if (!out) 1166 if (!out)
1163 { 1167 {
1164 out = 1; 1168 out = 1;
1165 /* Implements Measure#32: Row 224 */ 1169 /* Implements Measure#32: Row 224 */
1166 TRACE_EVENT ("semaphore error"); 1170 TRACE_EVENT ("semaphore error");
1167
1168 } 1171 }
1169 } 1172 }
1170 1173
1171 1174
1172 /* 1175 /*
1243 sem_EM_RR = vsi_s_open (VSI_CALLER "EM_RR_SEM",1); 1246 sem_EM_RR = vsi_s_open (VSI_CALLER "EM_RR_SEM",1);
1244 1247
1245 if (sem_EM_RR NEQ VSI_ERROR) 1248 if (sem_EM_RR NEQ VSI_ERROR)
1246 em_rr_sem_clear (); 1249 em_rr_sem_clear ();
1247 else 1250 else
1248 SYST_TRACE ("RR:canīt open semaphore \"EM_RR_SEM\""); 1251 SYST_TRACE ("RR:can't open semaphore \"EM_RR_SEM\"");
1249 } 1252 }
1250 1253
1251 /* 1254 /*
1252 +------------------------------------------------------------------------------ 1255 +------------------------------------------------------------------------------
1253 | Function : em_rr_sem_exit 1256 | Function : em_rr_sem_exit
1476 TRACE_FUNCTION("rr_em_pco_trace_req()"); 1479 TRACE_FUNCTION("rr_em_pco_trace_req()");
1477 1480
1478 /*check for SC data*/ 1481 /*check for SC data*/
1479 if(em_pco_trace_req->pco_bitmap & EM_PCO_SC_INFO) 1482 if(em_pco_trace_req->pco_bitmap & EM_PCO_SC_INFO)
1480 { 1483 {
1481 switch (GET_STATE (STATE_ATT)) 1484 switch (GET_STATE (STATE_ATT))
1482 { 1485 {
1483 case ATT_IDLE: 1486 case ATT_IDLE:
1484 1487
1485 if (rr_data->nc_data[SC_INDEX].bcch_status EQ DECODED) 1488 if (rr_data->nc_data[SC_INDEX].bcch_status EQ DECODED)
1486 { 1489 {
1690 /* Implements Measure#32: Row 242 */ 1693 /* Implements Measure#32: Row 242 */
1691 char *basestr="EM_CIP_HOP_DTX_INFO_REQ_FREQ"; 1694 char *basestr="EM_CIP_HOP_DTX_INFO_REQ_FREQ";
1692 1695
1693 /*to store the trace output*/ 1696 /*to store the trace output*/
1694 char hop_freq_list[MAX_SPRINTF_STRING_LEN]; /*lint !e813 , info about length*/ 1697 char hop_freq_list[MAX_SPRINTF_STRING_LEN]; /*lint !e813 , info about length*/
1695 1698
1696 if((GET_STATE(STATE_ATT) EQ ATT_DEDICATED) AND 1699 if ((GET_STATE(STATE_ATT) EQ ATT_DEDICATED) AND
1697 (GET_STATE(STATE_DAT) EQ DAT_DEDICATED)) 1700 (GET_STATE(STATE_DAT) EQ DAT_DEDICATED))
1698 { 1701 {
1699 1702
1700 TRACE_EVENT_EM_P6("EM_CIP_HOP_DTX_INFO_REQ_DEDICATED: ciph:%d dtx:%d v_start:%d hop:%d hsn:%d arfcn:%d", 1703 TRACE_EVENT_EM_P6("EM_CIP_HOP_DTX_INFO_REQ_DEDICATED: ciph:%d dtx:%d v_start:%d hop:%d hsn:%d arfcn:%d",
1701 rr_data->sc_data.ciph_on, 1704 rr_data->sc_data.ciph_on,
1702 rr_data->sc_data.cd.dtx, 1705 rr_data->sc_data.cd.dtx,
1834 }/*if - Identity data*/ 1837 }/*if - Identity data*/
1835 1838
1836 /*check AMR configuration data*/ 1839 /*check AMR configuration data*/
1837 if(em_pco_trace_req->pco_bitmap & EM_PCO_AMR_INFO) 1840 if(em_pco_trace_req->pco_bitmap & EM_PCO_AMR_INFO)
1838 { 1841 {
1839 if((GET_STATE(STATE_ATT) EQ ATT_DEDICATED) AND 1842 if ((GET_STATE(STATE_ATT) EQ ATT_DEDICATED) AND
1840 (GET_STATE(STATE_DAT) EQ DAT_DEDICATED)) 1843 (GET_STATE(STATE_DAT) EQ DAT_DEDICATED))
1841 { 1844 {
1842 if(rr_data->sc_data.ch_mode EQ CM_AMR) 1845 if(rr_data->sc_data.ch_mode EQ CM_AMR)
1843 { 1846 {
1844 UBYTE amr_index,amr_nr_modes = 1; 1847 UBYTE amr_index,amr_nr_modes = 1;
1845 1848
2095 2098
2096 #endif /*FF_WAP*/ 2099 #endif /*FF_WAP*/
2097 2100
2098 } 2101 }
2099 2102
2100
2101 #endif /* GPRS */ 2103 #endif /* GPRS */
2102 2104
2103 #endif /* FF_EM_MODE */ 2105 #endif /* FF_EM_MODE */
2104 2106
2105
2106
2107 #endif /* RR_EM_C */ 2107 #endif /* RR_EM_C */