From fe65fa7e36a400d362666e2c5bd0f289d45aa56a Mon Sep 17 00:00:00 2001 From: Max Date: Tue, 10 May 2016 17:17:05 +0200 Subject: Set DTX in Cell Options * rename field of struct gsm48_cell_options to better match the spec * add comments with spec references * add function for setting DTX in cell options struct * add necessary enum type Change-Id: I5a8924f57669c951b2e51b663d95f1d360062a54 Reviewed-on: https://gerrit.osmocom.org/39 Reviewed-by: Harald Welte Tested-by: Jenkins Builder --- include/osmocom/gsm/protocol/gsm_04_08.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'include/osmocom/gsm/protocol/gsm_04_08.h') diff --git a/include/osmocom/gsm/protocol/gsm_04_08.h b/include/osmocom/gsm/protocol/gsm_04_08.h index 3282bc16..4800b48b 100644 --- a/include/osmocom/gsm/protocol/gsm_04_08.h +++ b/include/osmocom/gsm/protocol/gsm_04_08.h @@ -1,6 +1,7 @@ #pragma once #include +#include #include @@ -469,11 +470,20 @@ struct gsm48_control_channel_descr { uint8_t t3212; } __attribute__ ((packed)); +enum gsm48_dtx_mode { + GSM48_DTX_MAY_BE_USED, + GSM48_DTX_SHALL_BE_USED, + GSM48_DTX_SHALL_NOT_BE_USED +}; + +/* Cell Options for SI6, SACCH (10.5.2.3a.2) or SI3, BCCH (Table 10.5.2.3.1), + 3GPP TS 44.018 */ struct gsm48_cell_options { uint8_t radio_link_timeout:4, dtx:2, pwrc:1, - spare:1; + /* either DN-IND or top bit of DTX IND */ + d:1; } __attribute__ ((packed)); /* Section 9.2.9 CM service request */ @@ -827,6 +837,9 @@ static inline uint8_t gsm48_hdr_msg_type_r99(const struct gsm48_hdr *hdr) } } +void gsm48_set_dtx(struct gsm48_cell_options *op, enum gsm48_dtx_mode full, + enum gsm48_dtx_mode half, bool is_bcch); + #define gsm48_hdr_msg_type gsm48_hdr_msg_type_r99 /* Section 10.4 */ -- cgit v1.2.3