aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2011-06-26 14:21:43 +0200
committerHarald Welte <laforge@gnumonks.org>2011-06-26 14:21:43 +0200
commit457a0813794f04670a4b2d952ba7256a9b900b12 (patch)
tree54aa48634ed91cca1afb1369bb0f9035d749af61
parent2c1ae479abd990733ff899ba973d778e9ccf2c5a (diff)
use new gsm48_number_of_paging_subchannels from libosmocore
-rw-r--r--openbsc/include/openbsc/abis_rsl.h1
-rw-r--r--openbsc/src/libbsc/abis_rsl.c14
-rw-r--r--openbsc/src/libbsc/paging.c6
3 files changed, 4 insertions, 17 deletions
diff --git a/openbsc/include/openbsc/abis_rsl.h b/openbsc/include/openbsc/abis_rsl.h
index 25268146a..7a7624a7e 100644
--- a/openbsc/include/openbsc/abis_rsl.h
+++ b/openbsc/include/openbsc/abis_rsl.h
@@ -82,7 +82,6 @@ int rsl_lchan_rll_release(struct gsm_lchan *lchan, uint8_t link_id);
/* BCCH related code */
int rsl_ccch_conf_to_bs_cc_chans(int ccch_conf);
int rsl_ccch_conf_to_bs_ccch_sdcch_comb(int ccch_conf);
-int rsl_number_of_paging_subchannels(struct gsm_bts *bts);
int rsl_sacch_info_modify(struct gsm_lchan *lchan, uint8_t type,
const uint8_t *data, int len);
diff --git a/openbsc/src/libbsc/abis_rsl.c b/openbsc/src/libbsc/abis_rsl.c
index c246213d4..d186008d4 100644
--- a/openbsc/src/libbsc/abis_rsl.c
+++ b/openbsc/src/libbsc/abis_rsl.c
@@ -45,8 +45,6 @@
#define RSL_ALLOC_SIZE 1024
#define RSL_ALLOC_HEADROOM 128
-#define MAX(a, b) (a) >= (b) ? (a) : (b)
-
static int rsl_send_imm_assignment(struct gsm_lchan *lchan);
static void send_lchan_signal(int sig_no, struct gsm_lchan *lchan,
@@ -1896,18 +1894,6 @@ int abis_rsl_rcvmsg(struct msgb *msg)
return rc;
}
-/* From Table 10.5.33 of GSM 04.08 */
-int rsl_number_of_paging_subchannels(struct gsm_bts *bts)
-{
- if (bts->si_common.chan_desc.ccch_conf == RSL_BCCH_CCCH_CONF_1_C) {
- return MAX(1, (3 - bts->si_common.chan_desc.bs_ag_blks_res))
- * (bts->si_common.chan_desc.bs_pa_mfrms + 2);
- } else {
- return (9 - bts->si_common.chan_desc.bs_ag_blks_res)
- * (bts->si_common.chan_desc.bs_pa_mfrms + 2);
- }
-}
-
int rsl_sms_cb_command(struct gsm_bts *bts, uint8_t chan_number,
uint8_t cb_command, const uint8_t *data, int len)
{
diff --git a/openbsc/src/libbsc/paging.c b/openbsc/src/libbsc/paging.c
index 2dcd3b42d..04f14c6d2 100644
--- a/openbsc/src/libbsc/paging.c
+++ b/openbsc/src/libbsc/paging.c
@@ -38,8 +38,10 @@
#include <stdlib.h>
#include <assert.h>
-#include <openbsc/paging.h>
#include <osmocom/core/talloc.h>
+#include <osmocom/gsm/gsm48.h>
+
+#include <openbsc/paging.h>
#include <openbsc/debug.h>
#include <openbsc/signal.h>
#include <openbsc/abis_rsl.h>
@@ -61,7 +63,7 @@ static unsigned int calculate_group(struct gsm_bts *bts, struct gsm_subscriber *
ccch_conf = bts->si_common.chan_desc.ccch_conf;
bs_cc_chans = rsl_ccch_conf_to_bs_cc_chans(ccch_conf);
/* code word + 2, as 2 channels equals 0x0 */
- blocks = rsl_number_of_paging_subchannels(bts);
+ blocks = gsm48_number_of_paging_subchannels(&bts->si_common.chan_desc);
group = get_paging_group(str_to_imsi(subscr->imsi),
bs_cc_chans, blocks);
return group;