diff options
author | Muhammad Awais Aslam <mawais.aslam985@gmail.com> | 2017-12-19 15:57:20 +0500 |
---|---|---|
committer | Vadim Yanitskiy <axilirator@gmail.com> | 2019-05-10 18:18:35 +0700 |
commit | 8f56258867ed321f8aee59f8cd0fb6a1f36090c9 (patch) | |
tree | 1816ba7e84b323ff391a94c86fc083553249de9c /src/target/firmware/layer1/prim_tch.c | |
parent | 0f5f76f65149f82b00ffba40794c59add7bedc88 (diff) |
WIP/HACK: bsic decoding of neighbour cells in dedicated mode and partially success in synchronized handovermawais/ho
Change-Id: Ib01460b796d2107c4599d327e184eb42340999d2
Diffstat (limited to 'src/target/firmware/layer1/prim_tch.c')
-rw-r--r-- | src/target/firmware/layer1/prim_tch.c | 35 |
1 files changed, 33 insertions, 2 deletions
diff --git a/src/target/firmware/layer1/prim_tch.c b/src/target/firmware/layer1/prim_tch.c index a8036d2f..808c2d3b 100644 --- a/src/target/firmware/layer1/prim_tch.c +++ b/src/target/firmware/layer1/prim_tch.c @@ -56,6 +56,9 @@ #include <l1ctl_proto.h> +/* FIXME: count of what? use better name */ +static int count11 = 0; + static inline int msb_get_bit(uint8_t *buf, int bn) { int pos_byte = bn >> 3; @@ -213,6 +216,13 @@ static int l1s_tch_resp(__unused uint8_t p1, __unused uint8_t p2, uint16_t p3) meas_id = (meas_id + 1) % FACCH_MEAS_HIST; /* absolute value doesn't matter */ + count11++; + if (count11 == 20){ + count11=0; + //printf("\nMTZ: arfcn in l1s_tch_resp = %d, sc = %d\n", arfcn, l1s.serving_cell.arfcn); + } + //printf("\nMTZ: arfcn in l1s_tch_resp = %d, sc = %d\n", arfcn, l1s.serving_cell.arfcn); + /* Collect measurements */ rx_tch.meas[meas_id].toa_qbit = dsp_api.db_r->a_serv_demod[D_TOA]; rx_tch.meas[meas_id].pm_dbm8 = @@ -258,6 +268,9 @@ static int l1s_tch_resp(__unused uint8_t p1, __unused uint8_t p2, uint16_t p3) /* Allocate msgb */ /* FIXME: we actually want all allocation out of L1S! */ msg = l1ctl_msgb_alloc(L1CTL_DATA_IND); + //MTZ + //printf("\n\n\n---------------------------------\nFACCH\n---------------------------------\n\n\n"); + //printf("\n\n\n---------------------------------\nFACCH\n---------------------------------\n\n\n"); if(!msg) { printf("TCH FACCH: unable to allocate msgb\n"); goto skip_rx_facch; @@ -272,6 +285,8 @@ static int l1s_tch_resp(__unused uint8_t p1, __unused uint8_t p2, uint16_t p3) dl->band_arfcn = htons(arfcn); dl->frame_nr = htonl(rx_time.fn); + printf("\n\nMTZ: FACCH received - chan_nr=%x\n\n", chan_nr); + /* Average SNR & RX level */ n = tch_f_hn ? 8 : 6; for (i=0; i<n; i++) { @@ -429,8 +444,10 @@ static int l1s_tch_cmd(__unused uint8_t p1, __unused uint8_t p2, uint16_t p3) msg = NULL; /* If TX is empty and we're signalling only, use dummy frame */ - if (msg) - data = msg->l3h; + if (msg) { //MTZ + //printf("\n\n\n---------------------------------\nFACCH\n---------------------------------\n\n\n"); + //printf("\n\n\n---------------------------------\nFACCH\n---------------------------------\n\n\n"); + data = msg->l3h;} else if (tch_mode == SIG_ONLY_MODE) data = pu_get_idle_frame(); else @@ -533,8 +550,16 @@ skip_tx_traffic: dsp_task_iq_swap(TCHT_DSP_TASK, arfcn, 0), 0, tsc /* burst_id unused for TCH */ ); + + //printf("\nMTZ: arfcn in l1s_tch_cmd = %d, sc = %d\n", arfcn, l1s.serving_cell.arfcn); + l1s_rx_win_ctrl(arfcn, L1_RXWIN_NB, 0); + /* stop here, if TX is disabled */ + if (l1s.dedicated.rx_only) + return 0; + + dsp_load_tx_task( dsp_task_iq_swap(TCHT_DSP_TASK, arfcn, 1), 0, tsc /* burst_id unused for TCH */ @@ -798,8 +823,14 @@ static int l1s_tch_a_cmd(__unused uint8_t p1, __unused uint8_t p2, uint16_t p3) dsp_task_iq_swap(TCHA_DSP_TASK, arfcn, 0), 0, tsc /* burst_id unused for TCHA */ ); + //printf("\nMTZ: arfcn in l1s_tch_a_cmd = %d, sc=%d\n", arfcn, l1s.serving_cell.arfcn); l1s_rx_win_ctrl(arfcn, L1_RXWIN_NB, 0); + /* stop here, if TX is disabled */ + if (l1s.dedicated.rx_only) + return 0; + + dsp_load_tx_task( dsp_task_iq_swap(TCHA_DSP_TASK, arfcn, 1), 0, tsc /* burst_id unused for TCHA */ |