diff options
author | Neels Hofmeyr <neels@hofmeyr.de> | 2020-09-18 02:49:15 +0200 |
---|---|---|
committer | laforge <laforge@osmocom.org> | 2020-10-07 10:21:12 +0000 |
commit | 766f59096ec05a899dd51c9f59eff0248098ecf3 (patch) | |
tree | 9c6309d378f16e022c469d491c1ad755bcbb7a51 /include/osmocom/bsc | |
parent | 24f7071936372801dd564233c32ad44e6ccfec86 (diff) |
refactor paging: introduce bsc_paging_params
For LCS, I would like to add an enum indicating the paging reason. Instead of
modifying extremely many function signatures to pass the reason across all
levels of paging, introduce a struct combining these.
Change-Id: I27ca78fc6ff8ef1101554c0a8429e34945ca6f3c
Diffstat (limited to 'include/osmocom/bsc')
-rw-r--r-- | include/osmocom/bsc/paging.h | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/include/osmocom/bsc/paging.h b/include/osmocom/bsc/paging.h index 449a2ebaa..3dd5dc6b4 100644 --- a/include/osmocom/bsc/paging.h +++ b/include/osmocom/bsc/paging.h @@ -28,9 +28,28 @@ #include <osmocom/bsc/gsm_data.h> #include <osmocom/bsc/bsc_subscriber.h> +#include <osmocom/bsc/bsc_msc_data.h> struct bsc_msc_data; +#define LOG_PAGING(PARAMS, SUBSYS, LEVEL, fmt, args...) \ + LOGP(SUBSYS, LEVEL, "(msc%d) Paging: %s TMSI-0x%08x: " fmt, \ + (PARAMS)->msc ? (PARAMS)->msc->nr : -1, \ + osmo_mobile_identity_to_str_c(OTC_SELECT, &(PARAMS)->imsi), \ + (PARAMS)->tmsi, \ + ##args) + +#define LOG_PAGING_BTS(PARAMS, BTS, SUBSYS, LEVEL, fmt, args...) \ + LOG_PAGING(PARAMS, SUBSYS, LEVEL, "(bts%u) " fmt, (BTS) ? (BTS)->nr : 255, ##args) + +struct bsc_paging_params { + struct bsc_msc_data *msc; + uint32_t tmsi; + struct osmo_mobile_identity imsi; + uint8_t chan_needed; + struct gsm0808_cell_id_list2 cil; +}; + /** * A pending paging request */ @@ -56,8 +75,7 @@ struct gsm_paging_request { }; /* schedule paging request */ -int paging_request_bts(struct gsm_bts *bts, struct bsc_subscr *bsub, int type, - struct bsc_msc_data *msc); +int paging_request_bts(const struct bsc_paging_params *params, struct bsc_subscr *bsub, struct gsm_bts *bts); struct bsc_msc_data *paging_request_stop(struct gsm_bts *bts, struct bsc_subscr *bsub); |