aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/osmocom/bsc/bsc_subscr_conn_fsm.h5
-rw-r--r--include/osmocom/bsc/gsm_data.h4
-rw-r--r--src/osmo-bsc/bsc_api.c133
-rw-r--r--src/osmo-bsc/bsc_init.c1
-rw-r--r--src/osmo-bsc/bsc_subscr_conn_fsm.c178
-rw-r--r--src/osmo-bsc/gsm_04_08_utils.c11
-rw-r--r--src/osmo-bsc/gsm_04_80_utils.c8
-rw-r--r--src/osmo-bsc/osmo_bsc_api.c2
-rw-r--r--tests/bsc/bsc_test.c3
9 files changed, 185 insertions, 160 deletions
diff --git a/include/osmocom/bsc/bsc_subscr_conn_fsm.h b/include/osmocom/bsc/bsc_subscr_conn_fsm.h
index e8226f443..0d373eb49 100644
--- a/include/osmocom/bsc/bsc_subscr_conn_fsm.h
+++ b/include/osmocom/bsc/bsc_subscr_conn_fsm.h
@@ -66,6 +66,11 @@ enum gscon_fsm_event {
struct gsm_subscriber_connection;
struct gsm_network;
+struct msgb;
/* Allocate a subscriber connection and its associated FSM */
struct gsm_subscriber_connection *bsc_subscr_con_allocate(struct gsm_network *net);
+
+void gscon_submit_rsl_dtap(struct gsm_subscriber_connection *conn,
+ struct msgb *msg, int link_id, int allow_sacch);
+void gscon_dtap_cache_flush(struct gsm_subscriber_connection *conn, int send);
diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index 76a1b30fe..6ee95f771 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -120,8 +120,8 @@ struct gsm_subscriber_connection {
struct gsm_classmark classmark;
/* Cache DTAP messages during handover/assignment (msgb_enqueue()/msgb_dequeue())*/
- struct llist_head ho_dtap_cache;
- unsigned int ho_dtap_cache_len;
+ struct llist_head dtap_cache;
+ unsigned int dtap_cache_len;
struct {
int failures;
diff --git a/src/osmo-bsc/bsc_api.c b/src/osmo-bsc/bsc_api.c
index 4cf11a466..2c799e3cb 100644
--- a/src/osmo-bsc/bsc_api.c
+++ b/src/osmo-bsc/bsc_api.c
@@ -33,6 +33,7 @@
#include <osmocom/bsc/bsc_subscriber.h>
#include <osmocom/bsc/penalty_timers.h>
#include <osmocom/bsc/osmo_bsc_sigtran.h>
+#include <osmocom/bsc/bsc_subscr_conn_fsm.h>
#include <osmocom/gsm/protocol/gsm_08_08.h>
#include <osmocom/gsm/gsm48.h>
@@ -41,10 +42,6 @@
#define GSM0808_T10_VALUE 6, 0
-#define HO_DTAP_CACHE_MSGB_CB_LINK_ID 0
-#define HO_DTAP_CACHE_MSGB_CB_ALLOW_SACCH 1
-
-static void rll_ind_cb(struct gsm_lchan *, uint8_t, void *, enum bsc_rllr_ind);
static void handle_release(struct gsm_subscriber_connection *conn, struct gsm_lchan *lchan);
static void handle_chan_ack(struct gsm_subscriber_connection *conn, struct gsm_lchan *lchan);
static void handle_chan_nack(struct gsm_subscriber_connection *conn, struct gsm_lchan *lchan);
@@ -116,97 +113,6 @@ static int handle_new_assignment(struct gsm_subscriber_connection *conn, int cha
return 0;
}
-static void ho_dtap_cache_add(struct gsm_subscriber_connection *conn, struct msgb *msg,
- int link_id, bool allow_sacch)
-{
- if (conn->ho_dtap_cache_len >= 23) {
- LOGP(DHO, LOGL_ERROR, "%s: Cannot cache more DTAP messages,"
- " already reached sane maximum of %u cached messages\n",
- bsc_subscr_name(conn->bsub), conn->ho_dtap_cache_len);
- msgb_free(msg);
- return;
- }
- conn->ho_dtap_cache_len ++;
- LOGP(DHO, LOGL_DEBUG, "%s: Caching DTAP message during ho/ass (%u)\n",
- bsc_subscr_name(conn->bsub), conn->ho_dtap_cache_len);
- msg->cb[HO_DTAP_CACHE_MSGB_CB_LINK_ID] = (unsigned long)link_id;
- msg->cb[HO_DTAP_CACHE_MSGB_CB_ALLOW_SACCH] = allow_sacch ? 1 : 0;
- msgb_enqueue(&conn->ho_dtap_cache, msg);
-}
-
-void ho_dtap_cache_flush(struct gsm_subscriber_connection *conn, int send)
-{
- struct msgb *msg;
- unsigned int flushed_count = 0;
-
- if (conn->secondary_lchan || conn->ho) {
- LOGP(DHO, LOGL_ERROR, "%s: Cannot send cached DTAP messages, handover/assignment is still ongoing\n",
- bsc_subscr_name(conn->bsub));
- send = 0;
- }
-
- while ((msg = msgb_dequeue(&conn->ho_dtap_cache))) {
- conn->ho_dtap_cache_len --;
- flushed_count ++;
- if (send) {
- int link_id = (int)msg->cb[HO_DTAP_CACHE_MSGB_CB_LINK_ID];
- bool allow_sacch = !!msg->cb[HO_DTAP_CACHE_MSGB_CB_ALLOW_SACCH];
- LOGP(DHO, LOGL_DEBUG, "%s: Sending cached DTAP message after handover/assignment (%u/%u)\n",
- bsc_subscr_name(conn->bsub), flushed_count, conn->ho_dtap_cache_len);
- gsm0808_submit_dtap(conn, msg, link_id, allow_sacch);
- } else
- msgb_free(msg);
- }
-}
-
-/*! \brief process incoming 08.08 DTAP from MSC (send via BTS to MS) */
-int gsm0808_submit_dtap(struct gsm_subscriber_connection *conn,
- struct msgb *msg, int link_id, int allow_sacch)
-{
- uint8_t sapi;
-
-
- if (!conn->lchan) {
- LOGP(DMSC, LOGL_ERROR,
- "%s Called submit dtap without an lchan.\n",
- bsc_subscr_name(conn->bsub));
- msgb_free(msg);
- return -1;
- }
-
- /* buffer message during assignment / handover */
- if (conn->secondary_lchan || conn->ho) {
- ho_dtap_cache_add(conn, msg, link_id, !! allow_sacch);
- return 0;
- }
-
- sapi = link_id & 0x7;
- msg->lchan = conn->lchan;
- msg->dst = msg->lchan->ts->trx->rsl_link;
-
- /* If we are on a TCH and need to submit a SMS (on SAPI=3) we need to use the SACH */
- if (allow_sacch && sapi != 0) {
- if (conn->lchan->type == GSM_LCHAN_TCH_F || conn->lchan->type == GSM_LCHAN_TCH_H)
- link_id |= 0x40;
- }
-
- msg->l3h = msg->data;
- /* is requested SAPI already up? */
- if (conn->lchan->sapis[sapi] == LCHAN_SAPI_UNUSED) {
- /* Establish L2 for additional SAPI */
- OBSC_LINKID_CB(msg) = link_id;
- if (rll_establish(msg->lchan, sapi, rll_ind_cb, msg) != 0) {
- msgb_free(msg);
- bsc_sapi_n_reject(conn, link_id);
- return -1;
- }
- return 0;
- } else {
- /* Directly forward via RLL/RSL to BTS */
- return rsl_data_request(msg, link_id);
- }
-}
-
/*
* \brief Check if the given channel is compatible with the mode/fullrate
*/
@@ -316,7 +222,7 @@ static void handle_ass_compl(struct gsm_subscriber_connection *conn,
/* FIXME: release old channel */
/* send pending messages, if any */
- ho_dtap_cache_flush(conn, 1);
+ gscon_dtap_cache_flush(conn, 1);
return;
}
@@ -332,7 +238,7 @@ static void handle_ass_compl(struct gsm_subscriber_connection *conn,
conn->secondary_lchan = NULL;
/* send pending messages, if any */
- ho_dtap_cache_flush(conn, 1);
+ gscon_dtap_cache_flush(conn, 1);
if (is_ipaccess_bts(conn_get_bts(conn)) && conn->lchan->tch_mode != GSM48_CMODE_SIGN)
rsl_ipacc_crcx(conn->lchan);
@@ -359,7 +265,7 @@ static void handle_ass_fail(struct gsm_subscriber_connection *conn,
/* FIXME: release allocated new channel */
/* send pending messages, if any */
- ho_dtap_cache_flush(conn, 1);
+ gscon_dtap_cache_flush(conn, 1);
return;
}
@@ -377,7 +283,7 @@ static void handle_ass_fail(struct gsm_subscriber_connection *conn,
}
/* send pending messages, if any */
- ho_dtap_cache_flush(conn, 1);
+ gscon_dtap_cache_flush(conn, 1);
gh = msgb_l3(msg);
if (msgb_l3len(msg) - sizeof(*gh) != 1) {
@@ -443,7 +349,7 @@ static void handle_rr_ho_compl(struct msgb *msg)
/* FIXME: release old channel */
/* send pending messages, if any */
- ho_dtap_cache_flush(msg->lchan->conn, 1);
+ gscon_dtap_cache_flush(msg->lchan->conn, 1);
}
/* Chapter 9.1.17 Handover Failure */
@@ -465,7 +371,7 @@ static void handle_rr_ho_fail(struct msgb *msg)
/* FIXME: release allocated new channel */
/* send pending messages, if any */
- ho_dtap_cache_flush(msg->lchan->conn, 1);
+ gscon_dtap_cache_flush(msg->lchan->conn, 1);
}
@@ -643,31 +549,6 @@ int gsm0808_clear(struct gsm_subscriber_connection *conn)
return 0;
}
-static void rll_ind_cb(struct gsm_lchan *lchan, uint8_t link_id, void *_data, enum bsc_rllr_ind rllr_ind)
-{
- struct msgb *msg = _data;
-
- /*
- * There seems to be a small window that the RLL timer can
- * fire after a lchan_release call and before the S_CHALLOC_FREED
- * is called. Check if a conn is set before proceeding.
- */
- if (!lchan->conn)
- return;
-
- switch (rllr_ind) {
- case BSC_RLLR_IND_EST_CONF:
- rsl_data_request(msg, OBSC_LINKID_CB(msg));
- break;
- case BSC_RLLR_IND_REL_IND:
- case BSC_RLLR_IND_ERR_IND:
- case BSC_RLLR_IND_TIMEOUT:
- bsc_sapi_n_reject(lchan->conn, OBSC_LINKID_CB(msg));
- msgb_free(msg);
- break;
- }
-}
-
static int bsc_handle_lchan_signal(unsigned int subsys, unsigned int signal,
void *handler_data, void *signal_data)
{
diff --git a/src/osmo-bsc/bsc_init.c b/src/osmo-bsc/bsc_init.c
index 1fe484761..641b6db4b 100644
--- a/src/osmo-bsc/bsc_init.c
+++ b/src/osmo-bsc/bsc_init.c
@@ -35,6 +35,7 @@
#include <osmocom/bsc/bsc_msc_data.h>
#include <osmocom/bsc/handover_cfg.h>
#include <osmocom/bsc/gsm_04_08_utils.h>
+#include <osmocom/bsc/neighbor_ident.h>
#include <time.h>
#include <limits.h>
diff --git a/src/osmo-bsc/bsc_subscr_conn_fsm.c b/src/osmo-bsc/bsc_subscr_conn_fsm.c
index 0f3d9d20a..8e904e3d0 100644
--- a/src/osmo-bsc/bsc_subscr_conn_fsm.c
+++ b/src/osmo-bsc/bsc_subscr_conn_fsm.c
@@ -34,6 +34,8 @@
#include <osmocom/bsc/bsc_subscr_conn_fsm.h>
#include <osmocom/bsc/osmo_bsc.h>
#include <osmocom/bsc/penalty_timers.h>
+#include <osmocom/bsc/bsc_rll.h>
+#include <osmocom/bsc/abis_rsl.h>
#include <osmocom/mgcp_client/mgcp_client_fsm.h>
#include <osmocom/core/byteswap.h>
@@ -146,6 +148,16 @@ static void mgcp_pick_codec(struct gsm_subscriber_connection *conn,
}
}
+/* forward MT DTAP from BSSAP side to RSL side */
+static inline void submit_dtap(struct gsm_subscriber_connection *conn, struct msgb *msg,
+ struct osmo_fsm_inst *fi)
+{
+ OSMO_ASSERT(fi);
+ OSMO_ASSERT(msg);
+ OSMO_ASSERT(conn);
+ gscon_submit_rsl_dtap(conn, msg, OBSC_LINKID_CB(msg), 1);
+}
+
/* Send data SCCP message through SCCP connection. All sigtran messages
* that are send from this FSM must use this function. Never use
* osmo_bsc_sigtran_send() directly since this would defeat the checks
@@ -257,26 +269,6 @@ static void send_ass_compl(struct gsm_lchan *lchan, struct osmo_fsm_inst *fi, bo
sigtran_send(conn, resp, fi);
}
-/* forward MT DTAP from BSSAP side to RSL side */
-static void submit_dtap(struct gsm_subscriber_connection *conn, struct msgb *msg, struct osmo_fsm_inst *fi)
-{
- int rc;
- struct msgb *resp = NULL;
-
- OSMO_ASSERT(fi);
- OSMO_ASSERT(msg);
- OSMO_ASSERT(conn);
-
- rc = gsm0808_submit_dtap(conn, msg, OBSC_LINKID_CB(msg), 1);
- if (rc != 0) {
- LOGPFSML(fi, LOGL_ERROR, "Tx BSSMAP CLEAR REQUEST to MSC\n");
- resp = gsm0808_create_clear_rqst(GSM0808_CAUSE_EQUIPMENT_FAILURE);
- sigtran_send(conn, resp, fi);
- osmo_fsm_inst_state_chg(fi, ST_ACTIVE, 0, 0);
- return;
- }
-}
-
/* forward MO DTAP from RSL side to BSSAP side */
static void forward_dtap(struct gsm_subscriber_connection *conn, struct msgb *msg, struct osmo_fsm_inst *fi)
{
@@ -1006,8 +998,6 @@ static void gscon_fsm_allstate(struct osmo_fsm_inst *fi, uint32_t event, void *d
}
}
-void ho_dtap_cache_flush(struct gsm_subscriber_connection *conn, int send);
-
static void gscon_cleanup(struct osmo_fsm_inst *fi, enum osmo_fsm_term_cause cause)
{
struct gsm_subscriber_connection *conn = fi->priv;
@@ -1038,7 +1028,7 @@ static void gscon_cleanup(struct osmo_fsm_inst *fi, enum osmo_fsm_term_cause cau
}
/* drop pending messages */
- ho_dtap_cache_flush(conn, 0);
+ gscon_dtap_cache_flush(conn, 0);
penalty_timers_free(&conn->hodec2.penalty_timers);
@@ -1131,7 +1121,7 @@ struct gsm_subscriber_connection *bsc_subscr_con_allocate(struct gsm_network *ne
return NULL;
conn->network = net;
- INIT_LLIST_HEAD(&conn->ho_dtap_cache);
+ INIT_LLIST_HEAD(&conn->dtap_cache);
/* BTW, penalty timers will be initialized on-demand. */
conn->sccp.conn_id = -1;
@@ -1156,3 +1146,143 @@ struct gsm_subscriber_connection *bsc_subscr_con_allocate(struct gsm_network *ne
llist_add_tail(&conn->entry, &net->subscr_conns);
return conn;
}
+
+static void gsm0808_send_rsl_dtap(struct gsm_subscriber_connection *conn,
+ struct msgb *msg, int link_id, int allow_sacch);
+
+#define GSCON_DTAP_CACHE_MSGB_CB_LINK_ID 0
+#define GSCON_DTAP_CACHE_MSGB_CB_ALLOW_SACCH 1
+
+static void gscon_dtap_cache_add(struct gsm_subscriber_connection *conn, struct msgb *msg,
+ int link_id, bool allow_sacch)
+{
+ if (conn->dtap_cache_len >= 23) {
+ LOGP(DHO, LOGL_ERROR, "%s: Cannot cache more DTAP messages,"
+ " already reached sane maximum of %u cached messages\n",
+ bsc_subscr_name(conn->bsub), conn->dtap_cache_len);
+ msgb_free(msg);
+ return;
+ }
+ conn->dtap_cache_len ++;
+ LOGP(DHO, LOGL_DEBUG, "%s: Caching DTAP message during ho/ass (%u)\n",
+ bsc_subscr_name(conn->bsub), conn->dtap_cache_len);
+ msg->cb[GSCON_DTAP_CACHE_MSGB_CB_LINK_ID] = (unsigned long)link_id;
+ msg->cb[GSCON_DTAP_CACHE_MSGB_CB_ALLOW_SACCH] = allow_sacch ? 1 : 0;
+ msgb_enqueue(&conn->dtap_cache, msg);
+}
+
+void gscon_dtap_cache_flush(struct gsm_subscriber_connection *conn, int send)
+{
+ struct msgb *msg;
+ unsigned int flushed_count = 0;
+
+ if (conn->secondary_lchan || conn->ho) {
+ LOGP(DHO, LOGL_ERROR, "%s: Cannot send cached DTAP messages, handover/assignment is still ongoing\n",
+ bsc_subscr_name(conn->bsub));
+ send = 0;
+ }
+
+ while ((msg = msgb_dequeue(&conn->dtap_cache))) {
+ conn->dtap_cache_len --;
+ flushed_count ++;
+ if (send) {
+ int link_id = (int)msg->cb[GSCON_DTAP_CACHE_MSGB_CB_LINK_ID];
+ bool allow_sacch = !!msg->cb[GSCON_DTAP_CACHE_MSGB_CB_ALLOW_SACCH];
+ LOGP(DHO, LOGL_DEBUG, "%s: Sending cached DTAP message after handover/assignment (%u/%u)\n",
+ bsc_subscr_name(conn->bsub), flushed_count, conn->dtap_cache_len);
+ gsm0808_send_rsl_dtap(conn, msg, link_id, allow_sacch);
+ } else
+ msgb_free(msg);
+ }
+}
+
+static void rll_ind_cb(struct gsm_lchan *lchan, uint8_t link_id, void *_data, enum bsc_rllr_ind rllr_ind)
+{
+ struct msgb *msg = _data;
+
+ /*
+ * There seems to be a small window that the RLL timer can
+ * fire after a lchan_release call and before the S_CHALLOC_FREED
+ * is called. Check if a conn is set before proceeding.
+ */
+ if (!lchan->conn)
+ return;
+
+ switch (rllr_ind) {
+ case BSC_RLLR_IND_EST_CONF:
+ rsl_data_request(msg, OBSC_LINKID_CB(msg));
+ break;
+ case BSC_RLLR_IND_REL_IND:
+ case BSC_RLLR_IND_ERR_IND:
+ case BSC_RLLR_IND_TIMEOUT:
+ bsc_sapi_n_reject(lchan->conn, OBSC_LINKID_CB(msg));
+ msgb_free(msg);
+ break;
+ }
+}
+
+/*! \brief process incoming 08.08 DTAP from MSC (send via BTS to MS) */
+static void gsm0808_send_rsl_dtap(struct gsm_subscriber_connection *conn,
+ struct msgb *msg, int link_id, int allow_sacch)
+{
+ uint8_t sapi;
+ int rc;
+ struct msgb *resp = NULL;
+
+ if (!conn->lchan) {
+ LOGP(DMSC, LOGL_ERROR,
+ "%s Called submit dtap without an lchan.\n",
+ bsc_subscr_name(conn->bsub));
+ msgb_free(msg);
+ rc = -EINVAL;
+ goto failed_to_send;
+ }
+
+ sapi = link_id & 0x7;
+ msg->lchan = conn->lchan;
+ msg->dst = msg->lchan->ts->trx->rsl_link;
+
+ /* If we are on a TCH and need to submit a SMS (on SAPI=3) we need to use the SACH */
+ if (allow_sacch && sapi != 0) {
+ if (conn->lchan->type == GSM_LCHAN_TCH_F || conn->lchan->type == GSM_LCHAN_TCH_H)
+ link_id |= 0x40;
+ }
+
+ msg->l3h = msg->data;
+ /* is requested SAPI already up? */
+ if (conn->lchan->sapis[sapi] == LCHAN_SAPI_UNUSED) {
+ /* Establish L2 for additional SAPI */
+ OBSC_LINKID_CB(msg) = link_id;
+ rc = rll_establish(msg->lchan, sapi, rll_ind_cb, msg);
+ if (rc) {
+ msgb_free(msg);
+ bsc_sapi_n_reject(conn, link_id);
+ goto failed_to_send;
+ }
+ return;
+ } else {
+ /* Directly forward via RLL/RSL to BTS */
+ rc = rsl_data_request(msg, link_id);
+ if (rc)
+ goto failed_to_send;
+ }
+ return;
+
+failed_to_send:
+ LOGPFSML(conn->fi, LOGL_ERROR, "Tx BSSMAP CLEAR REQUEST to MSC\n");
+ resp = gsm0808_create_clear_rqst(GSM0808_CAUSE_EQUIPMENT_FAILURE);
+ sigtran_send(conn, resp, conn->fi);
+ osmo_fsm_inst_state_chg(conn->fi, ST_ACTIVE, 0, 0);
+}
+
+void gscon_submit_rsl_dtap(struct gsm_subscriber_connection *conn,
+ struct msgb *msg, int link_id, int allow_sacch)
+{
+ /* buffer message during assignment / handover */
+ if (conn->secondary_lchan || conn->ho) {
+ gscon_dtap_cache_add(conn, msg, link_id, !! allow_sacch);
+ return;
+ }
+
+ gsm0808_send_rsl_dtap(conn, msg, link_id, allow_sacch);
+}
diff --git a/src/osmo-bsc/gsm_04_08_utils.c b/src/osmo-bsc/gsm_04_08_utils.c
index e9aeb550f..c54850081 100644
--- a/src/osmo-bsc/gsm_04_08_utils.c
+++ b/src/osmo-bsc/gsm_04_08_utils.c
@@ -34,7 +34,7 @@
#include <osmocom/bsc/debug.h>
#include <osmocom/bsc/paging.h>
#include <osmocom/bsc/signal.h>
-#include <osmocom/bsc/bsc_api.h>
+#include <osmocom/bsc/bsc_subscr_conn_fsm.h>
#include <osmocom/bsc/gsm_04_08_utils.h>
/* should ip.access BTS use direct RTP streams between each other (1),
@@ -600,7 +600,8 @@ int gsm48_tx_mm_serv_ack(struct gsm_subscriber_connection *conn)
DEBUGP(DMM, "-> CM SERVICE ACK\n");
- return gsm0808_submit_dtap(conn, msg, 0, 0);
+ gscon_submit_rsl_dtap(conn, msg, 0, 0);
+ return 0;
}
/* 9.2.6 CM service reject */
@@ -617,7 +618,8 @@ int gsm48_tx_mm_serv_rej(struct gsm_subscriber_connection *conn,
DEBUGP(DMM, "-> CM SERVICE Reject cause: %d\n", value);
- return gsm0808_submit_dtap(conn, msg, 0, 0);
+ gscon_submit_rsl_dtap(conn, msg, 0, 0);
+ return 0;
}
/* 9.1.29 RR Status */
@@ -644,7 +646,8 @@ int gsm48_tx_rr_status(struct gsm_subscriber_connection *conn, uint8_t cause)
struct msgb *msg = gsm48_create_rr_status(cause);
if (!msg)
return -1;
- return gsm0808_submit_dtap(conn, msg, 0, 0);
+ gscon_submit_rsl_dtap(conn, msg, 0, 0);
+ return 0;
}
struct msgb *gsm48_create_mm_serv_rej(enum gsm48_reject_value value)
diff --git a/src/osmo-bsc/gsm_04_80_utils.c b/src/osmo-bsc/gsm_04_80_utils.c
index d67f3c568..8de1262e9 100644
--- a/src/osmo-bsc/gsm_04_80_utils.c
+++ b/src/osmo-bsc/gsm_04_80_utils.c
@@ -20,7 +20,7 @@
*/
#include <osmocom/gsm/gsm0480.h>
-#include <osmocom/bsc/bsc_api.h>
+#include <osmocom/bsc/bsc_subscr_conn_fsm.h>
int bsc_send_ussd_notify(struct gsm_subscriber_connection *conn, int level,
const char *text)
@@ -28,7 +28,8 @@ int bsc_send_ussd_notify(struct gsm_subscriber_connection *conn, int level,
struct msgb *msg = gsm0480_create_ussd_notify(level, text);
if (!msg)
return -1;
- return gsm0808_submit_dtap(conn, msg, 0, 0);
+ gscon_submit_rsl_dtap(conn, msg, 0, 0);
+ return 0;
}
int bsc_send_ussd_release_complete(struct gsm_subscriber_connection *conn)
@@ -36,5 +37,6 @@ int bsc_send_ussd_release_complete(struct gsm_subscriber_connection *conn)
struct msgb *msg = gsm0480_create_ussd_release_complete();
if (!msg)
return -1;
- return gsm0808_submit_dtap(conn, msg, 0, 0);
+ gscon_submit_rsl_dtap(conn, msg, 0, 0);
+ return 0;
}
diff --git a/src/osmo-bsc/osmo_bsc_api.c b/src/osmo-bsc/osmo_bsc_api.c
index a86b4f99e..d409c9350 100644
--- a/src/osmo-bsc/osmo_bsc_api.c
+++ b/src/osmo-bsc/osmo_bsc_api.c
@@ -86,7 +86,7 @@ static void bsc_maybe_lu_reject(struct gsm_subscriber_connection *conn, int con_
}
msg->lchan = conn->lchan;
- gsm0808_submit_dtap(conn, msg, 0, 0);
+ gscon_submit_rsl_dtap(conn, msg, 0, 0);
}
static int bsc_filter_initial(struct osmo_bsc_data *bsc,
diff --git a/tests/bsc/bsc_test.c b/tests/bsc/bsc_test.c
index 950eaf59c..b05ca547d 100644
--- a/tests/bsc/bsc_test.c
+++ b/tests/bsc/bsc_test.c
@@ -249,3 +249,6 @@ void bsc_cm_update(struct gsm_subscriber_connection *conn,
const uint8_t *cm2, uint8_t cm2_len,
const uint8_t *cm3, uint8_t cm3_len) {}
void bsc_mr_config(struct gsm_subscriber_connection *conn, struct gsm_lchan *lchan, int full_rate) {}
+void gscon_submit_rsl_dtap(struct gsm_subscriber_connection *conn,
+ struct msgb *msg, int link_id, int allow_sacch) {}
+void gscon_dtap_cache_flush(struct gsm_subscriber_connection *conn, int send) {}