Change in osmo-bsc[master]: gsm_data: set meaningful default values for amr modes

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Tue Oct 23 18:23:54 UTC 2018


Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/11441 )

Change subject: gsm_data: set meaningful default values for amr modes
......................................................................

gsm_data: set meaningful default values for amr modes

The function gsm_bts_alloc() does set default values for the amr rates
for a newly allocated bts, but it does not populate the ms_mode and
bts_mode flags which contain hysteresis and threshold. Those values are
currently set to 0 by default, which does not make much sense. Lets
popluate some appropriate default values.

- Make sure that .mode .hysteresis and .threshold are populated for
  MS and BTS in full and halfrate

Change-Id: If14843feeeea6584e5991d5c0abb765611dfaa57
Related: OS#3529
---
M src/osmo-bsc/gsm_data.c
1 file changed, 30 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved



diff --git a/src/osmo-bsc/gsm_data.c b/src/osmo-bsc/gsm_data.c
index 8d0b831..08d5bcb 100644
--- a/src/osmo-bsc/gsm_data.c
+++ b/src/osmo-bsc/gsm_data.c
@@ -900,6 +900,21 @@
 		.m12_2 = 1
 	};
 	memcpy(bts->mr_full.gsm48_ie, &mr_cfg, sizeof(bts->mr_full.gsm48_ie));
+	bts->mr_full.ms_mode[0].mode = 1;
+	bts->mr_full.ms_mode[1].mode = 2;
+	bts->mr_full.ms_mode[2].mode = 6;
+	bts->mr_full.ms_mode[3].mode = 7;
+	bts->mr_full.bts_mode[0].mode = 1;
+	bts->mr_full.bts_mode[1].mode = 2;
+	bts->mr_full.bts_mode[2].mode = 6;
+	bts->mr_full.bts_mode[3].mode = 7;
+	for (i = 0; i < 3; i++) {
+		bts->mr_full.ms_mode[i].hysteresis = 8;
+		bts->mr_full.ms_mode[i].threshold = 32;
+		bts->mr_full.bts_mode[i].hysteresis = 8;
+		bts->mr_full.bts_mode[i].threshold = 32;
+	}
+	bts->mr_full.num_modes = 4;
 
 	mr_cfg = (struct gsm48_multi_rate_conf) {
 		.m4_75 = 0,
@@ -912,6 +927,21 @@
 		.m12_2 = 0
 	};
 	memcpy(bts->mr_half.gsm48_ie, &mr_cfg, sizeof(bts->mr_half.gsm48_ie));
+	bts->mr_half.ms_mode[0].mode = 1;
+	bts->mr_half.ms_mode[1].mode = 2;
+	bts->mr_half.ms_mode[2].mode = 4;
+	bts->mr_half.ms_mode[3].mode = 5;
+	bts->mr_half.bts_mode[0].mode = 1;
+	bts->mr_half.bts_mode[1].mode = 2;
+	bts->mr_half.bts_mode[2].mode = 4;
+	bts->mr_half.bts_mode[3].mode = 5;
+	for (i = 0; i < 3; i++) {
+		bts->mr_half.ms_mode[i].hysteresis = 8;
+		bts->mr_half.ms_mode[i].threshold = 32;
+		bts->mr_half.bts_mode[i].hysteresis = 8;
+		bts->mr_half.bts_mode[i].threshold = 32;
+	}
+	bts->mr_half.num_modes = 4;
 
 	return bts;
 }

-- 
To view, visit https://gerrit.osmocom.org/11441
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: If14843feeeea6584e5991d5c0abb765611dfaa57
Gerrit-Change-Number: 11441
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181023/8147366f/attachment.htm>


More information about the gerrit-log mailing list