FreeCalypso > hg > freecalypso-sw
comparison gsm-fw/g23m-gsm/rr/rr_csf.c @ 736:c64af13c976f
rr_csf.c compiles
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Sun, 05 Oct 2014 17:08:49 +0000 |
parents | 2f7df7a314f8 |
children | 1fa8ada742ff |
comparison
equal
deleted
inserted
replaced
735:458366ab2d6d | 736:c64af13c976f |
---|---|
20 */ | 20 */ |
21 | 21 |
22 #ifndef RR_CSF_C | 22 #ifndef RR_CSF_C |
23 #define RR_CSF_C | 23 #define RR_CSF_C |
24 | 24 |
25 #include "config.h" | |
26 #include "fixedconf.h" | |
27 #include "condat-features.h" | |
28 | |
25 #define ENTITY_RR | 29 #define ENTITY_RR |
26 #define SAP_ACI | 30 #define SAP_ACI |
27 | 31 |
28 /*==== INCLUDES ===================================================*/ | 32 /*==== INCLUDES ===================================================*/ |
29 | 33 |
43 #include "cnf_rr.h" | 47 #include "cnf_rr.h" |
44 #include "tok.h" | 48 #include "tok.h" |
45 #include "rr.h" | 49 #include "rr.h" |
46 #include "cl_imei.h" /* IMEI common library */ | 50 #include "cl_imei.h" /* IMEI common library */ |
47 #if defined(_SIMULATION_FFS_) | 51 #if defined(_SIMULATION_FFS_) |
48 #include "ffs/ffs.h" | 52 #include "../../services/ffs/ffs.h" |
49 #include "ffs_coat.h" | 53 #include "ffs_coat.h" |
50 #endif /* _SIMULATION_FFS_ */ | 54 #endif /* _SIMULATION_FFS_ */ |
51 | 55 |
52 /*==== EXPORT =====================================================*/ | 56 /*==== EXPORT =====================================================*/ |
53 | 57 |
528 if (rr_data->ms_data.cmsp_configured) | 532 if (rr_data->ms_data.cmsp_configured) |
529 { | 533 { |
530 rr_data->ms_data.rf_cap.cmsp = cmsp; | 534 rr_data->ms_data.rf_cap.cmsp = cmsp; |
531 TRACE_EVENT_P1 ("'cmsp' configured to a value of %d (overwrite of rfcap)", cmsp); | 535 TRACE_EVENT_P1 ("'cmsp' configured to a value of %d (overwrite of rfcap)", cmsp); |
532 } | 536 } |
533 | |
534 | |
535 | 537 |
536 #if defined(RFCAP_TEST) | 538 #if defined(RFCAP_TEST) |
537 if (ccd_ret NEQ ccdOK) | 539 if (ccd_ret NEQ ccdOK) |
538 { | 540 { |
539 /* | 541 /* |
884 #endif /* !RAC_RELEASE97 */ | 886 #endif /* !RAC_RELEASE97 */ |
885 #endif | 887 #endif |
886 break; | 888 break; |
887 case STD_DUAL_EGSM: | 889 case STD_DUAL_EGSM: |
888 /* note: incase of 1800 band, the FC bit shall be set to 0 */ | 890 /* note: incase of 1800 band, the FC bit shall be set to 0 */ |
889 if((rr_data->ms_data.rr_service EQ FULL_SERVICE) AND | 891 if ((rr_data->ms_data.rr_service EQ FULL_SERVICE) AND |
890 (!INRANGE(LOW_CHANNEL_1800,rr_data->nc_data[SC_INDEX].arfcn,HIGH_CHANNEL_1800))) | 892 (!INRANGE(LOW_CHANNEL_1800, rr_data->nc_data[SC_INDEX].arfcn, |
891 cm2->egsm = SUPPORTED; | 893 HIGH_CHANNEL_1800))) |
894 cm2->egsm = SUPPORTED; | |
892 cm3->mb_value = MB_DUAL_EXT; | 895 cm3->mb_value = MB_DUAL_EXT; |
893 #ifdef GPRS | 896 #ifdef GPRS |
894 rac->acc_tech_typ = ACC_GSM_E; | 897 rac->acc_tech_typ = ACC_GSM_E; |
895 rac->flag_ra_cap2 = rac->v_ra_cap2 = YES; | 898 rac->flag_ra_cap2 = rac->v_ra_cap2 = YES; |
896 rac->ra_cap2.acc_tech_typ = ACC_GSM_1800; | 899 rac->ra_cap2.acc_tech_typ = ACC_GSM_1800; |
985 case STD_DUAL_US: | 988 case STD_DUAL_US: |
986 cm3->v_gsm850_cap = SUPPORTED; | 989 cm3->v_gsm850_cap = SUPPORTED; |
987 cm3->gsm850_cap = rfc->rf_power.pow_class4[IDX_PWRCLASS_850].pow_class; | 990 cm3->gsm850_cap = rfc->rf_power.pow_class4[IDX_PWRCLASS_850].pow_class; |
988 cm3->v_pcs1900_cap = SUPPORTED; | 991 cm3->v_pcs1900_cap = SUPPORTED; |
989 cm3->pcs1900_cap = rfc->rf_power.pow_class4[IDX_PWRCLASS_1900].pow_class; | 992 cm3->pcs1900_cap = rfc->rf_power.pow_class4[IDX_PWRCLASS_1900].pow_class; |
990 /* note: in case the sc isīnt set, it is out of range */ | 993 /* note: in case the sc isn't set, it is out of range */ |
991 if (INRANGE(LOW_CHANNEL_1900,serving_cell,HIGH_CHANNEL_1900)) | 994 if (INRANGE(LOW_CHANNEL_1900,serving_cell,HIGH_CHANNEL_1900)) |
992 cm2->rf_pow_cap = cm3->pcs1900_cap - 1; | 995 cm2->rf_pow_cap = cm3->pcs1900_cap - 1; |
993 else | 996 else |
994 cm2->rf_pow_cap = cm3->gsm850_cap - 1; | 997 cm2->rf_pow_cap = cm3->gsm850_cap - 1; |
995 #ifdef GPRS | 998 #ifdef GPRS |
1139 rac->acc_cap.v_ms_struct = SUPPORTED; | 1142 rac->acc_cap.v_ms_struct = SUPPORTED; |
1140 rac->acc_cap.ms_struct.v_hscsd_ms_class = SUPPORTED; | 1143 rac->acc_cap.ms_struct.v_hscsd_ms_class = SUPPORTED; |
1141 rac->acc_cap.ms_struct.hscsd_ms_class = rfc->rf_ms.hscsd_ms_class; | 1144 rac->acc_cap.ms_struct.hscsd_ms_class = rfc->rf_ms.hscsd_ms_class; |
1142 } | 1145 } |
1143 | 1146 |
1144 | |
1145 if (rfc->rf_ms.gprs_ms_class) | 1147 if (rfc->rf_ms.gprs_ms_class) |
1146 { | 1148 { |
1147 rac->acc_cap.v_ms_struct = SUPPORTED; | 1149 rac->acc_cap.v_ms_struct = SUPPORTED; |
1148 rac->acc_cap.ms_struct.v_gprs_struct = SUPPORTED; | 1150 rac->acc_cap.ms_struct.v_gprs_struct = SUPPORTED; |
1149 rac->acc_cap.ms_struct.gprs_struct.gprs_ms_class = rfc->rf_ms.gprs_ms_class; | 1151 rac->acc_cap.ms_struct.gprs_struct.gprs_ms_class = rfc->rf_ms.gprs_ms_class; |
1150 rac->acc_cap.ms_struct.gprs_struct.gprs_eda = rfc->gprs_eda; | 1152 rac->acc_cap.ms_struct.gprs_struct.gprs_eda = rfc->gprs_eda; |
1151 } | 1153 } |
1152 | |
1153 #endif | 1154 #endif |
1154 | 1155 |
1155 cm3->ext_meas = rfc->ext_meas; | 1156 cm3->ext_meas = rfc->ext_meas; |
1156 | 1157 |
1157 if (rfc->meas) | 1158 if (rfc->meas) |
1528 rac->v_ra_cap_r = YES; | 1529 rac->v_ra_cap_r = YES; |
1529 rac->c_ra_cap_r++; | 1530 rac->c_ra_cap_r++; |
1530 rac->ra_cap_r[0].ra_cap_values.v_acc_cap = YES; | 1531 rac->ra_cap_r[0].ra_cap_values.v_acc_cap = YES; |
1531 | 1532 |
1532 if (INRANGE(LOW_CHANNEL_1800,serving_cell,HIGH_CHANNEL_1800)) | 1533 if (INRANGE(LOW_CHANNEL_1800,serving_cell,HIGH_CHANNEL_1800)) |
1533 { | 1534 { |
1534 rac->ra_cap_values.acc_tech_typ = ACC_GSM_1800; | 1535 rac->ra_cap_values.acc_tech_typ = ACC_GSM_1800; |
1535 rac->ra_cap_r[0].ra_cap_values.acc_tech_typ = ACC_GSM_P; | 1536 rac->ra_cap_r[0].ra_cap_values.acc_tech_typ = ACC_GSM_P; |
1536 } | 1537 } |
1537 else | 1538 else |
1538 { | 1539 { |
1552 cm2->egsm = SUPPORTED; | 1553 cm2->egsm = SUPPORTED; |
1553 cm3->mb_value = MB_DUAL_EXT; | 1554 cm3->mb_value = MB_DUAL_EXT; |
1554 | 1555 |
1555 #ifdef GPRS | 1556 #ifdef GPRS |
1556 rac->v_ra_cap_r = YES; | 1557 rac->v_ra_cap_r = YES; |
1557 rac->c_ra_cap_r++; | 1558 rac->c_ra_cap_r++; |
1558 rac->ra_cap_r[0].ra_cap_values.v_acc_cap = YES; | 1559 rac->ra_cap_r[0].ra_cap_values.v_acc_cap = YES; |
1559 | 1560 |
1560 if (INRANGE(LOW_CHANNEL_1800,serving_cell,HIGH_CHANNEL_1800)) | 1561 if (INRANGE(LOW_CHANNEL_1800,serving_cell,HIGH_CHANNEL_1800)) |
1561 { | 1562 { |
1562 rac->ra_cap_values.acc_tech_typ = ACC_GSM_1800; | 1563 rac->ra_cap_values.acc_tech_typ = ACC_GSM_1800; |
1668 cm3->v_gsm850_cap = SUPPORTED; | 1669 cm3->v_gsm850_cap = SUPPORTED; |
1669 cm3->gsm850_cap = rfc->rf_power.pow_class4[IDX_PWRCLASS_850].pow_class; | 1670 cm3->gsm850_cap = rfc->rf_power.pow_class4[IDX_PWRCLASS_850].pow_class; |
1670 cm3->v_pcs1900_cap = SUPPORTED; | 1671 cm3->v_pcs1900_cap = SUPPORTED; |
1671 cm3->pcs1900_cap = rfc->rf_power.pow_class4[IDX_PWRCLASS_1900].pow_class; | 1672 cm3->pcs1900_cap = rfc->rf_power.pow_class4[IDX_PWRCLASS_1900].pow_class; |
1672 | 1673 |
1673 /* note: in case the sc isīnt set, it is out of range */ | 1674 /* note: in case the sc isn't set, it is out of range */ |
1674 if (INRANGE(LOW_CHANNEL_1900,serving_cell,HIGH_CHANNEL_1900)) | 1675 if (INRANGE(LOW_CHANNEL_1900,serving_cell,HIGH_CHANNEL_1900)) |
1675 cm2->rf_pow_cap = cm3->pcs1900_cap - 1; | 1676 cm2->rf_pow_cap = cm3->pcs1900_cap - 1; |
1676 else | 1677 else |
1677 cm2->rf_pow_cap = cm3->gsm850_cap - 1; | 1678 cm2->rf_pow_cap = cm3->gsm850_cap - 1; |
1678 | 1679 |
1691 rac->ra_cap_values.acc_tech_typ = ACC_GSM_850; | 1692 rac->ra_cap_values.acc_tech_typ = ACC_GSM_850; |
1692 rac->ra_cap_r[0].ra_cap_values.acc_tech_typ = ACC_GSM_1900; | 1693 rac->ra_cap_r[0].ra_cap_values.acc_tech_typ = ACC_GSM_1900; |
1693 rac->ra_cap_values.acc_cap.pow_class = cm3->gsm850_cap; | 1694 rac->ra_cap_values.acc_cap.pow_class = cm3->gsm850_cap; |
1694 rac->ra_cap_r[0].ra_cap_values.acc_cap.pow_class = cm3->pcs1900_cap; | 1695 rac->ra_cap_r[0].ra_cap_values.acc_cap.pow_class = cm3->pcs1900_cap; |
1695 } | 1696 } |
1696 rac->ra_cap_r[0].ra_cap_values.acc_cap.v_a5_bits = NOT_SUPPORTED; | 1697 rac->ra_cap_r[0].ra_cap_values.acc_cap.v_a5_bits = NOT_SUPPORTED; |
1697 rac->ra_cap_r[0].ra_cap_values.acc_cap.v_ms_struct = NOT_SUPPORTED; | 1698 rac->ra_cap_r[0].ra_cap_values.acc_cap.v_ms_struct = NOT_SUPPORTED; |
1698 rac->ra_cap_r[0].ra_cap_values.acc_cap.v_pow_8psk_cap = NOT_SUPPORTED; | 1699 rac->ra_cap_r[0].ra_cap_values.acc_cap.v_pow_8psk_cap = NOT_SUPPORTED; |
1699 #endif | 1700 #endif |
1700 break; | 1701 break; |
1701 | 1702 |
1858 cm1->rf_pow_cap = cm2->rf_pow_cap; | 1859 cm1->rf_pow_cap = cm2->rf_pow_cap; |
1859 | 1860 |
1860 #if defined(_SIMULATION_) && defined(RFCAP_TEST) | 1861 #if defined(_SIMULATION_) && defined(RFCAP_TEST) |
1861 rr_csf_trace_power (); | 1862 rr_csf_trace_power (); |
1862 #endif /* RFCAP_TEST*/ | 1863 #endif /* RFCAP_TEST*/ |
1863 | |
1864 | 1864 |
1865 /*Set 8psk capability in uplink for EGPRS*/ | 1865 /*Set 8psk capability in uplink for EGPRS*/ |
1866 #if defined(FF_EGPRS) | 1866 #if defined(FF_EGPRS) |
1867 | 1867 |
1868 /*Initialize with 8psk is not supported in uplink*/ | 1868 /*Initialize with 8psk is not supported in uplink*/ |
1951 rac->ra_cap_values.acc_cap.pow_8psk_cap = rfc->rf_power.egde_pow1; | 1951 rac->ra_cap_values.acc_cap.pow_8psk_cap = rfc->rf_power.egde_pow1; |
1952 TRACE_EVENT_P1 ("5: 8PSK SUPPORTED (EGPRS) POWER CLASS E1 = %d",rac->ra_cap_values.acc_cap.pow_8psk_cap); | 1952 TRACE_EVENT_P1 ("5: 8PSK SUPPORTED (EGPRS) POWER CLASS E1 = %d",rac->ra_cap_values.acc_cap.pow_8psk_cap); |
1953 } | 1953 } |
1954 if (rfc->rf_power.egde_pow2) | 1954 if (rfc->rf_power.egde_pow2) |
1955 { | 1955 { |
1956 /*Set 8psk capability for 850/900*/ | 1956 /*Set 8psk capability for 850/900*/ |
1957 cm3->v_egde_struct = TRUE; | 1957 cm3->v_egde_struct = TRUE; |
1958 cm3->egde_struct.mod = SUPPORTED; | 1958 cm3->egde_struct.mod = SUPPORTED; |
1959 cm3->egde_struct.v_egde_pow2 = TRUE; | 1959 cm3->egde_struct.v_egde_pow2 = TRUE; |
1960 cm3->egde_struct.egde_pow2 = rfc->rf_power.egde_pow2; | 1960 cm3->egde_struct.egde_pow2 = rfc->rf_power.egde_pow2; |
1961 rac->ra_cap_r[0].ra_cap_values.acc_cap.v_pow_8psk_cap = TRUE; | 1961 rac->ra_cap_r[0].ra_cap_values.acc_cap.v_pow_8psk_cap = TRUE; |
2011 rac->ra_cap_values.acc_cap.ms_struct.v_gprs_struct = SUPPORTED; | 2011 rac->ra_cap_values.acc_cap.ms_struct.v_gprs_struct = SUPPORTED; |
2012 rac->ra_cap_values.acc_cap.ms_struct.gprs_struct.gprs_ms_class = rfc->rf_ms.gprs_ms_class; | 2012 rac->ra_cap_values.acc_cap.ms_struct.gprs_struct.gprs_ms_class = rfc->rf_ms.gprs_ms_class; |
2013 rac->ra_cap_values.acc_cap.ms_struct.gprs_struct.gprs_eda = rfc->gprs_eda; | 2013 rac->ra_cap_values.acc_cap.ms_struct.gprs_struct.gprs_eda = rfc->gprs_eda; |
2014 } | 2014 } |
2015 | 2015 |
2016 | |
2017 if (rfc->meas) | 2016 if (rfc->meas) |
2018 { | 2017 { |
2019 rac->ra_cap_values.acc_cap.ms_struct.v_sms_sm_value = SUPPORTED; | 2018 rac->ra_cap_values.acc_cap.ms_struct.v_sms_sm_value = SUPPORTED; |
2020 rac->ra_cap_values.acc_cap.ms_struct.sms_sm_value.sms_val = rfc->sms_val; | 2019 rac->ra_cap_values.acc_cap.ms_struct.sms_sm_value.sms_val = rfc->sms_val; |
2021 rac->ra_cap_values.acc_cap.ms_struct.sms_sm_value.sm_val = rfc->sm_val; | 2020 rac->ra_cap_values.acc_cap.ms_struct.sms_sm_value.sm_val = rfc->sm_val; |
2043 | 2042 |
2044 if ((rac->c_ra_cap_r > 0) AND rac->ra_cap_values.acc_cap.v_ms_struct) | 2043 if ((rac->c_ra_cap_r > 0) AND rac->ra_cap_values.acc_cap.v_ms_struct) |
2045 { | 2044 { |
2046 rac->v_ra_cap_r = TRUE; | 2045 rac->v_ra_cap_r = TRUE; |
2047 rac->ra_cap_r[0].ra_cap_values.acc_cap.rev99 = RELEASE99; | 2046 rac->ra_cap_r[0].ra_cap_values.acc_cap.rev99 = RELEASE99; |
2048 | |
2049 | 2047 |
2050 rac->ra_cap_r[0].ra_cap_values.acc_cap.compact = rfc->compact; | 2048 rac->ra_cap_r[0].ra_cap_values.acc_cap.compact = rfc->compact; |
2051 rac->ra_cap_r[0].ra_cap_values.acc_cap.es_ind = rfc->es_ind; | 2049 rac->ra_cap_r[0].ra_cap_values.acc_cap.es_ind = rfc->es_ind; |
2052 rac->ra_cap_r[0].ra_cap_values.acc_cap.ps = rfc->ps; | 2050 rac->ra_cap_r[0].ra_cap_values.acc_cap.ps = rfc->ps; |
2053 rac->ra_cap_r[0].ra_cap_values.acc_cap.vbs = rfc->vbs; | 2051 rac->ra_cap_r[0].ra_cap_values.acc_cap.vbs = rfc->vbs; |
2195 #ifdef FF_PS_RSSI | 2193 #ifdef FF_PS_RSSI |
2196 OR (new_qual NEQ rx_act_qual) | 2194 OR (new_qual NEQ rx_act_qual) |
2197 #endif | 2195 #endif |
2198 ) | 2196 ) |
2199 { | 2197 { |
2200 | |
2201 if ( GET_STATE (STATE_ATT) NEQ ATT_DEDICATED ) | 2198 if ( GET_STATE (STATE_ATT) NEQ ATT_DEDICATED ) |
2202 { | 2199 { |
2203 rx_act_value = new_value; | 2200 rx_act_value = new_value; |
2204 #ifdef FF_PS_RSSI | 2201 #ifdef FF_PS_RSSI |
2205 rx_act_qual = new_qual; | 2202 rx_act_qual = new_qual; |