fixeria has uploaded this change for review.

View Change

rlcmac: implement the missing IA_MultiBlock_PktDlAss_t

Add missing definition for the <Multiple Blocks Packet Downlink
Assignment> structure. It's not 100% complete, but should serve
a good starting point if we ever need to support this.

Change-Id: I544245f690fdd14a94f858a5f3cd8f8d39d17611
Related: OS#5500
---
M include/osmocom/gprs/rlcmac/gprs_rlcmac.h
M src/rlcmac/ts_44_018.c
2 files changed, 23 insertions(+), 2 deletions(-)

git pull ssh://gerrit.osmocom.org:29418/libosmo-gprs refs/changes/00/30800/1
diff --git a/include/osmocom/gprs/rlcmac/gprs_rlcmac.h b/include/osmocom/gprs/rlcmac/gprs_rlcmac.h
index f322455..b325f3e 100644
--- a/include/osmocom/gprs/rlcmac/gprs_rlcmac.h
+++ b/include/osmocom/gprs/rlcmac/gprs_rlcmac.h
@@ -677,6 +677,12 @@

typedef struct
{
+ StartingTime_t TBF_STARTING_TIME;
+ guint8 NOF_BLOCKS;
+} IA_MultiBlock_PktDlAss_t;
+
+typedef struct
+{
guint8 Length;
guint8 MAIO;
guint8 MobileAllocation[62];
@@ -817,7 +823,7 @@
guint8 UnionType;
union {
IA_EGPRS_PktUlAss_t EGPRS_PktUlAss;
- /* TODO: <Multiple Blocks Packet Downlink Assignment> */
+ IA_MultiBlock_PktDlAss_t MultiBlock_PktDlAss;
} u;
} IA_RestOctetsLH0x_t;

diff --git a/src/rlcmac/ts_44_018.c b/src/rlcmac/ts_44_018.c
index fd30416..1de16d6 100644
--- a/src/rlcmac/ts_44_018.c
+++ b/src/rlcmac/ts_44_018.c
@@ -227,6 +227,21 @@
M_TYPE (IA_EGPRS_PktUlAss_t, Access.OnePhaseAccess, EGPRS_OnePhaseAccess_t),
CSN_DESCR_END (IA_EGPRS_PktUlAss_t)

+/* < Multiple Blocks Packet Downlink Assignment > */
+static const
+CSN_DESCR_BEGIN(IA_MultiBlock_PktDlAss_t)
+ M_TYPE (IA_MultiBlock_PktDlAss_t, TBF_STARTING_TIME, StartingTime_t),
+ M_UINT (IA_MultiBlock_PktDlAss_t, NOF_BLOCKS, 4),
+
+#if 1 /* TODO: 0 -- Reserved for future use */
+ M_FIXED (IA_MultiBlock_PktDlAss_t, 1, 0x00),
+#else /* | 1 ... */
+ M_UNION (IA_MultiBlock_PktDlAss_t, 2),
+ M_TYPE (IA_MultiBlock_PktDlAss_t, u.Distribution, ),
+ M_TYPE (IA_MultiBlock_PktDlAss_t, u.NonDistribution),
+#endif
+CSN_DESCR_END (IA_MultiBlock_PktDlAss_t)
+
static const
CSN_DESCR_BEGIN(IA_FreqParamsBeforeTime_t)
M_UINT (IA_FreqParamsBeforeTime_t, Length, 6),
@@ -358,7 +373,7 @@
CSN_DESCR_BEGIN (IA_RestOctetsLH0x_t)
M_UNION (IA_RestOctetsLH0x_t, 2),
M_TYPE (IA_RestOctetsLH0x_t, u.EGPRS_PktUlAss, IA_EGPRS_PktUlAss_t),
- CSN_ERROR (IA_RestOctetsLH0x_t, "01 <Multiple Blocks Packet Downlink Assignment>", CSN_ERROR_STREAM_NOT_SUPPORTED),
+ M_TYPE (IA_RestOctetsLH0x_t, u.MultiBlock_PktDlAss, IA_MultiBlock_PktDlAss_t),
CSN_DESCR_END (IA_RestOctetsLH0x_t)

static const

To view, visit change 30800. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: libosmo-gprs
Gerrit-Branch: master
Gerrit-Change-Id: I544245f690fdd14a94f858a5f3cd8f8d39d17611
Gerrit-Change-Number: 30800
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy@sysmocom.de>
Gerrit-MessageType: newchange