use new gsm48_number_of_paging_subchannels from libosmocore

This commit is contained in:
Harald Welte 2011-06-26 14:21:43 +02:00
parent 2c1ae479ab
commit 457a081379
3 changed files with 4 additions and 17 deletions

View File

@ -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);

View File

@ -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)
{

View File

@ -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;