summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2017-07-16 17:13:34 +0700
committerVadim Yanitskiy <axilirator@gmail.com>2017-11-19 17:35:07 +0700
commitf2af7d2953429a15cda5b52bedec226ea0b47aab (patch)
treed2cbbd0b4b145eb559bcb49b98cead8f2c7bf2bf /src
parentf21f7036e8f60419c43c8da875098d93059f5c3a (diff)
host/trxcon/scheduler: confirm xCCH data sending
Diffstat (limited to 'src')
-rw-r--r--src/host/trxcon/l1ctl.c13
-rw-r--r--src/host/trxcon/l1ctl.h1
-rw-r--r--src/host/trxcon/sched_lchan_handlers.c34
3 files changed, 37 insertions, 11 deletions
diff --git a/src/host/trxcon/l1ctl.c b/src/host/trxcon/l1ctl.c
index 12745e97..7d96396f 100644
--- a/src/host/trxcon/l1ctl.c
+++ b/src/host/trxcon/l1ctl.c
@@ -221,6 +221,19 @@ int l1ctl_tx_rach_conf(struct l1ctl_link *l1l, uint32_t fn)
return l1ctl_link_send(l1l, msg);
}
+int l1ctl_tx_data_conf(struct l1ctl_link *l1l)
+{
+ struct msgb *msg;
+
+ msg = l1ctl_alloc_msg(L1CTL_DATA_CONF);
+ if (msg == NULL)
+ return -ENOMEM;
+
+ LOGP(DL1C, LOGL_DEBUG, "Send Data Conf\n");
+
+ return l1ctl_link_send(l1l, msg);
+}
+
/* FBSB expire timer */
static void fbsb_timer_cb(void *data)
{
diff --git a/src/host/trxcon/l1ctl.h b/src/host/trxcon/l1ctl.h
index 596a5b09..6c61bfd9 100644
--- a/src/host/trxcon/l1ctl.h
+++ b/src/host/trxcon/l1ctl.h
@@ -17,3 +17,4 @@ int l1ctl_rx_cb(struct l1ctl_link *l1l, struct msgb *msg);
int l1ctl_tx_data_ind(struct l1ctl_link *l1l, struct l1ctl_info_dl *ind);
int l1ctl_tx_rach_conf(struct l1ctl_link *l1l, uint32_t fn);
+int l1ctl_tx_data_conf(struct l1ctl_link *l1l);
diff --git a/src/host/trxcon/sched_lchan_handlers.c b/src/host/trxcon/sched_lchan_handlers.c
index 303ae818..1c7a3136 100644
--- a/src/host/trxcon/sched_lchan_handlers.c
+++ b/src/host/trxcon/sched_lchan_handlers.c
@@ -259,17 +259,6 @@ send_burst:
/* Choose proper TSC */
tsc = nb_training_bits[trx->tsc];
- /* If we are sending the last (4/4) burst */
- if ((*mask & 0x0f) == 0x0f) {
- /* Remove primitive from queue and free memory */
- prim = llist_entry(ts->tx_prims.next, struct trx_ts_prim, list);
- llist_del(&prim->list);
- talloc_free(prim);
-
- /* Reset mask */
- *mask = 0x00;
- }
-
/* Compose a new burst */
memset(burst, 0, 3); /* TB */
memcpy(burst + 3, offset, 58); /* Payload 1/2 */
@@ -287,9 +276,32 @@ send_burst:
rc = trx_if_tx_burst(trx, ts->index, fn, 10, burst);
if (rc) {
LOGP(DSCH, LOGL_ERROR, "Could not send burst to transceiver\n");
+
+ /* Remove primitive from queue and free memory */
+ prim = llist_entry(ts->tx_prims.next, struct trx_ts_prim, list);
+ llist_del(&prim->list);
+ talloc_free(prim);
+
+ /* Reset mask */
+ *mask = 0x00;
+
return rc;
}
+ /* If we have sent the last (4/4) burst */
+ if ((*mask & 0x0f) == 0x0f) {
+ /* Remove primitive from queue and free memory */
+ prim = llist_entry(ts->tx_prims.next, struct trx_ts_prim, list);
+ llist_del(&prim->list);
+ talloc_free(prim);
+
+ /* Reset mask */
+ *mask = 0x00;
+
+ /* Confirm data sending */
+ l1ctl_tx_data_conf(trx->l1l);
+ }
+
return 0;
}