aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-01-18 15:57:48 +0100
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-03-03 16:19:09 +0100
commit712074cb171a9139a40d564a35a07b59871c2389 (patch)
treed29c4ef80580987d46984a1ca2e1cdf118a0430f
parenta34aedf7f92b240e591098e7868513db244bd7b3 (diff)
cosmetic: a rename, comments.
Rename conn_ctx_list -> ue_conn_ctx_list. Indicate Iu-CS 'siblings' for a couple of functions. Tweak/add comments.
-rw-r--r--openbsc/include/openbsc/gsm_data_shared.h2
-rw-r--r--openbsc/include/openbsc/iu.h1
-rw-r--r--openbsc/src/gprs/iu.c6
-rw-r--r--openbsc/src/libbsc/bsc_api.c8
4 files changed, 10 insertions, 7 deletions
diff --git a/openbsc/include/openbsc/gsm_data_shared.h b/openbsc/include/openbsc/gsm_data_shared.h
index 000207dd9..f8e993566 100644
--- a/openbsc/include/openbsc/gsm_data_shared.h
+++ b/openbsc/include/openbsc/gsm_data_shared.h
@@ -350,7 +350,7 @@ struct gsm_bts_trx_ts {
struct gsm_lchan lchan[TS_MAX_LCHAN];
};
-/* One TRX in a BTS */
+/* One TRX (transceiver) in a BTS */
struct gsm_bts_trx {
/* list header in bts->trx_list */
struct llist_head list;
diff --git a/openbsc/include/openbsc/iu.h b/openbsc/include/openbsc/iu.h
index d66280bf1..3c6f04db8 100644
--- a/openbsc/include/openbsc/iu.h
+++ b/openbsc/include/openbsc/iu.h
@@ -9,6 +9,7 @@ struct ue_conn_ctx {
uint32_t conn_id;
};
+/* Implementations of iu_recv_cb_t shall find the ue_conn_ctx in msg->dest. */
typedef int (* iu_recv_cb_t )(struct msgb *msg, struct gprs_ra_id *ra_id,
/* TODO is ra_id only used for gprs? ^ */
uint16_t *sai);
diff --git a/openbsc/src/gprs/iu.c b/openbsc/src/gprs/iu.c
index 56614d10f..f30d844ac 100644
--- a/openbsc/src/gprs/iu.c
+++ b/openbsc/src/gprs/iu.c
@@ -33,7 +33,7 @@ void *talloc_asn1_ctx;
iu_recv_cb_t global_iu_recv_cb = NULL;
-static LLIST_HEAD(conn_ctx_list);
+static LLIST_HEAD(ue_conn_ctx_list);
struct ue_conn_ctx *ue_conn_ctx_alloc(struct osmo_sua_link *link, uint32_t conn_id)
{
@@ -41,7 +41,7 @@ struct ue_conn_ctx *ue_conn_ctx_alloc(struct osmo_sua_link *link, uint32_t conn_
ctx->link = link;
ctx->conn_id = conn_id;
- llist_add(&ctx->list, &conn_ctx_list);
+ llist_add(&ctx->list, &ue_conn_ctx_list);
return ctx;
}
@@ -50,7 +50,7 @@ struct ue_conn_ctx *ue_conn_ctx_find(struct osmo_sua_link *link, uint32_t conn_i
{
struct ue_conn_ctx *ctx;
- llist_for_each_entry(ctx, &conn_ctx_list, list) {
+ llist_for_each_entry(ctx, &ue_conn_ctx_list, list) {
if (ctx->link == link && ctx->conn_id == conn_id)
return ctx;
}
diff --git a/openbsc/src/libbsc/bsc_api.c b/openbsc/src/libbsc/bsc_api.c
index 3225adc1d..4613502e3 100644
--- a/openbsc/src/libbsc/bsc_api.c
+++ b/openbsc/src/libbsc/bsc_api.c
@@ -239,8 +239,8 @@ static int handle_new_assignment(struct gsm_subscriber_connection *conn, int cha
return 0;
}
-struct gsm_subscriber_connection *subscr_con_allocate_iu(struct gsm_lchan *lchan)
-/* for A-interface */
+/* Allocate a subscriber connection for A-interface link. For Iu-CS see
+ * subscr_con_allocate_iu(). */
struct gsm_subscriber_connection *subscr_con_allocate(struct gsm_lchan *lchan)
{
struct gsm_subscriber_connection *conn;
@@ -251,6 +251,7 @@ struct gsm_subscriber_connection *subscr_con_allocate(struct gsm_lchan *lchan)
return NULL;
/* Configure the time and start it so it will be closed */
+ /* FIXME: above comment is weird in at least two ways */
conn->lchan = lchan;
conn->bts = lchan->ts->trx->bts;
lchan->conn = conn;
@@ -655,7 +656,8 @@ static void dispatch_dtap(struct gsm_subscriber_connection *conn,
}
}
-/*! \brief RSL has received a DATA INDICATION with L3 from MS */
+/*! \brief RSL has received a DATA INDICATION with L3 from MS.
+ * (for Iu-CS see gsm0408_rcvmsg_iucs()) */
int gsm0408_rcvmsg(struct msgb *msg, uint8_t link_id)
{
int rc;