aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bts-trx
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2016-01-09 23:21:00 +0100
committerHarald Welte <laforge@gnumonks.org>2016-02-15 14:17:55 +0100
commit48726242add87e6850c64a4a6d3801a4b54084a5 (patch)
tree7a0c997f173542c76e9445ffc85b51ffbe139da3 /src/osmo-bts-trx
parent67311cc1f20c88a0ad0afe488ec136d985477b81 (diff)
TRX: scheduler: Remove dependency to trx_if.[ch]
Diffstat (limited to 'src/osmo-bts-trx')
-rw-r--r--src/osmo-bts-trx/scheduler.c14
-rw-r--r--src/osmo-bts-trx/scheduler_backend.h1
-rw-r--r--src/osmo-bts-trx/scheduler_trx.c10
3 files changed, 14 insertions, 11 deletions
diff --git a/src/osmo-bts-trx/scheduler.c b/src/osmo-bts-trx/scheduler.c
index 10f8972e..dee46ed1 100644
--- a/src/osmo-bts-trx/scheduler.c
+++ b/src/osmo-bts-trx/scheduler.c
@@ -38,7 +38,6 @@
#include "scheduler.h"
#include "scheduler_backend.h"
-//#include "trx_if.h"
extern void *tall_bts_ctx;
@@ -1325,10 +1324,8 @@ int trx_sched_set_lchan(struct l1sched_trx *l1t, uint8_t chan_nr, uint8_t link_i
}
/* disable handover detection (on deactivation) */
- if (!active) {
- struct trx_l1h *l1h = trx_l1h_hdl(l1t->trx);
- trx_if_cmd_nohandover(l1h, tn, ss);
- }
+ if (!active)
+ _sched_act_rach_det(l1t, tn, ss, 0);
return rc;
}
@@ -1340,7 +1337,6 @@ int trx_sched_set_mode(struct l1sched_trx *l1t, uint8_t chan_nr, uint8_t rsl_cmo
{
uint8_t tn = L1SAP_CHAN2TS(chan_nr);
struct l1sched_ts *l1ts = l1sched_trx_get_ts(l1t, tn);
- struct trx_l1h *l1h = trx_l1h_hdl(l1t->trx);
uint8_t ss = l1sap_chan2ss(chan_nr);
int i;
int rc = -EINVAL;
@@ -1385,11 +1381,7 @@ int trx_sched_set_mode(struct l1sched_trx *l1t, uint8_t chan_nr, uint8_t rsl_cmo
* of transceiver link).
* disable handover, if state is still set, since we might not know
* the actual state of transceiver (due to loss of link) */
- if (handover) {
- trx_if_cmd_handover(l1h, tn, ss);
- } else {
- trx_if_cmd_nohandover(l1h, tn, ss);
- }
+ _sched_act_rach_det(l1t, tn, ss, handover);
return rc;
}
diff --git a/src/osmo-bts-trx/scheduler_backend.h b/src/osmo-bts-trx/scheduler_backend.h
index b8084552..9f663cdd 100644
--- a/src/osmo-bts-trx/scheduler_backend.h
+++ b/src/osmo-bts-trx/scheduler_backend.h
@@ -79,3 +79,4 @@ int rx_tchh_fn(struct l1sched_trx *l1t, uint8_t tn, uint32_t fn,
const ubit_t *_sched_dl_burst(struct l1sched_trx *l1t, uint8_t tn, uint32_t fn);
int _sched_rts(struct l1sched_trx *l1t, uint8_t tn, uint32_t fn);
+void _sched_act_rach_det(struct l1sched_trx *l1t, uint8_t tn, uint8_t ss, int activate);
diff --git a/src/osmo-bts-trx/scheduler_trx.c b/src/osmo-bts-trx/scheduler_trx.c
index 0aeb8359..5629a64f 100644
--- a/src/osmo-bts-trx/scheduler_trx.c
+++ b/src/osmo-bts-trx/scheduler_trx.c
@@ -1458,3 +1458,13 @@ new_clock:
return 0;
}
+
+void _sched_act_rach_det(struct l1sched_trx *l1t, uint8_t tn, uint8_t ss, int activate)
+{
+ struct trx_l1h *l1h = trx_l1h_hdl(l1t->trx);
+
+ if (activate)
+ trx_if_cmd_handover(l1h, tn, ss);
+ else
+ trx_if_cmd_nohandover(l1h, tn, ss);
+}