diff options
author | Harald Welte <laforge@gnumonks.org> | 2018-03-17 12:22:40 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2018-03-17 13:40:03 +0100 |
commit | d8cd756da48bcff9f9caf9e64fc0af047a165b60 (patch) | |
tree | 136d09901ae8420803500d92646944376ae21f59 /include | |
parent | 7c4a22dbc48f51eb199766bf1b29e061bf765cbd (diff) |
Get rid of 'struct gsm_bts_role_bts'
gsm_bts_role_bts was introduced at a time when we still shared
gsm_data_shared.[ch] between BSC and BTS, and where we then subsequently
needed a BTS-private structure. Since that sharing was abandoned quite
some time ago, we can merge gsm_bts_role_bts into gsm_bts and do away
with the bts/btsb dualism in a lot of the code.
Change-Id: I4fdd601ea873d9697f89a748cc77bcf7c978fa3e
Diffstat (limited to 'include')
-rw-r--r-- | include/osmo-bts/gsm_data.h | 101 | ||||
-rw-r--r-- | include/osmo-bts/gsm_data_shared.h | 92 | ||||
-rw-r--r-- | include/osmo-bts/paging.h | 4 |
3 files changed, 94 insertions, 103 deletions
diff --git a/include/osmo-bts/gsm_data.h b/include/osmo-bts/gsm_data.h index 31879b9b..9e62cdf0 100644 --- a/include/osmo-bts/gsm_data.h +++ b/include/osmo-bts/gsm_data.h @@ -24,9 +24,6 @@ #define GSM_BTS_AGCH_QUEUE_LOW_LEVEL_DEFAULT 41 #define GSM_BTS_AGCH_QUEUE_HIGH_LEVEL_DEFAULT 91 -struct pcu_sock_state; -struct smscb_msg; - struct gsm_network { struct llist_head bts_list; unsigned int num_bts; @@ -34,99 +31,6 @@ struct gsm_network { struct pcu_sock_state *pcu_state; }; -/* data structure for BTS related data specific to the BTS role */ -struct gsm_bts_role_bts { - struct gsm_bts *bts; - struct { - /* Interference Boundaries for OML */ - int16_t boundary[6]; - uint8_t intave; - } interference; - unsigned int t200_ms[7]; - unsigned int t3105_ms; - struct { - uint8_t overload_period; - struct { - /* Input parameters from OML */ - uint8_t load_ind_thresh; /* percent */ - uint8_t load_ind_period; /* seconds */ - /* Internal data */ - struct osmo_timer_list timer; - unsigned int pch_total; - unsigned int pch_used; - } ccch; - struct { - /* Input parameters from OML */ - int16_t busy_thresh; /* in dBm */ - uint16_t averaging_slots; - /* Internal data */ - unsigned int total; /* total nr */ - unsigned int busy; /* above busy_thresh */ - unsigned int access; /* access bursts */ - } rach; - } load; - uint8_t ny1; - uint8_t max_ta; - - /* AGCH queuing */ - struct { - struct llist_head queue; - int length; - int max_length; - - int thresh_level; /* Cleanup threshold in percent of max len */ - int low_level; /* Low water mark in percent of max len */ - int high_level; /* High water mark in percent of max len */ - - /* TODO: Use a rate counter group instead */ - uint64_t dropped_msgs; - uint64_t merged_msgs; - uint64_t rejected_msgs; - uint64_t agch_msgs; - uint64_t pch_msgs; - } agch_queue; - - struct paging_state *paging_state; - char *bsc_oml_host; - struct llist_head oml_queue; - unsigned int rtp_jitter_buf_ms; - bool rtp_jitter_adaptive; - struct { - uint8_t ciphers; /* flags A5/1==0x1, A5/2==0x2, A5/3==0x4 */ - } support; - struct { - uint8_t tc4_ctr; - } si; - struct gsm_time gsm_time; - /* Radio Link Timeout counter. -1 disables timeout for - * lab/measurement purpose */ - int radio_link_timeout; - - int ul_power_target; /* Uplink Rx power target */ - - /* used by the sysmoBTS to adjust band */ - uint8_t auto_band; - - struct { - struct llist_head queue; /* list of struct smscb_msg */ - struct smscb_msg *cur_msg; /* current SMS-CB */ - } smscb_state; - - float min_qual_rach; /* minimum quality for RACH bursts */ - float min_qual_norm; /* minimum quality for normal daata */ - uint16_t max_ber10k_rach; /* Maximum permitted RACH BER in 0.01% */ - - struct { - char *sock_path; - } pcu; - - struct { - uint32_t last_fn; - struct timeval tv_clock; - struct osmo_timer_list fn_timer; - } vbts; -}; - enum lchan_ciph_state { LCHAN_CIPH_NONE, LCHAN_CIPH_RX_REQ, @@ -136,9 +40,6 @@ enum lchan_ciph_state { LCHAN_CIPH_RXTX_CONF, }; -#define bts_role_bts(x) ((struct gsm_bts_role_bts *)(x)->role) -#define btsb_bts(x) (x)->bts - #include <osmo-bts/gsm_data_shared.h> void lchan_set_state(struct gsm_lchan *lchan, enum gsm_lchan_state state); @@ -148,7 +49,7 @@ int conf_lchans_as_pchan(struct gsm_bts_trx_ts *ts, /* cipher code */ #define CIPHER_A5(x) (1 << (x-1)) -int bts_supports_cipher(struct gsm_bts_role_bts *bts, int rsl_cipher); +int bts_supports_cipher(struct gsm_bts *bts, int rsl_cipher); bool ts_is_pdch(const struct gsm_bts_trx_ts *ts); diff --git a/include/osmo-bts/gsm_data_shared.h b/include/osmo-bts/gsm_data_shared.h index e4ac9b0b..b19bc903 100644 --- a/include/osmo-bts/gsm_data_shared.h +++ b/include/osmo-bts/gsm_data_shared.h @@ -78,6 +78,8 @@ enum bts_gprs_mode { struct gsm_lchan; struct osmo_rtp_socket; +struct pcu_sock_state; +struct smscb_msg; /* Network Management State */ struct gsm_nm_state { @@ -626,7 +628,95 @@ struct gsm_bts { struct rate_ctr_group *ctrs; bool supp_meas_toa256; - void *role; + struct { + /* Interference Boundaries for OML */ + int16_t boundary[6]; + uint8_t intave; + } interference; + unsigned int t200_ms[7]; + unsigned int t3105_ms; + struct { + uint8_t overload_period; + struct { + /* Input parameters from OML */ + uint8_t load_ind_thresh; /* percent */ + uint8_t load_ind_period; /* seconds */ + /* Internal data */ + struct osmo_timer_list timer; + unsigned int pch_total; + unsigned int pch_used; + } ccch; + struct { + /* Input parameters from OML */ + int16_t busy_thresh; /* in dBm */ + uint16_t averaging_slots; + /* Internal data */ + unsigned int total; /* total nr */ + unsigned int busy; /* above busy_thresh */ + unsigned int access; /* access bursts */ + } rach; + } load; + uint8_t ny1; + uint8_t max_ta; + + /* AGCH queuing */ + struct { + struct llist_head queue; + int length; + int max_length; + + int thresh_level; /* Cleanup threshold in percent of max len */ + int low_level; /* Low water mark in percent of max len */ + int high_level; /* High water mark in percent of max len */ + + /* TODO: Use a rate counter group instead */ + uint64_t dropped_msgs; + uint64_t merged_msgs; + uint64_t rejected_msgs; + uint64_t agch_msgs; + uint64_t pch_msgs; + } agch_queue; + + struct paging_state *paging_state; + char *bsc_oml_host; + struct llist_head oml_queue; + unsigned int rtp_jitter_buf_ms; + bool rtp_jitter_adaptive; + struct { + uint8_t ciphers; /* flags A5/1==0x1, A5/2==0x2, A5/3==0x4 */ + } support; + struct { + uint8_t tc4_ctr; + } si; + struct gsm_time gsm_time; + /* Radio Link Timeout counter. -1 disables timeout for + * lab/measurement purpose */ + int radio_link_timeout; + + int ul_power_target; /* Uplink Rx power target */ + + /* used by the sysmoBTS to adjust band */ + uint8_t auto_band; + + struct { + struct llist_head queue; /* list of struct smscb_msg */ + struct smscb_msg *cur_msg; /* current SMS-CB */ + } smscb_state; + + float min_qual_rach; /* minimum quality for RACH bursts */ + float min_qual_norm; /* minimum quality for normal daata */ + uint16_t max_ber10k_rach; /* Maximum permitted RACH BER in 0.01% */ + + struct { + char *sock_path; + } pcu; + + struct { + uint32_t last_fn; + struct timeval tv_clock; + struct osmo_timer_list fn_timer; + } vbts; + }; diff --git a/include/osmo-bts/paging.h b/include/osmo-bts/paging.h index 38accd72..7fc0bf05 100644 --- a/include/osmo-bts/paging.h +++ b/include/osmo-bts/paging.h @@ -6,10 +6,10 @@ #include <osmocom/gsm/protocol/gsm_04_08.h> struct paging_state; -struct gsm_bts_role_bts; +struct gsm_bts; /* initialize paging code */ -struct paging_state *paging_init(struct gsm_bts_role_bts *btsb, +struct paging_state *paging_init(struct gsm_bts *bts, unsigned int num_paging_max, unsigned int paging_lifetime); |