aboutsummaryrefslogtreecommitdiffstats
path: root/src/gprs_bssgp_pcu.cpp
diff options
context:
space:
mode:
authorIvan Kluchnikov <kluchnikovi@gmail.com>2013-06-18 21:55:22 +0400
committerIvan Kluchnikov <kluchnikovi@gmail.com>2013-06-18 21:55:22 +0400
commit07cd260d9d9a6da0b3856c87852ee8039640d745 (patch)
tree3fb6057cb9fbe229fc040f10abb4725c46e8bf6c /src/gprs_bssgp_pcu.cpp
parenta004e6a8233695abd417a97d6f81a802b605038a (diff)
Implemented estimated C/I algorithm for link adaptation.link_adaptation
Description of algorithm: 1. Start with initial coding scheme. 2. Transmit RLC blocks until the end of the reporting window (Packet Downlink Ack/Nack message is received) 3. Estimate the average C/I for the previous reporting window and change CS, if it is necessary. 4. If there is more data to transmit return to step 2. Added configuration options to enable/disable link adaptation and setting maximum C/I level for CS1, CS2, CS3, CS4.
Diffstat (limited to 'src/gprs_bssgp_pcu.cpp')
-rw-r--r--src/gprs_bssgp_pcu.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gprs_bssgp_pcu.cpp b/src/gprs_bssgp_pcu.cpp
index 54753b85..7c5fba52 100644
--- a/src/gprs_bssgp_pcu.cpp
+++ b/src/gprs_bssgp_pcu.cpp
@@ -241,6 +241,19 @@ int gprs_bssgp_pcu_rx_dl_ud(struct msgb *msg, struct tlv_parsed *tp)
return -EBUSY;
}
tbf->tlli = tlli;
+ struct gprs_rlcmac_bts *bts = gprs_rlcmac_bts;
+ if (bts->cs_link_adaptation) {
+ /* set coding scheme */
+ int cs = recall_cs(tlli);
+ if (cs > 0) {
+ tbf->cs = cs;
+ LOGP(DCS, LOGL_NOTICE, "New DL TBF for tlli = 0x%08x recall CS = %d\n", tbf->tlli, tbf->cs);
+ } else {
+ tbf->cs = bts->initial_cs_dl;
+ remember_cs(tbf->tlli, tbf->cs);
+ LOGP(DCS, LOGL_NOTICE, "New DL TBF for tlli = 0x%08x remember CS = %d\n", tbf->tlli, tbf->cs);
+ }
+ }
tbf->tlli_valid = 1;
tbf->ta = ta;