aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-06-16 13:52:55 +0800
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-06-16 15:42:40 +0800
commit9ce1b27fbfde5cd7248af3e6ccecbd339b098d1f (patch)
treea0ebcad249aac290ee6898f8d15fa4fbcbd67472 /openbsc
parentb2be195b501d8327a493f93bc9fba41f8a699ba4 (diff)
bsc_api: Use gsm_subscriber_connection in rrlp.c
Diffstat (limited to 'openbsc')
-rw-r--r--openbsc/include/openbsc/gsm_04_08.h2
-rw-r--r--openbsc/src/gsm_04_08.c6
-rw-r--r--openbsc/src/rrlp.c10
3 files changed, 9 insertions, 9 deletions
diff --git a/openbsc/include/openbsc/gsm_04_08.h b/openbsc/include/openbsc/gsm_04_08.h
index 967155549..11bca5448 100644
--- a/openbsc/include/openbsc/gsm_04_08.h
+++ b/openbsc/include/openbsc/gsm_04_08.h
@@ -35,7 +35,7 @@ int gsm48_tx_mm_auth_req(struct gsm_subscriber_connection *conn, u_int8_t *rand,
int gsm48_tx_mm_auth_rej(struct gsm_subscriber_connection *conn);
int gsm48_send_rr_release(struct gsm_lchan *lchan);
int gsm48_send_rr_ciph_mode(struct gsm_lchan *lchan, int want_imeisv);
-int gsm48_send_rr_app_info(struct gsm_lchan *lchan, u_int8_t apdu_id,
+int gsm48_send_rr_app_info(struct gsm_subscriber_connection *conn, u_int8_t apdu_id,
u_int8_t apdu_len, const u_int8_t *apdu);
int gsm48_send_rr_ass_cmd(struct gsm_lchan *dest_lchan, struct gsm_lchan *lchan, u_int8_t power_class);
int gsm48_send_ho_cmd(struct gsm_lchan *old_lchan, struct gsm_lchan *new_lchan,
diff --git a/openbsc/src/gsm_04_08.c b/openbsc/src/gsm_04_08.c
index 0de10cc76..f6a44e0a4 100644
--- a/openbsc/src/gsm_04_08.c
+++ b/openbsc/src/gsm_04_08.c
@@ -1213,13 +1213,13 @@ static int gsm0408_rcv_rr(struct msgb *msg)
return rc;
}
-int gsm48_send_rr_app_info(struct gsm_lchan *lchan, u_int8_t apdu_id,
+int gsm48_send_rr_app_info(struct gsm_subscriber_connection *conn, u_int8_t apdu_id,
u_int8_t apdu_len, const u_int8_t *apdu)
{
struct msgb *msg = gsm48_msgb_alloc();
struct gsm48_hdr *gh;
- msg->lchan = lchan;
+ msg->lchan = conn->lchan;
DEBUGP(DRR, "TX APPLICATION INFO id=0x%02x, len=%u\n",
apdu_id, apdu_len);
@@ -1231,7 +1231,7 @@ int gsm48_send_rr_app_info(struct gsm_lchan *lchan, u_int8_t apdu_id,
gh->data[1] = apdu_len;
memcpy(gh->data+2, apdu, apdu_len);
- return gsm48_conn_sendmsg(msg, &lchan->conn, NULL);
+ return gsm48_conn_sendmsg(msg, conn, NULL);
}
/* Call Control */
diff --git a/openbsc/src/rrlp.c b/openbsc/src/rrlp.c
index c3b1dbcf4..b5c7daf79 100644
--- a/openbsc/src/rrlp.c
+++ b/openbsc/src/rrlp.c
@@ -40,9 +40,9 @@ static const u_int8_t ms_pref_pos_req[] = { 0x40, 0x02, 0x79, 0x50 };
Accuracy=60, Method=gpsOrEOTD, ResponseTime=5, multipleSets */
static const u_int8_t ass_pref_pos_req[] = { 0x40, 0x03, 0x79, 0x50 };
-static int send_rrlp_req(struct gsm_lchan *lchan)
+static int send_rrlp_req(struct gsm_subscriber_connection *conn)
{
- struct gsm_network *net = lchan->ts->trx->bts->network;
+ struct gsm_network *net = conn->bts->network;
const u_int8_t *req;
switch (net->rrlp.mode) {
@@ -60,7 +60,7 @@ static int send_rrlp_req(struct gsm_lchan *lchan)
return 0;
}
- return gsm48_send_rr_app_info(lchan, 0x00,
+ return gsm48_send_rr_app_info(conn, 0x00,
sizeof(ms_based_pos_req), req);
}
@@ -77,7 +77,7 @@ static int subscr_sig_cb(unsigned int subsys, unsigned int signal,
conn = connection_for_subscr(subscr);
if (!conn)
break;
- send_rrlp_req(&conn->lchan);
+ send_rrlp_req(conn);
break;
}
return 0;
@@ -91,7 +91,7 @@ static int paging_sig_cb(unsigned int subsys, unsigned int signal,
switch (signal) {
case S_PAGING_SUCCEEDED:
/* A subscriber has attached. */
- send_rrlp_req(psig_data->lchan);
+ send_rrlp_req(&psig_data->lchan->conn);
break;
case S_PAGING_EXPIRED:
break;