fixeria has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmocom-bb/+/35778?usp=email )
Change subject: trxcon/l1sched: trigger sending UL BLOCK.cnf for PDTCH
......................................................................
trxcon/l1sched: trigger sending UL BLOCK.cnf for PDTCH
In tx_pdtch_fn(), delay sending DATA.cnf until bid=3. Otherwise we
send it too early (at bid=0) and trick the upper layers (RLC/MAC)
to believe that the whole block (all bursts) has been transmitted.
Change-Id: If32fafeef0ea347ed3800e6b67349bf12e66047f
---
M src/host/trxcon/include/osmocom/bb/l1sched/l1sched.h
M src/host/trxcon/src/sched_lchan_pdtch.c
M src/host/trxcon/src/trxcon_fsm.c
3 files changed, 34 insertions(+), 4 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/78/35778/1
diff --git a/src/host/trxcon/include/osmocom/bb/l1sched/l1sched.h
b/src/host/trxcon/include/osmocom/bb/l1sched/l1sched.h
index 3f5e8b0..6c5a31e 100644
--- a/src/host/trxcon/include/osmocom/bb/l1sched/l1sched.h
+++ b/src/host/trxcon/include/osmocom/bb/l1sched/l1sched.h
@@ -223,6 +223,8 @@
/*! Queue of Tx primitives */
struct llist_head tx_prims;
+ /*! Tx primitive being sent */
+ struct msgb *prim;
/*! Mode for TCH channels (see GSM48_CMODE_*) */
uint8_t tch_mode;
diff --git a/src/host/trxcon/src/sched_lchan_pdtch.c
b/src/host/trxcon/src/sched_lchan_pdtch.c
index 4c49504..e5bf18b 100644
--- a/src/host/trxcon/src/sched_lchan_pdtch.c
+++ b/src/host/trxcon/src/sched_lchan_pdtch.c
@@ -160,8 +160,8 @@
return -EINVAL;
}
- /* Confirm data / traffic sending (pass ownership of the msgb/prim) */
- l1sched_lchan_emit_data_cnf(lchan, msg, br->fn);
+ /* Cache the prim, so that we can confirm it later (see below) */
+ lchan->prim = msg;
send_burst:
/* Determine which burst should be sent */
@@ -183,5 +183,12 @@
LOGP_LCHAND(lchan, LOGL_DEBUG, "Scheduled at fn=%u burst=%u\n", br->fn,
br->bid);
+ /* Confirm data / traffic sending (pass ownership of the msgb/prim) */
+ if (br->bid == 3 && lchan->prim != NULL) {
+ l1sched_lchan_emit_data_cnf(lchan, lchan->prim,
+ GSM_TDMA_FN_SUB(br->fn, 3));
+ lchan->prim = NULL;
+ }
+
return 0;
}
diff --git a/src/host/trxcon/src/trxcon_fsm.c b/src/host/trxcon/src/trxcon_fsm.c
index f6c9a05..6523a85 100644
--- a/src/host/trxcon/src/trxcon_fsm.c
+++ b/src/host/trxcon/src/trxcon_fsm.c
@@ -610,6 +610,16 @@
l1sched_prim_from_user(trxcon->sched, msg);
break;
}
+ case TRXCON_EV_TX_DATA_CNF:
+ {
+ const struct trxcon_param_tx_data_cnf *cnf = data;
+ struct msgb *msg;
+
+ msg = l1gprs_handle_ul_block_cnf(trxcon->gprs, cnf->frame_nr, cnf->chan_nr
& 0x07);
+ if (msg != NULL)
+ trxcon_l1ctl_send(trxcon, msg);
+ break;
+ }
case TRXCON_EV_RX_DATA_IND:
{
const struct trxcon_param_rx_data_ind *ind = data;
@@ -655,8 +665,6 @@
l1sched_reset(trxcon->sched, false);
/* TODO: switch to (not implemented) TRXCON_ST_DCH_TUNING? */
break;
- case TRXCON_EV_TX_DATA_CNF:
- break;
default:
OSMO_ASSERT(0);
}
--
To view, visit
https://gerrit.osmocom.org/c/osmocom-bb/+/35778?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: If32fafeef0ea347ed3800e6b67349bf12e66047f
Gerrit-Change-Number: 35778
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newchange