FreeCalypso > hg > tcs211-l1-reconst
comparison chipsetsw/layer1/cfile/l1_async.c @ 35:e64cc501383c
l1_async.c compiles
author | Mychaela Falconia <falcon@ivan.Harhan.ORG> |
---|---|
date | Wed, 28 Oct 2015 03:00:06 +0000 |
parents | 86690c3bfa7c |
children | bd7effdeba68 |
comparison
equal
deleted
inserted
replaced
34:86690c3bfa7c | 35:e64cc501383c |
---|---|
3518 /* */ | 3518 /* */ |
3519 /* Reset messages (input): MPHC_STOP_CCCH_REQ */ | 3519 /* Reset messages (input): MPHC_STOP_CCCH_REQ */ |
3520 /* ----------------------- (MPHC_STOP_CCCH_CON) */ | 3520 /* ----------------------- (MPHC_STOP_CCCH_CON) */ |
3521 /* */ | 3521 /* */ |
3522 /*-------------------------------------------------------*/ | 3522 /*-------------------------------------------------------*/ |
3523 //Nina added | 3523 |
3524 /* | |
3525 * FreeCalypso Frankenstein: the source we got with LoCosto contains | |
3526 * some logic, apparently designed to increase opportunities for | |
3527 * deep sleep, marked with "Nina added" comments. This addition by | |
3528 * Nina showed up on our radar because it makes use of a new member | |
3529 * in the l1s structure which is not present in the TCS211 version | |
3530 * of this data structure, which we are not allowed to change while | |
3531 * deblobbing L1 one module at a time. I am going to turn Nina's | |
3532 * addition into a conditional compilation option. -- Mychaela | |
3533 */ | |
3534 | |
3535 #define NINA_ADDED 0 | |
3536 | |
3537 #if NINA_ADDED | |
3524 INT8 last_page_mode = 2; //REORG; | 3538 INT8 last_page_mode = 2; //REORG; |
3525 //End Nina added | 3539 #endif |
3540 | |
3526 void l1a_idle_serving_cell_paging_process(xSignalHeaderRec *msg) | 3541 void l1a_idle_serving_cell_paging_process(xSignalHeaderRec *msg) |
3527 { | 3542 { |
3528 enum states | 3543 enum states |
3529 { | 3544 { |
3530 RESET = 0, | 3545 RESET = 0, |
3558 l1a_l1s_com.l1s_en_task[EP] = TASK_DISABLED; // Reset EP task enable flag. | 3573 l1a_l1s_com.l1s_en_task[EP] = TASK_DISABLED; // Reset EP task enable flag. |
3559 l1a_l1s_com.l1s_en_task[ALLC] = TASK_DISABLED; // Reset ALLC (reorg) task enable flag. | 3574 l1a_l1s_com.l1s_en_task[ALLC] = TASK_DISABLED; // Reset ALLC (reorg) task enable flag. |
3560 | 3575 |
3561 // No Paging => no gauging => no Deep sleep | 3576 // No Paging => no gauging => no Deep sleep |
3562 //Nina modify to save power, not forbid deep sleep, only force gauging in next paging | 3577 //Nina modify to save power, not forbid deep sleep, only force gauging in next paging |
3578 #if NINA_ADDED | |
3563 if(l1s.force_gauging_next_paging_due_to_CCHR == 0) // Force gauging next paging | 3579 if(l1s.force_gauging_next_paging_due_to_CCHR == 0) // Force gauging next paging |
3580 #endif | |
3564 l1s.pw_mgr.enough_gaug = FALSE; // forbid Deep sleep | 3581 l1s.pw_mgr.enough_gaug = FALSE; // forbid Deep sleep |
3565 | 3582 |
3566 } | 3583 } |
3567 break; | 3584 break; |
3568 | 3585 |
3570 { | 3587 { |
3571 if (SignalCode == MPHC_START_CCCH_REQ) | 3588 if (SignalCode == MPHC_START_CCCH_REQ) |
3572 { | 3589 { |
3573 // download page mode from message (msg) | 3590 // download page mode from message (msg) |
3574 page_mode = ((T_MPHC_START_CCCH_REQ *)(msg->SigP))->page_mode; | 3591 page_mode = ((T_MPHC_START_CCCH_REQ *)(msg->SigP))->page_mode; |
3575 //Nina added | 3592 #if NINA_ADDED |
3576 if(((last_page_mode == NORMAL) && (page_mode == EXTENDED)) || | 3593 if(((last_page_mode == NORMAL) && (page_mode == EXTENDED)) || |
3577 ((last_page_mode == EXTENDED) && (page_mode == NORMAL))) | 3594 ((last_page_mode == EXTENDED) && (page_mode == NORMAL))) |
3578 { | 3595 { |
3579 l1s.force_gauging_next_paging_due_to_CCHR = 1; | 3596 l1s.force_gauging_next_paging_due_to_CCHR = 1; |
3580 } | 3597 } |
3581 last_page_mode = page_mode; | 3598 last_page_mode = page_mode; |
3582 //End Nina added | 3599 #endif |
3583 | 3600 |
3584 if(page_mode == REORG) | 3601 if(page_mode == REORG) |
3585 // Request to enter the PAGING REORGANIZATION paging mode. | 3602 // Request to enter the PAGING REORGANIZATION paging mode. |
3586 //-------------------------------------------------------- | 3603 //-------------------------------------------------------- |
3587 // L1 must start the Serving cell paging monitoring in PAGING REORGANIZATION | 3604 // L1 must start the Serving cell paging monitoring in PAGING REORGANIZATION |
3829 { | 3846 { |
3830 if(SignalCode == MPHC_START_CCCH_REQ) | 3847 if(SignalCode == MPHC_START_CCCH_REQ) |
3831 { | 3848 { |
3832 // download paging mode from msg | 3849 // download paging mode from msg |
3833 page_mode = ((T_MPHC_START_CCCH_REQ *)(msg->SigP))->page_mode; | 3850 page_mode = ((T_MPHC_START_CCCH_REQ *)(msg->SigP))->page_mode; |
3834 //Nina added | 3851 #if NINA_ADDED |
3835 | 3852 |
3836 if(((last_page_mode == NORMAL) && (page_mode == EXTENDED)) || | 3853 if(((last_page_mode == NORMAL) && (page_mode == EXTENDED)) || |
3837 ((last_page_mode == EXTENDED) && (page_mode == NORMAL))) | 3854 ((last_page_mode == EXTENDED) && (page_mode == NORMAL))) |
3838 { | 3855 { |
3839 l1s.force_gauging_next_paging_due_to_CCHR = 1; | 3856 l1s.force_gauging_next_paging_due_to_CCHR = 1; |
3840 } | 3857 } |
3841 last_page_mode = page_mode; | 3858 last_page_mode = page_mode; |
3842 //End Nina added | 3859 #endif |
3843 if ((page_mode == NORMAL) || (page_mode == REORG)) | 3860 if ((page_mode == NORMAL) || (page_mode == REORG)) |
3844 { | 3861 { |
3845 // Step in state machine. | 3862 // Step in state machine. |
3846 *state = RESET; | 3863 *state = RESET; |
3847 } | 3864 } |
3965 l1a_l1s_com.l1s_en_task[NP] = TASK_ENABLED; // Set NP task enable flag. | 3982 l1a_l1s_com.l1s_en_task[NP] = TASK_ENABLED; // Set NP task enable flag. |
3966 l1a_l1s_com.l1s_en_task[EP] = TASK_ENABLED; // Set EP task enable flag also. | 3983 l1a_l1s_com.l1s_en_task[EP] = TASK_ENABLED; // Set EP task enable flag also. |
3967 | 3984 |
3968 // Paging parameters change => perform the gauging on the next paging | 3985 // Paging parameters change => perform the gauging on the next paging |
3969 //Nina modify to save power, not forbid deep sleep, only force gauging in next paging | 3986 //Nina modify to save power, not forbid deep sleep, only force gauging in next paging |
3987 #if NINA_ADDED | |
3970 if(l1s.force_gauging_next_paging_due_to_CCHR == 0) | 3988 if(l1s.force_gauging_next_paging_due_to_CCHR == 0) |
3989 #endif | |
3971 l1s.pw_mgr.enough_gaug = FALSE; // forbid Deep sleep until next gauging | 3990 l1s.pw_mgr.enough_gaug = FALSE; // forbid Deep sleep until next gauging |
3972 //End Nina modify | 3991 //End Nina modify |
3973 | 3992 |
3974 | 3993 |
3975 // end of process | 3994 // end of process |