aboutsummaryrefslogtreecommitdiffstats
path: root/src/gprs_ms.h
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2021-01-21 18:46:13 +0100
committerPau Espin Pedrol <pespin@sysmocom.de>2021-01-29 12:59:30 +0100
commitc0a250d17d79e08763f77cdf58e970dc2e65e7d3 (patch)
treefd17974c91dd13c5cd2f601c5937dcd025c52e04 /src/gprs_ms.h
parent1e77ca88af8f07290cd1a11f11f3db916c9c3c79 (diff)
Introduce NACC support
A new nacc_fsm is introduced per MS object, with its partner priv structure struct nacc_fsm_ctx, which exists and is available in the MS object only during the duration of the NACC procedure. The NACC context is created on an MS whenever a Pkt Cell Change Notification is received on Uplink RLCMAC, which asks for neighbor information of a given ARFCN+BSIC. First, the target ARFCN+BSIC needs to be translated into a CGI-PS (RAC+CI) address. That's done by asking the BSC through the Neighbour Resolution Service available in osmo-bsc using the CTRL interface. Once the CGI-PS of the target cell is known, PCU starts a RIM RAN-INFO request against the SGSN (which will route the request as needed), and wait for a response containing the SI bits from the target cell. After the SI are received, the scheduler is instructed to eventually poll a TBF for the MS originating the CCN, so that we can send the SI encapsulated into multiple Packet Neighbor Cell Data messages on the downlink. One all the SI bits are sent, the scheduler is instructed to send a Packet Cell Change Continue message. Once the message above has been sent, the FSM autodestroys itself. Caches are also introduced in this patch which allows for re-using recently known translations ARFCN+BSIC -> CGI-PS and CGI-PS -> SI_INFO respectively. Change-Id: Id35f40d05f3e081f32fddbf1fa34cb338db452ca
Diffstat (limited to 'src/gprs_ms.h')
-rw-r--r--src/gprs_ms.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gprs_ms.h b/src/gprs_ms.h
index 39d65de2..c57bbf6a 100644
--- a/src/gprs_ms.h
+++ b/src/gprs_ms.h
@@ -40,6 +40,7 @@ extern "C" {
#include <osmocom/gsm/gsm48.h>
#include "coding_scheme.h"
+#include <gsm_rlcmac.h>
#include <stdint.h>
#include <stddef.h>
@@ -100,6 +101,7 @@ struct GprsMs {
enum mcs_kind mode;
struct rate_ctr_group *ctrs;
+ struct nacc_fsm_ctx *nacc;
};
struct GprsMs *ms_alloc(struct gprs_rlcmac_bts *bts, uint32_t tlli);
@@ -140,6 +142,10 @@ static inline struct gprs_rlcmac_dl_tbf *ms_dl_tbf(const struct GprsMs *ms) {ret
void ms_set_callback(struct GprsMs *ms, struct gpr_ms_callback *cb);
+int ms_nacc_start(struct GprsMs *ms, Packet_Cell_Change_Notification_t *notif);
+bool ms_nacc_rts(const struct GprsMs *ms);
+struct msgb *ms_nacc_create_rlcmac_msg(struct GprsMs *ms, struct gprs_rlcmac_tbf *tbf);
+
static inline bool ms_is_idle(const struct GprsMs *ms)
{
return !ms->ul_tbf && !ms->dl_tbf && !ms->ref && llist_empty(&ms->old_tbfs);