aboutsummaryrefslogtreecommitdiffstats
path: root/include/osmocom/bsc
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2021-04-27 22:37:14 +0000
committerNeels Hofmeyr <neels@hofmeyr.de>2021-05-28 17:22:59 +0000
commitcb0aaad5d484b675b06b9fa5260123f00227cf31 (patch)
treef62ae13b2d726e40f392a86acfc29da71093cdc4 /include/osmocom/bsc
parentc2d3fe5da0c0d1ad6ba7963d92c9f75fea38f46a (diff)
assignment_fsm: allow assignment to a specific lchan
So far the assignment FSM always tried to satisfy the channel mode and rate by either re-using the current lchan or finding a new, unused lchan. For VAMOS however, we want to pick one specific lchan. Add target_lchan to struct assignment_request and skip all mode matching and lchan selection when a specific target_lchan is set. Related: SYS#5315 OS#4940 Change-Id: I71e0d4ff4746706e0be5266e4574d70ca432e3d7
Diffstat (limited to 'include/osmocom/bsc')
-rw-r--r--include/osmocom/bsc/assignment_fsm.h4
-rw-r--r--include/osmocom/bsc/gsm_data.h8
2 files changed, 12 insertions, 0 deletions
diff --git a/include/osmocom/bsc/assignment_fsm.h b/include/osmocom/bsc/assignment_fsm.h
index b4af335d1..d4ed846e1 100644
--- a/include/osmocom/bsc/assignment_fsm.h
+++ b/include/osmocom/bsc/assignment_fsm.h
@@ -41,6 +41,10 @@ enum assignment_fsm_event {
void assignment_fsm_init();
+int reassignment_request_to_lchan(enum assign_for assign_for, struct gsm_lchan *lchan, struct gsm_lchan *to_lchan);
+int reassignment_request_to_chan_type(enum assign_for assign_for, struct gsm_lchan *lchan,
+ enum gsm_chan_t new_lchan_type);
+
void assignment_fsm_start(struct gsm_subscriber_connection *conn, struct gsm_bts *bts,
struct assignment_request *req);
void assignment_reset(struct gsm_subscriber_connection *conn);
diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index 3ed624f26..58ec1243c 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -154,6 +154,14 @@ struct assignment_request {
/* Rate/codec setting in preference order (need at least 1 !) */
int n_ch_mode_rate;
struct channel_mode_and_rate ch_mode_rate_list[3];
+
+ /* An assignment request usually requests to assign any available lchan, to match above requirements. This may
+ * also choose to just keep the current lchan and merely modify it as appropriate. In these cases, keep
+ * target_lchan == NULL.
+ * In some situations, an assignment to a specific target lchan is requested (congestion resolution, VAMOS
+ * multiplexing, user request via VTY). In these situations, select a target lchan beforehand and point
+ * target_lchan to it. */
+ struct gsm_lchan *target_lchan;
};
/* State of an ongoing Assignment, while the assignment_fsm is still busy. This serves as state separation to keep the