comparison gsm-fw/g23m-gsm/rr/rr_dats.c @ 739:e915a56954ae

rr_dats.c compiles
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Sun, 05 Oct 2014 19:58:17 +0000
parents 2f7df7a314f8
children
comparison
equal deleted inserted replaced
738:9924ad35640f 739:e915a56954ae
20 */ 20 */
21 21
22 #ifndef RR_DATS_C 22 #ifndef RR_DATS_C
23 #define RR_DATS_C 23 #define RR_DATS_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 30
27 /*==== INCLUDES ===================================================*/ 31 /*==== INCLUDES ===================================================*/
28 32
29 #include <string.h> 33 #include <string.h>
642 &chan_rel->ba_range); 646 &chan_rel->ba_range);
643 } 647 }
644 648
645 EM_CHANNEL_RELEASE; 649 EM_CHANNEL_RELEASE;
646 } 650 }
647 PFREE (dl_data_ind); 651 PFREE (dl_data_ind);
648 } 652 }
649 653
650 /* 654 /*
651 +--------------------------------------------------------------------+ 655 +--------------------------------------------------------------------+
652 | PROJECT : GSM-PS (6147) MODULE : RR_DAT | 656 | PROJECT : GSM-PS (6147) MODULE : RR_DAT |
663 #else 667 #else
664 GLOBAL void dat_for_class_enq (T_DL_DATA_IND *dl_data_ind) 668 GLOBAL void dat_for_class_enq (T_DL_DATA_IND *dl_data_ind)
665 #endif 669 #endif
666 { 670 {
667 TRACE_FUNCTION ("dat_for_class_enq()"); 671 TRACE_FUNCTION ("dat_for_class_enq()");
668
669 672
670 if (dat_check_error_flag (SEND_RR_STATUS)) 673 if (dat_check_error_flag (SEND_RR_STATUS))
671 { 674 {
672 /* 675 /*
673 * The syntax check indicates no problems, then 676 * The syntax check indicates no problems, then
682 ((class_enq->v_class_enq_mask EQ TRUE) AND 685 ((class_enq->v_class_enq_mask EQ TRUE) AND
683 (class_enq->class_enq_mask.class_req EQ CLASS_CHANGE_REQ) ) ) 686 (class_enq->class_enq_mask.class_req EQ CLASS_CHANGE_REQ) ) )
684 #endif 687 #endif
685 dat_class_chng_data_req(); 688 dat_class_chng_data_req();
686 } 689 }
687
688 690
689 EM_CLASSMARK_ENQUIRY; 691 EM_CLASSMARK_ENQUIRY;
690 692
691 PFREE (dl_data_ind); 693 PFREE (dl_data_ind);
692 } 694 }
963 rr_data->sc_data.chan_desc.chan_type); 965 rr_data->sc_data.chan_desc.chan_type);
964 966
965 /* 967 /*
966 * store cipher parameter 968 * store cipher parameter
967 */ 969 */
968 rr_data->sc_data.ciph_on = ciph_cmd->ciph_mode_set.sc; 970 rr_data->sc_data.ciph_on = ciph_cmd->ciph_mode_set.sc;
969 971
970 rr_data->sc_data.algo = ciph_cmd->ciph_mode_set.algo_ident; 972 rr_data->sc_data.algo = ciph_cmd->ciph_mode_set.algo_ident;
971 rr_data->sc_data.ciph_received = TRUE; 973 rr_data->sc_data.ciph_received = TRUE;
972 memcpy (rr_data->ms_data.kc, rr_data->ms_data.new_kc, KC_STRING_SIZE); 974 memcpy (rr_data->ms_data.kc, rr_data->ms_data.new_kc, KC_STRING_SIZE);
973 975
1217 RR_EM_SET_HANDOVER_FAIL_CAUSE(rr_data->ms_data.error.val); 1219 RR_EM_SET_HANDOVER_FAIL_CAUSE(rr_data->ms_data.error.val);
1218 1220
1219 PFREE (dl_data_ind); 1221 PFREE (dl_data_ind);
1220 break; 1222 break;
1221 } 1223 }
1222
1223 1224
1224 default: 1225 default:
1225 /* 1226 /*
1226 * the message check has passed. 1227 * the message check has passed.
1227 * first of all suspend current layer 2 link 1228 * first of all suspend current layer 2 link
1365 1366
1366 PFREE (dl_data_ind); 1367 PFREE (dl_data_ind);
1367 return; 1368 return;
1368 } 1369 }
1369 } 1370 }
1370
1371 1371
1372 if(handov_cmd->v_mob_alloc_after) 1372 if(handov_cmd->v_mob_alloc_after)
1373 { 1373 {
1374 if(dat_for_handover_mob_alloc(mob_alloc, hop_list_after, (T_VOID_STRUCT *) &handov_cmd->mob_alloc_after,dl_data_ind)) 1374 if(dat_for_handover_mob_alloc(mob_alloc, hop_list_after, (T_VOID_STRUCT *) &handov_cmd->mob_alloc_after,dl_data_ind))
1375 return; 1375 return;
1434 1434
1435 /* 1435 /*
1436 * calculate the observed time difference from the relative 1436 * calculate the observed time difference from the relative
1437 * time difference of neighbourcell and serving cell 1437 * time difference of neighbourcell and serving cell
1438 * (given by time_alignment and frame offset) and the observed 1438 * (given by time_alignment and frame offset) and the observed
1439 * time difference of the serving cell (coming from timing advance 1439 * time difference of the serving cell (coming from timing
1440 * in layer 1 header of the downlink SACCH messages). 1440 * advance in layer 1 header of the downlink SACCH messages).
1441 */ 1441 */
1442 /* 1442 /*
1443 * A.1.3 of 3GPP TS 05.10 1443 * A.1.3 of 3GPP TS 05.10
1444 * after successful handover, either synchronized, 1444 * after successful handover, either synchronized,
1445 * non-synchronized or pseudo-synchronized, the MS shall provide 1445 * non-synchronized or pseudo-synchronized, the MS shall
1446 * to BTS 1 the value of OTD + t0 in the "HANDOVER COMPLETE" 1446 * provide to BTS 1 the value of OTD + t0 in the
1447 * message. 1447 * "HANDOVER COMPLETE" message.
1448 * 1448 *
1449 * NOTE : measurement_report.otd is the TA sent by the 1449 * NOTE : measurement_report.otd is the TA sent by the
1450 * network in downlink SACCH. TA is roundtrip propogation delay in bit periods. 1450 * network in downlink SACCH. TA is roundtrip propogation
1451 * t0 denotes the "one way" line of sight propagation delay between 1451 * delay in bit periods.
1452 * the MS and BTS 0, in "half bits". 1452 * t0 denotes the "one way" line of sight propagation delay
1453 * between the MS and BTS 0, in "half bits".
1453 * t0 = measurement_report.otd * 2 / 2. 1454 * t0 = measurement_report.otd * 2 / 2.
1454 */ 1455 */
1455 rr_data->sc_data.observed_ta = 1456 rr_data->sc_data.observed_ta =
1456 ( (rr_data->ms_data.measurement_report.ncells.time_alignmt[i1] 1457 ( (rr_data->ms_data.measurement_report.ncells.time_alignmt[i1]
1457 + fn_offset* QUARTER_BITS_PER_FRAME)/2 1458 + fn_offset* QUARTER_BITS_PER_FRAME)/2
1458 + rr_data->ms_data.measurement_report.otd ) % 2097152; 1459 + rr_data->ms_data.measurement_report.otd ) % 2097152;
1459 } 1460 }
1460 } 1461 }
1461 } 1462 }
1462
1463 1463
1464 dedicated_req->ho_param.ho_nci = rr_data->ms_data.ho_type.nci; 1464 dedicated_req->ho_param.ho_nci = rr_data->ms_data.ho_type.nci;
1465 1465
1466 /* 1466 /*
1467 * Set the handover mode 1467 * Set the handover mode
2408 */ 2408 */
2409 dat_code_prr_channel (&data_req->ch_type, 2409 dat_code_prr_channel (&data_req->ch_type,
2410 &data_req->sapi, 2410 &data_req->sapi,
2411 rr_data->sc_data.chan_desc.chan_type); 2411 rr_data->sc_data.chan_desc.chan_type);
2412 2412
2413 TRACE_EVENT_P1 ( "Value of tch_loop_subch %x", rr_data->tch_loop_subch); 2413 TRACE_EVENT_P1 ( "Value of tch_loop_subch %x", rr_data->tch_loop_subch);
2414 2414
2415 /* 2415 /*
2416 * do not use CCD for the response 2416 * do not use CCD for the response
2417 */ 2417 */
2418 data_req->sdu.l_buf = 24; 2418 data_req->sdu.l_buf = 24;
2838 2838
2839 if(rr_data->cr_data.ch_mode EQ CM_AMR) 2839 if(rr_data->cr_data.ch_mode EQ CM_AMR)
2840 { 2840 {
2841 if (v_multirate_conf) 2841 if (v_multirate_conf)
2842 { 2842 {
2843 /* 2843 /*
2844 * store a new multi-rate speech codec if available. 2844 * store a new multi-rate speech codec if available.
2845 */ 2845 */
2846 UBYTE i; 2846 UBYTE i;
2847 2847
2848 rr_data->cr_data.amr_conf.mr_vers = multirate_conf->mr_vers; 2848 rr_data->cr_data.amr_conf.mr_vers = multirate_conf->mr_vers;
2849 rr_data->cr_data.amr_conf.nscb = multirate_conf->nscb; 2849 rr_data->cr_data.amr_conf.nscb = multirate_conf->nscb;
2850 rr_data->cr_data.amr_conf.icmi = multirate_conf->icmi; 2850 rr_data->cr_data.amr_conf.icmi = multirate_conf->icmi;
2851 rr_data->cr_data.amr_conf.st_mode = multirate_conf->st_mode; 2851 rr_data->cr_data.amr_conf.st_mode = multirate_conf->st_mode;
2852 rr_data->cr_data.amr_conf.set_amr = multirate_conf->set_amr; 2852 rr_data->cr_data.amr_conf.set_amr = multirate_conf->set_amr;
2853 2853
2854 /* 2854 /*
2855 * valid flag for the threshold and hystersis values. multirate_conf.c_cod_prop 2855 * valid flag for the threshold and hystersis values.
2856 * defines the number of threshold and hystersis values. 2856 * multirate_conf.c_cod_prop
2857 */ 2857 * defines the number of threshold and hystersis values.
2858 */
2858 rr_data->cr_data.amr_conf.v_cod_prop = multirate_conf->v_cod_prop; 2859 rr_data->cr_data.amr_conf.v_cod_prop = multirate_conf->v_cod_prop;
2859 2860
2860 if(rr_data->cr_data.amr_conf.v_cod_prop) 2861 if(rr_data->cr_data.amr_conf.v_cod_prop)
2861 { 2862 {
2862 rr_data->cr_data.amr_conf.c_cod_prop = multirate_conf->c_cod_prop; 2863 rr_data->cr_data.amr_conf.c_cod_prop = multirate_conf->c_cod_prop;
2890 */ 2891 */
2891 { 2892 {
2892 MCAST (class_chng, U_CLASS_CHNG);/* T_U_CLASS_CHNG */ 2893 MCAST (class_chng, U_CLASS_CHNG);/* T_U_CLASS_CHNG */
2893 PALLOC_MSG (dl_data_req, DL_DATA_REQ, U_CLASS_CHNG); 2894 PALLOC_MSG (dl_data_req, DL_DATA_REQ, U_CLASS_CHNG);
2894 2895
2895 /* 2896 /*
2896 * set channel type and sapi 2897 * set channel type and sapi
2897 */ 2898 */
2898 dat_code_prr_channel (&dl_data_req->ch_type, 2899 dat_code_prr_channel (&dl_data_req->ch_type,
2899 &dl_data_req->sapi, rr_data->sc_data.chan_desc.chan_type); 2900 &dl_data_req->sapi, rr_data->sc_data.chan_desc.chan_type);
2900 2901
2901 class_chng->msg_type = U_CLASS_CHNG; 2902 class_chng->msg_type = U_CLASS_CHNG;
2902 class_chng->mob_class_2 = rr_data->ms_data.classmark2; 2903 class_chng->mob_class_2 = rr_data->ms_data.classmark2;