aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bsc/handover_decision_2.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/osmo-bsc/handover_decision_2.c')
-rw-r--r--src/osmo-bsc/handover_decision_2.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/src/osmo-bsc/handover_decision_2.c b/src/osmo-bsc/handover_decision_2.c
index 5b7d4b16c..84ddfa444 100644
--- a/src/osmo-bsc/handover_decision_2.c
+++ b/src/osmo-bsc/handover_decision_2.c
@@ -29,6 +29,7 @@
#include <osmocom/bsc/debug.h>
#include <osmocom/bsc/gsm_data.h>
+#include <osmocom/bsc/assignment_fsm.h>
#include <osmocom/bsc/handover_fsm.h>
#include <osmocom/bsc/handover_decision.h>
#include <osmocom/bsc/handover_decision_2.h>
@@ -812,7 +813,6 @@ static void check_requirements_remote_bss(struct ho_candidate *c)
/* Trigger handover or assignment depending on the target BTS */
static int trigger_local_ho_or_as(struct ho_candidate *c, uint8_t requirements)
{
- struct handover_out_req req;
int afs_bias = 0;
bool full_rate = false;
@@ -868,23 +868,25 @@ static int trigger_local_ho_or_as(struct ho_candidate *c, uint8_t requirements)
}
/* trigger handover or assignment */
- if (c->current.bts == c->target.bts)
+ if (c->current.bts == c->target.bts) {
LOGPHOLCHAN(c->current.lchan, LOGL_NOTICE, "Triggering assignment to %s, due to %s\n",
full_rate ? "TCH/F" : "TCH/H",
ho_reason_name(global_ho_reason));
- else
+ reassignment_request_to_chan_type(ASSIGN_FOR_CONGESTION_RESOLUTION, c->current.lchan,
+ full_rate? GSM_LCHAN_TCH_F : GSM_LCHAN_TCH_H);
+ } else {
+ struct handover_out_req req = {
+ .from_hodec_id = HODEC2,
+ .old_lchan = c->current.lchan,
+ .new_lchan_type = full_rate? GSM_LCHAN_TCH_F : GSM_LCHAN_TCH_H,
+ };
+ bts_cell_ab(&req.target_cell_ab, c->target.bts);
LOGPHOLCHANTOBTS(c->current.lchan, c->target.bts, LOGL_INFO,
"Triggering handover to %s, due to %s\n",
full_rate ? "TCH/F" : "TCH/H",
ho_reason_name(global_ho_reason));
-
- req = (struct handover_out_req){
- .from_hodec_id = HODEC2,
- .old_lchan = c->current.lchan,
- .new_lchan_type = full_rate? GSM_LCHAN_TCH_F : GSM_LCHAN_TCH_H,
- };
- bts_cell_ab(&req.target_cell_ab, c->target.bts);
- handover_request(&req);
+ handover_request(&req);
+ }
return 0;
}