aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2011-06-28 12:11:51 +0200
committerHarald Welte <laforge@gnumonks.org>2011-06-28 12:11:51 +0200
commitc5e01c8bd463e42ea3bbe4142941f43c548f14c7 (patch)
tree9290d3d187db52679152da51d06b437b3542aae0
parentd04d43098dd9017517e149016d3bcbcf4906c50c (diff)
implement RSL DEACTIVATE SACCH
-rw-r--r--include/osmo-bts/bts_model.h1
-rw-r--r--src/common/rsl.c1
-rw-r--r--src/osmo-bts-sysmo/bts_model.c5
-rw-r--r--src/osmo-bts-sysmo/oml.c19
4 files changed, 26 insertions, 0 deletions
diff --git a/include/osmo-bts/bts_model.h b/include/osmo-bts/bts_model.h
index 81b30e9..e7a0d04 100644
--- a/include/osmo-bts/bts_model.h
+++ b/include/osmo-bts/bts_model.h
@@ -29,5 +29,6 @@ int bts_model_chg_adm_state(struct gsm_bts *bts, struct gsm_abis_mo *mo,
int bts_model_rsl_chan_act(struct gsm_lchan *lchan, struct tlv_parsed *tp);
int bts_model_rsl_chan_rel(struct gsm_lchan *lchan);
+int bts_model_rsl_deact_sacch(struct gsm_lchan *lchan);
#endif
diff --git a/src/common/rsl.c b/src/common/rsl.c
index 650db24..e6ced26 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -946,6 +946,7 @@ static int rsl_rx_dchan(struct gsm_bts_trx *trx, struct msgb *msg)
case RSL_MT_SACCH_INFO_MODIFY:
return rsl_rx_sacch_inf_mod(msg);
case RSL_MT_DEACTIVATE_SACCH:
+ return bts_model_rsl_deact_sacch(msg->lchan);
case RSL_MT_ENCR_CMD:
case RSL_MT_MODE_MODIFY_REQ:
case RSL_MT_PHY_CONTEXT_REQ:
diff --git a/src/osmo-bts-sysmo/bts_model.c b/src/osmo-bts-sysmo/bts_model.c
index 71d8803..7e9ffee 100644
--- a/src/osmo-bts-sysmo/bts_model.c
+++ b/src/osmo-bts-sysmo/bts_model.c
@@ -39,3 +39,8 @@ int bts_model_rsl_chan_rel(struct gsm_lchan *lchan)
lchan_deactivate(lchan);
return rsl_tx_rf_rel_ack(lchan);
}
+
+int bts_model_rsl_deact_sacch(struct gsm_lchan *lchan)
+{
+ return lchan_deactivate_sacch(lchan);
+}
diff --git a/src/osmo-bts-sysmo/oml.c b/src/osmo-bts-sysmo/oml.c
index 0c9183a..068ca58 100644
--- a/src/osmo-bts-sysmo/oml.c
+++ b/src/osmo-bts-sysmo/oml.c
@@ -487,6 +487,25 @@ int lchan_deactivate(struct gsm_lchan *lchan)
return 0;
}
+int lchan_deactivate_sacch(struct gsm_lchan *lchan)
+{
+ struct femtol1_hdl *fl1h = trx_femtol1_hdl(lchan->ts->trx);
+ struct msgb *msg = l1p_msgb_alloc();
+ GsmL1_MphDeactivateReq_t *deact_req;
+
+ deact_req = prim_init(msgb_l1prim(msg), GsmL1_PrimId_MphDeactivateReq, fl1h);
+ deact_req->u8Tn = lchan->ts->nr;
+ deact_req->subCh = lchan_to_GsmL1_SubCh_t(lchan);
+ deact_req->dir = DIR_BOTH;
+ deact_req->sapi = GsmL1_Sapi_Sacch;
+
+ LOGP(DL1C, LOGL_NOTICE, "%s SACCH MPH-DEACTIVATE.req\n",
+ gsm_lchan_name(lchan));
+
+ /* send the primitive for all GsmL1_Sapi_* that match the LCHAN */
+ return l1if_req_compl(fl1h, msg, 0, lchan_deact_compl_cb, lchan);
+}
+
struct gsm_time *bts_model_get_time(struct gsm_bts *bts)
{