diff options
author | Holger Freyther <zecke@selfish.org> | 2009-02-04 02:14:45 +0000 |
---|---|---|
committer | Holger Freyther <zecke@selfish.org> | 2009-02-04 02:14:45 +0000 |
commit | 3aa8d6c46d63869f0d7f24c0135db201ec311d33 (patch) | |
tree | 32323cf8abd91830dffca76f4a85f1ffe2802cb2 /src/paging.c | |
parent | 2976c40cd17c44b9f5d1f69a9d77d62decd85ff1 (diff) |
[paging] This is paging my phone but it looks completely wrong...
- The paging block calculation is wrong but I have a hard time finding
the right information. The table of 05.02 (Table 5 of 9) looks good
but my phone is not happy with that group...
Diffstat (limited to 'src/paging.c')
-rw-r--r-- | src/paging.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/src/paging.c b/src/paging.c index e580ac72f..0461572d1 100644 --- a/src/paging.c +++ b/src/paging.c @@ -48,6 +48,22 @@ static LLIST_HEAD(managed_bts); +static unsigned int calculate_group(struct gsm_bts *bts, struct gsm_subscriber *subscr) +{ + int ccch_conf; + int bs_cc_chans; + int blocks; + unsigned int group; + + ccch_conf = bts->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 = bts->chan_desc.bs_pa_mfrms + 2; + group = get_paging_group(str_to_imsi(subscr->imsi), + bs_cc_chans, blocks); + return group; +} + /* * Kill one paging request update the internal list... */ @@ -66,6 +82,7 @@ static void page_handle_pending_requests(void *data) { u_int8_t mi[128]; unsigned long int tmsi; unsigned int mi_len; + unsigned int pag_group; struct paging_bts *paging_bts = (struct paging_bts *)data; struct paging_request *request = NULL; @@ -82,9 +99,11 @@ static void page_handle_pending_requests(void *data) { DEBUGP(DPAG, "Going to send paging commands: '%s'\n", request->subscr->imsi); ++request->requests; + + pag_group = calculate_group(paging_bts->bts, request->subscr); tmsi = strtoul(request->subscr->tmsi, NULL, 10); mi_len = generate_mid_from_tmsi(mi, tmsi); - rsl_paging_cmd(paging_bts->bts, 1, mi_len, mi, + rsl_paging_cmd(paging_bts->bts, pag_group, mi_len, mi, request->chan_type); if (request->requests > MAX_PAGING_REQUEST) { |