falconia has uploaded this change for review.
nokia cosmetic: add bts_is_insite() function
Nokia InSite gets a different config than the larger Nokia BTS models,
and make_bts_config() function checks the BTS type to decide which
config to send. Change the BTS type check from a long 'if' line that
compares against 3 different InSite BTS type codes to bts_is_insite()
helper function that encapsulates a switch statement.
Upcoming code additions will need to check for Flexi Multiradio BTS
family in a similar manner - so be consistent.
Change-Id: I44bbcd79d9741f1df280b6b2391f04f754598035
---
M src/osmo-bsc/bts_nokia_site.c
1 file changed, 14 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/25/42725/1
diff --git a/src/osmo-bsc/bts_nokia_site.c b/src/osmo-bsc/bts_nokia_site.c
index 340405e..29b1929 100644
--- a/src/osmo-bsc/bts_nokia_site.c
+++ b/src/osmo-bsc/bts_nokia_site.c
@@ -1162,12 +1162,24 @@
/* TODO: put in a separate file ? */
+static bool bts_is_insite(uint8_t bts_type)
+{
+ switch (bts_type) {
+ case 0x0E: /* InSite 900 MHz */
+ case 0x0F: /* InSite 1800 MHz */
+ case 0x10: /* InSite 1900 MHz */
+ return true;
+ default:
+ return false;
+ }
+}
+
/* build the configuration data */
static int make_bts_config(struct gsm_bts *bts, uint8_t bts_type, int n_trx, uint8_t * fu_config,
int need_hopping, int hopping_type)
{
- /* is it an InSite BTS ? */
- if (bts_type == 0x0E || bts_type == 0x0F || bts_type == 0x10) { /* TODO */
+ /* InSite BTS gets its own special config */
+ if (bts_is_insite(bts_type)) {
if (n_trx != 1) {
LOG_BTS(bts, DNM, LOGL_ERROR, "InSite has only one TRX\n");
return 0;
To view, visit change 42725. To unsubscribe, or for help writing mail filters, visit settings.