aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/gsm_04_08_utils.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2009-10-05 14:00:14 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2009-10-06 04:34:25 +0200
commitca6bc1d10f2a37511a3967d52b57c74b6b3768c7 (patch)
tree1a41cec7c562ea3fff4a72abddf5de4981d34d81 /openbsc/src/gsm_04_08_utils.c
parentea4088a7ea5ac3f25988acbafc0b9d49509ea8cb (diff)
[gsm0408] Add parameter to gsm48_send_rr_ciph_mode for controling the response
This parameter controls if the response should include the IMEISV or not. This will be set by the MSC and this is why this parameter was added.
Diffstat (limited to 'openbsc/src/gsm_04_08_utils.c')
-rw-r--r--openbsc/src/gsm_04_08_utils.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/openbsc/src/gsm_04_08_utils.c b/openbsc/src/gsm_04_08_utils.c
index 88edc7dc0..ef9e59c77 100644
--- a/openbsc/src/gsm_04_08_utils.c
+++ b/openbsc/src/gsm_04_08_utils.c
@@ -459,7 +459,7 @@ int gsm48_handle_paging_resp(struct msgb *msg, struct gsm_subscriber *subscr)
}
/* Chapter 9.1.9: Ciphering Mode Command */
-int gsm48_send_rr_ciph_mode(struct gsm_lchan *lchan)
+int gsm48_send_rr_ciph_mode(struct gsm_lchan *lchan, int want_imeisv)
{
struct msgb *msg = gsm48_msgb_alloc();
struct gsm48_hdr *gh;
@@ -477,7 +477,7 @@ int gsm48_send_rr_ciph_mode(struct gsm_lchan *lchan)
gh = (struct gsm48_hdr *) msgb_put(msg, sizeof(*gh) + 1);
gh->proto_discr = GSM48_PDISC_RR;
gh->msg_type = GSM48_MT_RR_CIPH_M_CMD;
- gh->data[0] = 0x10 | (ciph_mod_set & 0xf);
+ gh->data[0] = (want_imeisv & 0x1) << 4 | (ciph_mod_set & 0xf);
return rsl_encryption_cmd(msg);
}