diff options
author | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | 2020-05-21 19:55:46 +0700 |
---|---|---|
committer | laforge <laforge@osmocom.org> | 2020-06-03 12:49:40 +0000 |
commit | a0a0b7fb0ed9f7df3c8e6075cd8cfbaec5a015ca (patch) | |
tree | f1fa5f455cb3cbbbdecbfb938c131660ff2295da /src/bts.h | |
parent | 088dcbc016521cce5a18819edb97d90844e6eb91 (diff) |
bts: refactor handling and parsing of RACH.ind
This patch is a set of tightly related changes:
- group all RACH.ind parameters into struct 'rach_ind_params';
- group Channel Request parameters into struct 'chan_req_params';
- get rid of egprs_mslot_class_from_ra(), priority_from_ra(),
and is_single_block(), introduce unified parse_rach_ind();
- improve logging, get rid of redundant information.
This is needed for proper EGPRS Packet Channel Request handling.
Change-Id: I5fe7e0f51bf5c9eac073935cc4f4edd667c67c6e
Related: OS#1548
Diffstat (limited to 'src/bts.h')
-rw-r--r-- | src/bts.h | 23 |
1 files changed, 20 insertions, 3 deletions
@@ -267,6 +267,24 @@ enum { STAT_MS_PRESENT, }; +/* RACH.ind parameters (to be parsed) */ +struct rach_ind_params { + enum ph_burst_type burst_type; + bool is_11bit; + uint16_t ra; + uint8_t trx_nr; + uint8_t ts_nr; + uint32_t rfn; + int16_t qta; +}; + +/* [EGPRS Packet] Channel Request parameters (parsed) */ +struct chan_req_params { + unsigned int egprs_mslot_class; + unsigned int priority; + bool single_block; +}; + #ifdef __cplusplus /** * I represent a GSM BTS. I have one or more TRX, I know the current @@ -302,9 +320,8 @@ public: int rcv_imm_ass_cnf(const uint8_t *data, uint32_t fn); uint32_t rfn_to_fn(int32_t rfn); - int rcv_rach(uint16_t ra, uint32_t Fn, int16_t qta, bool is_11bit, - enum ph_burst_type burst_type); - int rcv_ptcch_rach(uint8_t trx_nr, uint8_t ts_nr, uint32_t fn, int16_t qta); + int rcv_rach(const struct rach_ind_params *rip); + int rcv_ptcch_rach(const struct rach_ind_params *rip); void snd_dl_ass(gprs_rlcmac_tbf *tbf, bool poll, uint16_t pgroup); |