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/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/16060 )
Change subject: Change gsm_lchan field fixed to bool
......................................................................
Change gsm_lchan field fixed to bool
Change-Id: I715ef151b67a21e325c574585a257e71b4b0ce2a
---
M include/osmo-bts/gsm_data_shared.h
M src/common/rsl.c
M tests/power/power_test.c
3 files changed, 11 insertions(+), 11 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/include/osmo-bts/gsm_data_shared.h b/include/osmo-bts/gsm_data_shared.h
index 8678ea5..5061310 100644
--- a/include/osmo-bts/gsm_data_shared.h
+++ b/include/osmo-bts/gsm_data_shared.h
@@ -323,7 +323,7 @@
/* power handling */
struct {
uint8_t current;
- uint8_t fixed;
+ bool fixed;
} ms_power_ctrl;
struct msgb *pending_rel_ind_msg;
diff --git a/src/common/rsl.c b/src/common/rsl.c
index d8ce016..9a4afb3 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -999,7 +999,7 @@
* cleared, or we would enable encryption on PDCH with parameters remaining from the TCH. */
lchan->ms_power = ms_pwr_ctl_lvl(lchan->ts->trx->bts->band, 0);
lchan->ms_power_ctrl.current = lchan->ms_power;
- lchan->ms_power_ctrl.fixed = 0;
+ lchan->ms_power_ctrl.fixed = false;
lchan->rsl_cmode = 0;
lchan->tch_mode = 0;
memset(&lchan->encr, 0, sizeof(lchan->encr));
@@ -1104,7 +1104,7 @@
/* Initialize channel defaults */
lchan->ms_power = ms_pwr_ctl_lvl(lchan->ts->trx->bts->band, 0);
lchan->ms_power_ctrl.current = lchan->ms_power;
- lchan->ms_power_ctrl.fixed = 0;
+ lchan->ms_power_ctrl.fixed = false;
rsl_tlv_parse(&tp, msgb_l3(msg), msgb_l3len(msg));
@@ -1156,7 +1156,7 @@
if (TLVP_PRES_LEN(&tp, RSL_IE_MS_POWER, 1)) {
lchan->ms_power = *TLVP_VAL(&tp, RSL_IE_MS_POWER);
lchan->ms_power_ctrl.current = lchan->ms_power;
- lchan->ms_power_ctrl.fixed = 0;
+ lchan->ms_power_ctrl.fixed = false;
}
/* 9.3.24 Timing Advance */
if (TLVP_PRES_LEN(&tp, RSL_IE_TIMING_ADVANCE, 1))
@@ -1165,12 +1165,12 @@
/* 9.3.32 BS Power Parameters */
/* 9.3.31 MS Power Parameters */
if (TLVP_PRESENT(&tp, RSL_IE_MS_POWER_PARAM))
- lchan->ms_power_ctrl.fixed = 0;
+ lchan->ms_power_ctrl.fixed = false;
else {
/* Spec explicitly states BTS should only perform
* autonomous MS power control loop in BTS if 'MS Power
* Parameters' IE is present! */
- lchan->ms_power_ctrl.fixed = 1;
+ lchan->ms_power_ctrl.fixed = true;
}
/* 9.3.16 Physical Context */
@@ -1642,16 +1642,16 @@
/* 9.3.31 MS Power Parameters (O) */
if (TLVP_PRESENT(&tp, RSL_IE_MS_POWER_PARAM))
- lchan->ms_power_ctrl.fixed = 0;
+ lchan->ms_power_ctrl.fixed = false;
else {
/* Spec explicitly states BTS should only perform
* autonomous MS power control loop in BTS if 'MS Power
* Parameters' IE is present! */
- lchan->ms_power_ctrl.fixed = 1;
+ lchan->ms_power_ctrl.fixed = true;
}
/* Only set current to lchan->ms_power if actual value of current
- in dBm > value in dBm from lchan->ms_power, or if fixed=1. */
+ in dBm > value in dBm from lchan->ms_power, or if fixed. */
if (lchan->ms_power_ctrl.fixed) {
lchan->ms_power_ctrl.current = lchan->ms_power;
} else {
diff --git a/tests/power/power_test.c b/tests/power/power_test.c
index 8df6d69..dbae8fa 100644
--- a/tests/power/power_test.c
+++ b/tests/power/power_test.c
@@ -68,11 +68,11 @@
apply_power_test(lchan, -100, 1, 0);
/* Fix it and jump down */
- lchan->ms_power_ctrl.fixed = 1;
+ lchan->ms_power_ctrl.fixed = true;
apply_power_test(lchan, -60, 0, 0);
/* And leave it again */
- lchan->ms_power_ctrl.fixed = 0;
+ lchan->ms_power_ctrl.fixed = false;
apply_power_test(lchan, -40, 1, 15);
}
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16060
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I715ef151b67a21e325c574585a257e71b4b0ce2a
Gerrit-Change-Number: 16060
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20191114/2d56309b/attachment.htm>