diff options
author | Andreas Eversberg <jolly@eversberg.eu> | 2013-08-31 20:30:40 +0200 |
---|---|---|
committer | Andreas Eversberg <jolly@eversberg.eu> | 2014-04-05 12:48:17 +0200 |
commit | a74d52c7b0b3193ad04726f8de6cb90671e2a03e (patch) | |
tree | f3e426dff661b70b7e80403bf86ecbbffe5eb023 /src/osmo-bts-sysmo | |
parent | f547208312a17985c8af1739db5ba087ed38fb17 (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/osmo-bts-sysmo')
-rw-r--r-- | src/osmo-bts-sysmo/l1_if.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c index c036147f..8babdd14 100644 --- a/src/osmo-bts-sysmo/l1_if.c +++ b/src/osmo-bts-sysmo/l1_if.c @@ -838,20 +838,20 @@ static void dump_meas_res(int ll, GsmL1_MeasParam_t *m) m->fBer, m->i16BurstTiming); } -static int process_meas_res(struct gsm_lchan *lchan, GsmL1_MeasParam_t *m) +static int process_meas_res(struct gsm_bts_trx *trx, uint8_t chan_nr, + GsmL1_MeasParam_t *m) { - struct bts_ul_meas ulm; - - /* 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; - - ulm.ta_offs_qbits = m->i16BurstTiming; - ulm.ber10k = (unsigned int) (m->fBer * 100); - ulm.inv_rssi = (uint8_t) (m->fRssi * -1); + struct osmo_phsap_prim l1sap; + memset(&l1sap, 0, sizeof(l1sap)); + osmo_prim_init(&l1sap.oph, SAP_GSM_PH, PRIM_MPH_INFO, + PRIM_OP_INDICATION, NULL); + l1sap.u.info.type = PRIM_INFO_MEAS; + l1sap.u.info.u.meas_ind.chan_nr = chan_nr; + l1sap.u.info.u.meas_ind.ta_offs_qbits = m->i16BurstTiming; + l1sap.u.info.u.meas_ind.ber10k = (unsigned int) (m->fBer * 100); + l1sap.u.info.u.meas_ind.inv_rssi = (uint8_t) (m->fRssi * -1); - return lchan_new_ul_meas(lchan, &ulm); + return l1sap_up(trx, &l1sap); } static int handle_ph_data_ind(struct femtol1_hdl *fl1, GsmL1_PhDataInd_t *data_ind, @@ -887,7 +887,7 @@ static int handle_ph_data_ind(struct femtol1_hdl *fl1, GsmL1_PhDataInd_t *data_i fn = data_ind->u32Fn; link_id = (data_ind->sapi == GsmL1_Sapi_Sacch) ? 0x40 : 0x00; - process_meas_res(lchan, &data_ind->measParam); + process_meas_res(trx, chan_nr, &data_ind->measParam); if (data_ind->measParam.fLinkQuality < fl1->min_qual_norm && data_ind->msgUnitParam.u8Size != 0) { |