aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2020-11-26 21:21:45 +0100
committerVadim Yanitskiy <vyanitskiy@sysmocom.de>2020-12-06 18:57:43 +0100
commit0698c58ebe1f0e196240dab152f413759c47feb9 (patch)
treea886ca56462cf34999ac9aec09c708edc521174e /include
parent0ced8dd03e1eac2e2dbffbbd0a5f86feeac8ca67 (diff)
power_control: implement BS (Downlink) Power Control
We already have MS Power Control, which according to 3GPP 45.008 shall be implemented in the MS to minimize the transmit power in the Uplink direction. The BS Power Control may optionally be implemented by the network side for the same purpose. Using Downlink signal measurements reported by the MS, the BSS (either BSC, or BTS) may control Downlink attenuation in a way that the transmit power remains as low as possible, or remains in a specific range corresponding to good RxLev values on the MS side. This change implements autonomous BS Power Control, that can optionally be enabled by the BSC. BS Power Control re-uses parts of the MS Power Control code, so all parameters can be configured in the same way - via the VTY interface or a configuration file. This basically means that features like hysteresis and EWMA based filtering are also available for BS Power Control. The only difference is that RxQual values higher than 0 would trigger the logic to reduce the current attenuation twice. Note that one of the unit tests ('TC_rxlev_max_min') fails, as the power step limitations for raising and lowering look wrong to me, and the related discussion is still ongoing. Change-Id: I5b509e71d5f668b6b8b2abf8053c27f2a7c78451 Related: SYS#4918
Diffstat (limited to 'include')
-rw-r--r--include/osmo-bts/gsm_data.h6
-rw-r--r--include/osmo-bts/power_control.h3
2 files changed, 5 insertions, 4 deletions
diff --git a/include/osmo-bts/gsm_data.h b/include/osmo-bts/gsm_data.h
index 04c66298..6af96fe9 100644
--- a/include/osmo-bts/gsm_data.h
+++ b/include/osmo-bts/gsm_data.h
@@ -316,11 +316,9 @@ struct gsm_lchan {
/* RTP header Marker bit to indicate beginning of speech after pause */
bool rtp_tx_marker;
- /* MS power control */
+ /* MS/BS power control */
struct lchan_power_ctrl_state ms_power_ctrl;
-
- /* BTS power reduction (in dB) */
- uint8_t bs_power_red;
+ struct lchan_power_ctrl_state bs_power_ctrl;
struct msgb *pending_rel_ind_msg;
diff --git a/include/osmo-bts/power_control.h b/include/osmo-bts/power_control.h
index cb566a8d..f2e14cfe 100644
--- a/include/osmo-bts/power_control.h
+++ b/include/osmo-bts/power_control.h
@@ -6,3 +6,6 @@
int lchan_ms_pwr_ctrl(struct gsm_lchan *lchan,
const uint8_t ms_power_lvl,
const int8_t ul_rssi_dbm);
+
+int lchan_bs_pwr_ctrl(struct gsm_lchan *lchan,
+ const struct gsm48_hdr *gh);