# HG changeset patch # User Michael Spacefalcon # Date 1412477632 0 # Node ID a6f45d948d2202ad33f243836c75be3f2376397d # Parent 68693b72670bdc0a6c192f12f42bf65d0f54bf3d rr_attf.c compiles diff -r 68693b72670b -r a6f45d948d22 gsm-fw/g23m-gsm/rr/Makefile --- a/gsm-fw/g23m-gsm/rr/Makefile Sun Oct 05 01:27:32 2014 +0000 +++ b/gsm-fw/g23m-gsm/rr/Makefile Sun Oct 05 02:53:52 2014 +0000 @@ -1,5 +1,13 @@ -# stub Makefile, to be filled out -all: +CC= arm-elf-gcc +LD= arm-elf-ld + +CFLAGS= -O2 -fno-builtin -mthumb-interwork -mthumb +CPPFLAGS=-I. -I../../include -I../../include/condat -I../../gpf/inc \ + -I../../cdginc + +OBJS= rr_attf.o + +all: ${OBJS} clean: rm -f *.[oa] *.out *errs diff -r 68693b72670b -r a6f45d948d22 gsm-fw/g23m-gsm/rr/rr_attf.c --- a/gsm-fw/g23m-gsm/rr/rr_attf.c Sun Oct 05 01:27:32 2014 +0000 +++ b/gsm-fw/g23m-gsm/rr/rr_attf.c Sun Oct 05 02:53:52 2014 +0000 @@ -22,6 +22,10 @@ #ifndef RR_ATTF_C #define RR_ATTF_C +#include "config.h" +#include "fixedconf.h" +#include "condat-features.h" + #define ENTITY_RR /*==== INCLUDES ===================================================*/ @@ -112,8 +116,6 @@ #endif - - LOCAL void att_copy_sys_info_2bis_2ter_par(UBYTE index, T_SI_TYPE si_type, T_LIST *new_2_bis_ter_list, BUF_neigh_cell_desc *neigh_cell_desc, @@ -1667,9 +1669,6 @@ } - - - /* +--------------------------------------------------------------------+ | PROJECT : GSM-PS (6147) MODULE : RR_ATT | @@ -1731,8 +1730,8 @@ rr_data->nc_data[index].rach.cell_bar_access EQ 1) { /* - * access class 15 is set - */ + * access class 15 is set + */ if (rr_data->nc_data[index].rach.ac & 0x8000) return FALSE; } @@ -1748,8 +1747,6 @@ return TRUE; else return FALSE; - - } @@ -1958,8 +1955,6 @@ (rr_data->nc_data[CR_INDEX].c1 > 0) AND att_priority_check (); - - if ( (found = att_plmn_in_found_list (lai->mcc, lai->mnc)) NEQ NULL ) { if ( found->cell_ok EQ 0 AND /* old cell did not allow access */ @@ -2036,8 +2031,8 @@ /* * calculate the path loss criterion */ - att_calculate_c1 (CR_INDEX); - TRACE_C1(CR_INDEX); + att_calculate_c1 (CR_INDEX); + TRACE_C1(CR_INDEX); /* * the check depends on the service which has been requested @@ -2779,8 +2774,8 @@ /* * check the cell requirements: * 1. check the cell barred status (if shall be non-barred) - * 2. the cell shall be not temporarily excluded (tnnn e.g. after random access - * failure). + * 2. the cell shall be not temporarily excluded (tnnn e.g. after random + * access failure). * 3. the cell must have a positive cell reselection criterion C2. */ @@ -2969,7 +2964,7 @@ * restore the sys_info_read bitmap if we are going * directly to idle */ - rr_data->sc_data.cd.sys_info_read = ALL_SYS_INFO_READ; + rr_data->sc_data.cd.sys_info_read = ALL_SYS_INFO_READ; if (rr_data->repeat_est) { @@ -3247,15 +3242,14 @@ #endif att_calculate_c2 (CR_INDEX); /* - * Check the cell. It shall not be barred and must have - * a positive cell reselection criterion C2. - */ + * Check the cell. It shall not be barred and must have + * a positive cell reselection criterion C2. + */ /* Implements RR Clone findings #8 */ cell_ok = ! att_cell_barred_status_cr_no_cr (CR_INDEX) AND rr_data->nc_data[CR_INDEX].c2 > 0; - - + #ifdef GPRS } #endif @@ -3328,7 +3322,8 @@ * - We are in LIMITED service. * If the req_mm_service is FUNC_LIM_SERV_ST_SRCH we * will stay in LIMITED. - * If we are in limited because of forbidden LAI we enter FULL SERVICE. + * If we are in limited because of forbidden LAI we enter + * FULL SERVICE. */ if(rr_data->ms_data.rr_service EQ FULL_SERVICE) { @@ -3353,8 +3348,8 @@ case BACK_FROM_DEDICATED: case BACK_FROM_DEDICATED_RLF: /* The mobile is trying to select a cell after coming back from dedicated - * state. The cell is selected only if it belongs to the previously selected - * PLMN + * state. The cell is selected only if it belongs to the previously + * selected PLMN */ if(cell_ok) { @@ -3847,7 +3842,7 @@ if(delta EQ 0 ) { delta = -1; - } + } } } else @@ -3971,7 +3966,6 @@ /* Implements RR Clone findings #8 */ if (att_cell_barred_status_cr_no_cr (SC_INDEX) EQ TRUE) { - #ifdef GPRS att_start_cell_reselection_gprs (CELL_RESELECTION); #else @@ -4015,7 +4009,6 @@ TRACE_EVENT ( "CLEAR ROAM FORB LIST"); } - for (i = 0; i < MAX_LAI; i++) { memset (forb_list[i].mcc, NOT_PRESENT_8BIT, SIZE_MCC); @@ -4025,7 +4018,6 @@ } - /* +--------------------------------------------------------------------+ | PROJECT : GSM-PS (6147) MODULE : RR_ATT | @@ -4396,7 +4388,6 @@ #if defined (REL99) && defined (TI_PS_FF_EMR) for_check_and_configure_si2quater(index); #endif - } /* @@ -5007,7 +4998,6 @@ /* MS Patch: CQ 24473 */ rr_activate_cnf->gprs_indication = (rr_data->nc_data[SC_INDEX].rac NEQ NOT_PRESENT_8BIT); - #else rr_activate_cnf->gprs_indication = FALSE; #endif @@ -5156,9 +5146,7 @@ should is stopped. MM is not informed, because it have already received a RR_ABORT_IND and left its state.*/ - TIMERSTOP (T3122); - - + TIMERSTOP (T3122); /* * indicate the requested MM service and the reached RR service @@ -5226,7 +5214,6 @@ /* MS Patch: CQ 24473 */ rr_activate_ind->gprs_indication = (rr_data->nc_data[SC_INDEX].rac NEQ NOT_PRESENT_8BIT); - #else rr_activate_ind->gprs_indication = FALSE; #endif @@ -5288,8 +5275,6 @@ att_set_rr_service_info(); } - - /* +--------------------------------------------------------------------+ | PROJECT : GSM-PS (6147) MODULE : RR_ATT | @@ -5454,8 +5439,6 @@ rr_data->reselect_index); } - - #ifdef GPRS } #endif @@ -6391,9 +6374,9 @@ { case BACK_FROM_DEDICATED: case BACK_FROM_DEDICATED_RLF: - /* - * prepare cell reselection list - */ + /* + * prepare cell reselection list + */ for (i = 0; i < 7; i++) { rr_data->nc_data[i].c2_used = FALSE; @@ -7055,31 +7038,31 @@ static void att_begin_cs (UBYTE req_mm_service) { - GET_INSTANCE_DATA; + GET_INSTANCE_DATA; if(GET_STATE(STATE_ATT) EQ ATT_CS_INIT ) { - SET_STATE(STATE_ATT, ATT_CS1 ); /*Boot Time*/ + SET_STATE(STATE_ATT, ATT_CS1 ); /*Boot Time*/ /* Boot Time Performance Enhancement: * Start the TABORT timer on receiving the second activate_req */ tstart_tabort(TABORT_VALUE); - /* Invalidate whitelist if its PLMN ID does not match - * with the requested PLMN - */ - if((rr_data->ms_data.req_mm_service EQ FUNC_PLMN_SRCH) AND - (!dat_plmn_equal_req(rr_data->cs_data.white_list.last_sc_lac.mcc, - rr_data->cs_data.white_list.last_sc_lac.mnc, - rr_data->ms_data.plmn.mcc, - rr_data->ms_data.plmn.mnc))) - { - rr_data->cs_data.white_list.region = NOT_PRESENT_8BIT; - } - if( srv_check_stored_prim(MPH_POWER_CNF)) - { - srv_use_stored_prim(); - } + /* Invalidate whitelist if its PLMN ID does not match + * with the requested PLMN + */ + if((rr_data->ms_data.req_mm_service EQ FUNC_PLMN_SRCH) AND + (!dat_plmn_equal_req(rr_data->cs_data.white_list.last_sc_lac.mcc, + rr_data->cs_data.white_list.last_sc_lac.mnc, + rr_data->ms_data.plmn.mcc, + rr_data->ms_data.plmn.mnc))) + { + rr_data->cs_data.white_list.region = NOT_PRESENT_8BIT; + } + if( srv_check_stored_prim(MPH_POWER_CNF)) + { + srv_use_stored_prim(); + } /* * reset the time for net search to finish * a PLMN available search during 60 seconds. @@ -7328,7 +7311,6 @@ rr_data->net_lost = FALSE; - #if defined FF_EOTD rr_data->t_expire[TAPDU] = tim_apdu; #endif /* FF_EOTD */ @@ -7355,7 +7337,7 @@ /* vsi_t_config is removed in latest GPF */ #endif } - } + } #endif } @@ -7744,7 +7726,7 @@ GET_INSTANCE_DATA; TRACE_FUNCTION ("att_search_cell()"); #if defined(_SIMULATION_) - TRACE_SELECTION_TYPE (rr_data->sc_data.selection_type); + TRACE_SELECTION_TYPE (rr_data->sc_data.selection_type); #endif /* _SIMULATION_ */ /* @@ -7803,7 +7785,7 @@ att_try_old_cell (); break; } - EM_FMM_RESEL_START_IND; + EM_FMM_RESEL_START_IND; } @@ -8839,7 +8821,7 @@ GLOBAL UBYTE att_check_network (T_loc_area_ident * lai) { GET_INSTANCE_DATA; - UBYTE count=0; + UBYTE count=0; /* * if a test SIM is inserted and "Software Shielding" is enabled then check mcc value with stored mcc value * (durig dynamic configuration command shield).The network exists in the list updated using dynamic @@ -9000,10 +8982,10 @@ } /* -+--------------------------------------------------------------------------------+ -| PROJECT : GSM-PS (6147) MODULE : RR_ATT | -| STATE : code ROUTINE : att_check_dynamic_search_mode_config | -+--------------------------------------------------------------------------------+ ++------------------------------------------------------------------------------+ +| PROJECT : GSM-PS (6147) MODULE : RR_ATT | +| STATE : code ROUTINE : att_check_dynamic_search_mode_config | ++------------------------------------------------------------------------------+ PURPOSE : This function updates the new search mode based on the current dynamic search mode configuration @@ -9070,7 +9052,7 @@ case STD_850_900_1800: #endif /* Ref 04.18 Section 10.5.2.35 - * Rest Octets IE includes parameters which are used by the mobile station + * Rest Octets IE includes parameters which are used by the mobile station * for cell selection and reselection purposes. It may also include the * POWER OFFSET parameter used by DCS 1800 Class 3 MS. */ @@ -9106,8 +9088,6 @@ return max_cch; } - - #if !defined(NTRACE) /* +--------------------------------------------------------------------+ @@ -9222,7 +9202,7 @@ /* +--------------------------------------------------------------------+ | PROJECT : GSM-PS (6147) MODULE : RR_ATT | -| STATE : code ROUTINE : att_func1_opt | +| STATE : code ROUTINE : att_func1_opt | +--------------------------------------------------------------------+ PURPOSE : This function sets the system information read flag of the passed @@ -9280,7 +9260,6 @@ #ifdef GPRS rr_data->gprs_data.ba_bcch_modified= FALSE; #endif - } else { @@ -9301,8 +9280,10 @@ modified = TRUE; } } - /* CSI-LLD section:4.1.1.11 - * This function Updates the black list with the BA list received in si2bis/ter + /* + * CSI-LLD section:4.1.1.11 + * This function Updates the black list with the BA list received + * in si2bis/ter */ cs_remove_BA_MA_from_black_list(rr_data->cs_data.region,&cd->ncell_list); @@ -9327,20 +9308,18 @@ } - #if defined (REL99) && defined (TI_PS_FF_EMR) /* +--------------------------------------------------------------------+ | PROJECT : GSM-PS (6147) MODULE : RR_ATT | -| STATE : code ROUTINE : attf_send_enh_para_to_alr | -+--------------------------------------------------------------------+ - - PURPOSE : This function formats and sends a primitive with enhanced measurement - parameters. +| STATE : code ROUTINE : attf_send_enh_para_to_alr | ++--------------------------------------------------------------------+ + + PURPOSE : This function formats and sends a primitive with enhanced + measurement parameters. */ GLOBAL void attf_send_enh_para_to_alr(UBYTE rep_type, T_enh_para_struct *p_src) { - PALLOC(p_enh, MPH_ENHPARA_UPDATE_REQ); TRACE_FUNCTION ("attf_send_enh_para_to_alr"); p_enh->rep_type = rep_type;