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
This commit is contained in:
Pau Espin 2023-07-21 19:21:48 +02:00
parent 3ae18f65a8
commit 459383d531
2 changed files with 15 additions and 1 deletions

View File

@ -234,6 +234,18 @@ static int gprs_rlcmac_ul_tbf_update_window(struct gprs_rlcmac_ul_tbf *ul_tbf,
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 @@ int gprs_rlcmac_ul_tbf_handle_pkt_ul_ack_nack(struct gprs_rlcmac_ul_tbf *ul_tbf,
"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;
}

View File

@ -321,7 +321,7 @@ static void ul_ack_nack_init(RlcMacDownlink_t *dl_block, uint8_t ul_tfi, enum gp
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)