diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2009-08-21 04:57:35 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2009-09-28 12:50:49 +0200 |
commit | adc1478a47323a3ae9bcfd928894a32541269b76 (patch) | |
tree | b6072c23ab09845c2ad6233a0c47b64e4dcf668c /openbsc/src/gsm_04_08_utils.c | |
parent | 9f16a869a514500b9ede709334d67a173d59b174 (diff) |
[gsm0408] Move send_siemens_mrpci to gsm_04_08_utils.c
Diffstat (limited to 'openbsc/src/gsm_04_08_utils.c')
-rw-r--r-- | openbsc/src/gsm_04_08_utils.c | 18 |
1 files changed, 18 insertions, 0 deletions
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); +} + |