mirror of
				https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw.git
				synced 2025-11-04 05:53:26 +00:00 
			
		
		
		
	Prepare for BTS attribute reporting via OML
* use define for number of attributes instead of magic number * add sub_model to gsm_bts struct * expand number of BTS features * mark attributes parameter to abis_nm_get_attr() as const Change-Id: I7ecb0c4339530d3a8354a2f94b34063dda87e030 Related: OS#1614
This commit is contained in:
		@@ -28,6 +28,9 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#include <openbsc/gsm_data.h>
 | 
					#include <openbsc/gsm_data.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/* max number of attributes represented as 3GPP TS 52.021 §9.4.62 SW Description array */
 | 
				
			||||||
 | 
					#define MAX_BTS_ATTR 5
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct cell_global_id {
 | 
					struct cell_global_id {
 | 
				
			||||||
	uint16_t mcc;
 | 
						uint16_t mcc;
 | 
				
			||||||
	uint16_t mnc;
 | 
						uint16_t mnc;
 | 
				
			||||||
@@ -85,7 +88,7 @@ int abis_nm_conn_terr_traf(struct gsm_bts_trx_ts *ts,
 | 
				
			|||||||
			   uint8_t e1_subslot);
 | 
								   uint8_t e1_subslot);
 | 
				
			||||||
int abis_nm_get_attr(struct gsm_bts *bts, uint8_t obj_class,
 | 
					int abis_nm_get_attr(struct gsm_bts *bts, uint8_t obj_class,
 | 
				
			||||||
		     uint8_t bts_nr, uint8_t trx_nr, uint8_t ts_nr,
 | 
							     uint8_t bts_nr, uint8_t trx_nr, uint8_t ts_nr,
 | 
				
			||||||
		     uint8_t *attr, uint8_t attr_len);
 | 
							     const uint8_t *attr, uint8_t attr_len);
 | 
				
			||||||
int abis_nm_set_bts_attr(struct gsm_bts *bts, uint8_t *attr, int attr_len);
 | 
					int abis_nm_set_bts_attr(struct gsm_bts *bts, uint8_t *attr, int attr_len);
 | 
				
			||||||
int abis_nm_set_radio_attr(struct gsm_bts_trx *trx, uint8_t *attr, int attr_len);
 | 
					int abis_nm_set_radio_attr(struct gsm_bts_trx *trx, uint8_t *attr, int attr_len);
 | 
				
			||||||
int abis_nm_set_channel_attr(struct gsm_bts_trx_ts *ts, uint8_t chan_comb);
 | 
					int abis_nm_set_channel_attr(struct gsm_bts_trx_ts *ts, uint8_t chan_comb);
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -545,6 +545,9 @@ enum gsm_bts_features {
 | 
				
			|||||||
	BTS_FEAT_ECSD,
 | 
						BTS_FEAT_ECSD,
 | 
				
			||||||
	BTS_FEAT_HOPPING,
 | 
						BTS_FEAT_HOPPING,
 | 
				
			||||||
	BTS_FEAT_MULTI_TSC,
 | 
						BTS_FEAT_MULTI_TSC,
 | 
				
			||||||
 | 
						BTS_FEAT_OML_ALERTS,
 | 
				
			||||||
 | 
						BTS_FEAT_AGCH_PCH_PROP,
 | 
				
			||||||
 | 
						BTS_FEAT_CBCH,
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
@@ -676,6 +679,7 @@ struct gsm_bts {
 | 
				
			|||||||
	struct gsm_bts_model *model;
 | 
						struct gsm_bts_model *model;
 | 
				
			||||||
	enum gsm_band band;
 | 
						enum gsm_band band;
 | 
				
			||||||
	char version[MAX_VERSION_LENGTH];
 | 
						char version[MAX_VERSION_LENGTH];
 | 
				
			||||||
 | 
						char sub_model[MAX_VERSION_LENGTH];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Connected PCU version (if any) */
 | 
						/* Connected PCU version (if any) */
 | 
				
			||||||
	char pcu_version[MAX_VERSION_LENGTH];
 | 
						char pcu_version[MAX_VERSION_LENGTH];
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -439,6 +439,7 @@ int abis_nm_select_newest_sw(const struct abis_nm_sw_desc *sw_descr,
 | 
				
			|||||||
	return res;
 | 
						return res;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/* 3GPP TS 52.021 §6.2.5 */
 | 
				
			||||||
static int abis_nm_rx_sw_act_req(struct msgb *mb)
 | 
					static int abis_nm_rx_sw_act_req(struct msgb *mb)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct abis_om_hdr *oh = msgb_l2(mb);
 | 
						struct abis_om_hdr *oh = msgb_l2(mb);
 | 
				
			||||||
@@ -447,7 +448,7 @@ static int abis_nm_rx_sw_act_req(struct msgb *mb)
 | 
				
			|||||||
	struct tlv_parsed tp;
 | 
						struct tlv_parsed tp;
 | 
				
			||||||
	const uint8_t *sw_config;
 | 
						const uint8_t *sw_config;
 | 
				
			||||||
	int ret, sw_config_len, len;
 | 
						int ret, sw_config_len, len;
 | 
				
			||||||
	struct abis_nm_sw_desc sw_descr[5];
 | 
						struct abis_nm_sw_desc sw_descr[MAX_BTS_ATTR];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	abis_nm_debugp_foh(DNM, foh);
 | 
						abis_nm_debugp_foh(DNM, foh);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -1441,10 +1442,9 @@ int abis_nm_disc_terr_traf(struct abis_nm_h *h, struct abis_om_obj_inst *inst,
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* Chapter 8.11.1 */
 | 
					/* 3GPP TS 52.021 § 8.11.1 */
 | 
				
			||||||
int abis_nm_get_attr(struct gsm_bts *bts, uint8_t obj_class,
 | 
					int abis_nm_get_attr(struct gsm_bts *bts, uint8_t obj_class, uint8_t bts_nr, uint8_t trx_nr, uint8_t ts_nr,
 | 
				
			||||||
			uint8_t bts_nr, uint8_t trx_nr, uint8_t ts_nr,
 | 
							     const uint8_t *attr, uint8_t attr_len)
 | 
				
			||||||
			uint8_t *attr, uint8_t attr_len)
 | 
					 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct abis_om_hdr *oh;
 | 
						struct abis_om_hdr *oh;
 | 
				
			||||||
	struct msgb *msg = nm_msgb_alloc();
 | 
						struct msgb *msg = nm_msgb_alloc();
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user