FreeCalypso > hg > freecalypso-sw
comparison gsm-fw/g23m-gsm/rr/rr_atts.c @ 734:abfc662e0082
rr_atts.c compiles
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Sun, 05 Oct 2014 07:51:55 +0000 |
parents | 2f7df7a314f8 |
children |
comparison
equal
deleted
inserted
replaced
733:d01d6b3ac2a9 | 734:abfc662e0082 |
---|---|
19 */ | 19 */ |
20 | 20 |
21 #ifndef RR_ATTS_C | 21 #ifndef RR_ATTS_C |
22 #define RR_ATTS_C | 22 #define RR_ATTS_C |
23 | 23 |
24 #include "config.h" | |
25 #include "fixedconf.h" | |
26 #include "condat-features.h" | |
27 | |
24 #define ENTITY_RR | 28 #define ENTITY_RR |
25 | 29 |
26 /*==== INCLUDES ===================================================*/ | 30 /*==== INCLUDES ===================================================*/ |
27 | 31 |
28 #include <string.h> | 32 #include <string.h> |
109 { | 113 { |
110 att_notify_stop_plmn_search (FALSE); | 114 att_notify_stop_plmn_search (FALSE); |
111 TRACE_EVENT(" PLMN_SEARCH_STOPPED"); | 115 TRACE_EVENT(" PLMN_SEARCH_STOPPED"); |
112 } | 116 } |
113 | 117 |
114 | |
115 /* | 118 /* |
116 * If network search is ongoing, abort | 119 * If network search is ongoing, abort |
117 * and allow cell reselection. | 120 * and allow cell reselection. |
118 */ | 121 */ |
119 if (rr_data->ms_data.req_mm_service EQ FUNC_NET_SRCH_BY_MMI) | 122 if (rr_data->ms_data.req_mm_service EQ FUNC_NET_SRCH_BY_MMI) |
307 UBYTE ncell_ext, | 310 UBYTE ncell_ext, |
308 T_SI_TYPE si_type) | 311 T_SI_TYPE si_type) |
309 | 312 |
310 { | 313 { |
311 GET_INSTANCE_DATA; | 314 GET_INSTANCE_DATA; |
312 /* | 315 /* |
313 * get the storage area by checking the channel number | 316 * get the storage area by checking the channel number |
314 */ | 317 */ |
315 UBYTE index = att_get_index (arfcn); | 318 UBYTE index = att_get_index (arfcn); |
316 | 319 |
317 TRACE_FUNCTION ("att_for_sysinfo_type2_2bis()"); | 320 TRACE_FUNCTION ("att_for_sysinfo_type2_2bis()"); |
408 | 411 |
409 case CR_INDEX: | 412 case CR_INDEX: |
410 /* | 413 /* |
411 * for 2 case:system information 2 is only important to speed up the | 414 * for 2 case:system information 2 is only important to speed up the |
412 * PLMN available search. | 415 * PLMN available search. |
413 * for 2bis case:system information type 2bis message is stored. This is needed | 416 * for 2bis case:system information type 2bis message is stored. |
417 * This is needed | |
414 * for PLMN available search. Really taken in account after | 418 * for PLMN available search. Really taken in account after |
415 * reception of system info 2,3 or 4. | 419 * reception of system info 2,3 or 4. |
416 */ | 420 */ |
417 att_copy_sys_info_2_2bis_par (CR_INDEX, | 421 att_copy_sys_info_2_2bis_par (CR_INDEX, |
418 sys_info_2_2bis, | 422 sys_info_2_2bis, |
420 ncell_ext, | 424 ncell_ext, |
421 si_type, | 425 si_type, |
422 FALSE); | 426 FALSE); |
423 if (si_type EQ SI_TYPE_2) | 427 if (si_type EQ SI_TYPE_2) |
424 { | 428 { |
425 /* | 429 /* |
426 * if all is read, add the PLMN to the found list | 430 * if all is read, add the PLMN to the found list |
427 */ | 431 */ |
428 switch (rr_data->ms_data.req_mm_service) | 432 switch (rr_data->ms_data.req_mm_service) |
429 { | 433 { |
430 case FUNC_NET_SRCH_BY_MMI: | 434 case FUNC_NET_SRCH_BY_MMI: |
431 att_check_bcch_carrier_si (); | 435 att_check_bcch_carrier_si (); |
432 break; | 436 break; |
619 */ | 623 */ |
620 att_copy_sys_info_3_par (CR_INDEX, | 624 att_copy_sys_info_3_par (CR_INDEX, |
621 sys_info_3, | 625 sys_info_3, |
622 FALSE); | 626 FALSE); |
623 /* | 627 /* |
624 * During Cell Selection if received SI3 from a PLMN which doesn't match | 628 * During Cell Selection if received SI3 from a PLMN which doesn't match |
625 * requested PLMN then no need to wait for remaining SI messages | 629 * requested PLMN then no need to wait for remaining SI messages |
626 * The First Scan First Attempt is for Full Service search and only | 630 * The First Scan First Attempt is for Full Service search and only |
627 * the carriers with Normal Priority is scanned and for this if the PLMN | 631 * the carriers with Normal Priority is scanned and for this if the |
628 * doesnot match, then no need to read remaining SIs. In the sucessive scans | 632 * PLMN doesnot match, then no need to read remaining SIs. In the |
629 * i.e First Scan Second Attempt and Second scan all the carriers are scanned | 633 * successive scans i.e First Scan Second Attempt and Second scan all |
630 * irrespective of the priority and all the SI messages need to be read. | 634 * the carriers are scanned irrespective of the priority and all the SI |
635 * messages need to be read. | |
631 */ | 636 */ |
632 if ((rr_data->cs_data.scan_mode EQ CS_FIRST_SCAN_FIRST_ATTEMPT) AND | 637 if ((rr_data->cs_data.scan_mode EQ CS_FIRST_SCAN_FIRST_ATTEMPT) AND |
633 (rr_data->ms_data.req_mm_service EQ FUNC_PLMN_SRCH) AND | 638 (rr_data->ms_data.req_mm_service EQ FUNC_PLMN_SRCH) AND |
634 (!dat_plmn_equal_req (sys_info_3->loc_area_ident.mcc, | 639 (!dat_plmn_equal_req (sys_info_3->loc_area_ident.mcc, |
635 sys_info_3->loc_area_ident.mnc, | 640 sys_info_3->loc_area_ident.mnc, |
722 * depending on the requested MM service | 727 * depending on the requested MM service |
723 */ | 728 */ |
724 | 729 |
725 /* Implements RR Clone findings #30 */ | 730 /* Implements RR Clone findings #30 */ |
726 att_sys_info_read(SYS_INFO_4_READ); | 731 att_sys_info_read(SYS_INFO_4_READ); |
727 | |
728 | |
729 | |
730 break; | 732 break; |
731 | 733 |
732 case NOT_PRESENT_8BIT: | 734 case NOT_PRESENT_8BIT: |
733 /* | 735 /* |
734 * unexpected channel number | 736 * unexpected channel number |
823 */ | 825 */ |
824 att_copy_sys_info_4_par (CR_INDEX, | 826 att_copy_sys_info_4_par (CR_INDEX, |
825 sys_info_4, | 827 sys_info_4, |
826 FALSE); | 828 FALSE); |
827 /* | 829 /* |
828 * During Cell Selection if received SI4 from a PLMN which doesn't match | 830 * During Cell Selection if received SI4 from a PLMN which doesn't match |
829 * requested PLMN then no need to wait for remaining SI messages | 831 * requested PLMN then no need to wait for remaining SI messages |
830 * The First Scan First Attempt is for Full Service search and only | 832 * The First Scan First Attempt is for Full Service search and only |
831 * the carriers with Normal Priority is scanned and for this if the PLMN | 833 * the carriers with Normal Priority is scanned and for this if the |
832 * doesnot match, then no need to read remaining SIs. In the sucessive scans | 834 * PLMN doesnot match, then no need to read remaining SIs. In the |
833 * i.e First Scan Second Attempt and Second scan all the carriers are scanned | 835 * successive scans i.e First Scan Second Attempt and Second scan all |
834 * irrespective of the priority and all the SI messages need to be read. | 836 * the carriers are scanned irrespective of the priority and all the SI |
837 * messages need to be read. | |
835 */ | 838 */ |
836 if ((rr_data->cs_data.scan_mode EQ CS_FIRST_SCAN_FIRST_ATTEMPT) AND | 839 if ((rr_data->cs_data.scan_mode EQ CS_FIRST_SCAN_FIRST_ATTEMPT) AND |
837 (rr_data->ms_data.req_mm_service EQ FUNC_PLMN_SRCH) AND | 840 (rr_data->ms_data.req_mm_service EQ FUNC_PLMN_SRCH) AND |
838 (!dat_plmn_equal_req (sys_info_4->loc_area_ident.mcc, | 841 (!dat_plmn_equal_req (sys_info_4->loc_area_ident.mcc, |
839 sys_info_4->loc_area_ident.mnc, | 842 sys_info_4->loc_area_ident.mnc, |
850 #endif | 853 #endif |
851 } | 854 } |
852 #ifdef GPRS | 855 #ifdef GPRS |
853 else | 856 else |
854 { | 857 { |
855 if (!sys_info_4->cell_select.acs) | 858 if (!sys_info_4->cell_select.acs) |
856 { | 859 { |
857 att_check_gprs_supp(sys_info_4->si4_rest_oct.v_gprs_indic, | 860 att_check_gprs_supp(sys_info_4->si4_rest_oct.v_gprs_indic, |
858 &sys_info_4->si4_rest_oct.gprs_indic); | 861 &sys_info_4->si4_rest_oct.gprs_indic); |
859 } | 862 } |
860 } | 863 } |
861 #endif | 864 #endif |
862 att_check_bcch_carrier_si (); | 865 att_check_bcch_carrier_si (); |
863 } | 866 } |
864 break; | 867 break; |
942 * depending on the service requested by MM | 945 * depending on the service requested by MM |
943 */ | 946 */ |
944 | 947 |
945 /* Implements RR Clone findings #30 */ | 948 /* Implements RR Clone findings #30 */ |
946 att_sys_info_read(SYS_INFO_3_READ); | 949 att_sys_info_read(SYS_INFO_3_READ); |
947 | |
948 | |
949 break; | 950 break; |
950 | 951 |
951 default: | 952 default: |
952 { | 953 { |
953 BOOL plmn_ok = TRUE; | 954 BOOL plmn_ok = TRUE; |
996 /*unify functions: att_for_sysinfo_type5, att_for_sysinfo_type5bis by adding a parameter si_type*/ | 997 /*unify functions: att_for_sysinfo_type5, att_for_sysinfo_type5bis by adding a parameter si_type*/ |
997 | 998 |
998 /* | 999 /* |
999 +--------------------------------------------------------------------+ | 1000 +--------------------------------------------------------------------+ |
1000 | PROJECT : GSM-PS (6147) MODULE : RR_ATT | | 1001 | PROJECT : GSM-PS (6147) MODULE : RR_ATT | |
1001 | STATE : code ROUTINE : att_for_sysinfo_type5_5bis | | 1002 | STATE : code ROUTINE : att_for_sysinfo_type5_5bis | |
1002 +--------------------------------------------------------------------+ | 1003 +--------------------------------------------------------------------+ |
1003 | 1004 |
1004 PURPOSE : This function handles the system information type 5 and 5bis | 1005 PURPOSE : This function handles the system information type 5 and 5bis |
1005 common parameters. | 1006 common parameters. |
1006 | 1007 |
1011 UBYTE ncell_ext, | 1012 UBYTE ncell_ext, |
1012 T_SI_TYPE si_type) | 1013 T_SI_TYPE si_type) |
1013 | 1014 |
1014 { | 1015 { |
1015 GET_INSTANCE_DATA; | 1016 GET_INSTANCE_DATA; |
1016 /* | 1017 /* |
1017 * calculate the index for the channel | 1018 * calculate the index for the channel |
1018 */ | 1019 */ |
1019 UBYTE index = att_get_index (arfcn); | 1020 UBYTE index = att_get_index (arfcn); |
1020 | 1021 |
1021 USHORT cur_si_type_read; /*Current SI type*/ | 1022 USHORT cur_si_type_read; /*Current SI type*/ |
1036 { | 1037 { |
1037 case ATT_DEDICATED: | 1038 case ATT_DEDICATED: |
1038 case ATT_CON_EST: | 1039 case ATT_CON_EST: |
1039 if (dat_check_error_flag (SEND_NO_RR_STATUS)) | 1040 if (dat_check_error_flag (SEND_NO_RR_STATUS)) |
1040 { | 1041 { |
1041 /* | 1042 /* |
1042 * receiving a modified BA indicator forces discarding the current BA | 1043 * receiving a modified BA indicator forces discarding the current BA |
1043 * receiving a SI5 while the bit SYS_INFO_5_READ is set or | 1044 * receiving a SI5 while the bit SYS_INFO_5_READ is set or |
1044 * receiving a SI5Bis while the bit SYS_INFO_5Bis_READ is set | 1045 * receiving a SI5Bis while the bit SYS_INFO_5Bis_READ is set |
1045 * indicates a change of the BA list | 1046 * indicates a change of the BA list |
1046 * => clear old channel list | 1047 * => clear old channel list |
1047 * => delete other SI5x read bit mask | 1048 * => delete other SI5x read bit mask |
1048 */ | 1049 */ |
1049 if(si_type EQ SI_TYPE_5) | 1050 if(si_type EQ SI_TYPE_5) |
1050 { | 1051 { |
1051 cur_si_type_read = SYS_INFO_5_READ; | 1052 cur_si_type_read = SYS_INFO_5_READ; |
1052 oth_si_type_read = SYS_INFO_5BIS_READ; | 1053 oth_si_type_read = SYS_INFO_5BIS_READ; |
1053 oth_si_to_clean = IND_SI_5BIS; | 1054 oth_si_to_clean = IND_SI_5BIS; |
1078 new_5_5bis_list, | 1079 new_5_5bis_list, |
1079 sizeof (T_LIST)); | 1080 sizeof (T_LIST)); |
1080 } | 1081 } |
1081 else | 1082 else |
1082 { | 1083 { |
1083 /* | 1084 /* |
1084 * SI5bis/SI5 received before | 1085 * SI5bis/SI5 received before |
1085 * merge list of sys info 5/sys info 5bis with the old neighbour cell list | 1086 * merge list of sys info 5/sys info 5bis with the old neighbour |
1086 */ | 1087 * cell list |
1088 */ | |
1087 srv_merge_list (&rr_data->sc_data.cd.ncell_list, new_5_5bis_list); | 1089 srv_merge_list (&rr_data->sc_data.cd.ncell_list, new_5_5bis_list); |
1088 } | 1090 } |
1089 /* CSI-LLD section:4.1.1.11 | 1091 /* CSI-LLD section:4.1.1.11 |
1090 * This function Updates the black list with the BA list received in si5/si5bis | 1092 * This function Updates the black list with the BA list received in |
1093 * si5/si5bis | |
1091 */ | 1094 */ |
1092 cs_remove_BA_MA_from_black_list(rr_data->cs_data.region,new_5_5bis_list); | 1095 cs_remove_BA_MA_from_black_list(rr_data->cs_data.region,new_5_5bis_list); |
1093 | 1096 |
1094 /* | 1097 /* |
1095 * set concerning bit mask | 1098 * set concerning bit mask |
1775 ncell_ext, | 1778 ncell_ext, |
1776 indicate_changes); | 1779 indicate_changes); |
1777 } | 1780 } |
1778 | 1781 |
1779 } | 1782 } |
1780 | |
1781 | 1783 |
1782 #endif | 1784 #endif |