pespin submitted this change.
rlcmac: Apply tx_cs requested by the network through PKT UL ACK/NACK
Recalculating CV when in Countdown Procedure will be implemented in a
follow-up commit.
Related: OS#6108
Change-Id: I1e7b28c2e5f1d77a962ec3070f3a027b8f66a69e
---
M src/rlcmac/tbf_ul.c
M tests/rlcmac/rlcmac_prim_test.c
2 files changed, 28 insertions(+), 1 deletion(-)
diff --git a/src/rlcmac/tbf_ul.c b/src/rlcmac/tbf_ul.c
index 6957658..0fa98ae 100644
--- a/src/rlcmac/tbf_ul.c
+++ b/src/rlcmac/tbf_ul.c
@@ -234,6 +234,18 @@
return 0;
}
+static void gprs_rlcmac_ul_tbf_update_tx_cs(struct gprs_rlcmac_ul_tbf *ul_tbf, enum gprs_rlcmac_coding_scheme tx_cs)
+{
+ if (ul_tbf->tx_cs == tx_cs)
+ return;
+
+ LOGPTBFUL(ul_tbf, LOGL_INFO, "Tx CS update: %s -> %s\n",
+ gprs_rlcmac_mcs_name(ul_tbf->tx_cs), gprs_rlcmac_mcs_name(tx_cs));
+ ul_tbf->tx_cs = tx_cs;
+
+ /* TODO: recalculate countdown_state, have to look a TS 44.060 specs on what to do exactly. */
+}
+
int gprs_rlcmac_ul_tbf_handle_pkt_ul_ack_nack(struct gprs_rlcmac_ul_tbf *ul_tbf,
const RlcMacDownlink_t *dl_block)
{
@@ -276,6 +288,8 @@
"Received acknowledge of all blocks, but without final ack indication (don't worry)\n");
}
+ gprs_rlcmac_ul_tbf_update_tx_cs(ul_tbf, gprs->CHANNEL_CODING_COMMAND + GPRS_RLCMAC_CS_1);
+
return rc;
}
diff --git a/tests/rlcmac/rlcmac_prim_test.c b/tests/rlcmac/rlcmac_prim_test.c
index 0c40737..10f148a 100644
--- a/tests/rlcmac/rlcmac_prim_test.c
+++ b/tests/rlcmac/rlcmac_prim_test.c
@@ -321,7 +321,7 @@
ack->UPLINK_TFI = ul_tfi;
ack->UnionType = 0; /* GPRS */
- gprs->CHANNEL_CODING_COMMAND = cs;
+ gprs->CHANNEL_CODING_COMMAND = gprs_rlcmac_mcs_chan_code(cs);
}
static void ul_ack_nack_mark(Ack_Nack_Description_t *ack_desc, unsigned int idx, bool received)
To view, visit change 33899. To unsubscribe, or for help writing mail filters, visit settings.