aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2010-05-01 14:26:36 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-05-03 19:36:58 +0800
commit3170305e56e7f4777e524c1e8078ec41a2d43f8b (patch)
treed6114dce7b05eea0d4501e7a817078046f2941c4 /openbsc
parent0f3490dd0377e59669671c0dedae1a19bb3ff860 (diff)
move gsm48_construct_ra() to libosmocore
Diffstat (limited to 'openbsc')
-rw-r--r--openbsc/src/gsm_data.c27
1 files changed, 0 insertions, 27 deletions
diff --git a/openbsc/src/gsm_data.c b/openbsc/src/gsm_data.c
index a473adef9..bf6c0cb3e 100644
--- a/openbsc/src/gsm_data.c
+++ b/openbsc/src/gsm_data.c
@@ -454,33 +454,6 @@ const char *gsm_auth_policy_name(enum gsm_auth_policy policy)
return get_value_string(auth_policy_names, policy);
}
-/* this should not be here but in gsm_04_08... but that creates
- in turn a dependency nightmare (abis_nm depending on 04_08, ...) */
-static int gsm48_construct_ra(u_int8_t *buf, const struct gprs_ra_id *raid)
-{
- u_int16_t mcc = raid->mcc;
- u_int16_t mnc = raid->mnc;
-
- buf[0] = ((mcc / 100) % 10) | (((mcc / 10) % 10) << 4);
- buf[1] = (mcc % 10);
-
- /* I wonder who came up with the stupidity of encoding the MNC
- * differently depending on how many digits its decimal number has! */
- if (mnc < 100) {
- buf[1] |= 0xf0;
- buf[2] = ((mnc / 10) % 10) | ((mnc % 10) << 4);
- } else {
- buf[1] |= (mnc % 10) << 4;
- buf[2] = ((mnc / 100) % 10) | (((mcc / 10) % 10) << 4);
- }
-
- *(u_int16_t *)(buf+3) = htons(raid->lac);
-
- buf[5] = raid->rac;
-
- return 6;
-}
-
void gprs_ra_id_by_bts(struct gprs_ra_id *raid, struct gsm_bts *bts)
{
raid->mcc = bts->network->country_code;