[PATCH 1/4] Add data structure for MCS change in Retx

Aravind Sirsikar arvind.sirsikar at radisys.com
Mon Apr 25 10:30:57 UTC 2016


From: Aravind Sirsikar <Arvind.sirsikar at radisys.com>

Modify the existing data structure to support MCS change during Retx
case in EGPRS DL.
---
 src/gprs_coding_scheme.cpp |   36 ++++++++++++++++++++++++++++++++++++
 src/gprs_coding_scheme.h   |    8 ++++++++
 src/rlc.h                  |   10 ++++++++++
 3 files changed, 54 insertions(+)

diff --git a/src/gprs_coding_scheme.cpp b/src/gprs_coding_scheme.cpp
index 8601d4f..4b47c0b 100644
--- a/src/gprs_coding_scheme.cpp
+++ b/src/gprs_coding_scheme.cpp
@@ -21,6 +21,42 @@
 
 #include "gprs_coding_scheme.h"
 
+/*
+ * 44.060 Table 8.1.1.1 and Table 8.1.1.2
+ * In has 3 level indexing. 0th level is ARQ type
+ * 1st level is Original MCS( index 0 corresponds to MCS1 and so on)
+ * 2nd level is MS MCS (index 0 corresponds to MCS1 and so on)
+ * in 0th level indexing only ARQ type 2 is supported i.e index 1 for
+ * incremental redundancy
+ */
+
+/* TODO: Need to support ARQ type 1 */
+enum GprsCodingScheme::Scheme GprsCodingScheme::egprs_mcs_retx_tbl[MAX_NUM_ARQ]
+			[MAX_NUM_MCS][MAX_NUM_MCS] = {
+		{
+			{MCS1, MCS1, MCS1, MCS1, MCS1, MCS1, MCS1, MCS1, MCS1},
+			{MCS2, MCS2, MCS2, MCS2, MCS2, MCS2, MCS2, MCS2, MCS2},
+			{MCS3, MCS3, MCS3, MCS3, MCS3, MCS3, MCS3, MCS3, MCS3},
+			{MCS1, MCS1, MCS1, MCS4, MCS4, MCS4, MCS4, MCS4, MCS4},
+			{MCS2, MCS2, MCS2, MCS2, MCS5, MCS5, MCS7, MCS7, MCS7},
+			{MCS3, MCS3, MCS3, MCS3, MCS3, MCS6, MCS6, MCS6, MCS9},
+			{MCS2, MCS2, MCS2, MCS2, MCS5, MCS5, MCS7, MCS7, MCS7},
+			{MCS3, MCS3, MCS3, MCS3, MCS3, MCS6, MCS6, MCS8, MCS8},
+			{MCS3, MCS3, MCS3, MCS3, MCS3, MCS6, MCS6, MCS6, MCS9}
+		},
+		{
+			{MCS1, MCS1, MCS1, MCS1, MCS1, MCS1, MCS1, MCS1, MCS1},
+			{MCS2, MCS2, MCS2, MCS2, MCS2, MCS2, MCS2, MCS2, MCS2},
+			{MCS3, MCS3, MCS3, MCS3, MCS3, MCS3, MCS3, MCS3, MCS3},
+			{MCS4, MCS4, MCS4, MCS4, MCS4, MCS4, MCS4, MCS4, MCS4},
+			{MCS5, MCS5, MCS5, MCS5, MCS5, MCS5, MCS7, MCS7, MCS7},
+			{MCS6, MCS6, MCS6, MCS6, MCS6, MCS6, MCS6, MCS6, MCS9},
+			{MCS5, MCS5, MCS5, MCS5, MCS5, MCS5, MCS7, MCS7, MCS7},
+			{MCS6, MCS6, MCS6, MCS6, MCS6, MCS6, MCS6, MCS8, MCS8},
+			{MCS6, MCS6, MCS6, MCS6, MCS6, MCS6, MCS6, MCS6, MCS9}
+		}
+	};
+
 static struct {
 	struct {
 		unsigned int bytes;
diff --git a/src/gprs_coding_scheme.h b/src/gprs_coding_scheme.h
index aec3762..bb0bad4 100644
--- a/src/gprs_coding_scheme.h
+++ b/src/gprs_coding_scheme.h
@@ -26,6 +26,12 @@
 
 class GprsCodingScheme {
 public:
+
+#define MAX_NUM_ARQ           2      /* max. number of ARQ */
+#define MAX_NUM_MCS           9     /* max. number of MCS */
+#define EGPRS_ARQ1            0x0
+#define EGPRS_ARQ2            0x1
+
 	enum Scheme {
 		UNKNOWN,
 		CS1, CS2, CS3, CS4,
@@ -105,6 +111,8 @@ public:
 	static GprsCodingScheme getEgprsByNum(unsigned num);
 
 	static const char *modeName(Mode mode);
+	static enum Scheme egprs_mcs_retx_tbl[MAX_NUM_ARQ]
+			[MAX_NUM_MCS][MAX_NUM_MCS];
 private:
 	GprsCodingScheme(int s); /* fail on use */
 	GprsCodingScheme& operator =(int s); /* fail on use */
diff --git a/src/rlc.h b/src/rlc.h
index 8f75588..3b0b04c 100644
--- a/src/rlc.h
+++ b/src/rlc.h
@@ -120,6 +120,16 @@ struct gprs_rlc_data {
 	uint8_t len;
 
 	struct gprs_rlc_data_block_info block_info;
+/*
+	 * cs_current_trans is variable to hold the cs value for
+	 * current transmission. cs_current_trans is same as cs during
+	 * transmission case. during retransmission cs_current_trans is
+	 * fetched from egprs_mcs_retx_tbl table based on
+	 * cs and demanded cs.reference is 44.060 Table
+	 * 8.1.1.1 and Table 8.1.1.2
+	 */
+	GprsCodingScheme cs_current_trans;
+
 	GprsCodingScheme cs;
 
 	/* puncturing scheme value to be used for next transmission*/
-- 
1.7.9.5




More information about the osmocom-net-gprs mailing list