edge: Add init functions for gprs_rlc_data_info
Add the functions gprs_rlc_data_info_init_dl/ul which initialise a
gprs_rlc_data_info structure depending on the coding scheme. The
fields num_data_blocks, data_offs_bits, cs, and the data_blocks are
valid after this call. The other fields are set to 0.
The data blocks are initialised to the correct data_len, e == 1
(no extension header field), cv == 15 (not a final block). The other
data block fields are set to 0.
The gprs_rlc_data_block_info can also be initialised separately
by using the gprs_rlc_data_block_info_init function.
Sponsored-by: On-Waves ehf
diff --git a/src/rlc.h b/src/rlc.h
index 0cd7593..5917625 100644
--- a/src/rlc.h
+++ b/src/rlc.h
@@ -99,6 +99,13 @@
GprsCodingScheme cs;
};
+void gprs_rlc_data_info_init_dl(struct gprs_rlc_data_info *rlc,
+ GprsCodingScheme cs);
+void gprs_rlc_data_info_init_ul(struct gprs_rlc_data_info *rlc,
+ GprsCodingScheme cs);
+void gprs_rlc_data_block_info_init(struct gprs_rlc_data_block_info *rdbi,
+ GprsCodingScheme cs);
+
/*
* I hold the currently transferred blocks and will provide
* the routines to manipulate these arrays.