aboutsummaryrefslogtreecommitdiffstats
path: root/src/tbf_dl.cpp
diff options
context:
space:
mode:
authorAravind Sirsikar <arvind.sirsikar@radisys.com>2016-03-23 18:29:47 +0530
committerHarald Welte <laforge@gnumonks.org>2016-03-30 22:02:48 +0200
commit7952282b78867e53ab8fd9cf819d1f9fdece58ba (patch)
treefde59cc78b97ef55f5f8b533e5f97aeadd549185 /src/tbf_dl.cpp
parenta859a2180043759a762af0701a056e23e22f1d19 (diff)
Support puncturing scheme selection for EGPRS DL
Adds support to find the puncturing scheme for retransmission with MCS change, retransmission with no MCS change, transmission case. Puncturing scheme selection for retransmission case with MCS change is aligned with TS 44.060 9.3.2.1. Puncturing scheme selection for retransmission without MCS change, fresh transmission is aligned with TS 44.060 10.4.8a.3.1, 10.4.8a.2.1, 10.4.8a.1.1
Diffstat (limited to 'src/tbf_dl.cpp')
-rw-r--r--src/tbf_dl.cpp25
1 files changed, 22 insertions, 3 deletions
diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp
index 56dedd0b..9e4d078a 100644
--- a/src/tbf_dl.cpp
+++ b/src/tbf_dl.cpp
@@ -587,6 +587,7 @@ struct msgb *gprs_rlcmac_dl_tbf::create_dl_acked_block(
bool is_final = false;
gprs_rlc_data_info rlc;
GprsCodingScheme cs;
+ GprsCodingScheme cs_current_trans;
int bsns[ARRAY_SIZE(rlc.block_info)];
unsigned num_bsns;
enum egprs_puncturing_values punct[ARRAY_SIZE(rlc.block_info)];
@@ -638,6 +639,7 @@ struct msgb *gprs_rlcmac_dl_tbf::create_dl_acked_block(
GprsCodingScheme cs_enc;
uint8_t *block_data;
gprs_rlc_data_block_info *rdbi, *block_info;
+ enum egprs_puncturing_values punct_scheme;
/* Check if there are more blocks than BSNs */
if (data_block_idx < num_bsns)
@@ -650,9 +652,19 @@ struct msgb *gprs_rlcmac_dl_tbf::create_dl_acked_block(
/* get data and header from current block */
block_data = m_rlc.block(bsn)->block;
- /* TODO: Use real puncturing values */
- punct[data_block_idx] =
- (enum egprs_puncturing_values) data_block_idx;
+ /* TODO: Need to support MCS change during retx */
+ cs_current_trans = cs;
+
+ /* Get current puncturing scheme from block */
+ punct_scheme = gprs_get_punct_scheme(
+ m_rlc.block(bsn)->next_ps,
+ cs, cs_current_trans);
+
+ if (cs.isEgprs()) {
+ OSMO_ASSERT(punct_scheme >= EGPRS_PS_1);
+ OSMO_ASSERT(punct_scheme <= EGPRS_PS_3);
+ }
+ punct[data_block_idx] = punct_scheme;
rdbi = &rlc.block_info[data_block_idx];
block_info = &m_rlc.block(bsn)->block_info;
@@ -665,6 +677,13 @@ struct msgb *gprs_rlcmac_dl_tbf::create_dl_acked_block(
data_block_idx, bsn, cs_enc.name());
OSMO_ASSERT(rdbi->data_len == m_rlc.block(bsn)->len);
}
+
+ /* TODO: Need to handle 2 same bsns
+ * in header type 1
+ */
+ gprs_update_punct_scheme(&m_rlc.block(bsn)->next_ps,
+ cs_current_trans);
+
rdbi->e = block_info->e;
rdbi->cv = block_info->cv;
rdbi->bsn = bsn;