mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw.git
synced 2025-11-02 13:03:33 +00:00
Compare commits
3 Commits
on-waves/0
...
on-waves/0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
936d8c1b64 | ||
|
|
3170305e56 | ||
|
|
0f3490dd03 |
@@ -1,7 +1,7 @@
|
||||
dnl Process this file with autoconf to produce a configure script
|
||||
AC_INIT
|
||||
|
||||
AM_INIT_AUTOMAKE(openbsc, 0.3.99.3onwaves)
|
||||
AM_INIT_AUTOMAKE(openbsc, 0.3.99.4onwaves)
|
||||
|
||||
dnl kernel style compile messages
|
||||
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
||||
|
||||
@@ -774,14 +774,6 @@ const char *bts_gprs_mode_name(enum bts_gprs_mode mode);
|
||||
|
||||
void gsm_trx_lock_rf(struct gsm_bts_trx *trx, int locked);
|
||||
|
||||
/* A parsed GPRS routing area */
|
||||
struct gprs_ra_id {
|
||||
u_int16_t mnc;
|
||||
u_int16_t mcc;
|
||||
u_int16_t lac;
|
||||
u_int8_t rac;
|
||||
};
|
||||
|
||||
int gsm48_ra_id_by_bts(u_int8_t *buf, struct gsm_bts *bts);
|
||||
void gprs_ra_id_by_bts(struct gprs_ra_id *raid, struct gsm_bts *bts);
|
||||
struct gsm_meas_rep *lchan_next_meas_rep(struct gsm_lchan *lchan);
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user