aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2009-08-21 04:57:35 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2009-09-28 12:50:49 +0200
commitadc1478a47323a3ae9bcfd928894a32541269b76 (patch)
treeb6072c23ab09845c2ad6233a0c47b64e4dcf668c /openbsc
parent9f16a869a514500b9ede709334d67a173d59b174 (diff)
[gsm0408] Move send_siemens_mrpci to gsm_04_08_utils.c
Diffstat (limited to 'openbsc')
-rw-r--r--openbsc/include/openbsc/gsm_04_08.h2
-rw-r--r--openbsc/src/gsm_04_08.c16
-rw-r--r--openbsc/src/gsm_04_08_utils.c18
3 files changed, 20 insertions, 16 deletions
diff --git a/openbsc/include/openbsc/gsm_04_08.h b/openbsc/include/openbsc/gsm_04_08.h
index 96e12c6cc..be530c38d 100644
--- a/openbsc/include/openbsc/gsm_04_08.h
+++ b/openbsc/include/openbsc/gsm_04_08.h
@@ -736,4 +736,6 @@ int decode_bcd_number(char *output, int output_len, const u_int8_t *bcd_lv,
extern const char *gsm0408_cc_msg_names[];
+int send_siemens_mrpci(struct gsm_lchan *lchan, u_int8_t *classmark2_lv);
+
#endif
diff --git a/openbsc/src/gsm_04_08.c b/openbsc/src/gsm_04_08.c
index 196fdca11..3c9ffbbec 100644
--- a/openbsc/src/gsm_04_08.c
+++ b/openbsc/src/gsm_04_08.c
@@ -1282,22 +1282,6 @@ static int gsm48_tx_mm_serv_rej(struct gsm_lchan *lchan,
return gsm48_sendmsg(msg, NULL);
}
-static int send_siemens_mrpci(struct gsm_lchan *lchan,
- u_int8_t *classmark2_lv)
-{
- struct rsl_mrpci mrpci;
-
- if (classmark2_lv[0] < 2)
- return -EINVAL;
-
- mrpci.power_class = classmark2_lv[1] & 0x7;
- mrpci.vgcs_capable = classmark2_lv[2] & (1 << 1);
- mrpci.vbs_capable = classmark2_lv[2] & (1 <<2);
- mrpci.gsm_phase = (classmark2_lv[1]) >> 5 & 0x3;
-
- return rsl_siemens_mrpci(lchan, &mrpci);
-}
-
/*
* Handle CM Service Requests
* a) Verify that the packet is long enough to contain the information
diff --git a/openbsc/src/gsm_04_08_utils.c b/openbsc/src/gsm_04_08_utils.c
index c62f04d57..c9cbd5c34 100644
--- a/openbsc/src/gsm_04_08_utils.c
+++ b/openbsc/src/gsm_04_08_utils.c
@@ -25,6 +25,7 @@
*/
#include <stdio.h>
#include <stdlib.h>
+#include <errno.h>
#include <netinet/in.h>
#include <openbsc/msgb.h>
@@ -395,3 +396,20 @@ int gsm48_mi_to_string(char *string, const int str_len, const u_int8_t *mi, cons
return str_cur - string;
}
+
+int send_siemens_mrpci(struct gsm_lchan *lchan,
+ u_int8_t *classmark2_lv)
+{
+ struct rsl_mrpci mrpci;
+
+ if (classmark2_lv[0] < 2)
+ return -EINVAL;
+
+ mrpci.power_class = classmark2_lv[1] & 0x7;
+ mrpci.vgcs_capable = classmark2_lv[2] & (1 << 1);
+ mrpci.vbs_capable = classmark2_lv[2] & (1 <<2);
+ mrpci.gsm_phase = (classmark2_lv[1]) >> 5 & 0x3;
+
+ return rsl_siemens_mrpci(lchan, &mrpci);
+}
+