summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2017-06-09 20:53:20 +0700
committerVadim Yanitskiy <axilirator@gmail.com>2017-10-23 22:05:49 +0330
commit2637b084011859c034d6447c789871ac08d2ba34 (patch)
tree2d5ab9f7d34d4a039d644e10c3d05266dd2575e4
parenta08d66fbaaf983c5fc70af8b47d36bc1e26e938f (diff)
host/trxcon/trx_if.c: handle clock indications
-rw-r--r--src/host/trxcon/trx_if.c6
-rw-r--r--src/host/trxcon/trx_if.h5
2 files changed, 10 insertions, 1 deletions
diff --git a/src/host/trxcon/trx_if.c b/src/host/trxcon/trx_if.c
index 8f93b0a6..83db173a 100644
--- a/src/host/trxcon/trx_if.c
+++ b/src/host/trxcon/trx_if.c
@@ -42,6 +42,7 @@
#include "trxcon.h"
#include "trx_if.h"
#include "logging.h"
+#include "scheduler.h"
extern void *tall_trx_ctx;
extern struct osmo_fsm_inst *trxcon_fsm;
@@ -146,6 +147,7 @@ static void trx_udp_close(struct osmo_fd *ofd)
static int trx_clck_read_cb(struct osmo_fd *ofd, unsigned int what)
{
+ struct trx_instance *trx = (struct trx_instance *) ofd->data;
char buf[1500];
uint32_t fn;
int len;
@@ -173,7 +175,9 @@ static int trx_clck_read_cb(struct osmo_fd *ofd, unsigned int what)
"correctly, correcting to fn=%u\n", fn);
}
- /* TODO: call the clck_ind callback */
+ /* Call the clck_ind callback */
+ sched_clck_handle(&trx->sched, fn);
+
return 0;
}
diff --git a/src/host/trxcon/trx_if.h b/src/host/trxcon/trx_if.h
index a81da37e..e41d506b 100644
--- a/src/host/trxcon/trx_if.h
+++ b/src/host/trxcon/trx_if.h
@@ -5,6 +5,8 @@
#include <osmocom/core/timer.h>
#include <osmocom/core/fsm.h>
+#include "scheduler.h"
+
enum trx_fsm_states {
TRX_STATE_OFFLINE = 0,
TRX_STATE_IDLE,
@@ -21,6 +23,9 @@ struct trx_instance {
struct llist_head trx_ctrl_list;
struct osmo_fsm_inst *fsm;
uint32_t prev_state;
+
+ /* Scheduler stuff */
+ struct trx_sched sched;
};
struct trx_ctrl_msg {