aboutsummaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2013-08-31 20:30:40 +0200
committerAndreas Eversberg <jolly@eversberg.eu>2014-04-05 12:48:17 +0200
commita74d52c7b0b3193ad04726f8de6cb90671e2a03e (patch)
treef3e426dff661b70b7e80403bf86ecbbffe5eb023 /src/common
parentf547208312a17985c8af1739db5ba087ed38fb17 (diff)
Add MEAS (MPH_INFO) IND message to PH-/MPH-/TCH-SAP interface
This part moves processing of measurement infos from osmo-bts-sysmo to common part.
Diffstat (limited to 'src/common')
-rw-r--r--src/common/l1sap.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index a51c1fb4..37988142 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -144,6 +144,35 @@ static int l1sap_info_time_ind(struct gsm_bts_trx *trx,
return 0;
}
+/* measurement information received from bts model */
+static int l1sap_info_meas_ind(struct gsm_bts_trx *trx,
+ struct osmo_phsap_prim *l1sap,
+ struct info_meas_ind_param *info_meas_ind)
+{
+ struct bts_ul_meas ulm;
+ struct gsm_lchan *lchan;
+
+ DEBUGP(DL1P, "MPH_INFO meas ind chan_nr=%02x\n",
+ info_meas_ind->chan_nr);
+
+ lchan = &trx->ts[L1SAP_CHAN2TS(info_meas_ind->chan_nr)]
+ .lchan[l1sap_chan2ss(info_meas_ind->chan_nr)];
+
+ /* in the GPRS case we are not interested in measurement
+ * processing. The PCU will take care of it */
+ if (lchan->type == GSM_LCHAN_PDTCH)
+ return 0;
+
+ memset(&ulm, 0, sizeof(ulm));
+ ulm.ta_offs_qbits = info_meas_ind->ta_offs_qbits;
+ ulm.ber10k = info_meas_ind->ber10k;
+ ulm.inv_rssi = info_meas_ind->inv_rssi;
+
+ lchan_new_ul_meas(lchan, &ulm);
+
+ return 0;
+}
+
/* any L1 MPH_INFO indication prim recevied from bts model */
static int l1sap_mph_info_ind(struct gsm_bts_trx *trx,
struct osmo_phsap_prim *l1sap, struct mph_info_param *info)
@@ -154,6 +183,9 @@ static int l1sap_mph_info_ind(struct gsm_bts_trx *trx,
case PRIM_INFO_TIME:
rc = l1sap_info_time_ind(trx, l1sap, &info->u.time_ind);
break;
+ case PRIM_INFO_MEAS:
+ rc = l1sap_info_meas_ind(trx, l1sap, &info->u.meas_ind);
+ break;
default:
LOGP(DL1P, LOGL_NOTICE, "unknown MPH_INFO ind type %d\n",
info->type);