# HG changeset patch # User Michael Spacefalcon # Date 1413064344 0 # Node ID 72de8fe8ef5fe2624fa256d418754167c8acdc6b # Parent 4c7f82008335d95b376354690ef141e9a21a01f0 sim_stk.o compiles diff -r 4c7f82008335 -r 72de8fe8ef5f gsm-fw/g23m-gsm/sim/Makefile --- a/gsm-fw/g23m-gsm/sim/Makefile Sat Oct 11 21:30:45 2014 +0000 +++ b/gsm-fw/g23m-gsm/sim/Makefile Sat Oct 11 21:52:24 2014 +0000 @@ -5,7 +5,7 @@ CPPFLAGS=-I. -I../../include -I../../include/condat -I../../gpf/inc \ -I../../cdginc -OBJS= sim_app.o sim_em.o sim_fkt.o sim_pei.o +OBJS= sim_app.o sim_em.o sim_fkt.o sim_pei.o sim_stk.o all: ${OBJS} diff -r 4c7f82008335 -r 72de8fe8ef5f gsm-fw/g23m-gsm/sim/sim_stk.c --- a/gsm-fw/g23m-gsm/sim/sim_stk.c Sat Oct 11 21:30:45 2014 +0000 +++ b/gsm-fw/g23m-gsm/sim/sim_stk.c Sat Oct 11 21:52:24 2014 +0000 @@ -21,6 +21,10 @@ #ifndef SIM_STK_C #define SIM_STK_C +#include "config.h" +#include "fixedconf.h" +#include "condat-features.h" + #define ENTITY_SIM /*==== INCLUDES ===================================================*/ @@ -52,8 +56,9 @@ /*==== EXPORT =====================================================*/ /* -* These Functions are only temporary valid and should be replaced as soon as possible -*/ + * These Functions are only temporary valid and should be replaced + * as soon as possible + */ EXTERN UBYTE get_network_meas (UBYTE * chan_list); EXTERN UBYTE get_bcch_chan_list (stk_data_type * out_stk_data); @@ -734,7 +739,7 @@ /* * builds a TERMINAL RESPONSE */ -static const UBYTE dev_resp[5] = + static const UBYTE dev_resp[5] = { STK_DEVICE_IDENTITY_TAG | STK_COMPREHENSION_REQUIRED, /* device details tag */ @@ -779,10 +784,8 @@ MALLOC (p, sizeof (T_STK_POLL_DATA)); memset (p, 0, sizeof (T_STK_POLL_DATA)); - TRACE_FUNCTION ("process_sim_refresh()"); - /* process as before */ switch (cmd_ptr->p_cmd[4]) { @@ -989,7 +992,7 @@ else { #ifndef TI_PS_UICC_CHIPSET_15 - T_SIM_CARD sim_info; + T_SIM_CARD sim_info; #endif /* TI_PS_UICC_CHIPSET_15 */ USHORT retcode; @@ -1043,12 +1046,9 @@ MFREE (p); TRACE_FUNCTION ("process_sim_refresh() exited(0)"); return(0); - } - - GLOBAL void stk_proactive_polling (void) { UBYTE *stk, *p_tag, *p_cmd = NULL; @@ -1477,7 +1477,7 @@ #endif if (org_val) { - p->response[cmd_len+ 9] = found_tag[2][0]; /* copy unit */ + p->response[cmd_len+ 9] = found_tag[2][0]; /* copy unit */ /* copy number of units (1 to 255) or 0 !!! */ p->response[cmd_len+10] = found_tag[2][1]; } @@ -2163,8 +2163,6 @@ } - - /* +--------------------------------------------------------------------+ | PROJECT : GSM-PS (8419) MODULE : SIM_STK | @@ -4908,11 +4906,11 @@ if (sim_data.sim_data_len > 0) { - sim_toolkit_cnf->stk_cmd.l_cmd = stk_l_cmd; - stk_l_cmd = 0; + sim_toolkit_cnf->stk_cmd.l_cmd = stk_l_cmd; + stk_l_cmd = 0; } else - sim_toolkit_cnf->stk_cmd.l_cmd = 0; + sim_toolkit_cnf->stk_cmd.l_cmd = 0; /* * send confirmation to requesting entity @@ -5048,34 +5046,35 @@ stk_start_timer_and_poll(); #else if (error EQ SIM_NO_ERROR) - { + { stk_start_timer_and_poll(); - sim_data.timer[index].active = FALSE; //modified by Jinshu Wang, 2008-09-04 - if(sim_data.chk_sat_avail) - { - sim_data.chk_sat_avail = FALSE; - stk_proactive_polling(); - } - return; //modified by Jinshu Wang, 2008-09-04 - } + //modified by Jinshu Wang, 2008-09-04 + sim_data.timer[index].active = FALSE; + if(sim_data.chk_sat_avail) + { + sim_data.chk_sat_avail = FALSE; + stk_proactive_polling(); + } + return; //modified by Jinshu Wang, 2008-09-04 + } #endif //end - /* - * If SIM response is busy(9300), we have to once retry sending - * timer-expiry envelope after SIM becomes OK on getting a TR - */ - if (error EQ SIM_CAUSE_SAT_BUSY) - { - pending_timers[next_pos_to_fill] = (UBYTE) index; - if (8 == next_pos_to_fill) - { - next_pos_to_fill = 0; - } - else - { - next_pos_to_fill++; - } - } + /* + * If SIM response is busy(9300), we have to once retry sending + * timer-expiry envelope after SIM becomes OK on getting a TR + */ + if (error EQ SIM_CAUSE_SAT_BUSY) + { + pending_timers[next_pos_to_fill] = (UBYTE) index; + if (8 == next_pos_to_fill) + { + next_pos_to_fill = 0; + } + else + { + next_pos_to_fill++; + } + } sim_data.timer[index].active = FALSE; } }