aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/osmo-bts/pcu_if.h2
-rw-r--r--src/common/l1sap.c18
-rw-r--r--src/common/pcu_sock.c4
-rw-r--r--src/common/scheduler.c10
4 files changed, 26 insertions, 8 deletions
diff --git a/include/osmo-bts/pcu_if.h b/include/osmo-bts/pcu_if.h
index 114f87d1..f34e0cdc 100644
--- a/include/osmo-bts/pcu_if.h
+++ b/include/osmo-bts/pcu_if.h
@@ -12,7 +12,7 @@ int pcu_tx_data_ind(struct gsm_bts_trx_ts *ts, uint8_t is_ptcch, uint32_t fn,
uint16_t arfcn, uint8_t block_nr, uint8_t *data, uint8_t len,
int8_t rssi, uint16_t ber10k, int16_t bto, int16_t lqual);
int pcu_tx_rach_ind(struct gsm_bts *bts, int16_t qta, uint16_t ra, uint32_t fn,
- uint8_t is_11bit, enum ph_burst_type burst_type);
+ uint8_t is_11bit, enum ph_burst_type burst_type, uint8_t sapi);
int pcu_tx_time_ind(uint32_t fn);
int pcu_tx_pag_req(const uint8_t *identity_lv, uint8_t chan_needed);
int pcu_tx_pch_data_cnf(uint32_t fn, uint8_t *data, uint8_t len);
diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index a77b53ab..2874c812 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -1313,6 +1313,20 @@ static int l1sap_ph_rach_ind(struct gsm_bts_trx *trx,
DEBUGPFN(DL1P, rach_ind->fn, "Rx PH-RA.ind\n");
+ /* PTCCH/UL (Packet Timing Advance Control Channel) */
+ if (L1SAP_IS_CHAN_PDCH(rach_ind->chan_nr) && L1SAP_IS_PTCCH(rach_ind->fn)) {
+ LOGPFN(DL1P, LOGL_DEBUG, rach_ind->fn,
+ /* TODO: calculate and print Timing Advance Index */
+ "Access Burst for continuous Timing Advance control (toa256=%d)\n",
+ rach_ind->acc_delay_256bits);
+
+ /* QTA: Timing Advance in units of 1/4 of a symbol */
+ pcu_tx_rach_ind(bts, rach_ind->acc_delay_256bits >> 6,
+ rach_ind->ra, rach_ind->fn, rach_ind->is_11bit,
+ rach_ind->burst_type, PCU_IF_SAPI_PTCCH);
+ return 0;
+ }
+
/* check for handover access burst on dedicated channels */
if (!L1SAP_IS_CHAN_RACH(rach_ind->chan_nr)) {
rate_ctr_inc2(trx->bts->ctrs, BTS_CTR_RACH_HO);
@@ -1349,8 +1363,8 @@ static int l1sap_ph_rach_ind(struct gsm_bts_trx *trx,
rach_ind->acc_delay, rach_ind->ra);
pcu_tx_rach_ind(bts, rach_ind->acc_delay << 2,
- rach_ind->ra, rach_ind->fn,
- rach_ind->is_11bit, rach_ind->burst_type);
+ rach_ind->ra, rach_ind->fn, rach_ind->is_11bit,
+ rach_ind->burst_type, PCU_IF_SAPI_RACH);
return 0;
}
diff --git a/src/common/pcu_sock.c b/src/common/pcu_sock.c
index ba9e1721..51f72d89 100644
--- a/src/common/pcu_sock.c
+++ b/src/common/pcu_sock.c
@@ -380,7 +380,7 @@ int pcu_tx_data_ind(struct gsm_bts_trx_ts *ts, uint8_t sapi, uint32_t fn,
}
int pcu_tx_rach_ind(struct gsm_bts *bts, int16_t qta, uint16_t ra, uint32_t fn,
- uint8_t is_11bit, enum ph_burst_type burst_type)
+ uint8_t is_11bit, enum ph_burst_type burst_type, uint8_t sapi)
{
struct msgb *msg;
struct gsm_pcu_if *pcu_prim;
@@ -395,7 +395,7 @@ int pcu_tx_rach_ind(struct gsm_bts *bts, int16_t qta, uint16_t ra, uint32_t fn,
pcu_prim = (struct gsm_pcu_if *) msg->data;
rach_ind = &pcu_prim->u.rach_ind;
- rach_ind->sapi = PCU_IF_SAPI_RACH;
+ rach_ind->sapi = sapi;
rach_ind->ra = ra;
rach_ind->qta = qta;
rach_ind->fn = fn;
diff --git a/src/common/scheduler.c b/src/common/scheduler.c
index 40e0a542..19fec324 100644
--- a/src/common/scheduler.c
+++ b/src/common/scheduler.c
@@ -539,11 +539,15 @@ const struct trx_chan_desc trx_chan_desc[_TRX_CHAN_MAX] = {
.desc = "Packet Timing advance control channel",
.chan_nr = RSL_CHAN_OSMO_PDCH,
- /* Same as for TRXC_BCCH (xCCH), see above. */
+ /* On the Uplink, mobile stations transmit random Access Bursts
+ * to allow estimation of the timing advance for one MS in packet
+ * transfer mode. On Downlink, the network sends timing advance
+ * updates for several mobile stations. The coding scheme used
+ * for PTCCH/D messages is the same as for PDTCH CS-1. */
.flags = TRX_CHAN_FLAG_PDCH,
.rts_fn = rts_data_fn,
- .dl_fn = tx_data_fn,
- .ul_fn = rx_data_fn,
+ .dl_fn = tx_pdtch_fn,
+ .ul_fn = rx_rach_fn,
},
[TRXC_CBCH] = {
/* TODO: distinguish CBCH on SDCCH/4 and SDCCH/8 */