comparison src/ui/mfw/mfw_sim.c @ 188:92abb46dc1ba

src/ui/mfw/*.[ch]: rm trailing white space
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 19 Jan 2021 06:10:27 +0000
parents 67bfe9f274f6
children
comparison
equal deleted inserted replaced
187:a33dd8a5dcc9 188:92abb46dc1ba
10 10
11 PURPOSE : This modul contains the functions for SIM management. 11 PURPOSE : This modul contains the functions for SIM management.
12 12
13 13
14 $History:: mfw_sim.c 14 $History:: mfw_sim.c
15 15
16 May 30, 2007 DR: OMAPS00132483 x0pleela 16 May 30, 2007 DR: OMAPS00132483 x0pleela
17 Description: MM: While playing an AAC, unplug USB freezes the audio 17 Description: MM: While playing an AAC, unplug USB freezes the audio
18 Solution: Defined new functions mfw_get_Phlock_status(), mfw_set_Phlock_status( ), 18 Solution: Defined new functions mfw_get_Phlock_status(), mfw_set_Phlock_status( ),
19 mfw_get_Auto_Phlock_status(), mfw_set_Auto_Phlock_status() to set and 19 mfw_get_Auto_Phlock_status(), mfw_set_Auto_Phlock_status() to set and
20 get the phone lock and automatic phone lock status 20 get the phone lock and automatic phone lock status
21 21
22 Apr 03, 2007 ER: OMAPS00122561 x0pleela 22 Apr 03, 2007 ER: OMAPS00122561 x0pleela
23 Description: [ACI] Phone lock feature has to be supported by ACI 23 Description: [ACI] Phone lock feature has to be supported by ACI
24 Solution: Phone Lock ER implementation 24 Solution: Phone Lock ER implementation
25 25
26 Feb 19, 2006 ER:OMAPS00115179 a0393213 26 Feb 19, 2006 ER:OMAPS00115179 a0393213
27 Description : support SIM insertion without powering down 27 Description : support SIM insertion without powering down
28 Solution : New case is handled in rAT_PercentSIMINS 28 Solution : New case is handled in rAT_PercentSIMINS
29 29
30 Dec 13, 2006 DR: OMAPS00105640 x0039928 30 Dec 13, 2006 DR: OMAPS00105640 x0039928
31 Description: SIMP: The board reboots when removing SIM card. 31 Description: SIMP: The board reboots when removing SIM card.
32 Solution: Sim status is updated. 32 Solution: Sim status is updated.
33 33
34 Nov 13, 2006 DR: OMAPS00103356 x0pleela 34 Nov 13, 2006 DR: OMAPS00103356 x0pleela
35 Description: SIMP:Master unlock failed through MMI 35 Description: SIMP:Master unlock failed through MMI
36 Solution: In function mfw_simlock_master_unlock() a check is added if the master unlock 36 Solution: In function mfw_simlock_master_unlock() a check is added if the master unlock
37 password is wrong. If wrong, displays Wrong password. 37 password is wrong. If wrong, displays Wrong password.
38 Also a check is added if the error code for any of the categories (non-dependent) 38 Also a check is added if the error code for any of the categories (non-dependent)
39 being locked/blocked. If yes, return OK as the dependent categories are unblocked 39 being locked/blocked. If yes, return OK as the dependent categories are unblocked
40 using Master unblock password 40 using Master unblock password
41 41
42 Sep 26, 2006 DR: OMAPS00095524 x0pleela 42 Sep 26, 2006 DR: OMAPS00095524 x0pleela
43 Description:Implement 2 missing SIM Lock types 43 Description:Implement 2 missing SIM Lock types
44 Solution: Made the following changes 44 Solution: Made the following changes
45 1) sim_error_cfun(), sim_error_cpin() 45 1) sim_error_cfun(), sim_error_cpin()
46 - Setting the aciErrdesc separately for all the CME errors related to 46 - Setting the aciErrdesc separately for all the CME errors related to
47 SIMP categories 47 SIMP categories
48 - Handling the extension error of request for Blocked network password 48 - Handling the extension error of request for Blocked network password
49 (both PIN and PUK) 49 (both PIN and PUK)
50 2) mfw_simlock_check_lock_bootup() 50 2) mfw_simlock_check_lock_bootup()
51 - Updating aciErrDesc with Blocked Network (PIN or PUK) password request 51 - Updating aciErrDesc with Blocked Network (PIN or PUK) password request
52 3) mfw_simlock_return_lock_type() 52 3) mfw_simlock_return_lock_type()
53 - Return coresponding ACI lock type for Blocked network category 53 - Return coresponding ACI lock type for Blocked network category
54 4) sim_simlock_cpin_code() 54 4) sim_simlock_cpin_code()
55 - Set the reqduired parameters for Blocked Network Password and Unblock 55 - Set the reqduired parameters for Blocked Network Password and Unblock
56 code request 56 code request
57 57
58 Sep 26, 2006 DR: OMAPS00096565 x0pleela 58 Sep 26, 2006 DR: OMAPS00096565 x0pleela
59 Description: After blocking PIN, when ISAMPLE is reset, instead of prompting for PUK, master 59 Description: After blocking PIN, when ISAMPLE is reset, instead of prompting for PUK, master
60 unlock key is asked 60 unlock key is asked
61 Solution: Reset C_KEY_REQ to 0 in functions sim_error_cfun() and sim_error_cpin() 61 Solution: Reset C_KEY_REQ to 0 in functions sim_error_cfun() and sim_error_cpin()
62 62
63 Sep 11, 2006 DR: OMAPS00094215 x0pleela 63 Sep 11, 2006 DR: OMAPS00094215 x0pleela
64 Description: MMI compilation failed as CME_ErrBusy undefined 64 Description: MMI compilation failed as CME_ErrBusy undefined
65 Solution: Handling new Ext_ERR_Busy sent by ACI 65 Solution: Handling new Ext_ERR_Busy sent by ACI
66 66
67 xashmic 9 Sep 2006, OMAPS00092732 67 xashmic 9 Sep 2006, OMAPS00092732
68 USBMS ER 68 USBMS ER
69 69
70 Sep 08, 2006 DR: OMAPS00091250 x0pleela 70 Sep 08, 2006 DR: OMAPS00091250 x0pleela
77 OMAPS00087587: Time Penaly feature extend handset security 77 OMAPS00087587: Time Penaly feature extend handset security
78 Solution:Made the following changes 78 Solution:Made the following changes
79 1) Defined new static variable "Simp_Busy_State" which will be set to either TRUE or FALSE based on the ACI's busy error 79 1) Defined new static variable "Simp_Busy_State" which will be set to either TRUE or FALSE based on the ACI's busy error
80 2) sim_error_cfun(): Update global aciErrDesc with the current CME error code 80 2) sim_error_cfun(): Update global aciErrDesc with the current CME error code
81 3) mfw_simlock_check_lock_bootup(): Check for the CME busy error and update "Simp_Busy_State" accordingly 81 3) mfw_simlock_check_lock_bootup(): Check for the CME busy error and update "Simp_Busy_State" accordingly
82 4) mfw_simlock_return_lock_type(): Return coresponding lock type for master unlock 82 4) mfw_simlock_return_lock_type(): Return coresponding lock type for master unlock
83 5) Added following new functions: 83 5) Added following new functions:
84 mfw_simlock_master_unlock: This function unlocks(dependent categories) or unblocks ME 84 mfw_simlock_master_unlock: This function unlocks(dependent categories) or unblocks ME
85 mfw_simlock_check_masterkey: This function checks from ACI whether Master Unlock feature is enabled or not. If 85 mfw_simlock_check_masterkey: This function checks from ACI whether Master Unlock feature is enabled or not. If
86 enabled, displays a menu item for the user toy select master unlocking option. If not enabled, doesn't 86 enabled, displays a menu item for the user toy select master unlocking option. If not enabled, doesn't
87 display master unlocking option in the menu 87 display master unlocking option in the menu
88 mfw_simlock_set_busy_state: This function sets Simp_Busy_State to either TRUE or FALSE based on ACI's CME error 88 mfw_simlock_set_busy_state: This function sets Simp_Busy_State to either TRUE or FALSE based on ACI's CME error
89 mfw_simlock_get_busy_state: This function returns the current value of Simp_Busy_State 89 mfw_simlock_get_busy_state: This function returns the current value of Simp_Busy_State
90 90
91 Jun 23, 2006 DR: OMAPS00082374 x0pleela 91 Jun 23, 2006 DR: OMAPS00082374 x0pleela
92 Description: EONS Failures - unexpected output from the MMI: 2 carriers; on the top always T-Mobile 92 Description: EONS Failures - unexpected output from the MMI: 2 carriers; on the top always T-Mobile
93 Solution: a) Removed the usage of global variable gEons_alloc_active 93 Solution: a) Removed the usage of global variable gEons_alloc_active
94 b) Removed the check for services 51 and 52 from function rat_pluscfunp 94 b) Removed the check for services 51 and 52 from function rat_pluscfunp
95 95
96 xrashmic 6 Jul, 2006 OMAPS00080708 96 xrashmic 6 Jul, 2006 OMAPS00080708
97 For error return value in sAT_PercentPVRF, bmi has to be informed 97 For error return value in sAT_PercentPVRF, bmi has to be informed
98 98
99 xrashmic 1 Jul, 2006 OMAPS00075784 99 xrashmic 1 Jul, 2006 OMAPS00075784
100 Hanlding of SIMP events during bootup 100 Hanlding of SIMP events during bootup
101 101
102 May 15, 2006 DR: OMAPS00067919 x0pleela 102 May 15, 2006 DR: OMAPS00067919 x0pleela
103 Description: SIMP:On repeat Depersonalisation with invalid password MEPD unblock key should 103 Description: SIMP:On repeat Depersonalisation with invalid password MEPD unblock key should
104 be asked not Puk1. 104 be asked not Puk1.
105 Solution:Made the following changes 105 Solution:Made the following changes
106 1. Added global variables (simp_cpin_code, simp_cpin_flag) to store the code result of qAT_PlusCPIN() result 106 1. Added global variables (simp_cpin_code, simp_cpin_flag) to store the code result of qAT_PlusCPIN() result
107 2. Using new enum type T_MFW_SIMP_CLCK_FLAG sim_unlock_in_prog instead of U8 107 2. Using new enum type T_MFW_SIMP_CLCK_FLAG sim_unlock_in_prog instead of U8
108 3. Added code in sim_error_cpin() to set the sim_status field to request for Unblocking code 108 3. Added code in sim_error_cpin() to set the sim_status field to request for Unblocking code
109 4. Modified the code to check SIMP during bootup sequence 109 4. Modified the code to check SIMP during bootup sequence
110 5. Added new function sim_simlock_cpin_code() which checks for the code and take action for SIMP category unlocking 110 5. Added new function sim_simlock_cpin_code() which checks for the code and take action for SIMP category unlocking
111 111
112 Feb 15, 2006 ER: OMAPS00065203 x0pleela 112 Feb 15, 2006 ER: OMAPS00065203 x0pleela
113 Description: Cingular Operator Name Prioritization implementation required 113 Description: Cingular Operator Name Prioritization implementation required
114 Solution: Incorporated review comments 114 Solution: Incorporated review comments
115 Combined both checks for services 51 and 52 in rAT_PlusCFUNP 115 Combined both checks for services 51 and 52 in rAT_PlusCFUNP
116 116
117 Feb 09, 2006 ER: OMAPS00065203 x0pleela 117 Feb 09, 2006 ER: OMAPS00065203 x0pleela
118 Description: Cingular Operator Name Prioritization implementation required 118 Description: Cingular Operator Name Prioritization implementation required
119 Solution: Check for services 51 - OPL and 52 - PNN in function rAT_PlusCFUNP and 119 Solution: Check for services 51 - OPL and 52 - PNN in function rAT_PlusCFUNP and
120 gEons_alloc_active is updated accordingly 120 gEons_alloc_active is updated accordingly
121 121
122 Nov 24, 2005 DR: OMAPS00045909 - Shashi Shekar B.S. 122 Nov 24, 2005 DR: OMAPS00045909 - Shashi Shekar B.S.
123 Description: Improve IMEI control mechanism 123 Description: Improve IMEI control mechanism
124 Solution : When MMI calls sAT_PLUSCFUN, if an IMEI invalid error is returned, 124 Solution : When MMI calls sAT_PLUSCFUN, if an IMEI invalid error is returned,
125 we will block on that screen & will not allow the user to browse menus further, 125 we will block on that screen & will not allow the user to browse menus further,
126 since the PS will not be booted at all!!! 126 since the PS will not be booted at all!!!
128 Nov 15,2005 DR : OMAPS00057280 - x0034700 128 Nov 15,2005 DR : OMAPS00057280 - x0034700
129 Description: Compilation Errors in Neptune build while integrating latest MMI Changes 129 Description: Compilation Errors in Neptune build while integrating latest MMI Changes
130 Solution: Included the compilation FLAG "NEPTUNE_BOARD" for un wanted code for Neptune build 130 Solution: Included the compilation FLAG "NEPTUNE_BOARD" for un wanted code for Neptune build
131 131
132 Nov 03, 2005 DR: OMAPS00052032 - xpradipg 132 Nov 03, 2005 DR: OMAPS00052032 - xpradipg
133 Description : Locosto: SIMP - integration of issues submitted by solDel on 133 Description : Locosto: SIMP - integration of issues submitted by solDel on
134 ME Personalization - changes as per the new interfaces 134 ME Personalization - changes as per the new interfaces
135 Solution : The return value of sAT_PlusCLCK of AT_EXCT is handled and 135 Solution : The return value of sAT_PlusCLCK of AT_EXCT is handled and
136 a please wait screen is displayed until the response is recieved 136 a please wait screen is displayed until the response is recieved
137 137
138 Nov 03, 2005 DR: OMAPS00050595 - xpradipg 138 Nov 03, 2005 DR: OMAPS00050595 - xpradipg
139 Description: SIMP: If the SIM is blocked (by entering invalid PIN1), the user is 139 Description: SIMP: If the SIM is blocked (by entering invalid PIN1), the user is
140 not able to unblock it even after entering the valid PUK1 140 not able to unblock it even after entering the valid PUK1
141 Solution : The global flag for SIM Personlaization PUK request was set even 141 Solution : The global flag for SIM Personlaization PUK request was set even
142 for the SIM PUK request. This setting is removed. Also the condition 142 for the SIM PUK request. This setting is removed. Also the condition
143 check has been done first for the global flag and then the rest of the 143 check has been done first for the global flag and then the rest of the
144 checks. 144 checks.
145 145
146 Sept 24, 2005 REF: LOCOSTO-ENH-34438, xpradipg 146 Sept 24, 2005 REF: LOCOSTO-ENH-34438, xpradipg
147 Description: Integration changes required with new aci labe 147 Description: Integration changes required with new aci labe
148 Solution: changes to adopt to the new ACI label 148 Solution: changes to adopt to the new ACI label
149 149
150 July 19, 2005 REF: CRR LOCOSTO-ENH-28173 xpradipg 150 July 19, 2005 REF: CRR LOCOSTO-ENH-28173 xpradipg
151 Description: To provide MMI Support to enable/disable/change password and 151 Description: To provide MMI Support to enable/disable/change password and
152 query all the Personalization locks 152 query all the Personalization locks
153 Solution: Integration of the changes for the same provided by the soldel 153 Solution: Integration of the changes for the same provided by the soldel
154 team 154 team
155 155
156 Aug 16, 2004 REF: CRR 24323 Deepa M.D 156 Aug 16, 2004 REF: CRR 24323 Deepa M.D
157 Bug:Clenup of sprintf used for tracing 157 Bug:Clenup of sprintf used for tracing
158 Fix:Replace the char buf[]; sprintf (buf, "...", ...); TRACE_EVENT (buf); statements by TRACE_EVENT_PX $ 158 Fix:Replace the char buf[]; sprintf (buf, "...", ...); TRACE_EVENT (buf); statements by TRACE_EVENT_PX $
159 159
160 May 22, 2006 x0047685 160 May 22, 2006 x0047685
163 * * ***************** Version 43 ***************** 163 * * ***************** Version 43 *****************
164 * User: MC Date: 14.11.02 Time: 10:40 164 * User: MC Date: 14.11.02 Time: 10:40
165 * Updated in $/BMI/Condat/MS/SRC/MFW 165 * Updated in $/BMI/Condat/MS/SRC/MFW
166 * Changed simlock functions into wrappers for aci_slock functions, and 166 * Changed simlock functions into wrappers for aci_slock functions, and
167 * removed variables definitions and helper functions rendered obsolete. 167 * removed variables definitions and helper functions rendered obsolete.
168 * 168 *
169 * ***************** Version 43 ***************** 169 * ***************** Version 43 *****************
170 * User: Vo Date: 22.03.00 Time: 17:29 170 * User: Vo Date: 22.03.00 Time: 17:29
171 * Updated in $/GSM/Condat/MS/SRC/MFW 171 * Updated in $/GSM/Condat/MS/SRC/MFW
172 * Add new parameter PIN type in structure T_MFW_SIM_STATUS to 172 * Add new parameter PIN type in structure T_MFW_SIM_STATUS to
173 * identify PIN type 173 * identify PIN type
414 414
415 #include "mfw_ss.h" 415 #include "mfw_ss.h"
416 #include "mfw_ssi.h" 416 #include "mfw_ssi.h"
417 417
418 #include "aci_ext_pers.h" /*MC, SPR 1351 include ACI simlock files*/ 418 #include "aci_ext_pers.h" /*MC, SPR 1351 include ACI simlock files*/
419 #include "aci_slock.h" 419 #include "aci_slock.h"
420 420
421 #ifdef SIM_TOOLKIT 421 #ifdef SIM_TOOLKIT
422 #include "mfw_sat.h" 422 #include "mfw_sat.h"
423 #endif 423 #endif
424 424
440 int mfw_simlock_get_lock_status(S16 lcktyp); 440 int mfw_simlock_get_lock_status(S16 lcktyp);
441 int C_KEY_REQ = 0; 441 int C_KEY_REQ = 0;
442 442
443 //x0pleela 25 Apr, 2006 DR: OMAPS00067919 443 //x0pleela 25 Apr, 2006 DR: OMAPS00067919
444 //Global variable to store the code result of qAT_PlusCPIN() result 444 //Global variable to store the code result of qAT_PlusCPIN() result
445 GLOBAL T_ACI_CPIN_RSLT simp_cpin_code; 445 GLOBAL T_ACI_CPIN_RSLT simp_cpin_code;
446 GLOBAL UBYTE simp_cpin_flag; //Global to indicate whether Category pwds are asked after qAT_PlusCPIN() 446 GLOBAL UBYTE simp_cpin_flag; //Global to indicate whether Category pwds are asked after qAT_PlusCPIN()
447 #endif 447 #endif
448 448
449 static T_MFW_SIM_STATUS sim_status; 449 static T_MFW_SIM_STATUS sim_status;
450 static T_MFW_SIM_CONFIG sim_config; 450 static T_MFW_SIM_CONFIG sim_config;
468 EXTERN MfwHdr * current_mfw_elem; 468 EXTERN MfwHdr * current_mfw_elem;
469 #if defined (WIN32) 469 #if defined (WIN32)
470 /* 470 /*
471 * Only for windows to check several SIM lock combinations 471 * Only for windows to check several SIM lock combinations
472 */ 472 */
473 UBYTE sim_lock_mode = 0; 473 UBYTE sim_lock_mode = 0;
474 #endif 474 #endif
475 UBYTE sim_lock_field = NOT_PRESENT_8BIT; /* type of sim lock field */ 475 UBYTE sim_lock_field = NOT_PRESENT_8BIT; /* type of sim lock field */
476 476
477 #ifdef SIM_PERS 477 #ifdef SIM_PERS
478 EXTERN UBYTE gsim_status; 478 EXTERN UBYTE gsim_status;
517 TRACE_FUNCTION("sim_init()"); 517 TRACE_FUNCTION("sim_init()");
518 518
519 pin_flag = -1; 519 pin_flag = -1;
520 pin_ident = MFW_SIM_UNKNOWN; 520 pin_ident = MFW_SIM_UNKNOWN;
521 521
522 /* 522 /*
523 * install prim handler 523 * install prim handler
524 */ 524 */
525 pSlot = aci_create(sima_response_cb,NULL); 525 pSlot = aci_create(sima_response_cb,NULL);
526 mfwCommand[MfwTypSim] = (MfwCb) simCommand; 526 mfwCommand[MfwTypSim] = (MfwCb) simCommand;
527 527
528 return TRUE; 528 return TRUE;
556 556
557 void sim_exit (void) 557 void sim_exit (void)
558 { 558 {
559 TRACE_FUNCTION("sim_exit()"); 559 TRACE_FUNCTION("sim_exit()");
560 560
561 /* 561 /*
562 * remove prim handler 562 * remove prim handler
563 */ 563 */
564 aci_delete(pSlot); 564 aci_delete(pSlot);
565 sim_stat = SIM_NOT_ACTIVE; 565 sim_stat = SIM_NOT_ACTIVE;
566 } 566 }
567 567
588 sim_para = (T_MFW_SIM *) mfwAlloc(sizeof(T_MFW_SIM)); 588 sim_para = (T_MFW_SIM *) mfwAlloc(sizeof(T_MFW_SIM));
589 589
590 if (!hdr || !sim_para) 590 if (!hdr || !sim_para)
591 { 591 {
592 TRACE_ERROR("ERROR: sim_create() Mem Alloc Failed."); 592 TRACE_ERROR("ERROR: sim_create() Mem Alloc Failed.");
593 593
594 if(hdr) 594 if(hdr)
595 mfwFree((U8*)hdr,sizeof(MfwHdr)); 595 mfwFree((U8*)hdr,sizeof(MfwHdr));
596 596
597 if(sim_para) 597 if(sim_para)
598 mfwFree((U8*)sim_para,sizeof(T_MFW_SIM)); 598 mfwFree((U8*)sim_para,sizeof(T_MFW_SIM));
599 599
600 return 0; 600 return 0;
601 } 601 }
602 sim_para->emask = event; 602 sim_para->emask = event;
603 sim_para->handler = cbfunc; 603 sim_para->handler = cbfunc;
604 604
605 hdr->data = sim_para; 605 hdr->data = sim_para;
606 hdr->type = MfwTypSim; 606 hdr->type = MfwTypSim;
607 607
608 insert_status = mfwInsert((MfwHdr *) hWin,hdr); 608 insert_status = mfwInsert((MfwHdr *) hWin,hdr);
609 609
610 if(!insert_status) 610 if(!insert_status)
611 { 611 {
612 TRACE_ERROR("ERROR: sim_create() Failed to Install Handler. "); 612 TRACE_ERROR("ERROR: sim_create() Failed to Install Handler. ");
613 mfwFree((U8*)hdr,sizeof(MfwHdr)); 613 mfwFree((U8*)hdr,sizeof(MfwHdr));
614 mfwFree((U8*)sim_para,sizeof(T_MFW_SIM)); 614 mfwFree((U8*)sim_para,sizeof(T_MFW_SIM));
615 return 0; 615 return 0;
616 } 616 }
617 return insert_status; 617 return insert_status;
618 618
619 } 619 }
664 if (mfwSignallingMethod EQ 0) 664 if (mfwSignallingMethod EQ 0)
665 { 665 {
666 if (mfwFocus) 666 if (mfwFocus)
667 if (sim_sign_exec(mfwFocus,event,para)) 667 if (sim_sign_exec(mfwFocus,event,para))
668 { 668 {
669 dspl_Enable(temp); 669 dspl_Enable(temp);
670 return; 670 return;
671 } 671 }
672 if (mfwRoot) 672 if (mfwRoot)
673 sim_sign_exec(mfwRoot,event,para); 673 sim_sign_exec(mfwRoot,event,para);
674 } 674 }
698 /* 698 /*
699 * Signal consumed, then return 699 * Signal consumed, then return
700 */ 700 */
701 if (sim_sign_exec (h, event, para)) 701 if (sim_sign_exec (h, event, para))
702 { 702 {
703 dspl_Enable(temp); 703 dspl_Enable(temp);
704 return; 704 return;
705 } 705 }
706 706
707 /* 707 /*
708 * All windows tried inclusive root 708 * All windows tried inclusive root
709 */ 709 */
710 if (h == mfwRoot) 710 if (h == mfwRoot)
711 { 711 {
712 dspl_Enable(temp); 712 dspl_Enable(temp);
713 return; 713 return;
714 } 714 }
715 715
716 /* 716 /*
717 * get parent window 717 * get parent window
719 h = mfwParent(mfwParent(h)); 719 h = mfwParent(mfwParent(h));
720 if(h) 720 if(h)
721 h = ((MfwWin * )(h->data))->elems; 721 h = ((MfwWin * )(h->data))->elems;
722 } 722 }
723 sim_sign_exec (mfwRoot, event, para); 723 sim_sign_exec (mfwRoot, event, para);
724 } 724 }
725 dspl_Enable(temp); 725 dspl_Enable(temp);
726 return; 726 return;
727 } 727 }
728 728
729 729
730 /* 730 /*
806 T_ACI_RETURN cfun; 806 T_ACI_RETURN cfun;
807 T_ACI_ERR_DESC cfun_err; 807 T_ACI_ERR_DESC cfun_err;
808 808
809 TRACE_FUNCTION("sim_activate()"); 809 TRACE_FUNCTION("sim_activate()");
810 810
811 /* 811 /*
812 * Full functionality is used don´t reset the ME 812 * Full functionality is used don´t reset the ME
813 */ 813 */
814 814
815 // Nov 24, 2005, a0876501, DR: OMAPS00045909 815 // Nov 24, 2005, a0876501, DR: OMAPS00045909
816 cfun = sAT_PlusCFUN(CMD_SRC_LCL,CFUN_FUN_Full,CFUN_RST_NotPresent); 816 cfun = sAT_PlusCFUN(CMD_SRC_LCL,CFUN_FUN_Full,CFUN_RST_NotPresent);
817 817
918 PURPOSE : Notify error status of SIM card 918 PURPOSE : Notify error status of SIM card
919 919
920 */ 920 */
921 921
922 /* OMAPS00075177 - 17,Apr-2006 */ 922 /* OMAPS00075177 - 17,Apr-2006 */
923 /* Signature of the function has been changed from U8 to T_ACI_CME_ERR. 923 /* Signature of the function has been changed from U8 to T_ACI_CME_ERR.
924 because, when calling this function, it is converting from T_ACI_CME_ERR to U8. 924 because, when calling this function, it is converting from T_ACI_CME_ERR to U8.
925 It is loosing the negative values( the enum T_ACI_CME_ERR has negative values ) 925 It is loosing the negative values( the enum T_ACI_CME_ERR has negative values )
926 */ 926 */
927 void sim_error_cfun (T_ACI_CME_ERR result) 927 void sim_error_cfun (T_ACI_CME_ERR result)
928 { 928 {
929 TRACE_FUNCTION("sim_error_cfun()"); 929 TRACE_FUNCTION("sim_error_cfun()");
943 sim_status.sim_status = MFW_SIM_PIN2_REQ; 943 sim_status.sim_status = MFW_SIM_PIN2_REQ;
944 sim_status.sim_pin_retries = sim_pin_count(MFW_SIM_PIN2); 944 sim_status.sim_pin_retries = sim_pin_count(MFW_SIM_PIN2);
945 sim_status.sim_status_type = MFW_SIM_PIN2; 945 sim_status.sim_status_type = MFW_SIM_PIN2;
946 sim_stat = SIM_ACTIVE; 946 sim_stat = SIM_ACTIVE;
947 break; 947 break;
948 948
949 #ifdef SIM_PERS 949 #ifdef SIM_PERS
950 case CME_ERR_PhoneFail: 950 case CME_ERR_PhoneFail:
951 case CME_ERR_NetworkPersPukReq: 951 case CME_ERR_NetworkPersPukReq:
952 case CME_ERR_NetworkSubsetPersPukReq: 952 case CME_ERR_NetworkSubsetPersPukReq:
953 case CME_ERR_ProviderPersPukReq: 953 case CME_ERR_ProviderPersPukReq:
954 case CME_ERR_CorporatePersPukReq: 954 case CME_ERR_CorporatePersPukReq:
955 //x0pleela 25 Sep, 2006 ER: OMAPS00095524 955 //x0pleela 25 Sep, 2006 ER: OMAPS00095524
956 //Update global aciErrDesc with the current CME error code 956 //Update global aciErrDesc with the current CME error code
957 ACI_ERR_DESC( ACI_ERR_CLASS_Cme, result ); 957 ACI_ERR_DESC( ACI_ERR_CLASS_Cme, result );
958 C_KEY_REQ = 1; 958 C_KEY_REQ = 1;
959 sim_status.sim_status = MFW_SIM_PUK_REQ; 959 sim_status.sim_status = MFW_SIM_PUK_REQ;
960 sim_status.sim_pin_retries = sim_pin_count(MFW_SIM_PUK1); 960 sim_status.sim_pin_retries = sim_pin_count(MFW_SIM_PUK1);
961 sim_status.sim_status_type = MFW_SIM_PUK1; 961 sim_status.sim_status_type = MFW_SIM_PUK1;
962 sim_stat = SIM_ACTIVE; 962 sim_stat = SIM_ACTIVE;
963 break; 963 break;
964 964
965 #endif 965 #endif
966 // Nov 03, 2005 DR: OMAPS00050595 - xpradipg 966 // Nov 03, 2005 DR: OMAPS00050595 - xpradipg
967 // the setting of C_KEY_REQ is done only for SIM Personalization PUK request 967 // the setting of C_KEY_REQ is done only for SIM Personalization PUK request
968 case CME_ERR_SimPukReq: /* PUK 1 must be entered */ 968 case CME_ERR_SimPukReq: /* PUK 1 must be entered */
969 #ifdef SIM_PERS 969 #ifdef SIM_PERS
970 C_KEY_REQ = 0; 970 C_KEY_REQ = 0;
971 #endif 971 #endif
972 sim_status.sim_status = MFW_SIM_PUK_REQ; 972 sim_status.sim_status = MFW_SIM_PUK_REQ;
973 sim_status.sim_pin_retries = sim_pin_count(MFW_SIM_PUK1); 973 sim_status.sim_pin_retries = sim_pin_count(MFW_SIM_PUK1);
974 sim_status.sim_status_type = MFW_SIM_PUK1; 974 sim_status.sim_status_type = MFW_SIM_PUK1;
978 sim_status.sim_status = MFW_SIM_PUK2_REQ; 978 sim_status.sim_status = MFW_SIM_PUK2_REQ;
979 sim_status.sim_pin_retries = sim_pin_count(MFW_SIM_PUK2); 979 sim_status.sim_pin_retries = sim_pin_count(MFW_SIM_PUK2);
980 sim_status.sim_status_type = MFW_SIM_PUK2; 980 sim_status.sim_status_type = MFW_SIM_PUK2;
981 sim_stat = SIM_ACTIVE; 981 sim_stat = SIM_ACTIVE;
982 break; 982 break;
983 case CME_ERR_NotPresent: /* JVJ -#1580. Unexpected error should be treated as INVALID CARD for FTA*/ 983 case CME_ERR_NotPresent: /* JVJ -#1580. Unexpected error should be treated as INVALID CARD for FTA*/
984 case CME_ERR_SimFail: /* SIM card is invalid */ 984 case CME_ERR_SimFail: /* SIM card is invalid */
985 case CME_ERR_SimWrong: 985 case CME_ERR_SimWrong:
986 sim_status.sim_status = MFW_SIM_INVALID_CARD; 986 sim_status.sim_status = MFW_SIM_INVALID_CARD;
987 sim_status.sim_pin_retries = 0; 987 sim_status.sim_pin_retries = 0;
988 sim_status.sim_status_type = MFW_SIM_UNKNOWN; 988 sim_status.sim_status_type = MFW_SIM_UNKNOWN;
992 sim_status.sim_status = MFW_SIM_NO_SIM_CARD; 992 sim_status.sim_status = MFW_SIM_NO_SIM_CARD;
993 sim_status.sim_pin_retries = 0; 993 sim_status.sim_pin_retries = 0;
994 sim_status.sim_status_type = MFW_SIM_UNKNOWN; 994 sim_status.sim_status_type = MFW_SIM_UNKNOWN;
995 sim_stat = SIM_NOT_ACTIVE; 995 sim_stat = SIM_NOT_ACTIVE;
996 break; 996 break;
997 #ifdef SIM_PERS 997 #ifdef SIM_PERS
998 //The events are handled that are posted by rAT_PlusCME() 998 //The events are handled that are posted by rAT_PlusCME()
999 //for all the five SIM Locks. 999 //for all the five SIM Locks.
1000 case CME_ERR_PhSimPinReq: 1000 case CME_ERR_PhSimPinReq:
1001 //x0pleela 25 Sep, 2006 ER: OMAPS00095524 1001 //x0pleela 25 Sep, 2006 ER: OMAPS00095524
1002 //Update global aciErrDesc with the current CME error code 1002 //Update global aciErrDesc with the current CME error code
1007 sim_stat = SIM_ACTIVE; 1007 sim_stat = SIM_ACTIVE;
1008 break; 1008 break;
1009 case CME_ERR_NetworkPersPinReq: 1009 case CME_ERR_NetworkPersPinReq:
1010 //x0pleela 25 Sep, 2006 ER: OMAPS00095524 1010 //x0pleela 25 Sep, 2006 ER: OMAPS00095524
1011 //Update global aciErrDesc with the current CME error code 1011 //Update global aciErrDesc with the current CME error code
1012 ACI_ERR_DESC( ACI_ERR_CLASS_Cme, result ); 1012 ACI_ERR_DESC( ACI_ERR_CLASS_Cme, result );
1013 sim_status.sim_status = MFW_SIM_NLOCK_REQ; 1013 sim_status.sim_status = MFW_SIM_NLOCK_REQ;
1014 sim_status.sim_pin_retries = 0; 1014 sim_status.sim_pin_retries = 0;
1015 sim_status.sim_status_type = MFW_SIM_LOCKED; 1015 sim_status.sim_status_type = MFW_SIM_LOCKED;
1016 sim_stat = SIM_ACTIVE; 1016 sim_stat = SIM_ACTIVE;
1017 gsim_status=sim_stat; 1017 gsim_status=sim_stat;
1035 sim_stat = SIM_ACTIVE; 1035 sim_stat = SIM_ACTIVE;
1036 break; 1036 break;
1037 case CME_ERR_CorporatePersPinReq: 1037 case CME_ERR_CorporatePersPinReq:
1038 //x0pleela 25 Sep, 2006 ER: OMAPS00095524 1038 //x0pleela 25 Sep, 2006 ER: OMAPS00095524
1039 //Update global aciErrDesc with the current CME error code 1039 //Update global aciErrDesc with the current CME error code
1040 ACI_ERR_DESC( ACI_ERR_CLASS_Cme, result ); 1040 ACI_ERR_DESC( ACI_ERR_CLASS_Cme, result );
1041 sim_status.sim_status = MFW_SIM_CLOCK_REQ; 1041 sim_status.sim_status = MFW_SIM_CLOCK_REQ;
1042 sim_status.sim_pin_retries = 0; 1042 sim_status.sim_pin_retries = 0;
1043 sim_status.sim_status_type = MFW_SIM_LOCKED; 1043 sim_status.sim_status_type = MFW_SIM_LOCKED;
1044 sim_stat = SIM_ACTIVE; 1044 sim_stat = SIM_ACTIVE;
1045 break; 1045 break;
1046 1046
1047 //x0pleela 27 Apr, 2006 DR: OMAPS00067919 1047 //x0pleela 27 Apr, 2006 DR: OMAPS00067919
1048 case CME_ERR_WrongPasswd: 1048 case CME_ERR_WrongPasswd:
1049 { 1049 {
1050 TRACE_EVENT("CME_ERR_WrongPasswd"); 1050 TRACE_EVENT("CME_ERR_WrongPasswd");
1051 switch( aciErrDesc & 0x0000FFFF ) 1051 switch( aciErrDesc & 0x0000FFFF )
1052 { 1052 {
1053 case CME_ERR_PhoneFail: 1053 case CME_ERR_PhoneFail:
1054 case CME_ERR_NetworkPersPukReq: 1054 case CME_ERR_NetworkPersPukReq:
1055 case CME_ERR_NetworkSubsetPersPukReq: 1055 case CME_ERR_NetworkSubsetPersPukReq:
1056 case CME_ERR_ProviderPersPukReq: 1056 case CME_ERR_ProviderPersPukReq:
1057 case CME_ERR_CorporatePersPukReq: 1057 case CME_ERR_CorporatePersPukReq:
1058 C_KEY_REQ = 1; 1058 C_KEY_REQ = 1;
1059 sim_status.sim_status = MFW_SIM_PUK_REQ; 1059 sim_status.sim_status = MFW_SIM_PUK_REQ;
1060 sim_status.sim_pin_retries = sim_pin_count(MFW_SIM_PUK1); 1060 sim_status.sim_pin_retries = sim_pin_count(MFW_SIM_PUK1);
1061 sim_status.sim_status_type = MFW_SIM_LOCKED; 1061 sim_status.sim_status_type = MFW_SIM_LOCKED;
1062 sim_stat = SIM_ACTIVE; 1062 sim_stat = SIM_ACTIVE;
1066 C_KEY_REQ = 0; 1066 C_KEY_REQ = 0;
1067 break; 1067 break;
1068 } 1068 }
1069 } 1069 }
1070 break; 1070 break;
1071 1071
1072 //x0pleela 23 Aug, 2006 DR: OMAPS00091250 1072 //x0pleela 23 Aug, 2006 DR: OMAPS00091250
1073 case CME_ERR_Unknown: 1073 case CME_ERR_Unknown:
1074 { 1074 {
1075 if( ((aciErrDesc & 0xFFFF0000) >> 16) EQ ACI_ERR_CLASS_Ext) 1075 if( ((aciErrDesc & 0xFFFF0000) >> 16) EQ ACI_ERR_CLASS_Ext)
1076 { 1076 {
1077 switch(aciErrDesc & 0x0000FFFF) 1077 switch(aciErrDesc & 0x0000FFFF)
1078 { 1078 {
1079 //x0pleela 06 Sep, 2006 DR: OMAPS00091250 1079 //x0pleela 06 Sep, 2006 DR: OMAPS00091250
1080 //Check for No MEPD Error 1080 //Check for No MEPD Error
1148 pin_flag = -1; 1148 pin_flag = -1;
1149 pin_ident = MFW_SIM_UNKNOWN; 1149 pin_ident = MFW_SIM_UNKNOWN;
1150 1150
1151 //x0pleela 26 Sep, 2006 DR: OMAPS00096565 1151 //x0pleela 26 Sep, 2006 DR: OMAPS00096565
1152 //Reset C_KEY_REQ to 0 1152 //Reset C_KEY_REQ to 0
1153 #ifdef SIM_PERS 1153 #ifdef SIM_PERS
1154 C_KEY_REQ = 0; 1154 C_KEY_REQ = 0;
1155 #endif 1155 #endif
1156 1156
1157 switch (reason) 1157 switch (reason)
1158 { 1158 {
1159 case CME_ERR_WrongPasswd: 1159 case CME_ERR_WrongPasswd:
1162 TRACE_ERROR("sim_error_cpin():CPIN? failed"); 1162 TRACE_ERROR("sim_error_cpin():CPIN? failed");
1163 sim_signal(E_SIM_STATUS,&sim_status); 1163 sim_signal(E_SIM_STATUS,&sim_status);
1164 return; 1164 return;
1165 } 1165 }
1166 break; 1166 break;
1167 #ifdef SIM_PERS 1167 #ifdef SIM_PERS
1168 case CME_ERR_SimPinReq: /* PIN 1 must be entered */ 1168 case CME_ERR_SimPinReq: /* PIN 1 must be entered */
1169 sim_status.sim_status = MFW_SIM_PIN_REQ; 1169 sim_status.sim_status = MFW_SIM_PIN_REQ;
1170 sim_status.sim_pin_retries = sim_pin_count(MFW_SIM_PIN1); 1170 sim_status.sim_pin_retries = sim_pin_count(MFW_SIM_PIN1);
1171 sim_status.sim_status_type = MFW_SIM_PIN1; 1171 sim_status.sim_status_type = MFW_SIM_PIN1;
1172 sim_status.sim_procedure = MFW_SIM_ACTIVATION; 1172 sim_status.sim_procedure = MFW_SIM_ACTIVATION;
1173 sim_stat = SIM_ACTIVE; 1173 sim_stat = SIM_ACTIVE;
1174 sim_signal(E_SIM_STATUS,&sim_status); 1174 sim_signal(E_SIM_STATUS,&sim_status);
1175 return; 1175 return;
1176 1176
1177 case CME_ERR_SimPin2Req: /* PIN 2 must be entered */ 1177 case CME_ERR_SimPin2Req: /* PIN 2 must be entered */
1178 sim_status.sim_status = MFW_SIM_PIN2_REQ; 1178 sim_status.sim_status = MFW_SIM_PIN2_REQ;
1179 sim_status.sim_pin_retries = sim_pin_count(MFW_SIM_PIN2); 1179 sim_status.sim_pin_retries = sim_pin_count(MFW_SIM_PIN2);
1180 sim_status.sim_status_type = MFW_SIM_PIN2; 1180 sim_status.sim_status_type = MFW_SIM_PIN2;
1181 sim_status.sim_procedure = MFW_SIM_ACTIVATION; 1181 sim_status.sim_procedure = MFW_SIM_ACTIVATION;
1182 sim_stat = SIM_ACTIVE; 1182 sim_stat = SIM_ACTIVE;
1183 sim_signal(E_SIM_STATUS,&sim_status); 1183 sim_signal(E_SIM_STATUS,&sim_status);
1184 return; 1184 return;
1185 1185
1186 case CME_ERR_PhoneFail: 1186 case CME_ERR_PhoneFail:
1187 case CME_ERR_NetworkPersPukReq: 1187 case CME_ERR_NetworkPersPukReq:
1188 case CME_ERR_NetworkSubsetPersPukReq: 1188 case CME_ERR_NetworkSubsetPersPukReq:
1189 case CME_ERR_ProviderPersPukReq: 1189 case CME_ERR_ProviderPersPukReq:
1190 case CME_ERR_CorporatePersPukReq: 1190 case CME_ERR_CorporatePersPukReq:
1191 //x0pleela 25 Sep, 2006 ER: OMAPS00095524 1191 //x0pleela 25 Sep, 2006 ER: OMAPS00095524
1192 //Update global aciErrDesc with the current CME error code 1192 //Update global aciErrDesc with the current CME error code
1193 ACI_ERR_DESC( ACI_ERR_CLASS_Cme, reason ); 1193 ACI_ERR_DESC( ACI_ERR_CLASS_Cme, reason );
1194 C_KEY_REQ = 1; 1194 C_KEY_REQ = 1;
1195 sim_status.sim_status = MFW_SIM_PUK_REQ; 1195 sim_status.sim_status = MFW_SIM_PUK_REQ;
1198 sim_status.sim_procedure = MFW_SIM_ACTIVATION; 1198 sim_status.sim_procedure = MFW_SIM_ACTIVATION;
1199 sim_stat = SIM_ACTIVE; 1199 sim_stat = SIM_ACTIVE;
1200 sim_signal(E_SIM_STATUS,&sim_status); 1200 sim_signal(E_SIM_STATUS,&sim_status);
1201 return; 1201 return;
1202 1202
1203 // Nov 03, 2005 DR: OMAPS00050595 - xpradipg 1203 // Nov 03, 2005 DR: OMAPS00050595 - xpradipg
1204 case CME_ERR_SimPukReq: /* PUK 1 must be entered */ 1204 case CME_ERR_SimPukReq: /* PUK 1 must be entered */
1205 C_KEY_REQ = 0; 1205 C_KEY_REQ = 0;
1206 sim_status.sim_status = MFW_SIM_PUK_REQ; 1206 sim_status.sim_status = MFW_SIM_PUK_REQ;
1207 sim_status.sim_pin_retries = sim_pin_count(MFW_SIM_PUK1); 1207 sim_status.sim_pin_retries = sim_pin_count(MFW_SIM_PUK1);
1208 sim_status.sim_status_type = MFW_SIM_PUK1; 1208 sim_status.sim_status_type = MFW_SIM_PUK1;
1216 sim_status.sim_status_type = MFW_SIM_PUK2; 1216 sim_status.sim_status_type = MFW_SIM_PUK2;
1217 sim_status.sim_procedure = MFW_SIM_ACTIVATION; 1217 sim_status.sim_procedure = MFW_SIM_ACTIVATION;
1218 sim_stat = SIM_ACTIVE; 1218 sim_stat = SIM_ACTIVE;
1219 sim_signal(E_SIM_STATUS,&sim_status); 1219 sim_signal(E_SIM_STATUS,&sim_status);
1220 return; 1220 return;
1221 case CME_ERR_NotPresent: /* JVJ -#1580. Unexpected error should be treated as INVALID CARD for FTA*/ 1221 case CME_ERR_NotPresent: /* JVJ -#1580. Unexpected error should be treated as INVALID CARD for FTA*/
1222 case CME_ERR_SimFail: /* SIM card is invalid */ 1222 case CME_ERR_SimFail: /* SIM card is invalid */
1223 #endif 1223 #endif
1224 case CME_ERR_SimWrong: 1224 case CME_ERR_SimWrong:
1225 sim_status.sim_status = MFW_SIM_INVALID_CARD; 1225 sim_status.sim_status = MFW_SIM_INVALID_CARD;
1226 #ifdef SIM_PERS 1226 #ifdef SIM_PERS
1227 sim_status.sim_pin_retries = 0; 1227 sim_status.sim_pin_retries = 0;
1228 sim_status.sim_status_type = MFW_SIM_UNKNOWN; 1228 sim_status.sim_status_type = MFW_SIM_UNKNOWN;
1232 #else 1232 #else
1233 sim_signal(E_SIM_STATUS,&sim_status); 1233 sim_signal(E_SIM_STATUS,&sim_status);
1234 #endif 1234 #endif
1235 return; 1235 return;
1236 1236
1237 1237
1238 case CME_ERR_SimNotIns: /* no SIM card inserted */ 1238 case CME_ERR_SimNotIns: /* no SIM card inserted */
1239 sim_status.sim_status = MFW_SIM_NO_SIM_CARD; 1239 sim_status.sim_status = MFW_SIM_NO_SIM_CARD;
1240 sim_status.sim_pin_retries = 0; 1240 sim_status.sim_pin_retries = 0;
1241 sim_status.sim_status_type = MFW_SIM_UNKNOWN; 1241 sim_status.sim_status_type = MFW_SIM_UNKNOWN;
1242 sim_status.sim_procedure = MFW_SIM_ACTIVATION; 1242 sim_status.sim_procedure = MFW_SIM_ACTIVATION;
1243 sim_stat = SIM_NOT_ACTIVE; 1243 sim_stat = SIM_NOT_ACTIVE;
1244 sim_signal(E_SIM_STATUS,&sim_status); 1244 sim_signal(E_SIM_STATUS,&sim_status);
1245 return; 1245 return;
1246 1246
1247 #ifdef SIM_PERS 1247 #ifdef SIM_PERS
1248 //The events are handled that are posted by rAT_PlusCME() 1248 //The events are handled that are posted by rAT_PlusCME()
1249 //for all the five SIM Locks. 1249 //for all the five SIM Locks.
1250 case CME_ERR_PhSimPinReq: 1250 case CME_ERR_PhSimPinReq:
1251 //x0pleela 25 Sep, 2006 ER: OMAPS00095524 1251 //x0pleela 25 Sep, 2006 ER: OMAPS00095524
1252 //Update global aciErrDesc with the current CME error code 1252 //Update global aciErrDesc with the current CME error code
1253 ACI_ERR_DESC( ACI_ERR_CLASS_Cme, reason ); 1253 ACI_ERR_DESC( ACI_ERR_CLASS_Cme, reason );
1254 sim_status.sim_status = MFW_SIM_PLOCK_REQ; 1254 sim_status.sim_status = MFW_SIM_PLOCK_REQ;
1255 sim_status.sim_pin_retries = 0; 1255 sim_status.sim_pin_retries = 0;
1256 sim_status.sim_status_type = MFW_SIM_LOCKED ; 1256 sim_status.sim_status_type = MFW_SIM_LOCKED ;
1257 sim_status.sim_procedure = MFW_SIM_ACTIVATION; 1257 sim_status.sim_procedure = MFW_SIM_ACTIVATION;
1258 sim_stat = SIM_ACTIVE; 1258 sim_stat = SIM_ACTIVE;
1259 sim_signal(E_SIM_STATUS,&sim_status); 1259 sim_signal(E_SIM_STATUS,&sim_status);
1260 return; 1260 return;
1261 case CME_ERR_NetworkPersPinReq: 1261 case CME_ERR_NetworkPersPinReq:
1262 //x0pleela 25 Sep, 2006 ER: OMAPS00095524 1262 //x0pleela 25 Sep, 2006 ER: OMAPS00095524
1263 //Update global aciErrDesc with the current CME error code 1263 //Update global aciErrDesc with the current CME error code
1264 ACI_ERR_DESC( ACI_ERR_CLASS_Cme, reason ); 1264 ACI_ERR_DESC( ACI_ERR_CLASS_Cme, reason );
1265 sim_status.sim_status = MFW_SIM_NLOCK_REQ; 1265 sim_status.sim_status = MFW_SIM_NLOCK_REQ;
1266 sim_status.sim_pin_retries = 0; 1266 sim_status.sim_pin_retries = 0;
1267 sim_status.sim_status_type = MFW_SIM_LOCKED; 1267 sim_status.sim_status_type = MFW_SIM_LOCKED;
1268 sim_status.sim_procedure = MFW_SIM_ACTIVATION; 1268 sim_status.sim_procedure = MFW_SIM_ACTIVATION;
1269 //sim_stat = SIM_NOT_ACTIVE; temporary changes 1269 //sim_stat = SIM_NOT_ACTIVE; temporary changes
1271 sim_signal(E_SIM_STATUS,&sim_status); 1271 sim_signal(E_SIM_STATUS,&sim_status);
1272 return; 1272 return;
1273 case CME_ERR_NetworkSubsetPersPinReq: 1273 case CME_ERR_NetworkSubsetPersPinReq:
1274 //x0pleela 25 Sep, 2006 ER: OMAPS00095524 1274 //x0pleela 25 Sep, 2006 ER: OMAPS00095524
1275 //Update global aciErrDesc with the current CME error code 1275 //Update global aciErrDesc with the current CME error code
1276 ACI_ERR_DESC( ACI_ERR_CLASS_Cme, reason ); 1276 ACI_ERR_DESC( ACI_ERR_CLASS_Cme, reason );
1277 sim_status.sim_status = MFW_SIM_NSLOCK_REQ; 1277 sim_status.sim_status = MFW_SIM_NSLOCK_REQ;
1278 sim_status.sim_pin_retries = 0; 1278 sim_status.sim_pin_retries = 0;
1279 sim_status.sim_status_type = MFW_SIM_LOCKED; 1279 sim_status.sim_status_type = MFW_SIM_LOCKED;
1280 sim_status.sim_procedure = MFW_SIM_ACTIVATION; 1280 sim_status.sim_procedure = MFW_SIM_ACTIVATION;
1281 sim_stat = SIM_ACTIVE; 1281 sim_stat = SIM_ACTIVE;
1282 sim_signal(E_SIM_STATUS,&sim_status); 1282 sim_signal(E_SIM_STATUS,&sim_status);
1283 return; 1283 return;
1284 case CME_ERR_ProviderPersPinReq: 1284 case CME_ERR_ProviderPersPinReq:
1285 //x0pleela 25 Sep, 2006 ER: OMAPS00095524 1285 //x0pleela 25 Sep, 2006 ER: OMAPS00095524
1286 //Update global aciErrDesc with the current CME error code 1286 //Update global aciErrDesc with the current CME error code
1287 ACI_ERR_DESC( ACI_ERR_CLASS_Cme, reason ); 1287 ACI_ERR_DESC( ACI_ERR_CLASS_Cme, reason );
1288 sim_status.sim_status = MFW_SIM_SPLOCK_REQ; 1288 sim_status.sim_status = MFW_SIM_SPLOCK_REQ;
1289 sim_status.sim_pin_retries = 0; 1289 sim_status.sim_pin_retries = 0;
1290 sim_status.sim_status_type = MFW_SIM_LOCKED; 1290 sim_status.sim_status_type = MFW_SIM_LOCKED;
1291 sim_status.sim_procedure = MFW_SIM_ACTIVATION; 1291 sim_status.sim_procedure = MFW_SIM_ACTIVATION;
1292 sim_stat = SIM_ACTIVE; 1292 sim_stat = SIM_ACTIVE;
1293 sim_signal(E_SIM_STATUS,&sim_status); 1293 sim_signal(E_SIM_STATUS,&sim_status);
1294 return; 1294 return;
1295 case CME_ERR_CorporatePersPinReq: 1295 case CME_ERR_CorporatePersPinReq:
1296 //x0pleela 25 Sep, 2006 ER: OMAPS00095524 1296 //x0pleela 25 Sep, 2006 ER: OMAPS00095524
1297 //Update global aciErrDesc with the current CME error code 1297 //Update global aciErrDesc with the current CME error code
1298 ACI_ERR_DESC( ACI_ERR_CLASS_Cme, reason ); 1298 ACI_ERR_DESC( ACI_ERR_CLASS_Cme, reason );
1299 sim_status.sim_status = MFW_SIM_CLOCK_REQ; 1299 sim_status.sim_status = MFW_SIM_CLOCK_REQ;
1300 sim_status.sim_pin_retries = 0; 1300 sim_status.sim_pin_retries = 0;
1301 sim_status.sim_status_type = MFW_SIM_LOCKED; 1301 sim_status.sim_status_type = MFW_SIM_LOCKED;
1302 sim_status.sim_procedure = MFW_SIM_ACTIVATION; 1302 sim_status.sim_procedure = MFW_SIM_ACTIVATION;
1303 sim_stat = SIM_ACTIVE; 1303 sim_stat = SIM_ACTIVE;
1305 return; 1305 return;
1306 1306
1307 case CME_ERR_Unknown: 1307 case CME_ERR_Unknown:
1308 { 1308 {
1309 //Check for No MEPD Error 1309 //Check for No MEPD Error
1310 if( ((aciErrDesc & 0xFFFF0000) >> 16) EQ ACI_ERR_CLASS_Ext) 1310 if( ((aciErrDesc & 0xFFFF0000) >> 16) EQ ACI_ERR_CLASS_Ext)
1311 { 1311 {
1312 switch(aciErrDesc & 0x0000FFFF) 1312 switch(aciErrDesc & 0x0000FFFF)
1313 { 1313 {
1314 //x0pleela 06 Sep, 2006 DR: OMAPS00091250 1314 //x0pleela 06 Sep, 2006 DR: OMAPS00091250
1315 case EXT_ERR_NoMEPD: 1315 case EXT_ERR_NoMEPD:
1317 sim_status.sim_pin_retries = 0; 1317 sim_status.sim_pin_retries = 0;
1318 sim_status.sim_status_type = MFW_SIM_UNKNOWN; 1318 sim_status.sim_status_type = MFW_SIM_UNKNOWN;
1319 sim_stat = SIM_ACTIVE; 1319 sim_stat = SIM_ACTIVE;
1320 sim_signal(E_SIM_STATUS,&sim_status); 1320 sim_signal(E_SIM_STATUS,&sim_status);
1321 return; 1321 return;
1322 1322
1323 //x0pleela 25 Sep, 2006 ER: OMAPS00095524 1323 //x0pleela 25 Sep, 2006 ER: OMAPS00095524
1324 //Set the reqd. parameters for Blocked Network Password request 1324 //Set the reqd. parameters for Blocked Network Password request
1325 case EXT_ERR_BlockedNetworkPersPinReq: 1325 case EXT_ERR_BlockedNetworkPersPinReq:
1326 sim_status.sim_status = MFW_SIM_PBLOCK_REQ; 1326 sim_status.sim_status = MFW_SIM_PBLOCK_REQ;
1327 sim_status.sim_pin_retries = 0; 1327 sim_status.sim_pin_retries = 0;
1328 sim_status.sim_status_type = MFW_SIM_LOCKED; 1328 sim_status.sim_status_type = MFW_SIM_LOCKED;
1329 sim_status.sim_procedure = MFW_SIM_ACTIVATION; 1329 sim_status.sim_procedure = MFW_SIM_ACTIVATION;
1330 sim_stat = SIM_ACTIVE; 1330 sim_stat = SIM_ACTIVE;
1331 sim_signal(E_SIM_STATUS,&sim_status); 1331 sim_signal(E_SIM_STATUS,&sim_status);
1332 return; 1332 return;
1333 1333
1334 //x0pleela 25 Sep, 2006 ER: OMAPS00095524 1334 //x0pleela 25 Sep, 2006 ER: OMAPS00095524
1335 //Set the reqd. parameters for Blocked Network Unblock code request 1335 //Set the reqd. parameters for Blocked Network Unblock code request
1336 case EXT_ERR_BlockedNetworkPersPukReq: 1336 case EXT_ERR_BlockedNetworkPersPukReq:
1337 C_KEY_REQ = 1; 1337 C_KEY_REQ = 1;
1338 sim_status.sim_status = MFW_SIM_PUK_REQ; 1338 sim_status.sim_status = MFW_SIM_PUK_REQ;
1340 sim_status.sim_status_type = MFW_SIM_PUK1; 1340 sim_status.sim_status_type = MFW_SIM_PUK1;
1341 sim_status.sim_procedure = MFW_SIM_ACTIVATION; 1341 sim_status.sim_procedure = MFW_SIM_ACTIVATION;
1342 sim_stat = SIM_ACTIVE; 1342 sim_stat = SIM_ACTIVE;
1343 sim_signal(E_SIM_STATUS,&sim_status); 1343 sim_signal(E_SIM_STATUS,&sim_status);
1344 return; 1344 return;
1345 1345
1346 default: 1346 default:
1347 break; 1347 break;
1348 } 1348 }
1349 } 1349 }
1350 } 1350 }
1351 break; 1351 break;
1352 #endif 1352 #endif
1353 1353
1354 default: 1354 default:
1355 TRACE_ERROR("sim_error_cpin():Ill reason"); 1355 TRACE_ERROR("sim_error_cpin():Ill reason");
1356 sim_signal(E_SIM_STATUS,&sim_status); 1356 sim_signal(E_SIM_STATUS,&sim_status);
1357 return; 1357 return;
1362 case CPIN_RSLT_SimPinReq: 1362 case CPIN_RSLT_SimPinReq:
1363 sim_status.sim_status = MFW_SIM_PIN_REQ; 1363 sim_status.sim_status = MFW_SIM_PIN_REQ;
1364 sim_status.sim_pin_retries = sim_pin_count(MFW_SIM_PIN1); 1364 sim_status.sim_pin_retries = sim_pin_count(MFW_SIM_PIN1);
1365 break; 1365 break;
1366 case CPIN_RSLT_SimPukReq: 1366 case CPIN_RSLT_SimPukReq:
1367 #ifdef SIM_PERS 1367 #ifdef SIM_PERS
1368 C_KEY_REQ = 0; 1368 C_KEY_REQ = 0;
1369 #endif 1369 #endif
1370 sim_status.sim_status = MFW_SIM_PUK_REQ; 1370 sim_status.sim_status = MFW_SIM_PUK_REQ;
1371 sim_status.sim_pin_retries = sim_pin_count(MFW_SIM_PUK1); 1371 sim_status.sim_pin_retries = sim_pin_count(MFW_SIM_PUK1);
1372 //x0pleela 10 May, 2006 DR: OMAPS00067919 1372 //x0pleela 10 May, 2006 DR: OMAPS00067919
1418 sim_status.sim_procedure = MFW_SIM_UNBLOCK; 1418 sim_status.sim_procedure = MFW_SIM_UNBLOCK;
1419 sim_status.sim_status = MFW_SIM_SUCCESS; 1419 sim_status.sim_status = MFW_SIM_SUCCESS;
1420 sim_status.sim_status_type = pin_ident; 1420 sim_status.sim_status_type = pin_ident;
1421 //TISH due to 11.11, if pin is unblock successfully, it should set pin Enabled. 1421 //TISH due to 11.11, if pin is unblock successfully, it should set pin Enabled.
1422 //#ifdef SIM_PERS 1422 //#ifdef SIM_PERS
1423 pin1_set = MFW_SIM_ENABLE; 1423 pin1_set = MFW_SIM_ENABLE;
1424 //#endif 1424 //#endif
1425 break; 1425 break;
1426 //xrashmic 1 Jul, 2006 OMAPS00075784 1426 //xrashmic 1 Jul, 2006 OMAPS00075784
1427 //To handle the simp lock disable events during bootup 1427 //To handle the simp lock disable events during bootup
1428 case MFW_SIM_ACTIVATION: 1428 case MFW_SIM_ACTIVATION:
1429 sim_status.sim_procedure = MFW_SIM_ACTIVATION; 1429 sim_status.sim_procedure = MFW_SIM_ACTIVATION;
1430 sim_status.sim_status = MFW_SIM_NO_PIN; 1430 sim_status.sim_status = MFW_SIM_NO_PIN;
1431 sim_status.sim_status_type = pin_ident; 1431 sim_status.sim_status_type = pin_ident;
1460 */ 1460 */
1461 1461
1462 void sim_ss_unblock(UBYTE result, T_ACI_CME_ERR reason) 1462 void sim_ss_unblock(UBYTE result, T_ACI_CME_ERR reason)
1463 { 1463 {
1464 TRACE_FUNCTION("sim_ss_unblock()"); 1464 TRACE_FUNCTION("sim_ss_unblock()");
1465 1465
1466 pin_flag = MFW_SIM_UNBLOCK; 1466 pin_flag = MFW_SIM_UNBLOCK;
1467 1467
1468 if (result == SIM_UBLK_ERROR) 1468 if (result == SIM_UBLK_ERROR)
1469 sim_error_cpin (reason); 1469 sim_error_cpin (reason);
1470 if (result == SIM_UBLK_OK) 1470 if (result == SIM_UBLK_OK)
1569 pin_ident = pin_id; 1569 pin_ident = pin_id;
1570 switch (pin_id) 1570 switch (pin_id)
1571 { 1571 {
1572 case MFW_SIM_PIN1: 1572 case MFW_SIM_PIN1:
1573 /*a0393213 warnings removal - CPWD_FAC_Sc changed to FAC_Sc as a result of ACI enum change*/ 1573 /*a0393213 warnings removal - CPWD_FAC_Sc changed to FAC_Sc as a result of ACI enum change*/
1574 sAT_PlusCPWD(CMD_SRC_LCL, FAC_Sc, 1574 sAT_PlusCPWD(CMD_SRC_LCL, FAC_Sc,
1575 (char *)old_pin, (char *)new_pin); 1575 (char *)old_pin, (char *)new_pin);
1576 break; 1576 break;
1577 case MFW_SIM_PIN2: 1577 case MFW_SIM_PIN2:
1578 sAT_PlusCPWD(CMD_SRC_LCL, FAC_P2, 1578 sAT_PlusCPWD(CMD_SRC_LCL, FAC_P2,
1579 (char *)old_pin, (char *)new_pin); 1579 (char *)old_pin, (char *)new_pin);
1701 sim_status.sim_pin_retries = sim_pin_count(MFW_SIM_PIN1); 1701 sim_status.sim_pin_retries = sim_pin_count(MFW_SIM_PIN1);
1702 sim_status.sim_status_type = MFW_SIM_UNKNOWN; // no indication 1702 sim_status.sim_status_type = MFW_SIM_UNKNOWN; // no indication
1703 1703
1704 sim_signal(E_SIM_STATUS,&sim_status); 1704 sim_signal(E_SIM_STATUS,&sim_status);
1705 } 1705 }
1706 /* 1706 /*
1707 +--------------------------------------------------------------------+ 1707 +--------------------------------------------------------------------+
1708 | PROJECT : MMI-Framework (8417) MODULE : MFW_SIM | 1708 | PROJECT : MMI-Framework (8417) MODULE : MFW_SIM |
1709 | STATE : code ROUTINE : sim_disable | 1709 | STATE : code ROUTINE : sim_disable |
1710 +--------------------------------------------------------------------+ 1710 +--------------------------------------------------------------------+
1711 1711
1716 { 1716 {
1717 1717
1718 T_ACI_RETURN cfun; 1718 T_ACI_RETURN cfun;
1719 1719
1720 TRACE_FUNCTION("sim_disable()"); 1720 TRACE_FUNCTION("sim_disable()");
1721 /* 1721 /*
1722 * Full functionality is used don´t reset the ME 1722 * Full functionality is used don´t reset the ME
1723 */ 1723 */
1724 cfun = sAT_PlusCFUN(CMD_SRC_LCL,CFUN_FUN_Minimum,CFUN_RST_NotPresent); 1724 cfun = sAT_PlusCFUN(CMD_SRC_LCL,CFUN_FUN_Minimum,CFUN_RST_NotPresent);
1725 1725
1726 if (cfun NEQ AT_EXCT) 1726 if (cfun NEQ AT_EXCT)
1727 { 1727 {
1773 /******************************************************************************* 1773 /*******************************************************************************
1774 $Function: mfw_simlock_continue 1774 $Function: mfw_simlock_continue
1775 $Description: for displaying the sAT_PlusCLCK result 1775 $Description: for displaying the sAT_PlusCLCK result
1776 $Returns: None 1776 $Returns: None
1777 $Arguments: state if passed / failed 1777 $Arguments: state if passed / failed
1778 1778
1779 *******************************************************************************/ 1779 *******************************************************************************/
1780 void mfw_simlock_continue(U8 state) 1780 void mfw_simlock_continue(U8 state)
1781 { 1781 {
1782 mmi_display_result(state); 1782 mmi_display_result(state);
1783 } 1783 }
1784 1784
1785 /******************************************************************************* 1785 /*******************************************************************************
1786 $Function: mfw_simlock_unblockME 1786 $Function: mfw_simlock_unblockME
1787 $Description: for unblocking ME 1787 $Description: for unblocking ME
1788 $Returns: SUCCESS or FAILURE 1788 $Returns: SUCCESS or FAILURE
1789 $Arguments: PUK 1789 $Arguments: PUK
1790 1790
1791 *******************************************************************************/ 1791 *******************************************************************************/
1792 int mfw_simlock_unblockME(char *puk) 1792 int mfw_simlock_unblockME(char *puk)
1793 { 1793 {
1794 TRACE_FUNCTION("mfw_simlock_unblockME"); 1794 TRACE_FUNCTION("mfw_simlock_unblockME");
1795 /*a0393213 warnings removal - CLCK_FAC_Sc, changed to FAC_Sc as a result of ACI enum change*/ 1795 /*a0393213 warnings removal - CLCK_FAC_Sc, changed to FAC_Sc as a result of ACI enum change*/
1796 if( sAT_PlusCLCK(CMD_SRC_LCL,FAC_Fc,CLCK_MOD_Unlock,(char*)puk,CLASS_NotPresent)==AT_CMPL)/*a0393213 compiler warnings removal - -1 changed to CLASS_NotPresent*/ 1796 if( sAT_PlusCLCK(CMD_SRC_LCL,FAC_Fc,CLCK_MOD_Unlock,(char*)puk,CLASS_NotPresent)==AT_CMPL)/*a0393213 compiler warnings removal - -1 changed to CLASS_NotPresent*/
1797 //return UNBLOCK_SUCESS; 1797 //return UNBLOCK_SUCESS;
1798 return MFW_SS_OK; 1798 return MFW_SS_OK;
1799 else 1799 else
1800 //return UNBLOCK_FAILURE; 1800 //return UNBLOCK_FAILURE;
1801 return MFW_SS_FAIL; 1801 return MFW_SS_FAIL;
1802 } 1802 }
1803 1803
1804 /******************************************************************************* 1804 /*******************************************************************************
1805 $Function: mfw_simlock_check_lock_bootup 1805 $Function: mfw_simlock_check_lock_bootup
1806 $Description: checking PIN during bootup 1806 $Description: checking PIN during bootup
1807 $Returns: SUCCESS or FAILURE 1807 $Returns: SUCCESS or FAILURE
1808 $Arguments: PIN 1808 $Arguments: PIN
1809 1809
1810 *******************************************************************************/ 1810 *******************************************************************************/
1811 int mfw_simlock_check_lock_bootup(char *pin, S16 lcktype) 1811 int mfw_simlock_check_lock_bootup(char *pin, S16 lcktype)
1812 { 1812 {
1813 1813
1814 /* if( sAT_PlusCPIN(CMD_SRC_LCL, pin, NULL)==AT_CMPL) 1814 /* if( sAT_PlusCPIN(CMD_SRC_LCL, pin, NULL)==AT_CMPL)
1815 return BOOTUP_LOCK_SUCCESS; 1815 return BOOTUP_LOCK_SUCCESS;
1816 else 1816 else
1817 return BOOTUP_LOCK_FAILURE;*/ //Leela for CPIN to CLCK change 1817 return BOOTUP_LOCK_FAILURE;*/ //Leela for CPIN to CLCK change
1818 1818
1819 T_ACI_FAC lckFac;/*a0393213 warnings removal - T_ACI_CLCK_FAC changed to T_ACI_FAC as a result of ACI enum changed*/ 1819 T_ACI_FAC lckFac;/*a0393213 warnings removal - T_ACI_CLCK_FAC changed to T_ACI_FAC as a result of ACI enum changed*/
1820 /*a0393213 compiler warnings removal- removed variables clsStat,slock_status,status*/ 1820 /*a0393213 compiler warnings removal- removed variables clsStat,slock_status,status*/
1821 1821
1822 int maxval, curval; 1822 int maxval, curval;
1823 T_ACI_RETURN ret; //x0pleela 21 Apr, 2006 DR: OMAPS00067919 1823 T_ACI_RETURN ret; //x0pleela 21 Apr, 2006 DR: OMAPS00067919
1824 T_ACI_CPIN_RSLT code; //x0pleela 21 Apr, 2006 DR: OMAPS00067919 1824 T_ACI_CPIN_RSLT code; //x0pleela 21 Apr, 2006 DR: OMAPS00067919
1825 1825
1826 TRACE_FUNCTION("mfw_simlock_check_lock_bootup"); 1826 TRACE_FUNCTION("mfw_simlock_check_lock_bootup");
1827 1827
1828 lckFac= mfw_simlock_return_lock_type(lcktype); 1828 lckFac= mfw_simlock_return_lock_type(lcktype);
1829 1829
1830 //x0pleela 27 Apr, 2006 DR: OMAPS00067919 1830 //x0pleela 27 Apr, 2006 DR: OMAPS00067919
1831 sim_unlock_in_prog = SIMP_BOOTUP; 1831 sim_unlock_in_prog = SIMP_BOOTUP;
1832 simp_cpin_flag = FALSE; 1832 simp_cpin_flag = FALSE;
1834 //To handle the simp lock disable events during bootup 1834 //To handle the simp lock disable events during bootup
1835 pin_flag=MFW_SIM_ACTIVATION; 1835 pin_flag=MFW_SIM_ACTIVATION;
1836 if(sAT_PlusCLCK(CMD_SRC_LCL,lckFac,CLCK_MOD_Unlock,(char*)pin,CLASS_NotPresent)== AT_FAIL)/*a0393213 compiler warnings removal - -1 changed to CLASS_NotPresent*/ 1836 if(sAT_PlusCLCK(CMD_SRC_LCL,lckFac,CLCK_MOD_Unlock,(char*)pin,CLASS_NotPresent)== AT_FAIL)/*a0393213 compiler warnings removal - -1 changed to CLASS_NotPresent*/
1837 { 1837 {
1838 //x0pleela 11 Sep, 2006 DR: OMASP00094215 1838 //x0pleela 11 Sep, 2006 DR: OMASP00094215
1839 //checking for Class type and the ext busy error and update Simp_Busy_State accordingly 1839 //checking for Class type and the ext busy error and update Simp_Busy_State accordingly
1840 //x0pleela 06 Sep, 2006 SIMP: fix for ACI 1840 //x0pleela 06 Sep, 2006 SIMP: fix for ACI
1841 if( ( ((aciErrDesc & 0xFFFF0000) >> 16) EQ ACI_ERR_CLASS_Ext) AND 1841 if( ( ((aciErrDesc & 0xFFFF0000) >> 16) EQ ACI_ERR_CLASS_Ext) AND
1842 (aciErrDesc & 0x0000FFFF) EQ EXT_ERR_Busy) 1842 (aciErrDesc & 0x0000FFFF) EQ EXT_ERR_Busy)
1843 mfw_simlock_set_busy_state(TRUE); 1843 mfw_simlock_set_busy_state(TRUE);
1844 else 1844 else
1845 mfw_simlock_set_busy_state(FALSE); 1845 mfw_simlock_set_busy_state(FALSE);
1846 1846
1847 mfw_simlock_check_status(lcktype,&maxval,&curval); 1847 mfw_simlock_check_status(lcktype,&maxval,&curval);
1848 //set the error descriptor 1848 //set the error descriptor
1849 switch( lcktype) 1849 switch( lcktype)
1850 { 1850 {
1851 case MFW_SIM_NLOCK: 1851 case MFW_SIM_NLOCK:
1852 if(curval !=0) 1852 if(curval !=0)
1853 { 1853 {
1854 ACI_ERR_DESC( ACI_ERR_CLASS_Cme, CME_ERR_NetworkPersPinReq ); 1854 ACI_ERR_DESC( ACI_ERR_CLASS_Cme, CME_ERR_NetworkPersPinReq );
1855 } 1855 }
1856 else 1856 else
1857 { 1857 {
1858 ACI_ERR_DESC( ACI_ERR_CLASS_Cme, CME_ERR_NetworkPersPukReq); 1858 ACI_ERR_DESC( ACI_ERR_CLASS_Cme, CME_ERR_NetworkPersPukReq);
1859 } 1859 }
1860 break; 1860 break;
1861 1861
1862 case MFW_SIM_NSLOCK: 1862 case MFW_SIM_NSLOCK:
1863 if(curval !=0) 1863 if(curval !=0)
1864 { 1864 {
1865 ACI_ERR_DESC( ACI_ERR_CLASS_Cme, CME_ERR_NetworkSubsetPersPinReq ); 1865 ACI_ERR_DESC( ACI_ERR_CLASS_Cme, CME_ERR_NetworkSubsetPersPinReq );
1866 } 1866 }
1867 else 1867 else
1868 { 1868 {
1869 ACI_ERR_DESC( ACI_ERR_CLASS_Cme, CME_ERR_NetworkSubsetPersPukReq); 1869 ACI_ERR_DESC( ACI_ERR_CLASS_Cme, CME_ERR_NetworkSubsetPersPukReq);
1870 } 1870 }
1871 break; 1871 break;
1872 1872
1873 case MFW_SIM_SPLOCK: 1873 case MFW_SIM_SPLOCK:
1874 1874
1875 if(curval !=0) 1875 if(curval !=0)
1876 { 1876 {
1877 ACI_ERR_DESC( ACI_ERR_CLASS_Cme, CME_ERR_ProviderPersPinReq); 1877 ACI_ERR_DESC( ACI_ERR_CLASS_Cme, CME_ERR_ProviderPersPinReq);
1878 } 1878 }
1879 else 1879 else
1880 { 1880 {
1881 ACI_ERR_DESC( ACI_ERR_CLASS_Cme, CME_ERR_ProviderPersPukReq ); 1881 ACI_ERR_DESC( ACI_ERR_CLASS_Cme, CME_ERR_ProviderPersPukReq );
1882 } 1882 }
1883 break; 1883 break;
1884 1884
1885 case MFW_SIM_CLOCK: 1885 case MFW_SIM_CLOCK:
1886 1886
1887 if(curval !=0) 1887 if(curval !=0)
1888 { 1888 {
1889 ACI_ERR_DESC( ACI_ERR_CLASS_Cme, CME_ERR_CorporatePersPinReq); 1889 ACI_ERR_DESC( ACI_ERR_CLASS_Cme, CME_ERR_CorporatePersPinReq);
1890 } 1890 }
1891 else 1891 else
1892 { 1892 {
1893 ACI_ERR_DESC( ACI_ERR_CLASS_Cme, CME_ERR_CorporatePersPukReq ); 1893 ACI_ERR_DESC( ACI_ERR_CLASS_Cme, CME_ERR_CorporatePersPukReq );
1894 } 1894 }
1895 break; 1895 break;
1896 1896
1897 case MFW_SIM_PLOCK: 1897 case MFW_SIM_PLOCK:
1898 1898
1899 if(curval !=0) 1899 if(curval !=0)
1900 { 1900 {
1901 ACI_ERR_DESC( ACI_ERR_CLASS_Cme, CME_ERR_PhSimPinReq ); 1901 ACI_ERR_DESC( ACI_ERR_CLASS_Cme, CME_ERR_PhSimPinReq );
1902 } 1902 }
1903 else 1903 else
1904 { 1904 {
1905 ACI_ERR_DESC( ACI_ERR_CLASS_Cme, CME_ERR_PhoneFail); 1905 ACI_ERR_DESC( ACI_ERR_CLASS_Cme, CME_ERR_PhoneFail);
1906 } 1906 }
1907 break; 1907 break;
1908 1908
1909 //x0pleela 25 Sep, 2006 ER: OMAPS00095524 1909 //x0pleela 25 Sep, 2006 ER: OMAPS00095524
1910 case MFW_SIM_PBLOCK: 1910 case MFW_SIM_PBLOCK:
1911 if(curval !=0) 1911 if(curval !=0)
1912 { 1912 {
1913 ACI_ERR_DESC( ACI_ERR_CLASS_Ext, EXT_ERR_BlockedNetworkPersPinReq ); 1913 ACI_ERR_DESC( ACI_ERR_CLASS_Ext, EXT_ERR_BlockedNetworkPersPinReq );
1914 } 1914 }
1915 else 1915 else
1916 { 1916 {
1917 ACI_ERR_DESC( ACI_ERR_CLASS_Ext, EXT_ERR_BlockedNetworkPersPukReq); 1917 ACI_ERR_DESC( ACI_ERR_CLASS_Ext, EXT_ERR_BlockedNetworkPersPukReq);
1918 } 1918 }
1919 break; 1919 break;
1920 1920
1921 // default: 1921 // default:
1922 // ACI_ERR_DESC( ACI_ERR_CLASS_Cme, CME_ERR_WrongPasswd ); 1922 // ACI_ERR_DESC( ACI_ERR_CLASS_Cme, CME_ERR_WrongPasswd );
1923 // break; 1923 // break;
1924 1924
1925 } 1925 }
1926 return BOOTUP_LOCK_FAILURE; 1926 return BOOTUP_LOCK_FAILURE;
1927 } 1927 }
1928 //x0pleela 21 Apr, 2006 DR: OMAPS00067919 1928 //x0pleela 21 Apr, 2006 DR: OMAPS00067919
1929 //Calling qat_plusCPIN for next category check by ACI 1929 //Calling qat_plusCPIN for next category check by ACI
1930 else 1930 else
1931 { 1931 {
1932 ret = qAT_PlusCPIN( CMD_SRC_LCL, &code ); 1932 ret = qAT_PlusCPIN( CMD_SRC_LCL, &code );
1933 1933
1934 if( code EQ CPIN_RSLT_SimReady ) 1934 if( code EQ CPIN_RSLT_SimReady )
1935 { 1935 {
1936 TRACE_EVENT("BOOTUP_LOCK_SUCCESS"); 1936 TRACE_EVENT("BOOTUP_LOCK_SUCCESS");
1942 switch( ret ) 1942 switch( ret )
1943 { 1943 {
1944 case AT_FAIL: 1944 case AT_FAIL:
1945 TRACE_EVENT("qAT_PlusCPIN error"); 1945 TRACE_EVENT("qAT_PlusCPIN error");
1946 return BOOTUP_LOCK_FAILURE; 1946 return BOOTUP_LOCK_FAILURE;
1947 1947
1948 case AT_CMPL: 1948 case AT_CMPL:
1949 // case AT_EXCT: 1949 // case AT_EXCT:
1950 TRACE_EVENT("BOOTUP_OK"); 1950 TRACE_EVENT("BOOTUP_OK");
1951 return BOOTUP_OK; 1951 return BOOTUP_OK;
1952 1952
1953 default: 1953 default:
1954 break; 1954 break;
1955 } 1955 }
1956 } 1956 }
1957 return BOOTUP_LOCK_FAILURE; /*a0393213 lint warnings removal - return statement added*/ 1957 return BOOTUP_LOCK_FAILURE; /*a0393213 lint warnings removal - return statement added*/
1958 } 1958 }
1959 1959
1960 /******************************************************************************* 1960 /*******************************************************************************
1961 $Function: mfw_simlock_get_sup_info 1961 $Function: mfw_simlock_get_sup_info
1962 $Description: for getting the fc value 1962 $Description: for getting the fc value
1963 $Returns: value of the req fc type 1963 $Returns: value of the req fc type
1964 $Arguments: fc type 1964 $Arguments: fc type
1965 1965
1966 *******************************************************************************/ 1966 *******************************************************************************/
1967 int mfw_simlock_get_sup_info(int flag) 1967 int mfw_simlock_get_sup_info(int flag)
1968 { 1968 {
1969 T_SUP_INFO sup_info; 1969 T_SUP_INFO sup_info;
1970 // sup_info=(T_SUP_INFO *)malloc(sizeof(T_SUP_INFO)); 1970 // sup_info=(T_SUP_INFO *)malloc(sizeof(T_SUP_INFO));
1980 /******************************************************************************* 1980 /*******************************************************************************
1981 $Function: mfw_simlock_return_lock_type 1981 $Function: mfw_simlock_return_lock_type
1982 $Description: The lock type is converted to the ACI enum type 1982 $Description: The lock type is converted to the ACI enum type
1983 $Returns: corresponding ACi lock type 1983 $Returns: corresponding ACi lock type
1984 $Arguments: MMI lock type - (SIM Locks Only) 1984 $Arguments: MMI lock type - (SIM Locks Only)
1985 1985
1986 *******************************************************************************/ 1986 *******************************************************************************/
1987 /*a0393213 warnings removal - return type changed from T_ACI_CLCK_FAC as a result of ACI enum change*/ 1987 /*a0393213 warnings removal - return type changed from T_ACI_CLCK_FAC as a result of ACI enum change*/
1988 T_ACI_FAC mfw_simlock_return_lock_type(S16 lck) 1988 T_ACI_FAC mfw_simlock_return_lock_type(S16 lck)
1989 { 1989 {
1990 switch (lck) 1990 switch (lck)
1991 { 1991 {
1992 //case 0: 1992 //case 0:
1993 case MFW_SIM_NLOCK: 1993 case MFW_SIM_NLOCK:
1994 return FAC_Pn; 1994 return FAC_Pn;
1995 //case 1: 1995 //case 1:
1996 case MFW_SIM_SPLOCK: 1996 case MFW_SIM_SPLOCK:
1997 return FAC_Pp; 1997 return FAC_Pp;
1998 //case 2: 1998 //case 2:
1999 case MFW_SIM_NSLOCK: 1999 case MFW_SIM_NSLOCK:
2000 return FAC_Pu; 2000 return FAC_Pu;
2001 //case 3: 2001 //case 3:
2002 case MFW_SIM_CLOCK: 2002 case MFW_SIM_CLOCK:
2003 return FAC_Pc; 2003 return FAC_Pc;
2004 //case 4: 2004 //case 4:
2005 case MFW_SIM_PLOCK: 2005 case MFW_SIM_PLOCK:
2006 return FAC_Ps; 2006 return FAC_Ps;
2007 2007
2008 case MFW_SIM_FC: 2008 case MFW_SIM_FC:
2009 return FAC_Fc; 2009 return FAC_Fc;
2010 2010
2011 case MFW_SIM_FCM: 2011 case MFW_SIM_FCM:
2012 return FAC_Fcm; 2012 return FAC_Fcm;
2013 2013
2014 //x0pleela 20 July, 2006 2014 //x0pleela 20 July, 2006
2015 //Return coresponding lock type for master unlock 2015 //Return coresponding lock type for master unlock
2016 case MFW_SIM_MKEY: 2016 case MFW_SIM_MKEY:
2017 return FAC_Mu; 2017 return FAC_Mu;
2018 case MFW_SIM_MKEYM: 2018 case MFW_SIM_MKEYM:
2019 return FAC_Mum; 2019 return FAC_Mum;
2020 2020
2021 //x0pleela 25 Sep, 2006 ER: OMAPS00095524 2021 //x0pleela 25 Sep, 2006 ER: OMAPS00095524
2022 //Return coresponding ACI lock type for Blocked network 2022 //Return coresponding ACI lock type for Blocked network
2023 case MFW_SIM_PBLOCK: 2023 case MFW_SIM_PBLOCK:
2024 return FAC_Bl; 2024 return FAC_Bl;
2025 2025
2026 default: 2026 default:
2027 return FAC_NotPresent; /*a0393213 compiler warnings removal - -1 changed to CLCK_FAC_NotPresent*/ 2027 return FAC_NotPresent; /*a0393213 compiler warnings removal - -1 changed to CLCK_FAC_NotPresent*/
2028 } 2028 }
2029 2029
2030 } 2030 }
2031 2031
2032 2032
2033 /******************************************************************************* 2033 /*******************************************************************************
2034 $Function: mfw_simlock_check_status 2034 $Function: mfw_simlock_check_status
2041 T_MFW mfw_simlock_check_status(S16 lcktyp,int *max,int *curr) 2041 T_MFW mfw_simlock_check_status(S16 lcktyp,int *max,int *curr)
2042 { 2042 {
2043 T_SUP_INFO_TYPE FLAG; 2043 T_SUP_INFO_TYPE FLAG;
2044 int curr_fc, max_fc,FC_Reset_Fail_Max,FC_Reset_Fail_Current,FC_Reset_Success_Max,FC_Reset_Success_Current ; 2044 int curr_fc, max_fc,FC_Reset_Fail_Max,FC_Reset_Fail_Current,FC_Reset_Success_Max,FC_Reset_Success_Current ;
2045 //T_DISPLAY_DATA display_info; 2045 //T_DISPLAY_DATA display_info;
2046 2046
2047 // T_MFW_HND win = mfwParent(mfw_header()); 2047 // T_MFW_HND win = mfwParent(mfw_header());
2048 // Sept 24, 2005 REF: LOCOSTO-ENH-34438, xpradipg 2048 // Sept 24, 2005 REF: LOCOSTO-ENH-34438, xpradipg
2049 // used new enum value 2049 // used new enum value
2050 FLAG=FCMAX; /* set flag to current */ 2050 FLAG=FCMAX; /* set flag to current */
2051 max_fc=mfw_simlock_get_sup_info(FLAG); /* get the value of the corresponding flag*/ 2051 max_fc=mfw_simlock_get_sup_info(FLAG); /* get the value of the corresponding flag*/
2056 // Sept 24, 2005 REF: LOCOSTO-ENH-34438, xpradipg 2056 // Sept 24, 2005 REF: LOCOSTO-ENH-34438, xpradipg
2057 // used new enum value 2057 // used new enum value
2058 FLAG = FCRESETFAILMAX; 2058 FLAG = FCRESETFAILMAX;
2059 FC_Reset_Fail_Max=mfw_simlock_get_sup_info(FLAG); 2059 FC_Reset_Fail_Max=mfw_simlock_get_sup_info(FLAG);
2060 // Sept 24, 2005 REF: LOCOSTO-ENH-34438, xpradipg 2060 // Sept 24, 2005 REF: LOCOSTO-ENH-34438, xpradipg
2061 // used new enum value 2061 // used new enum value
2062 FLAG =FCRESETFAILATTEMPTSLEFT; 2062 FLAG =FCRESETFAILATTEMPTSLEFT;
2063 FC_Reset_Fail_Current=mfw_simlock_get_sup_info(FLAG); 2063 FC_Reset_Fail_Current=mfw_simlock_get_sup_info(FLAG);
2064 // Sept 24, 2005 REF: LOCOSTO-ENH-34438, xpradipg 2064 // Sept 24, 2005 REF: LOCOSTO-ENH-34438, xpradipg
2065 // used new enum value 2065 // used new enum value
2066 FLAG =FCRESETSUCCESSMAX; 2066 FLAG =FCRESETSUCCESSMAX;
2067 FC_Reset_Success_Max=mfw_simlock_get_sup_info(FLAG); 2067 FC_Reset_Success_Max=mfw_simlock_get_sup_info(FLAG);
2068 // Sept 24, 2005 REF: LOCOSTO-ENH-34438, xpradipg 2068 // Sept 24, 2005 REF: LOCOSTO-ENH-34438, xpradipg
2069 // used new enum value 2069 // used new enum value
2070 FLAG =FCRESETSUCCESSATTEMPTSLEFT; 2070 FLAG =FCRESETSUCCESSATTEMPTSLEFT;
2071 FC_Reset_Success_Current=mfw_simlock_get_sup_info(FLAG); 2071 FC_Reset_Success_Current=mfw_simlock_get_sup_info(FLAG);
2072 2072
2073 if( lcktyp !=0) 2073 if( lcktyp !=0)
2074 { 2074 {
2079 { 2079 {
2080 *max = FC_Reset_Fail_Current; 2080 *max = FC_Reset_Fail_Current;
2081 *curr = FC_Reset_Success_Current; 2081 *curr = FC_Reset_Success_Current;
2082 } 2082 }
2083 2083
2084 TRACE_FUNCTION_P4(" FC_Reset_Fail_Max %d FC_Reset_Fail_Current %d FC_Reset_Success_Max %d FC_Reset_Success_Current %d",FC_Reset_Fail_Max,FC_Reset_Fail_Current,FC_Reset_Success_Max,FC_Reset_Success_Current); 2084 TRACE_FUNCTION_P4(" FC_Reset_Fail_Max %d FC_Reset_Fail_Current %d FC_Reset_Success_Max %d FC_Reset_Success_Current %d",FC_Reset_Fail_Max,FC_Reset_Fail_Current,FC_Reset_Success_Max,FC_Reset_Success_Current);
2085 2085
2086 /* if( lcktyp == 0 ) */ 2086 /* if( lcktyp == 0 ) */
2087 if (curr_fc == 0) 2087 if (curr_fc == 0)
2088 { 2088 {
2089 if(( FC_Reset_Fail_Current !=0 )&& (FC_Reset_Success_Current !=0) ) 2089 if(( FC_Reset_Fail_Current !=0 )&& (FC_Reset_Success_Current !=0) )
2090 { 2090 {
2091 //temporarily blocked 2091 //temporarily blocked
2092 TRACE_FUNCTION("chk_status:MFW_SIM_BLOCKED"); 2092 TRACE_FUNCTION("chk_status:MFW_SIM_BLOCKED");
2093 return MFW_SIM_BLOCKED; 2093 return MFW_SIM_BLOCKED;
2094 2094
2095 } 2095 }
2096 else 2096 else
2097 { 2097 {
2098 //permanently blocked 2098 //permanently blocked
2099 TRACE_FUNCTION("check_staus: MFW_SIM_PERM_BLOCKED"); 2099 TRACE_FUNCTION("check_staus: MFW_SIM_PERM_BLOCKED");
2100 return MFW_SIM_PERM_BLOCKED; 2100 return MFW_SIM_PERM_BLOCKED;
2101 } 2101 }
2102 2102
2103 } 2103 }
2104 else 2104 else
2105 { 2105 {
2106 if( curr_fc == 0 ) 2106 if( curr_fc == 0 )
2107 return MFW_SIM_BLOCKED; 2107 return MFW_SIM_BLOCKED;
2113 /******************************************************************************* 2113 /*******************************************************************************
2114 $Function: mfw_simlock_get_lock_status 2114 $Function: mfw_simlock_get_lock_status
2115 $Description: returns the status of the lock - enabled / disabled 2115 $Description: returns the status of the lock - enabled / disabled
2116 $Returns: lock status 2116 $Returns: lock status
2117 $Arguments: lock type 2117 $Arguments: lock type
2118 2118
2119 *******************************************************************************/ 2119 *******************************************************************************/
2120 int mfw_simlock_get_lock_status(S16 lcktyp) 2120 int mfw_simlock_get_lock_status(S16 lcktyp)
2121 { 2121 {
2122 /*a0393213 compiler warnings removal - removed variable stat*/ 2122 /*a0393213 compiler warnings removal - removed variable stat*/
2123 T_ACI_CLSSTAT clsStat; 2123 T_ACI_CLSSTAT clsStat;
2129 status = mfw_simlock_check_status(lcktyp,&maxval,&curval); 2129 status = mfw_simlock_check_status(lcktyp,&maxval,&curval);
2130 if((status == MFW_SIM_BLOCKED)) 2130 if((status == MFW_SIM_BLOCKED))
2131 return MFW_SIM_BLOCKED; 2131 return MFW_SIM_BLOCKED;
2132 if(status == MFW_SIM_PERM_BLOCKED) 2132 if(status == MFW_SIM_PERM_BLOCKED)
2133 return MFW_SIM_PERM_BLOCKED; 2133 return MFW_SIM_PERM_BLOCKED;
2134 2134
2135 lckfac= mfw_simlock_return_lock_type(lcktyp); 2135 lckfac= mfw_simlock_return_lock_type(lcktyp);
2136 if (qAT_PlusCLCK(CMD_SRC_LCL, lckfac, 2136 if (qAT_PlusCLCK(CMD_SRC_LCL, lckfac,
2137 CLASS_NotPresent, &clsStat) EQ AT_CMPL) 2137 CLASS_NotPresent, &clsStat) EQ AT_CMPL)
2138 { 2138 {
2139 TRACE_FUNCTION("Leela:qAT_PlusCLCK->AT_CMPL "); 2139 TRACE_FUNCTION("Leela:qAT_PlusCLCK->AT_CMPL ");
2146 return MFW_SIM_ENABLE; 2146 return MFW_SIM_ENABLE;
2147 2147
2148 } 2148 }
2149 } 2149 }
2150 return MFW_SIM_FAILURE; 2150 return MFW_SIM_FAILURE;
2151 2151
2152 } 2152 }
2153 2153
2154 2154
2155 2155
2156 2156
2157 /******************************************************************************* 2157 /*******************************************************************************
2158 $Function: mfw_simlock_enable_lock 2158 $Function: mfw_simlock_enable_lock
2159 $Description: Changes the oldpassword with the new one for the given 2159 $Description: Changes the oldpassword with the new one for the given
2160 lock type 2160 lock type
2161 $Returns: success or failure 2161 $Returns: success or failure
2162 $Arguments: type of lock and old and new password 2162 $Arguments: type of lock and old and new password
2163 2163
2164 *******************************************************************************/ 2164 *******************************************************************************/
2165 2165
2166 T_MFW_SS_RETURN mfw_simlock_enable_lock(U8 *pin, S16 lcktyp) 2166 T_MFW_SS_RETURN mfw_simlock_enable_lock(U8 *pin, S16 lcktyp)
2167 { 2167 {
2168 2168
2169 T_ACI_FAC lckFac;/*a0393213 warnings removal - T_ACI_CLCK_FAC changed to T_ACI_FAC as a result of ACI enum change*/ 2169 T_ACI_FAC lckFac;/*a0393213 warnings removal - T_ACI_CLCK_FAC changed to T_ACI_FAC as a result of ACI enum change*/
2170 // Nov 03, 2005 DR: OMAPS00052032 - xpradipg 2170 // Nov 03, 2005 DR: OMAPS00052032 - xpradipg
2171 T_ACI_RETURN ret; 2171 T_ACI_RETURN ret;
2172 TRACE_FUNCTION("mfw_simlock_enable_lock()"); 2172 TRACE_FUNCTION("mfw_simlock_enable_lock()");
2173 2173
2174 /* return ss_set_clck(FAC_Ps, CLCK_MOD_Lock, 2174 /* return ss_set_clck(FAC_Ps, CLCK_MOD_Lock,
2175 (char *)pin, -1, MFW_SIM_CPINE);*/ 2175 (char *)pin, -1, MFW_SIM_CPINE);*/
2176 lckFac= mfw_simlock_return_lock_type(lcktyp); 2176 lckFac= mfw_simlock_return_lock_type(lcktyp);
2177 ret = sAT_PlusCLCK(CMD_SRC_LCL,lckFac,CLCK_MOD_Lock,(char*)pin,CLASS_NotPresent); /*a0393213 compiler warnings removal - -1 changed to CLASS_NotPresent*/ 2177 ret = sAT_PlusCLCK(CMD_SRC_LCL,lckFac,CLCK_MOD_Lock,(char*)pin,CLASS_NotPresent); /*a0393213 compiler warnings removal - -1 changed to CLASS_NotPresent*/
2178 // Nov 03, 2005 DR: OMAPS00052032 - xpradipg 2178 // Nov 03, 2005 DR: OMAPS00052032 - xpradipg
2179 // handle the AT_EXCT case and set the global to true 2179 // handle the AT_EXCT case and set the global to true
2180 switch(ret) 2180 switch(ret)
2181 { 2181 {
2182 case AT_CMPL: 2182 case AT_CMPL:
2183 return MFW_SS_OK; 2183 return MFW_SS_OK;
2184 case AT_EXCT: 2184 case AT_EXCT:
2193 /******************************************************************************* 2193 /*******************************************************************************
2194 $Function: mfw_simlock_disable_lock 2194 $Function: mfw_simlock_disable_lock
2195 $Description: disables the lock with the given password for the given lock 2195 $Description: disables the lock with the given password for the given lock
2196 $Returns: success or failure 2196 $Returns: success or failure
2197 $Arguments: type of lock and password 2197 $Arguments: type of lock and password
2198 2198
2199 *******************************************************************************/ 2199 *******************************************************************************/
2200 T_MFW_SS_RETURN mfw_simlock_disable_lock(U8 *pin, S16 lcktyp) 2200 T_MFW_SS_RETURN mfw_simlock_disable_lock(U8 *pin, S16 lcktyp)
2201 { 2201 {
2202 T_ACI_FAC lckFac;/*a0393213 warnings removal - T_ACI_CLCK_FAC changed to T_ACI_FAC as a result of ACI enum change*/ 2202 T_ACI_FAC lckFac;/*a0393213 warnings removal - T_ACI_CLCK_FAC changed to T_ACI_FAC as a result of ACI enum change*/
2203 T_ACI_RETURN ret; 2203 T_ACI_RETURN ret;
2217 { 2217 {
2218 2218
2219 T_ACI_FAC lckFac;/*a0393213 warnings removal - T_ACI_CLCK_FAC changed to T_ACI_FAC as a result of ACI enum change*/ 2219 T_ACI_FAC lckFac;/*a0393213 warnings removal - T_ACI_CLCK_FAC changed to T_ACI_FAC as a result of ACI enum change*/
2220 T_ACI_RETURN stat; 2220 T_ACI_RETURN stat;
2221 TRACE_FUNCTION("mfw_simlock_reset_fc_value()"); 2221 TRACE_FUNCTION("mfw_simlock_reset_fc_value()");
2222 TRACE_EVENT_P1("SimLock_MFW FC Password=%s",pin); 2222 TRACE_EVENT_P1("SimLock_MFW FC Password=%s",pin);
2223 lckFac= mfw_simlock_return_lock_type(fc_flag); 2223 lckFac= mfw_simlock_return_lock_type(fc_flag);
2224 stat = sAT_PlusCLCK(CMD_SRC_LCL,lckFac,CLCK_MOD_Unlock,(char*)pin,CLASS_NotPresent) ;/*a0393213 compiler warnings removal - -1 changed to CLASS_NotPresent*/ 2224 stat = sAT_PlusCLCK(CMD_SRC_LCL,lckFac,CLCK_MOD_Unlock,(char*)pin,CLASS_NotPresent) ;/*a0393213 compiler warnings removal - -1 changed to CLASS_NotPresent*/
2225 if( stat != AT_CMPL) 2225 if( stat != AT_CMPL)
2226 { 2226 {
2227 TRACE_FUNCTION_P1("Reset Failed %d",stat); 2227 TRACE_FUNCTION_P1("Reset Failed %d",stat);
2236 2236
2237 /******************************************************************************* 2237 /*******************************************************************************
2238 $Function: mfw_simlock_master_unlock 2238 $Function: mfw_simlock_master_unlock
2239 $Description: This function unlocks(dependent categories) or unblocks ME 2239 $Description: This function unlocks(dependent categories) or unblocks ME
2240 $Returns: success or failure 2240 $Returns: success or failure
2241 $Arguments: 2241 $Arguments:
2242 *******************************************************************************/ 2242 *******************************************************************************/
2243 //x0pleela 20 July, 2006 ER: OMAPS00087586, OMAPS00087587 2243 //x0pleela 20 July, 2006 ER: OMAPS00087586, OMAPS00087587
2244 T_MFW mfw_simlock_master_unlock(U8 *pin, S16 MK_Unblock_flag) 2244 T_MFW mfw_simlock_master_unlock(U8 *pin, S16 MK_Unblock_flag)
2245 { 2245 {
2246 T_ACI_FAC lckFac;/*a0393213 warnings removal - T_ACI_CLCK_FAC changed to T_ACI_FAC as a result of ACI enum change*/ 2246 T_ACI_FAC lckFac;/*a0393213 warnings removal - T_ACI_CLCK_FAC changed to T_ACI_FAC as a result of ACI enum change*/
2292 /******************************************************************************* 2292 /*******************************************************************************
2293 $Function: mfw_simlock_check_masterkey 2293 $Function: mfw_simlock_check_masterkey
2294 $Description: This function checks from ACI whether Master Unlock feature is enabled or not 2294 $Description: This function checks from ACI whether Master Unlock feature is enabled or not
2295 If enabled, displays a menu item for the user to select master unlocking option 2295 If enabled, displays a menu item for the user to select master unlocking option
2296 If not enabled, doesn't display master unlocking option in the menu 2296 If not enabled, doesn't display master unlocking option in the menu
2297 $Arguments: 2297 $Arguments:
2298 *******************************************************************************/ 2298 *******************************************************************************/
2299 //x0pleela 20 July, 2006 ER: OMAPS00087586, OMAPS00087587 2299 //x0pleela 20 July, 2006 ER: OMAPS00087586, OMAPS00087587
2300 2300
2301 UBYTE mfw_simlock_check_masterkey( S16 MK_unlock_type) 2301 UBYTE mfw_simlock_check_masterkey( S16 MK_unlock_type)
2302 { 2302 {
2303 T_ACI_CLSSTAT clsStat; 2303 T_ACI_CLSSTAT clsStat;
2304 T_ACI_FAC lckfac;/*a0393213 warnings removal - T_ACI_CLCK_FAC changed to T_ACI_FAC as a result of ACI enum change*/ 2304 T_ACI_FAC lckfac;/*a0393213 warnings removal - T_ACI_CLCK_FAC changed to T_ACI_FAC as a result of ACI enum change*/
2305 2305
2306 TRACE_FUNCTION("mfw_simlock_check_masterkey()"); 2306 TRACE_FUNCTION("mfw_simlock_check_masterkey()");
2307 2307
2308 //get the lock type 2308 //get the lock type
2309 lckfac= mfw_simlock_return_lock_type(MK_unlock_type); 2309 lckfac= mfw_simlock_return_lock_type(MK_unlock_type);
2310 2310
2311 //query ACI for master unlocking option 2311 //query ACI for master unlocking option
2312 qAT_PlusCLCK(CMD_SRC_LCL, lckfac, CLASS_NotPresent, &clsStat); 2312 qAT_PlusCLCK(CMD_SRC_LCL, lckfac, CLASS_NotPresent, &clsStat);
2322 } 2322 }
2323 } 2323 }
2324 2324
2325 /******************************************************************************* 2325 /*******************************************************************************
2326 $Function: mfw_simlock_set_busy_state 2326 $Function: mfw_simlock_set_busy_state
2327 $Description: This function sets Simp_Busy_State to either TRUE or FALSE based on ACI's 2327 $Description: This function sets Simp_Busy_State to either TRUE or FALSE based on ACI's
2328 CME error 2328 CME error
2329 $Arguments: 2329 $Arguments:
2330 *******************************************************************************/ 2330 *******************************************************************************/
2331 //x0pleela 20 July, 2006 ER: OMAPS00087586, OMAPS00087587 2331 //x0pleela 20 July, 2006 ER: OMAPS00087586, OMAPS00087587
2332 void mfw_simlock_set_busy_state( UBYTE state ) 2332 void mfw_simlock_set_busy_state( UBYTE state )
2333 { 2333 {
2334 TRACE_FUNCTION("mfw_simlock_set_busy_state()"); 2334 TRACE_FUNCTION("mfw_simlock_set_busy_state()");
2335 Simp_Busy_State = state; 2335 Simp_Busy_State = state;
2336 } 2336 }
2337 2337
2338 /******************************************************************************* 2338 /*******************************************************************************
2339 $Function: mfw_simlock_get_busy_state 2339 $Function: mfw_simlock_get_busy_state
2340 $Description: This function returns the current value of Simp_Busy_State 2340 $Description: This function returns the current value of Simp_Busy_State
2341 $Arguments: 2341 $Arguments:
2342 *******************************************************************************/ 2342 *******************************************************************************/
2343 //x0pleela 20 July, 2006 ER: OMAPS00087586, OMAPS00087587 2343 //x0pleela 20 July, 2006 ER: OMAPS00087586, OMAPS00087587
2344 UBYTE mfw_simlock_get_busy_state( void ) 2344 UBYTE mfw_simlock_get_busy_state( void )
2345 { 2345 {
2346 TRACE_FUNCTION("mfw_simlock_get_busy_state()"); 2346 TRACE_FUNCTION("mfw_simlock_get_busy_state()");
2352 // this function is never referenced and this inturn calls sAT_PercentSLPVRF 2352 // this function is never referenced and this inturn calls sAT_PercentSLPVRF
2353 // which has been removed at ACI leve 2353 // which has been removed at ACI leve
2354 #if 0 2354 #if 0
2355 /******************************************************************************* 2355 /*******************************************************************************
2356 $Function: mfw_simlock_verify_lock 2356 $Function: mfw_simlock_verify_lock
2357 $Description: If locked, it performs unlock + lock, if unlocks, it performs 2357 $Description: If locked, it performs unlock + lock, if unlocks, it performs
2358 lock + unlock, thus validating if the password provided is correct 2358 lock + unlock, thus validating if the password provided is correct
2359 $Returns: success or failure 2359 $Returns: success or failure
2360 $Arguments: type of lock and password 2360 $Arguments: type of lock and password
2361 2361
2362 *******************************************************************************/ 2362 *******************************************************************************/
2363 2363
2364 int mfw_simlock_verify_lock(char* pwd,S16 lock) 2364 int mfw_simlock_verify_lock(char* pwd,S16 lock)
2365 { 2365 {
2366 int status; 2366 int status;
2367 T_ACI_FAC lckfac; 2367 T_ACI_FAC lckfac;
2368 2368
2369 TRACE_FUNCTION("mfw_simlock_verify_lock()"); 2369 TRACE_FUNCTION("mfw_simlock_verify_lock()");
2370 TRACE_EVENT_P1("Vidya: SimLock_MFW Password=%s",pwd); 2370 TRACE_EVENT_P1("Vidya: SimLock_MFW Password=%s",pwd);
2371 2371
2372 // status = mfw_simlock_get_lock_status(lock); 2372 // status = mfw_simlock_get_lock_status(lock);
2373 lckfac=mfw_simlock_return_lock_type(lock); 2373 lckfac=mfw_simlock_return_lock_type(lock);
2374 if(sAT_PercentSLPVRF(CMD_SRC_LCL, lckfac, pwd)==AT_CMPL) 2374 if(sAT_PercentSLPVRF(CMD_SRC_LCL, lckfac, pwd)==AT_CMPL)
2375 return MFW_SS_OK; 2375 return MFW_SS_OK;
2392 return MFW_SS_FAIL; 2392 return MFW_SS_FAIL;
2393 } 2393 }
2394 else 2394 else
2395 return MFW_SS_OK; 2395 return MFW_SS_OK;
2396 } 2396 }
2397 2397
2398 } 2398 }
2399 else if(status==MFW_SIM_DISABLE) 2399 else if(status==MFW_SIM_DISABLE)
2400 { 2400 {
2401 if( sAT_PlusCLCK(CMD_SRC_LCL,lckfac,CLCK_MOD_Lock,pwd,CLASS_NotPresent) !=AT_CMPL) 2401 if( sAT_PlusCLCK(CMD_SRC_LCL,lckfac,CLCK_MOD_Lock,pwd,CLASS_NotPresent) !=AT_CMPL)
2402 { 2402 {
2411 return MFW_SS_FAIL; 2411 return MFW_SS_FAIL;
2412 } 2412 }
2413 else 2413 else
2414 return MFW_SS_OK; 2414 return MFW_SS_OK;
2415 } 2415 }
2416 2416
2417 2417
2418 } 2418 }
2419 */ 2419 */
2420 /* if(aci_ext_personalisation_MMI_verify_password(pwd) != MMILOCK_VERIFIED) 2420 /* if(aci_ext_personalisation_MMI_verify_password(pwd) != MMILOCK_VERIFIED)
2421 MFW_SS_FAIL; 2421 MFW_SS_FAIL;
2422 else 2422 else
2424 2424
2425 } 2425 }
2426 #endif 2426 #endif
2427 /******************************************************************************* 2427 /*******************************************************************************
2428 $Function: mfw_simlock_change_lock_code 2428 $Function: mfw_simlock_change_lock_code
2429 $Description: Changes the oldpassword with the new one for the given 2429 $Description: Changes the oldpassword with the new one for the given
2430 lock type 2430 lock type
2431 $Returns: success or failure 2431 $Returns: success or failure
2432 $Arguments: type of lock and old and new password 2432 $Arguments: type of lock and old and new password
2433 2433
2434 *******************************************************************************/ 2434 *******************************************************************************/
2435 T_MFW mfw_simlock_change_lock_code(int type,char*oldpswd,char* newpswd) 2435 T_MFW mfw_simlock_change_lock_code(int type,char*oldpswd,char* newpswd)
2436 { 2436 {
2437 T_ACI_FAC lckType;/*a0393213 warnings removal - T_ACI_CPWD_FAC changed to T_ACI_FAC as a result of ACI enum change*/ 2437 T_ACI_FAC lckType;/*a0393213 warnings removal - T_ACI_CPWD_FAC changed to T_ACI_FAC as a result of ACI enum change*/
2438 2438
2585 sim_config.access_acmmax = mmi_insert_ind->access_acmmax; 2585 sim_config.access_acmmax = mmi_insert_ind->access_acmmax;
2586 sim_config.access_puct = mmi_insert_ind->access_puct; 2586 sim_config.access_puct = mmi_insert_ind->access_puct;
2587 2587
2588 2588
2589 /* Apr 13, 2004 REF: CRR 16303 JuanVi Jativa-Villoldo */ 2589 /* Apr 13, 2004 REF: CRR 16303 JuanVi Jativa-Villoldo */
2590 /* SPN must always be read, not only when nm_registration is called */ 2590 /* SPN must always be read, not only when nm_registration is called */
2591 sim_spn_req(); 2591 sim_spn_req();
2592 2592
2593 if (sim_check_service(15,sim_service_table) 2593 if (sim_check_service(15,sim_service_table)
2594 == ALLOCATED_AND_ACTIVATED) 2594 == ALLOCATED_AND_ACTIVATED)
2595 sim_read_sim(SIM_GID1, NOT_PRESENT_8BIT, 5); 2595 sim_read_sim(SIM_GID1, NOT_PRESENT_8BIT, 5);
2596 #ifdef BMI_TEST_MC_SIM_EVENT 2596 #ifdef BMI_TEST_MC_SIM_EVENT
2735 { 2735 {
2736 TRACE_FUNCTION("rAT_PercentSIMREM()"); 2736 TRACE_FUNCTION("rAT_PercentSIMREM()");
2737 2737
2738 /* Dec 13, 2006 DR: OMAPS00105640 x0039928 2738 /* Dec 13, 2006 DR: OMAPS00105640 x0039928
2739 Fix: sim_stat is updated */ 2739 Fix: sim_stat is updated */
2740 sim_stat = SIM_NOT_ACTIVE; 2740 sim_stat = SIM_NOT_ACTIVE;
2741 if ( srType EQ SIMREM_FAILURE ) 2741 if ( srType EQ SIMREM_FAILURE )
2742 { 2742 {
2743 sim_status.sim_procedure = MFW_SIM_REMOVED; 2743 sim_status.sim_procedure = MFW_SIM_REMOVED;
2744 sim_status.sim_status = MFW_SIM_NO_SIM_CARD; 2744 sim_status.sim_status = MFW_SIM_NO_SIM_CARD;
2745 sim_status.sim_operation_mode = sim_config.oper_mode; 2745 sim_status.sim_operation_mode = sim_config.oper_mode;
2748 sim_signal(E_SIM_STATUS,&sim_status); 2748 sim_signal(E_SIM_STATUS,&sim_status);
2749 } 2749 }
2750 else if ( srType EQ SIMREM_RESET ) 2750 else if ( srType EQ SIMREM_RESET )
2751 { 2751 {
2752 #ifdef SIM_TOOLKIT 2752 #ifdef SIM_TOOLKIT
2753 sim_signal(E_SIM_RESET, 0); 2753 sim_signal(E_SIM_RESET, 0);
2754 #endif 2754 #endif
2755 } 2755 }
2756 } 2756 }
2757 2757
2758 2758
2791 break; 2791 break;
2792 case CME_ERR_SimResetNeeded: /*OMAPS00115179 -a0393213 (R.Prabakar*/ 2792 case CME_ERR_SimResetNeeded: /*OMAPS00115179 -a0393213 (R.Prabakar*/
2793 { 2793 {
2794 T_ACI_RETURN cfun; 2794 T_ACI_RETURN cfun;
2795 /*This event is not passed to BMI as there is no need currently*/ 2795 /*This event is not passed to BMI as there is no need currently*/
2796 cfun = sAT_PlusCFUN(CMD_SRC_LCL,CFUN_FUN_Full,CFUN_RST_NotPresent); 2796 cfun = sAT_PlusCFUN(CMD_SRC_LCL,CFUN_FUN_Full,CFUN_RST_NotPresent);
2797 if (cfun NEQ AT_EXCT) 2797 if (cfun NEQ AT_EXCT)
2798 { 2798 {
2799 TRACE_ERROR("rAT_PercentSIMINS() : sAT_PlusCFUN error"); 2799 TRACE_ERROR("rAT_PercentSIMINS() : sAT_PlusCFUN error");
2800 } 2800 }
2801 break; 2801 break;
2802 } 2802 }
2803 2803
2804 default: 2804 default:
2805 break; 2805 break;
2817 */ 2817 */
2818 2818
2819 UBYTE sim_cvt_access_status(UBYTE acs) 2819 UBYTE sim_cvt_access_status(UBYTE acs)
2820 { 2820 {
2821 TRACE_FUNCTION("sim_cvt_access_status()"); 2821 TRACE_FUNCTION("sim_cvt_access_status()");
2822 2822
2823 switch(acs) 2823 switch(acs)
2824 { 2824 {
2825 #ifdef FF_2TO1_PS 2825 #ifdef FF_2TO1_PS
2826 case SIM_ACCESS_ALWAYS: return MFW_SIM_NO_PIN; 2826 case SIM_ACCESS_ALWAYS: return MFW_SIM_NO_PIN;
2827 case SIM_ACCESS_PIN_1: return MFW_SIM_PIN1; 2827 case SIM_ACCESS_PIN_1: return MFW_SIM_PIN1;
2859 2859
2860 if (phase != NULL) 2860 if (phase != NULL)
2861 *phase = sim_config.phase; 2861 *phase = sim_config.phase;
2862 2862
2863 if ((serv != NULL) && (slen != NULL)) 2863 if ((serv != NULL) && (slen != NULL))
2864 { 2864 {
2865 l = sizeof(sim_service_table); 2865 l = sizeof(sim_service_table);
2866 if (l < *slen) 2866 if (l < *slen)
2867 *slen = l; 2867 *slen = l;
2868 memcpy(serv,sim_service_table,*slen); 2868 memcpy(serv,sim_service_table,*slen);
2869 } 2869 }
2924 SHORT pn2Cnt; 2924 SHORT pn2Cnt;
2925 SHORT pk1Cnt; 2925 SHORT pk1Cnt;
2926 SHORT pk2Cnt; 2926 SHORT pk2Cnt;
2927 T_ACI_PVRF_STAT ps1; 2927 T_ACI_PVRF_STAT ps1;
2928 T_ACI_PVRF_STAT ps2; 2928 T_ACI_PVRF_STAT ps2;
2929 2929
2930 TRACE_FUNCTION("sim_pin_count()"); 2930 TRACE_FUNCTION("sim_pin_count()");
2931 2931
2932 2932
2933 if (qAT_PercentPVRF(CMD_SRC_LCL, &pn1Cnt, 2933 if (qAT_PercentPVRF(CMD_SRC_LCL, &pn1Cnt,
2934 &pn2Cnt, &pk1Cnt, &pk2Cnt, &ps1, &ps2) != AT_CMPL) 2934 &pn2Cnt, &pk1Cnt, &pk2Cnt, &ps1, &ps2) != AT_CMPL)
2950 SHORT pn2Cnt; 2950 SHORT pn2Cnt;
2951 SHORT pk1Cnt; 2951 SHORT pk1Cnt;
2952 SHORT pk2Cnt; 2952 SHORT pk2Cnt;
2953 T_ACI_PVRF_STAT ps1; 2953 T_ACI_PVRF_STAT ps1;
2954 T_ACI_PVRF_STAT ps2; 2954 T_ACI_PVRF_STAT ps2;
2955 2955
2956 TRACE_FUNCTION("sim_pin_count()"); 2956 TRACE_FUNCTION("sim_pin_count()");
2957 2957
2958 2958
2959 if (qAT_PercentPVRF(CMD_SRC_LCL, &pn1Cnt, 2959 if (qAT_PercentPVRF(CMD_SRC_LCL, &pn1Cnt,
2960 &pn2Cnt, &pk1Cnt, &pk2Cnt, &ps1, &ps2) != AT_CMPL) 2960 &pn2Cnt, &pk1Cnt, &pk2Cnt, &ps1, &ps2) != AT_CMPL)
2963 //Aug 16, 2004 REF: CRR 24323 Deepa M.D 2963 //Aug 16, 2004 REF: CRR 24323 Deepa M.D
2964 TRACE_EVENT_P1("PIN2 STATUS: %d", ps2); 2964 TRACE_EVENT_P1("PIN2 STATUS: %d", ps2);
2965 /***************************Go-lite Optimization changes end***********************/ 2965 /***************************Go-lite Optimization changes end***********************/
2966 switch (pin_id) 2966 switch (pin_id)
2967 { 2967 {
2968 case MFW_SIM_PIN1: 2968 case MFW_SIM_PIN1:
2969 { if (ps1 ==PVRF_STAT_NotPresent) 2969 { if (ps1 ==PVRF_STAT_NotPresent)
2970 return 0; 2970 return 0;
2971 else 2971 else
2972 return 1; 2972 return 1;
2973 } // break; // RAVI 2973 } // break; // RAVI
2974 case MFW_SIM_PIN2: 2974 case MFW_SIM_PIN2:
2975 { if (ps2 ==PVRF_STAT_NotPresent) 2975 { if (ps2 ==PVRF_STAT_NotPresent)
2976 return 0; 2976 return 0;
2977 else 2977 else
2978 return 1; 2978 return 1;
2979 }// break; // RAVI 2979 }// break; // RAVI
2986 +---------------------------------------------------------------------+ 2986 +---------------------------------------------------------------------+
2987 | PROJECT : MMI-Framework (8417) MODULE : MFW_SIM | 2987 | PROJECT : MMI-Framework (8417) MODULE : MFW_SIM |
2988 | STATE : code ROUTINE : sim_convert_simlock_status| 2988 | STATE : code ROUTINE : sim_convert_simlock_status|
2989 +---------------------------------------------------------------------+ 2989 +---------------------------------------------------------------------+
2990 2990
2991 PURPOSE : Conversion of ACI simlock status to MFW simlock status codes for 2991 PURPOSE : Conversion of ACI simlock status to MFW simlock status codes for
2992 compatibility with existing MMI layer. 2992 compatibility with existing MMI layer.
2993 2993
2994 */ 2994 */
2995 UBYTE sim_convert_simlock_status(T_SIMLOCK_STATUS aci_status) 2995 UBYTE sim_convert_simlock_status(T_SIMLOCK_STATUS aci_status)
2996 { 2996 {
2999 case(SIMLOCK_DISABLED): return MFW_SIM_DISABLE; //break; // RAVI 2999 case(SIMLOCK_DISABLED): return MFW_SIM_DISABLE; //break; // RAVI
3000 case(SIMLOCK_ENABLED): return MFW_SIM_ENABLE; //break; // RAVI 3000 case(SIMLOCK_ENABLED): return MFW_SIM_ENABLE; //break; // RAVI
3001 case(SIMLOCK_BLOCKED): return MFW_SIM_BLOCKED; // break; // RAVI 3001 case(SIMLOCK_BLOCKED): return MFW_SIM_BLOCKED; // break; // RAVI
3002 case(SIMLOCK_LOCKED): return MFW_SIM_LOCKED; //break; // RAVI 3002 case(SIMLOCK_LOCKED): return MFW_SIM_LOCKED; //break; // RAVI
3003 case (SIMLOCK_FAIL): return MFW_SIM_FAILURE; // break; // RAVI 3003 case (SIMLOCK_FAIL): return MFW_SIM_FAILURE; // break; // RAVI
3004 default: return MFW_SIM_FAILURE; 3004 default: return MFW_SIM_FAILURE;
3005 } 3005 }
3006 3006
3007 } 3007 }
3008 /* 3008 /*
3009 +---------------------------------------------------------------------+ 3009 +---------------------------------------------------------------------+
3016 3016
3017 */ 3017 */
3018 /*MC SPR1351, replaced previous implemnetation with wrapper for aci implementation*/ 3018 /*MC SPR1351, replaced previous implemnetation with wrapper for aci implementation*/
3019 T_MFW sim_unlock_sim_lock(UBYTE type, UBYTE *passwd) 3019 T_MFW sim_unlock_sim_lock(UBYTE type, UBYTE *passwd)
3020 { 3020 {
3021 3021
3022 T_SIMLOCK_STATUS simlock_status=SIMLOCK_DISABLED;/*status from ACI */ 3022 T_SIMLOCK_STATUS simlock_status=SIMLOCK_DISABLED;/*status from ACI */
3023 /*for CQ-34324 -- While Integrating of VLE5 ME personalization code aci_slock_unlock 3023 /*for CQ-34324 -- While Integrating of VLE5 ME personalization code aci_slock_unlock
3024 function is moved under SIM_PERS flag and this function is never called . So variable 3024 function is moved under SIM_PERS flag and this function is never called . So variable
3025 simlock_status is hardcoded to default value */ 3025 simlock_status is hardcoded to default value */
3026 UBYTE mfw_simlock_status;/*status converted to MFW encoding*/ 3026 UBYTE mfw_simlock_status;/*status converted to MFW encoding*/
3027 3027
3028 TRACE_EVENT_P1("sim_unlock_sim_lock(): %d", type); 3028 TRACE_EVENT_P1("sim_unlock_sim_lock(): %d", type);
3029 3029
3030 3030
3060 case (MFW_SIM_DISABLE): return MFW_SIM_SPLOCK; 3060 case (MFW_SIM_DISABLE): return MFW_SIM_SPLOCK;
3061 case(MFW_SIM_LOCKED): return MFW_SIM_UNLOCK_ERR; 3061 case(MFW_SIM_LOCKED): return MFW_SIM_UNLOCK_ERR;
3062 default: return MFW_SIM_UNLOCK_ERR; 3062 default: return MFW_SIM_UNLOCK_ERR;
3063 } 3063 }
3064 // break; // RAVI 3064 // break; // RAVI
3065 3065
3066 /* 3066 /*
3067 * NS-Lock 3067 * NS-Lock
3068 */ 3068 */
3069 case MFW_SIM_NSLOCK: 3069 case MFW_SIM_NSLOCK:
3070 #ifdef MMI_34324 3070 #ifdef MMI_34324
3111 case (MFW_SIM_DISABLE): return MFW_SIM_PLOCK; 3111 case (MFW_SIM_DISABLE): return MFW_SIM_PLOCK;
3112 case(MFW_SIM_LOCKED): return MFW_SIM_UNLOCK_ERR; 3112 case(MFW_SIM_LOCKED): return MFW_SIM_UNLOCK_ERR;
3113 default:return MFW_SIM_UNLOCK_ERR; 3113 default:return MFW_SIM_UNLOCK_ERR;
3114 } 3114 }
3115 // break; // RAVI 3115 // break; // RAVI
3116 3116
3117 } 3117 }
3118 3118
3119 return MFW_SIM_UNLOCK_ERR; 3119 return MFW_SIM_UNLOCK_ERR;
3120 } 3120 }
3121 3121
3128 PURPOSE : check SIM lock 3128 PURPOSE : check SIM lock
3129 3129
3130 */ 3130 */
3131 /*MC SPR1351, replaced previous implemnetation with wrapper for aci implementation*/ 3131 /*MC SPR1351, replaced previous implemnetation with wrapper for aci implementation*/
3132 int sim_check_sim_Plock (void) 3132 int sim_check_sim_Plock (void)
3133 { T_SIMLOCK_STATUS simlock_status = SIMLOCK_DISABLED; 3133 { T_SIMLOCK_STATUS simlock_status = SIMLOCK_DISABLED;
3134 /*ACI set default value for CQ-34324--While Integrating of VLE5 ME personalization code 3134 /*ACI set default value for CQ-34324--While Integrating of VLE5 ME personalization code
3135 aci_slock_checklock function is removed and this function is never called. So variable 3135 aci_slock_checklock function is removed and this function is never called. So variable
3136 simlock_status is hardcoded to default value 3136 simlock_status is hardcoded to default value
3137 */ 3137 */
3138 3138
3139 TRACE_EVENT ("sim_check_sim_Plock"); 3139 TRACE_EVENT ("sim_check_sim_Plock");
3140 #ifdef MMI_34324 3140 #ifdef MMI_34324
3141 simlock_status =aci_slock_checklock(SIMLOCK_SIM); 3141 simlock_status =aci_slock_checklock(SIMLOCK_SIM);
3142 #endif 3142 #endif
3143 TRACE_EVENT_P1("PLock: %d", simlock_status); 3143 TRACE_EVENT_P1("PLock: %d", simlock_status);
3144 /*convert status from ACI to MFW encoding*/ 3144 /*convert status from ACI to MFW encoding*/
3145 return sim_convert_simlock_status(simlock_status); 3145 return sim_convert_simlock_status(simlock_status);
3146 3146
3147 } 3147 }
3148 3148
3149 3149
3156 PURPOSE : Check network lock 3156 PURPOSE : Check network lock
3157 3157
3158 */ 3158 */
3159 /*MC SPR1351, replaced previous implemnetation with wrapper for aci implementation*/ 3159 /*MC SPR1351, replaced previous implemnetation with wrapper for aci implementation*/
3160 int sim_check_sim_Nlock (void) 3160 int sim_check_sim_Nlock (void)
3161 { T_SIMLOCK_STATUS simlock_status = SIMLOCK_DISABLED; 3161 { T_SIMLOCK_STATUS simlock_status = SIMLOCK_DISABLED;
3162 /*ACI set default value for CQ-34324--While Integrating of VLE5 ME personalization code 3162 /*ACI set default value for CQ-34324--While Integrating of VLE5 ME personalization code
3163 aci_slock_checklock function is removed and this function is never called. So variable 3163 aci_slock_checklock function is removed and this function is never called. So variable
3164 simlock_status is hardcoded to default value 3164 simlock_status is hardcoded to default value
3165 */ 3165 */
3166 TRACE_EVENT ("sim_check_sim_Nlock()"); 3166 TRACE_EVENT ("sim_check_sim_Nlock()");
3167 #ifdef MMI_34324 3167 #ifdef MMI_34324
3168 simlock_status =aci_slock_checklock(SIMLOCK_NETWORK); 3168 simlock_status =aci_slock_checklock(SIMLOCK_NETWORK);
3169 #endif 3169 #endif
3170 TRACE_EVENT_P1("NLock: %d", simlock_status); 3170 TRACE_EVENT_P1("NLock: %d", simlock_status);
3171 /*convert status from ACI to MFW encoding*/ 3171 /*convert status from ACI to MFW encoding*/
3172 return sim_convert_simlock_status(simlock_status); 3172 return sim_convert_simlock_status(simlock_status);
3173 3173
3174 3174
3175 } 3175 }
3176 3176
3187 */ 3187 */
3188 /*MC SPR1351, replaced previous implemnetation with wrapper for aci implementation*/ 3188 /*MC SPR1351, replaced previous implemnetation with wrapper for aci implementation*/
3189 int sim_check_sim_SPlock (void) 3189 int sim_check_sim_SPlock (void)
3190 { T_SIMLOCK_STATUS simlock_status = SIMLOCK_DISABLED; 3190 { T_SIMLOCK_STATUS simlock_status = SIMLOCK_DISABLED;
3191 /*ACI set default value for CQ-34324--While Integrating of VLE5 ME personalization code 3191 /*ACI set default value for CQ-34324--While Integrating of VLE5 ME personalization code
3192 aci_slock_checklock function is removed and this function is never called. So variable 3192 aci_slock_checklock function is removed and this function is never called. So variable
3193 simlock_status is hardcoded to default value 3193 simlock_status is hardcoded to default value
3194 */ 3194 */
3195 TRACE_EVENT ("sim_check_sim_SPlock()"); 3195 TRACE_EVENT ("sim_check_sim_SPlock()");
3196 3196
3197 #ifdef MMI_34324 3197 #ifdef MMI_34324
3198 simlock_status =aci_slock_checklock(SIMLOCK_SERVICE_PROVIDER); 3198 simlock_status =aci_slock_checklock(SIMLOCK_SERVICE_PROVIDER);
3199 #endif 3199 #endif
3200 3200
3201 TRACE_EVENT_P1("NLock: %d", simlock_status); 3201 TRACE_EVENT_P1("NLock: %d", simlock_status);
3202 /*convert status from ACI to MFW encoding*/ 3202 /*convert status from ACI to MFW encoding*/
3203 return sim_convert_simlock_status(simlock_status); 3203 return sim_convert_simlock_status(simlock_status);
3204 3204
3205 } 3205 }
3206 3206
3207 3207
3214 PURPOSE : Check network subset lock 3214 PURPOSE : Check network subset lock
3215 3215
3216 */ 3216 */
3217 /*MC SPR1351, replaced previous implementation with wrapper for aci implementation*/ 3217 /*MC SPR1351, replaced previous implementation with wrapper for aci implementation*/
3218 int sim_check_sim_NSlock (void) 3218 int sim_check_sim_NSlock (void)
3219 { T_SIMLOCK_STATUS simlock_status = SIMLOCK_DISABLED; 3219 { T_SIMLOCK_STATUS simlock_status = SIMLOCK_DISABLED;
3220 /*ACI set default value for CQ-34324--While Integrating of VLE5 ME personalization code 3220 /*ACI set default value for CQ-34324--While Integrating of VLE5 ME personalization code
3221 aci_slock_checklock function is removed and this function is never called. So variable 3221 aci_slock_checklock function is removed and this function is never called. So variable
3222 simlock_status is hardcoded to default value 3222 simlock_status is hardcoded to default value
3223 */ 3223 */
3224 TRACE_EVENT ("sim_check_sim_NSlock()"); 3224 TRACE_EVENT ("sim_check_sim_NSlock()");
3225 3225
3226 #ifdef MMI_34324 3226 #ifdef MMI_34324
3227 simlock_status =aci_slock_checklock(SIMLOCK_NETWORK_SUBSET); 3227 simlock_status =aci_slock_checklock(SIMLOCK_NETWORK_SUBSET);
3228 #endif 3228 #endif
3229 TRACE_EVENT_P1("NSLock: %d", simlock_status); 3229 TRACE_EVENT_P1("NSLock: %d", simlock_status);
3230 3230
3231 /*convert status from ACI to MFW encoding*/ 3231 /*convert status from ACI to MFW encoding*/
3232 return sim_convert_simlock_status(simlock_status); 3232 return sim_convert_simlock_status(simlock_status);
3233 } 3233 }
3234 3234
3235 /* 3235 /*
3236 +---------------------------------------------------------------------+ 3236 +---------------------------------------------------------------------+
3242 which support GID1 and GID2 files. 3242 which support GID1 and GID2 files.
3243 3243
3244 */ 3244 */
3245 /*MC SPR1351, replaced previous implemnetation with wrapper for aci implementation*/ 3245 /*MC SPR1351, replaced previous implemnetation with wrapper for aci implementation*/
3246 int sim_check_sim_Clock (void) 3246 int sim_check_sim_Clock (void)
3247 { T_SIMLOCK_STATUS simlock_status = SIMLOCK_DISABLED; 3247 { T_SIMLOCK_STATUS simlock_status = SIMLOCK_DISABLED;
3248 /*ACI set default value for CQ-34324--While Integrating of VLE5 ME personalization code 3248 /*ACI set default value for CQ-34324--While Integrating of VLE5 ME personalization code
3249 aci_slock_checklock function is removed and this function is never called. So variable 3249 aci_slock_checklock function is removed and this function is never called. So variable
3250 simlock_status is hardcoded to default value 3250 simlock_status is hardcoded to default value
3251 */ 3251 */
3252 TRACE_EVENT ("sim_check_sim_Clock()"); 3252 TRACE_EVENT ("sim_check_sim_Clock()");
3253 #ifdef MMI_34324 3253 #ifdef MMI_34324
3254 simlock_status =aci_slock_checklock(SIMLOCK_CORPORATE); 3254 simlock_status =aci_slock_checklock(SIMLOCK_CORPORATE);
3255 #endif 3255 #endif
3256 TRACE_EVENT_P1("CLock: %d", simlock_status); 3256 TRACE_EVENT_P1("CLock: %d", simlock_status);
3257 /*convert status from ACI to MFW encoding*/ 3257 /*convert status from ACI to MFW encoding*/
3258 return sim_convert_simlock_status(simlock_status); 3258 return sim_convert_simlock_status(simlock_status);
3259 } 3259 }
3260 3260
3261 3261
3262 3262
3281 // char debug[30]; // RAVI 3281 // char debug[30]; // RAVI
3282 TRACE_FUNCTION("sim_pin_status()"); 3282 TRACE_FUNCTION("sim_pin_status()");
3283 3283
3284 status->stat = MFW_SIM_UNKNOWN; 3284 status->stat = MFW_SIM_UNKNOWN;
3285 status->set = MFW_SIM_UNKNOWN; 3285 status->set = MFW_SIM_UNKNOWN;
3286 3286
3287 if (qAT_PercentPVRF(CMD_SRC_LCL, &pn1Cnt, 3287 if (qAT_PercentPVRF(CMD_SRC_LCL, &pn1Cnt,
3288 &pn2Cnt, &pk1Cnt, &pk2Cnt, &ps1, &ps2) == AT_CMPL) 3288 &pn2Cnt, &pk1Cnt, &pk2Cnt, &ps1, &ps2) == AT_CMPL)
3289 { 3289 {
3290 switch (status->type) 3290 switch (status->type)
3291 { 3291 {
3292 case MFW_SIM_PIN1: 3292 case MFW_SIM_PIN1:
3324 { 3324 {
3325 TRACE_FUNCTION("sim_cvtPINstatus()"); 3325 TRACE_FUNCTION("sim_cvtPINstatus()");
3326 3326
3327 switch (ps) 3327 switch (ps)
3328 { 3328 {
3329 case PVRF_STAT_NotRequired: 3329 case PVRF_STAT_NotRequired:
3330 return MFW_SIM_NO_PIN; 3330 return MFW_SIM_NO_PIN;
3331 case PVRF_STAT_Required: 3331 case PVRF_STAT_Required:
3332 if (type EQ MFW_SIM_PIN1) 3332 if (type EQ MFW_SIM_PIN1)
3333 return MFW_SIM_PIN_REQ; 3333 return MFW_SIM_PIN_REQ;
3334 if (type EQ MFW_SIM_PIN2) 3334 if (type EQ MFW_SIM_PIN2)
3335 return MFW_SIM_PIN2_REQ; 3335 return MFW_SIM_PIN2_REQ;
3336 return MFW_SIM_UNKNOWN; 3336 return MFW_SIM_UNKNOWN;
3337 default: 3337 default:
3338 return MFW_SIM_UNKNOWN; 3338 return MFW_SIM_UNKNOWN;
3339 } 3339 }
3340 } 3340 }
3341 3341
3342 3342
3348 3348
3349 PURPOSE : convert imsi (packed bcd to ASCIIZ; ->11.11) 3349 PURPOSE : convert imsi (packed bcd to ASCIIZ; ->11.11)
3350 3350
3351 */ 3351 */
3352 3352
3353 void simDecodeIMSI (UBYTE * imsi_field, 3353 void simDecodeIMSI (UBYTE * imsi_field,
3354 UBYTE imsi_c_field, 3354 UBYTE imsi_c_field,
3355 UBYTE * imsi_extracted) 3355 UBYTE * imsi_extracted)
3356 { 3356 {
3357 UBYTE length; 3357 UBYTE length;
3358 UBYTE i; 3358 UBYTE i;
3359 UBYTE digit; 3359 UBYTE digit;
3454 | STATE : code ROUTINE : sim_simlock_ok | 3454 | STATE : code ROUTINE : sim_simlock_ok |
3455 +--------------------------------------------------------------------+ 3455 +--------------------------------------------------------------------+
3456 3456
3457 PURPOSE : The function checks all simlocks and returns SIMLOCK_DISABLED 3457 PURPOSE : The function checks all simlocks and returns SIMLOCK_DISABLED
3458 if none are set. 3458 if none are set.
3459 3459
3460 */ 3460 */
3461 /*spr 1351, replaced previous implemntation with a wrapper for aci implentation*/ 3461 /*spr 1351, replaced previous implemntation with a wrapper for aci implentation*/
3462 UBYTE sim_simlock_ok (void) 3462 UBYTE sim_simlock_ok (void)
3463 { 3463 {
3464 T_SIMLOCK_STATUS simlock_status = SIMLOCK_ENABLED; 3464 T_SIMLOCK_STATUS simlock_status = SIMLOCK_ENABLED;
3465 /*ACI set default value for CQ-34324 -- While Integrating of VLE5 ME personalization code 3465 /*ACI set default value for CQ-34324 -- While Integrating of VLE5 ME personalization code
3466 aci_slock_checkpersonalisation function is moved under SIM_PERS flag and this function is 3466 aci_slock_checkpersonalisation function is moved under SIM_PERS flag and this function is
3467 never called . So variable simlock_status is hardcoded to default value */ 3467 never called . So variable simlock_status is hardcoded to default value */
3468 #ifdef MMI_34324 3468 #ifdef MMI_34324
3469 simlock_status = aci_slock_checkpersonalisation(); 3469 simlock_status = aci_slock_checkpersonalisation();
3470 #endif 3470 #endif
3471 return sim_convert_simlock_status(simlock_status); 3471 return sim_convert_simlock_status(simlock_status);
3472 3472
3473 } 3473 }
3538 sim_read_sim(SIM_GID2, NOT_PRESENT_8BIT, 5); 3538 sim_read_sim(SIM_GID2, NOT_PRESENT_8BIT, 5);
3539 break; 3539 break;
3540 case SIM_LP: 3540 case SIM_LP:
3541 { 3541 {
3542 T_ACI_LAN_SUP lngCde; 3542 T_ACI_LAN_SUP lngCde;
3543 CHAR lang_buffer[3]; 3543 CHAR lang_buffer[3];
3544 3544
3545 memset(lang_buffer, 0, sizeof(lang_buffer)); 3545 memset(lang_buffer, 0, sizeof(lang_buffer));
3546 lngCde.str = lang_buffer; 3546 lngCde.str = lang_buffer;
3547 if (qAT_PlusCLAN(CMD_SRC_LCL, &lngCde) == AT_EXCT) 3547 if (qAT_PlusCLAN(CMD_SRC_LCL, &lngCde) == AT_EXCT)
3548 return; 3548 return;
3607 +--------------------------------------------------------------------+ 3607 +--------------------------------------------------------------------+
3608 | PROJECT : MMI-Framework (8417) MODULE : MFW_SIM | 3608 | PROJECT : MMI-Framework (8417) MODULE : MFW_SIM |
3609 | STATE : code ROUTINE : sim_init_CPRS | 3609 | STATE : code ROUTINE : sim_init_CPRS |
3610 +--------------------------------------------------------------------+ 3610 +--------------------------------------------------------------------+
3611 3611
3612 PURPOSE : initialize the ciphering indication 3612 PURPOSE : initialize the ciphering indication
3613 3613
3614 */ 3614 */
3615 3615
3616 UBYTE sim_init_CPRS (CallbackCPRI func, UBYTE CPRImode ) 3616 UBYTE sim_init_CPRS (CallbackCPRI func, UBYTE CPRImode )
3617 { 3617 {
3618 3618
3619 //UBYTE getCPRImode; // RAVI 3619 //UBYTE getCPRImode; // RAVI
3620 3620
3621 TRACE_FUNCTION("sim_init_CPRS()"); 3621 TRACE_FUNCTION("sim_init_CPRS()");
3622 3622
3623 //keep the callback function from MMI 3623 //keep the callback function from MMI
3624 if (func != NULL) 3624 if (func != NULL)
3625 mmi_cprs_cb = func; 3625 mmi_cprs_cb = func;
3626 else 3626 else
3627 return FALSE; 3627 return FALSE;
3637 +--------------------------------------------------------------------+ 3637 +--------------------------------------------------------------------+
3638 | PROJECT : MMI-Framework (8417) MODULE : MFW_SIM | 3638 | PROJECT : MMI-Framework (8417) MODULE : MFW_SIM |
3639 | STATE : code ROUTINE : rAT_PercentCPRI | 3639 | STATE : code ROUTINE : rAT_PercentCPRI |
3640 +--------------------------------------------------------------------+ 3640 +--------------------------------------------------------------------+
3641 3641
3642 PURPOSE : is called to inform the application about a received ciphering indication. 3642 PURPOSE : is called to inform the application about a received ciphering indication.
3643 gsm_ciph and gprs_ciph are used to inform the application about a change in ciphering 3643 gsm_ciph and gprs_ciph are used to inform the application about a change in ciphering
3644 mode in GSM or GPRS. 3644 mode in GSM or GPRS.
3645 3645
3646 */ 3646 */
3647 3647
3648 3648
3657 +---------------------------------------------------------------------+ 3657 +---------------------------------------------------------------------+
3658 | PROJECT : MMI-Framework (8417) MODULE : MFW_SIM | 3658 | PROJECT : MMI-Framework (8417) MODULE : MFW_SIM |
3659 | STATE : code ROUTINE : sim_read_lp_cnf | 3659 | STATE : code ROUTINE : sim_read_lp_cnf |
3660 +---------------------------------------------------------------------+ 3660 +---------------------------------------------------------------------+
3661 3661
3662 PURPOSE : 3662 PURPOSE :
3663 3663
3664 */ 3664 */
3665 3665
3666 void sim_read_lp_cnf (USHORT error, T_ACI_LAN_SUP *CLang) 3666 void sim_read_lp_cnf (USHORT error, T_ACI_LAN_SUP *CLang)
3667 { 3667 {
3668 TRACE_FUNCTION("sim_read_lp_cnf()"); 3668 TRACE_FUNCTION("sim_read_lp_cnf()");
3669 3669
3689 +---------------------------------------------------------------------+ 3689 +---------------------------------------------------------------------+
3690 | PROJECT : MMI-Framework (8417) MODULE : MFW_SIM | 3690 | PROJECT : MMI-Framework (8417) MODULE : MFW_SIM |
3691 | STATE : code ROUTINE : sim_simlock_cpin_code | 3691 | STATE : code ROUTINE : sim_simlock_cpin_code |
3692 +---------------------------------------------------------------------+ 3692 +---------------------------------------------------------------------+
3693 3693
3694 PURPOSE : This function checks for the code and take action for SIMP category unlocking 3694 PURPOSE : This function checks for the code and take action for SIMP category unlocking
3695 */ 3695 */
3696 #ifdef SIM_PERS 3696 #ifdef SIM_PERS
3697 void sim_simlock_cpin_code (T_ACI_CPIN_RSLT code) 3697 void sim_simlock_cpin_code (T_ACI_CPIN_RSLT code)
3698 { 3698 {
3699 TRACE_FUNCTION("sim_simlock_cpin_code()"); 3699 TRACE_FUNCTION("sim_simlock_cpin_code()");
3700 3700
3702 sim_status.sim_operation_mode = sim_config.oper_mode; 3702 sim_status.sim_operation_mode = sim_config.oper_mode;
3703 sim_status.sim_pin_retries = 0; 3703 sim_status.sim_pin_retries = 0;
3704 sim_stat = SIM_ACTIVE; 3704 sim_stat = SIM_ACTIVE;
3705 pin_flag = -1; 3705 pin_flag = -1;
3706 pin_ident = MFW_SIM_UNKNOWN; 3706 pin_ident = MFW_SIM_UNKNOWN;
3707 3707
3708 if( code EQ CPIN_RSLT_SimReady ) 3708 if( code EQ CPIN_RSLT_SimReady )
3709 { 3709 {
3710 TRACE_EVENT("CPIN_RSLT_SimReady"); 3710 TRACE_EVENT("CPIN_RSLT_SimReady");
3711 sim_status.sim_status = MFW_SIM_NO_PIN; 3711 sim_status.sim_status = MFW_SIM_NO_PIN;
3712 sim_status.sim_status_type = pin_ident; 3712 sim_status.sim_status_type = pin_ident;
3715 sim_signal(E_SIM_STATUS,&sim_status); 3715 sim_signal(E_SIM_STATUS,&sim_status);
3716 return ; 3716 return ;
3717 } 3717 }
3718 switch ( code ) 3718 switch ( code )
3719 { 3719 {
3720 case CPIN_RSLT_PhSimPinReq: 3720 case CPIN_RSLT_PhSimPinReq:
3721 sim_status.sim_status = MFW_SIM_PLOCK_REQ; 3721 sim_status.sim_status = MFW_SIM_PLOCK_REQ;
3722 sim_status.sim_status_type = MFW_SIM_LOCKED ; 3722 sim_status.sim_status_type = MFW_SIM_LOCKED ;
3723 sim_signal(E_SIM_STATUS,&sim_status); 3723 sim_signal(E_SIM_STATUS,&sim_status);
3724 break; 3724 break;
3725 3725
3750 case CPIN_RSLT_PhNetPukReq: 3750 case CPIN_RSLT_PhNetPukReq:
3751 case CPIN_RSLT_PhNetSubPukReq: 3751 case CPIN_RSLT_PhNetSubPukReq:
3752 case CPIN_RSLT_PhSPPukReq: 3752 case CPIN_RSLT_PhSPPukReq:
3753 case CPIN_RSLT_PhCorpPukReq: 3753 case CPIN_RSLT_PhCorpPukReq:
3754 case CPIN_RSLT_PhSimFail: 3754 case CPIN_RSLT_PhSimFail:
3755 C_KEY_REQ = 1; 3755 C_KEY_REQ = 1;
3756 sim_status.sim_status = MFW_SIM_PUK_REQ; 3756 sim_status.sim_status = MFW_SIM_PUK_REQ;
3757 sim_status.sim_pin_retries = sim_pin_count(MFW_SIM_PUK1); 3757 sim_status.sim_pin_retries = sim_pin_count(MFW_SIM_PUK1);
3758 sim_status.sim_status_type = MFW_SIM_PUK1; 3758 sim_status.sim_status_type = MFW_SIM_PUK1;
3759 sim_status.sim_procedure = MFW_SIM_ACTIVATION; 3759 sim_status.sim_procedure = MFW_SIM_ACTIVATION;
3760 sim_signal(E_SIM_STATUS,&sim_status); 3760 sim_signal(E_SIM_STATUS,&sim_status);
3765 case CPIN_RSLT_PhBlockedNetPinReq: 3765 case CPIN_RSLT_PhBlockedNetPinReq:
3766 sim_status.sim_status = MFW_SIM_PBLOCK_REQ; 3766 sim_status.sim_status = MFW_SIM_PBLOCK_REQ;
3767 sim_status.sim_status_type = MFW_SIM_LOCKED; 3767 sim_status.sim_status_type = MFW_SIM_LOCKED;
3768 sim_signal(E_SIM_STATUS,&sim_status); 3768 sim_signal(E_SIM_STATUS,&sim_status);
3769 break; 3769 break;
3770 3770
3771 //x0pleela 25 Sep, 2006 ER: OMAPS00095524 3771 //x0pleela 25 Sep, 2006 ER: OMAPS00095524
3772 //Set the reqd. parameters for Blocked Network Unblock code request 3772 //Set the reqd. parameters for Blocked Network Unblock code request
3773 case CPIN_RSLT_PhBlockedNetPukReq: 3773 case CPIN_RSLT_PhBlockedNetPukReq:
3774 C_KEY_REQ = 1; 3774 C_KEY_REQ = 1;
3775 sim_status.sim_status = MFW_SIM_PUK_REQ; 3775 sim_status.sim_status = MFW_SIM_PUK_REQ;
3776 sim_status.sim_pin_retries = sim_pin_count(MFW_SIM_PUK1); 3776 sim_status.sim_pin_retries = sim_pin_count(MFW_SIM_PUK1);
3777 sim_status.sim_status_type = MFW_SIM_PUK1; 3777 sim_status.sim_status_type = MFW_SIM_PUK1;
3778 sim_status.sim_procedure = MFW_SIM_ACTIVATION; 3778 sim_status.sim_procedure = MFW_SIM_ACTIVATION;
3779 sim_signal(E_SIM_STATUS,&sim_status); 3779 sim_signal(E_SIM_STATUS,&sim_status);
3780 break; 3780 break;
3781 3781
3782 default: 3782 default:
3783 TRACE_ERROR("sim_simlock_cpin_code (): result"); 3783 TRACE_ERROR("sim_simlock_cpin_code (): result");
3784 break; 3784 break;
3785 } 3785 }
3786 return ; 3786 return ;
3787 } 3787 }
3788 #endif 3788 #endif
3789 3789
3790 //x0pleela 19 Feb, 2007 ER: OMAPS00122561 3790 //x0pleela 19 Feb, 2007 ER: OMAPS00122561
3793 /******************************************************************************* 3793 /*******************************************************************************
3794 $Function: mfw_phlock_get_lock_status 3794 $Function: mfw_phlock_get_lock_status
3795 $Description: returns the status of the lock - enabled / disabled 3795 $Description: returns the status of the lock - enabled / disabled
3796 $Returns: lock status 3796 $Returns: lock status
3797 $Arguments: lock type 3797 $Arguments: lock type
3798 3798
3799 *******************************************************************************/ 3799 *******************************************************************************/
3800 int mfw_phlock_get_lock_status(S16 lcktyp) 3800 int mfw_phlock_get_lock_status(S16 lcktyp)
3801 { 3801 {
3802 T_ACI_CLSSTAT clsStat; 3802 T_ACI_CLSSTAT clsStat;
3803 T_ACI_FAC lckfac; 3803 T_ACI_FAC lckfac;
3804 3804
3805 TRACE_FUNCTION("mfw_phlock_get_lock_status()"); 3805 TRACE_FUNCTION("mfw_phlock_get_lock_status()");
3806 3806
3807 lckfac = FAC_Pl; 3807 lckfac = FAC_Pl;
3808 3808
3809 if (qAT_PlusCLCK(CMD_SRC_LCL, lckfac, 3809 if (qAT_PlusCLCK(CMD_SRC_LCL, lckfac,
3810 CLASS_NotPresent, &clsStat) EQ AT_CMPL) 3810 CLASS_NotPresent, &clsStat) EQ AT_CMPL)
3811 { 3811 {
3829 3829
3830 return MFW_PH_LOCK_ENABLE; 3830 return MFW_PH_LOCK_ENABLE;
3831 } 3831 }
3832 } 3832 }
3833 return MFW_PH_LOCK_FAILURE; 3833 return MFW_PH_LOCK_FAILURE;
3834 3834
3835 } 3835 }
3836 3836
3837 /******************************************************************************* 3837 /*******************************************************************************
3838 $Function: mfw_autophlock_get_lock_status 3838 $Function: mfw_autophlock_get_lock_status
3839 $Description: returns the status of the lock - enabled / disabled 3839 $Description: returns the status of the lock - enabled / disabled
3840 $Returns: lock status 3840 $Returns: lock status
3841 $Arguments: lock type 3841 $Arguments: lock type
3842 3842
3843 *******************************************************************************/ 3843 *******************************************************************************/
3844 int mfw_phlock_get_autolock_status(S16 lcktyp) 3844 int mfw_phlock_get_autolock_status(S16 lcktyp)
3845 { 3845 {
3846 T_ACI_CLSSTAT clsStat; 3846 T_ACI_CLSSTAT clsStat;
3847 T_ACI_FAC lckfac=FAC_NotPresent; 3847 T_ACI_FAC lckfac=FAC_NotPresent;
3857 TRACE_FUNCTION("qAT_PlusCLCK->AT_CMPL "); 3857 TRACE_FUNCTION("qAT_PlusCLCK->AT_CMPL ");
3858 switch (clsStat.status) 3858 switch (clsStat.status)
3859 { 3859 {
3860 case STATUS_NotActive: 3860 case STATUS_NotActive:
3861 TRACE_FUNCTION("MFW_PH_LOCK_DISABLE "); 3861 TRACE_FUNCTION("MFW_PH_LOCK_DISABLE ");
3862 3862
3863 //x0pleela 29 May, 2007 DR: OMAPS00132483 3863 //x0pleela 29 May, 2007 DR: OMAPS00132483
3864 //set the auto phone lock status to FALSE 3864 //set the auto phone lock status to FALSE
3865 mfw_set_Auto_Phlock_status(FALSE); 3865 mfw_set_Auto_Phlock_status(FALSE);
3866 return MFW_PH_LOCK_DISABLE; 3866 return MFW_PH_LOCK_DISABLE;
3867 3867
3868 case STATUS_Active: 3868 case STATUS_Active:
3869 TRACE_FUNCTION("MFW_PH_LOCK_ENABLE "); 3869 TRACE_FUNCTION("MFW_PH_LOCK_ENABLE ");
3870 3870
3871 //x0pleela 29 May, 2007 DR: OMAPS00132483 3871 //x0pleela 29 May, 2007 DR: OMAPS00132483
3872 //set the auto phone lock status to TRUE 3872 //set the auto phone lock status to TRUE
3873 mfw_set_Auto_Phlock_status(TRUE); 3873 mfw_set_Auto_Phlock_status(TRUE);
3874 return MFW_PH_LOCK_ENABLE; 3874 return MFW_PH_LOCK_ENABLE;
3875 } 3875 }
3876 } 3876 }
3877 return MFW_PH_LOCK_FAILURE; 3877 return MFW_PH_LOCK_FAILURE;
3878 3878
3879 } 3879 }
3880 /******************************************************************************* 3880 /*******************************************************************************
3881 $Function: mfw_phlock_enable_lock 3881 $Function: mfw_phlock_enable_lock
3882 $Description: disables the lock with the given password for the given lock 3882 $Description: disables the lock with the given password for the given lock
3883 $Returns: success or failure 3883 $Returns: success or failure
3884 $Arguments: type of lock and password 3884 $Arguments: type of lock and password
3885 3885
3886 *******************************************************************************/ 3886 *******************************************************************************/
3887 T_MFW_SS_RETURN mfw_phlock_enable_lock(U8 *pin, S16 lcktyp) 3887 T_MFW_SS_RETURN mfw_phlock_enable_lock(U8 *pin, S16 lcktyp)
3888 { 3888 {
3889 T_ACI_FAC lckFac=FAC_NotPresent; 3889 T_ACI_FAC lckFac=FAC_NotPresent;
3890 T_ACI_RETURN ret; 3890 T_ACI_RETURN ret;
3892 if( lcktyp == MFW_AUTO_PH_LOCK ) 3892 if( lcktyp == MFW_AUTO_PH_LOCK )
3893 lckFac = FAC_Apl; 3893 lckFac = FAC_Apl;
3894 else if ( lcktyp == MFW_PH_LOCK ) 3894 else if ( lcktyp == MFW_PH_LOCK )
3895 lckFac = FAC_Pl; 3895 lckFac = FAC_Pl;
3896 3896
3897 ret = sAT_PlusCLCK(CMD_SRC_LCL,lckFac,CLCK_MOD_Lock,(char*)pin,CLASS_NotPresent); 3897 ret = sAT_PlusCLCK(CMD_SRC_LCL,lckFac,CLCK_MOD_Lock,(char*)pin,CLASS_NotPresent);
3898 switch(ret) 3898 switch(ret)
3899 { 3899 {
3900 case AT_CMPL: 3900 case AT_CMPL:
3901 return MFW_SS_OK; 3901 return MFW_SS_OK;
3902 case AT_FAIL: 3902 case AT_FAIL:
3903 return MFW_SS_FAIL; 3903 return MFW_SS_FAIL;
3904 } 3904 }
3905 return MFW_SS_FAIL; 3905 return MFW_SS_FAIL;
3906 } 3906 }
3907 3907
3908 /******************************************************************************* 3908 /*******************************************************************************
3909 $Function: mfw_phlock_disable_lock 3909 $Function: mfw_phlock_disable_lock
3910 $Description: disables the lock with the given password for the given lock 3910 $Description: disables the lock with the given password for the given lock
3911 $Returns: success or failure 3911 $Returns: success or failure
3912 $Arguments: type of lock and password 3912 $Arguments: type of lock and password
3913 3913
3914 *******************************************************************************/ 3914 *******************************************************************************/
3915 T_MFW_SS_RETURN mfw_phlock_disable_lock(U8 *pin, S16 lcktyp) 3915 T_MFW_SS_RETURN mfw_phlock_disable_lock(U8 *pin, S16 lcktyp)
3916 { 3916 {
3917 T_ACI_FAC lckFac=FAC_NotPresent; 3917 T_ACI_FAC lckFac=FAC_NotPresent;
3918 T_ACI_RETURN ret; 3918 T_ACI_RETURN ret;
3919 3919
3920 TRACE_FUNCTION("mfw_phlock_disable_lock()"); 3920 TRACE_FUNCTION("mfw_phlock_disable_lock()");
3921 if( lcktyp == MFW_PH_LOCK ) 3921 if( lcktyp == MFW_PH_LOCK )
3922 lckFac = FAC_Pl; 3922 lckFac = FAC_Pl;
3923 3923
3924 ret = sAT_PlusCLCK(CMD_SRC_LCL,lckFac,CLCK_MOD_Unlock,(char*)pin,CLASS_NotPresent) ; 3924 ret = sAT_PlusCLCK(CMD_SRC_LCL,lckFac,CLCK_MOD_Unlock,(char*)pin,CLASS_NotPresent) ;
3925 if(ret != AT_CMPL) 3925 if(ret != AT_CMPL)
3926 return MFW_SS_FAIL; 3926 return MFW_SS_FAIL;
3927 else 3927 else
3928 return MFW_SS_OK; 3928 return MFW_SS_OK;
3929 } 3929 }
3931 /******************************************************************************* 3931 /*******************************************************************************
3932 $Function: mfw_phlock_disable_autoLock 3932 $Function: mfw_phlock_disable_autoLock
3933 $Description: disables the auto lock when user selects Autolock Off option from menu 3933 $Description: disables the auto lock when user selects Autolock Off option from menu
3934 $Returns: success or failure 3934 $Returns: success or failure
3935 $Arguments: type of lock and password 3935 $Arguments: type of lock and password
3936 3936
3937 *******************************************************************************/ 3937 *******************************************************************************/
3938 T_MFW_SS_RETURN mfw_phlock_disable_autoLock( S16 lcktyp) 3938 T_MFW_SS_RETURN mfw_phlock_disable_autoLock( S16 lcktyp)
3939 { 3939 {
3940 T_ACI_FAC lckFac=FAC_NotPresent; 3940 T_ACI_FAC lckFac=FAC_NotPresent;
3941 T_ACI_RETURN ret; 3941 T_ACI_RETURN ret;
3942 3942
3943 TRACE_FUNCTION("mfw_phlock_disable_lock()"); 3943 TRACE_FUNCTION("mfw_phlock_disable_lock()");
3944 if( lcktyp == MFW_AUTO_PH_LOCK ) 3944 if( lcktyp == MFW_AUTO_PH_LOCK )
3945 lckFac = FAC_Apl; 3945 lckFac = FAC_Apl;
3946 3946
3947 if( mfw_phlock_get_autolock_status(MFW_AUTO_PH_LOCK) == MFW_PH_LOCK_ENABLE ) 3947 if( mfw_phlock_get_autolock_status(MFW_AUTO_PH_LOCK) == MFW_PH_LOCK_ENABLE )
3948 { 3948 {
3949 ret = sAT_PlusCLCK(CMD_SRC_LCL,lckFac,CLCK_MOD_Unlock,NULL,CLASS_NotPresent) ; 3949 ret = sAT_PlusCLCK(CMD_SRC_LCL,lckFac,CLCK_MOD_Unlock,NULL,CLASS_NotPresent) ;
3950 3950
3951 if(ret != AT_CMPL) 3951 if(ret != AT_CMPL)
3952 return MFW_SS_FAIL; 3952 return MFW_SS_FAIL;
3953 else 3953 else
3959 } 3959 }
3960 } 3960 }
3961 3961
3962 /******************************************************************************* 3962 /*******************************************************************************
3963 $Function: mfw_phlock_change_lock_code 3963 $Function: mfw_phlock_change_lock_code
3964 $Description: Changes the oldpassword with the new one for the given 3964 $Description: Changes the oldpassword with the new one for the given
3965 lock type 3965 lock type
3966 $Returns: success or failure 3966 $Returns: success or failure
3967 $Arguments: type of lock and old and new password 3967 $Arguments: type of lock and old and new password
3968 3968
3969 *******************************************************************************/ 3969 *******************************************************************************/
3970 T_MFW mfw_phlock_change_lock_code(int type,char*oldpswd,char* newpswd) 3970 T_MFW mfw_phlock_change_lock_code(int type,char*oldpswd,char* newpswd)
3971 { 3971 {
3972 T_ACI_FAC lckType=FAC_NotPresent; 3972 T_ACI_FAC lckType=FAC_NotPresent;
3973 T_ACI_RETURN ret; 3973 T_ACI_RETURN ret;
3992 3992
3993 /******************************************************************************* 3993 /*******************************************************************************
3994 3994
3995 $Function: mfw_set_Auto_Phlock_status 3995 $Function: mfw_set_Auto_Phlock_status
3996 3996
3997 $Description: set /resets the AutoPhlockStatus bit in Phlock_flag 3997 $Description: set /resets the AutoPhlockStatus bit in Phlock_flag
3998 3998
3999 $Returns: none. 3999 $Returns: none.
4000 4000
4001 $Arguments: 4001 $Arguments:
4002 4002
4014 4014
4015 /******************************************************************************* 4015 /*******************************************************************************
4016 4016
4017 $Function: mfw_get_Auto_Phlock_status 4017 $Function: mfw_get_Auto_Phlock_status
4018 4018
4019 $Description: returns the AutoPhlockStatus status from Phlock_flag 4019 $Description: returns the AutoPhlockStatus status from Phlock_flag
4020 4020
4021 $Returns: none. 4021 $Returns: none.
4022 4022
4023 $Arguments: 4023 $Arguments:
4024 4024
4036 4036
4037 /******************************************************************************* 4037 /*******************************************************************************
4038 4038
4039 $Function: mfw_set_Phlock_status 4039 $Function: mfw_set_Phlock_status
4040 4040
4041 $Description: set /resets the PhlockStatus bit in Phlock_flag 4041 $Description: set /resets the PhlockStatus bit in Phlock_flag
4042 4042
4043 $Returns: none. 4043 $Returns: none.
4044 4044
4045 $Arguments: 4045 $Arguments:
4046 4046
4058 4058
4059 /******************************************************************************* 4059 /*******************************************************************************
4060 4060
4061 $Function: mfw_get_Phlock_status 4061 $Function: mfw_get_Phlock_status
4062 4062
4063 $Description: returns the PhlockStatus status from Phlock_flag 4063 $Description: returns the PhlockStatus status from Phlock_flag
4064 4064
4065 $Returns: none. 4065 $Returns: none.
4066 4066
4067 $Arguments: 4067 $Arguments:
4068 4068