diff options
author | Stefan Sperling <ssperling@sysmocom.de> | 2018-07-27 15:17:09 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2019-01-12 09:51:08 +0000 |
commit | bd6e7a9f2dd5d4e881a0a21ebdb29b7a76ebdc9a (patch) | |
tree | 601573b5f19fd67030a3958217bd383d2ff958c3 /include/osmocom/gprs | |
parent | fdf8b7b1beeb0cda262c5fb060a933aa7edb5e9a (diff) |
port rest octets encoding code from osmo-bsc
As part of fixing issue OS#3075, we want to migrate support
for encoding system information from osmo-bsc to libosmocore.
This change ports osmo-bsc code for encoding SI rest octets.
The conversion was a bit tricky in some places because some
functions receive a 'struct gsm_bts' parameter in osmo-bsc.
In this libosmocore version, such functions expect parameters
which correspond to the individual fields of 'struct gsm_bts'
which are used by these functions.
Several structs from osmo-bsc's system_information.h are now
also declared in libosmocore headers, with an added osmo_ prefix
to avoid collisions with existing definitions in osmo-bsc.
Some helpers were ported from osmo-bsc's system_information.c
to libosmocore's gsm48_rest_octets.c. Contrary to osmo-bsc's
implementation they are now only visible within this file.
Unfortunately, this code ported from osmo-bsc lacks unit tests.
Change-Id: I47888965ab11bba1186c21987f1365c9270abeab
Related: OS#3075
Diffstat (limited to 'include/osmocom/gprs')
-rw-r--r-- | include/osmocom/gprs/protocol/gsm_04_60.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/include/osmocom/gprs/protocol/gsm_04_60.h b/include/osmocom/gprs/protocol/gsm_04_60.h index 5d5fca9a..f592b14f 100644 --- a/include/osmocom/gprs/protocol/gsm_04_60.h +++ b/include/osmocom/gprs/protocol/gsm_04_60.h @@ -312,3 +312,42 @@ struct gprs_rlc_dl_header_egprs_3 { #endif } __attribute__ ((packed)); #endif + +/* TS 03.60 Chapter 6.3.3.1: Network Mode of Operation */ +enum osmo_gprs_nmo { + GPRS_NMO_I = 0, /* CS pagin on GPRS paging or traffic channel */ + GPRS_NMO_II = 1, /* all paging on CCCH */ + GPRS_NMO_III = 2, /* no paging coordination */ +}; + +/* TS 04.60 12.24 */ +struct osmo_gprs_cell_options { + enum osmo_gprs_nmo nmo; + /* T3168: wait for packet uplink assignment message */ + uint32_t t3168; /* in milliseconds */ + /* T3192: wait for release of the TBF after reception of the final block */ + uint32_t t3192; /* in milliseconds */ + uint32_t drx_timer_max;/* in seconds */ + uint32_t bs_cv_max; + uint8_t supports_egprs_11bit_rach; + bool ctrl_ack_type_use_block; /* use PACKET CONTROL ACKNOWLEDGMENT */ + + uint8_t ext_info_present; + struct { + uint8_t egprs_supported; + uint8_t use_egprs_p_ch_req; + uint8_t bep_period; + uint8_t pfc_supported; + uint8_t dtm_supported; + uint8_t bss_paging_coordination; + } ext_info; +}; + +/* TS 04.60 Table 12.9.2 */ +struct osmo_gprs_power_ctrl_pars { + uint8_t alpha; + uint8_t t_avg_w; + uint8_t t_avg_t; + uint8_t pc_meas_chan; + uint8_t n_avg_i; +}; |