From 9e8593917f3e301c3487f73430ce416a08360ce8 Mon Sep 17 00:00:00 2001 From: Jacob Erlbeck Date: Tue, 2 Feb 2016 11:48:37 +0100 Subject: rlc: Support encoding of EGPRS header type 1 + 2 Currently only header type 3 (MCS-1 to MCS-4) is supported. Add header structs to rlc.h and extend Encoding::rlc_write_dl_data_header accordingly. Sponsored-by: On-Waves ehf --- src/rlc.h | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) (limited to 'src/rlc.h') diff --git a/src/rlc.h b/src/rlc.h index 3a7f1a1a..8c3a4124 100644 --- a/src/rlc.h +++ b/src/rlc.h @@ -106,7 +106,8 @@ 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); -unsigned int gprs_rlc_mcs_cps(GprsCodingScheme cs, int punct, int with_padding); +unsigned int gprs_rlc_mcs_cps(GprsCodingScheme cs, int punct, int punct2, + int with_padding); /* * I hold the currently transferred blocks and will provide @@ -300,6 +301,35 @@ struct gprs_rlc_ul_header_egprs_3 { dummy:1; } __attribute__ ((packed)); +struct gprs_rlc_dl_header_egprs_1 { + uint8_t usf:3, + es_p:2, + rrbp:2, + tfi_a:1; + uint8_t tfi_b:4, + pr:2, + bsn1_a:2; + uint8_t bsn1_b:8; + uint8_t bsn1_c:1, + bsn2_a:7; + uint8_t bsn2_b:3, + cps:5; +} __attribute__ ((packed)); + +struct gprs_rlc_dl_header_egprs_2 { + uint8_t usf:3, + es_p:2, + rrbp:2, + tfi_a:1; + uint8_t tfi_b:4, + pr:2, + bsn1_a:2; + uint8_t bsn1_b:8; + uint8_t bsn1_c:1, + cps:3, + dummy:4; +} __attribute__ ((packed)); + struct gprs_rlc_dl_header_egprs_3 { uint8_t usf:3, es_p:2, -- cgit v1.2.3