diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2023-04-17 16:33:35 +0200 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2023-04-20 16:17:38 +0200 |
commit | eb0a0527e0a720fa9b0e351b5b38a8e46cb286e5 (patch) | |
tree | ac81a80c09db7a5b4b1a99c98c78877cec92f242 /src/pcu_l1_if.cpp | |
parent | cde18c56321f34456d3c8ba8a3af411310e25400 (diff) |
ms: Merge ms_storage into bts.cpp
That class is mostly a C++ class holding a llist plus some callbacks.
Having that in a separate class makes code more complex for no good
reason. This patch moves the llist into bts and allocates stuff directly
from within bts.
This will allow further cleanup of MS lieficyle in future patches.
Change-Id: I627f5db5073189c23ddf2b7f09c90abb24846f62
Diffstat (limited to 'src/pcu_l1_if.cpp')
-rw-r--r-- | src/pcu_l1_if.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/pcu_l1_if.cpp b/src/pcu_l1_if.cpp index 7068083a..4aae9c49 100644 --- a/src/pcu_l1_if.cpp +++ b/src/pcu_l1_if.cpp @@ -55,7 +55,7 @@ extern "C" { #include <pdch.h> #include <tbf_ul.h> #include <tbf_dl.h> -#include <gprs_ms_storage.h> +#include <gprs_ms.h> extern void *tall_pcu_ctx; @@ -1094,7 +1094,7 @@ static int pcu_rx_susp_req(struct gprs_rlcmac_bts *bts, struct gsm_pcu_if_susp_r LOGP(DL1IF, LOGL_INFO, "GPRS Suspend request received: TLLI=0x%08x RAI=%s\n", susp_req->tlli, osmo_rai_name(&ra_id)); - if ((ms = bts_ms_store(bts)->get_ms(susp_req->tlli))) { + if ((ms = bts_get_ms_by_tlli(bts, susp_req->tlli, GSM_RESERVED_TMSI))) { /* We need to catch both pointers here since MS may become freed after first tbf_free(dl_tbf) if only DL TBF was available */ dl_tbf = ms_dl_tbf(ms); @@ -1119,8 +1119,8 @@ static int pcu_rx_app_info_req(struct gprs_rlcmac_bts *bts, struct gsm_pcu_if_ap app_info_req->application_type, app_info_req->len); bts->app_info_pending = 0; - llist_for_each(tmp, bts_ms_store(bts)->ms_list()) { - GprsMs *ms = llist_entry(tmp, typeof(*ms), list); + llist_for_each(tmp, &bts->ms_list) { + struct GprsMs *ms = llist_entry(tmp, typeof(*ms), list); if (!ms_dl_tbf(ms)) continue; bts->app_info_pending++; @@ -1177,8 +1177,8 @@ static int pcu_rx_neigh_addr_cnf(struct gprs_rlcmac_bts *bts, struct gsm_pcu_if_ NEIGH_CACHE_ENTRY_KEY_ARGS(&neigh_key), naddr_cnf->err_code); } - llist_for_each(tmp, bts_ms_store(bts)->ms_list()) { - GprsMs *ms = llist_entry(tmp, typeof(*ms), list); + llist_for_each(tmp, &bts->ms_list) { + struct GprsMs *ms = llist_entry(tmp, typeof(*ms), list); if (ms->nacc && nacc_fsm_is_waiting_addr_resolution(ms->nacc, &neigh_key)) osmo_fsm_inst_dispatch(ms->nacc->fi, NACC_EV_RX_RAC_CI, cgi_ps_ptr); } |