aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bsc/osmo_bsc_grace.c
diff options
context:
space:
mode:
authorStefan Sperling <ssperling@sysmocom.de>2018-01-11 14:53:18 +0100
committerStefan Sperling <ssperling@sysmocom.de>2018-01-16 14:14:01 +0100
commit714c2f9552c5ce54d4a29e72b4bd1d830524a992 (patch)
treeb989f3c2524b381d93d9eea522412282a1b83466 /src/osmo-bsc/osmo_bsc_grace.c
parent74b8cdb8e9d7112026ec3c6e346e5c667d261db3 (diff)
Move BTS selection for paging from osmo_bsc_grace.c into osmo_bsc_bssap.c.
We can now either page an invidual BTS directly or page several BTS in a given location area. This decision is taken based on the contents of the cell identifier list in the paging request. Select a set of BTS for paging while processing the cell identifier list, rather than requiring the paging layer to loop over all BTS in the MSC. This change requires some adjustment in bssap_test. In particular, this test must now add a BTS to its network in order to pass. The purpose of this change is to make the layering a bit cleaner. There is one functional change: We no longer abort paging if paging fails for a particular BTS. Instead, we keep trying to page on other BTS. Change-Id: Ic1c72c7f83e53988eb9fedf314b1dc459836833d Suggested-by: Harald Welte Depends: Ic7772e75c3d7fb0df6e17e118bb33b3248352d4d Related: OS#2753
Diffstat (limited to 'src/osmo-bsc/osmo_bsc_grace.c')
-rw-r--r--src/osmo-bsc/osmo_bsc_grace.c47
1 files changed, 4 insertions, 43 deletions
diff --git a/src/osmo-bsc/osmo_bsc_grace.c b/src/osmo-bsc/osmo_bsc_grace.c
index 93ca9b93e..705933cb4 100644
--- a/src/osmo-bsc/osmo_bsc_grace.c
+++ b/src/osmo-bsc/osmo_bsc_grace.c
@@ -34,22 +34,6 @@ int bsc_grace_allow_new_connection(struct gsm_network *network, struct gsm_bts *
}
-static int normal_paging(struct bsc_subscr *subscr, int chan_needed,
- struct bsc_msc_data *msc)
-{
- /* we can't page by lac.. we need to page everything */
- if (msc->core_lac != -1) {
- struct gsm_bts *bts;
-
- llist_for_each_entry(bts, &msc->network->bts_list, list)
- paging_request_bts(bts, subscr, chan_needed, msc);
-
- return 0;
- }
-
- return paging_request(msc->network, subscr, chan_needed, msc);
-}
-
/* Return value is like paging_request_bts():
* returns 1 on success (one BTS was paged); 0 in case of error (e.g. TRX down) */
static int locked_paging_bts(struct gsm_bts *bts,
@@ -68,31 +52,14 @@ static int locked_paging_bts(struct gsm_bts *bts,
return paging_request_bts(bts, subscr, chan_needed, msc);
}
-static int locked_paging(struct bsc_subscr *subscr, int chan_needed,
- struct bsc_msc_data *msc)
-{
- struct gsm_bts *bts = NULL;
- int num_pages = 0;
-
- /*
- * Check if there is any BTS that is on for the given lac. Start
- * with NULL and iterate through all bts.
- * All other bts are either off or in the grace period.
- */
- llist_for_each_entry(bts, &msc->network->bts_list, list)
- num_pages += locked_paging_bts(bts, subscr, chan_needed, msc);
-
- return num_pages;
-}
-
/**
* Page a subscriber in an MSC.
* \param[in] rf_policy if not S_RF_ON, page only BTSs which are not excluded from the RF lock
* \param[in] subscr subscriber we want to page
* \param[in] chan_needed value of the GSM0808_IE_CHANNEL_NEEDED IE
* \param[in] msc MSC which has issued this paging
- * \param[in] bts if not NULL, page via this particular BTS
- * \returns number of BTS on which we issued the paging
+ * \param[in] bts The BTS to issue the paging on
+ * \returns 1 if paging was issued to the BTS, 0 if not
*/
int bsc_grace_paging_request(enum signal_rf rf_policy,
struct bsc_subscr *subscr,
@@ -100,15 +67,9 @@ int bsc_grace_paging_request(enum signal_rf rf_policy,
struct bsc_msc_data *msc,
struct gsm_bts *bts)
{
- if (bts) {
- if (rf_policy == S_RF_ON)
- return paging_request_bts(bts, subscr, chan_needed, msc);
- return locked_paging_bts(bts, subscr, chan_needed, msc);
- }
-
if (rf_policy == S_RF_ON)
- return normal_paging(subscr, chan_needed, msc);
- return locked_paging(subscr, chan_needed, msc);
+ return paging_request_bts(bts, subscr, chan_needed, msc);
+ return locked_paging_bts(bts, subscr, chan_needed, msc);
}
static int handle_sub(struct gsm_lchan *lchan, const char *text)