summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2017-07-30 15:42:07 +0200
committerHarald Welte <laforge@gnumonks.org>2017-08-20 22:19:17 +0200
commit35564c691fe975047efe640db098a8385a8482f3 (patch)
tree8e8483c0a6ebfec8916f25bce514ede9172dcb0d
parentae15e7f9de3dbfb776f0771803dcc9ad5a88432a (diff)
VIRT-PHY: virt_l1_sched: Pass timeslot number into call-back
When we schedule a given frame for transmission, we save its timeslot number. However, the callback doesn't get informed about this so far. Change-Id: I608a91ae8e2a57a2d6f87f4b873c82edb0215bf6
-rw-r--r--src/host/virt_phy/include/virtphy/gsmtapl1_if.h2
-rw-r--r--src/host/virt_phy/include/virtphy/virt_l1_sched.h2
-rw-r--r--src/host/virt_phy/src/gsmtapl1_if.c2
-rw-r--r--src/host/virt_phy/src/virt_l1_sched_simple.c2
-rw-r--r--src/host/virt_phy/src/virt_prim_data.c4
-rw-r--r--src/host/virt_phy/src/virt_prim_rach.c4
-rw-r--r--src/host/virt_phy/src/virt_prim_traffic.c4
7 files changed, 10 insertions, 10 deletions
diff --git a/src/host/virt_phy/include/virtphy/gsmtapl1_if.h b/src/host/virt_phy/include/virtphy/gsmtapl1_if.h
index 125ec111..8dab6b28 100644
--- a/src/host/virt_phy/include/virtphy/gsmtapl1_if.h
+++ b/src/host/virt_phy/include/virtphy/gsmtapl1_if.h
@@ -9,4 +9,4 @@
void gsmtapl1_init(struct l1_model_ms *model);
void gsmtapl1_rx_from_virt_um_inst_cb(struct virt_um_inst *vui,
struct msgb *msg);
-void gsmtapl1_tx_to_virt_um_inst(struct l1_model_ms *ms, uint32_t fn, struct msgb *msg);
+void gsmtapl1_tx_to_virt_um_inst(struct l1_model_ms *ms, uint32_t fn, uint8_t tn, struct msgb *msg);
diff --git a/src/host/virt_phy/include/virtphy/virt_l1_sched.h b/src/host/virt_phy/include/virtphy/virt_l1_sched.h
index f3e9b849..b8d401ff 100644
--- a/src/host/virt_phy/include/virtphy/virt_l1_sched.h
+++ b/src/host/virt_phy/include/virtphy/virt_l1_sched.h
@@ -7,7 +7,7 @@
struct l1_model_ms;
-typedef void virt_l1_sched_cb(struct l1_model_ms *ms, uint32_t fn, struct msgb * msg);
+typedef void virt_l1_sched_cb(struct l1_model_ms *ms, uint32_t fn, uint8_t tn, struct msgb * msg);
/* bucket containing items to be executed for a specific mframe number */
struct virt_l1_sched_mframe_item {
diff --git a/src/host/virt_phy/src/gsmtapl1_if.c b/src/host/virt_phy/src/gsmtapl1_if.c
index df1c1242..8202046f 100644
--- a/src/host/virt_phy/src/gsmtapl1_if.c
+++ b/src/host/virt_phy/src/gsmtapl1_if.c
@@ -51,7 +51,7 @@ static char *pseudo_lchan_name(uint16_t arfcn, uint8_t ts, uint8_t ss, uint8_t s
/**
* Replace l11 header of given msgb by a gsmtap header and send it over the virt um.
*/
-void gsmtapl1_tx_to_virt_um_inst(struct l1_model_ms *ms, uint32_t fn, struct msgb *msg)
+void gsmtapl1_tx_to_virt_um_inst(struct l1_model_ms *ms, uint32_t fn, uint8_t tn, struct msgb *msg)
{
struct l1ctl_hdr *l1h = (struct l1ctl_hdr *)msg->data;
struct l1ctl_info_ul *ul = (struct l1ctl_info_ul *)l1h->data;
diff --git a/src/host/virt_phy/src/virt_l1_sched_simple.c b/src/host/virt_phy/src/virt_l1_sched_simple.c
index ba8298fa..4737135c 100644
--- a/src/host/virt_phy/src/virt_l1_sched_simple.c
+++ b/src/host/virt_phy/src/virt_l1_sched_simple.c
@@ -94,7 +94,7 @@ void virt_l1_sched_execute(struct l1_model_ms *ms, uint32_t fn)
/* exec tdma sched item's handler callback */
/* TODO: we do not have a TDMA scheduler currently and execute
* all scheduled tdma items here at once */
- ti_next->handler_cb(ms, mi_next->fn, ti_next->msg);
+ ti_next->handler_cb(ms, mi_next->fn, ti_next->ts, ti_next->msg);
/* remove handled tdma sched item */
llist_del(&ti_next->tdma_item_entry);
}
diff --git a/src/host/virt_phy/src/virt_prim_data.c b/src/host/virt_phy/src/virt_prim_data.c
index 8931cf91..96534aab 100644
--- a/src/host/virt_phy/src/virt_prim_data.c
+++ b/src/host/virt_phy/src/virt_prim_data.c
@@ -44,9 +44,9 @@
* @param [in] fn frame number
* @param [in] msg the msg to sent over virtual um.
*/
-static void virt_l1_sched_handler_cb(struct l1_model_ms *ms, uint32_t fn, struct msgb * msg)
+static void virt_l1_sched_handler_cb(struct l1_model_ms *ms, uint32_t fn, uint8_t tn, struct msgb * msg)
{
- gsmtapl1_tx_to_virt_um_inst(ms, fn, msg);
+ gsmtapl1_tx_to_virt_um_inst(ms, fn, tn, msg);
l1ctl_tx_data_conf(ms, fn, 0, ms->state.serving_cell.arfcn);
}
diff --git a/src/host/virt_phy/src/virt_prim_rach.c b/src/host/virt_phy/src/virt_prim_rach.c
index 8fb0e2f7..94076cf9 100644
--- a/src/host/virt_phy/src/virt_prim_rach.c
+++ b/src/host/virt_phy/src/virt_prim_rach.c
@@ -56,9 +56,9 @@ static const uint8_t rach_to_t3_comb[27] = {
*
* @param [in] msg the msg to sent over virtual um.
*/
-static void virt_l1_sched_handler_cb(struct l1_model_ms *ms, uint32_t fn, struct msgb *msg)
+static void virt_l1_sched_handler_cb(struct l1_model_ms *ms, uint32_t fn, uint8_t tn, struct msgb *msg)
{
- gsmtapl1_tx_to_virt_um_inst(ms, fn, msg);
+ gsmtapl1_tx_to_virt_um_inst(ms, fn, tn, msg);
l1ctl_tx_rach_conf(ms, fn, ms->state.serving_cell.arfcn);
}
diff --git a/src/host/virt_phy/src/virt_prim_traffic.c b/src/host/virt_phy/src/virt_prim_traffic.c
index 6798bc1c..4e58de60 100644
--- a/src/host/virt_phy/src/virt_prim_traffic.c
+++ b/src/host/virt_phy/src/virt_prim_traffic.c
@@ -44,9 +44,9 @@
* @param [in] fn frame number
* @param [in] msg the msg to sent over virtual um.
*/
-static void virt_l1_sched_handler_cb(struct l1_model_ms *ms, uint32_t fn, struct msgb * msg)
+static void virt_l1_sched_handler_cb(struct l1_model_ms *ms, uint32_t fn, uint8_t tn, struct msgb * msg)
{
- gsmtapl1_tx_to_virt_um_inst(ms, fn, msg);
+ gsmtapl1_tx_to_virt_um_inst(ms, fn, tn, msg);
l1ctl_tx_traffic_conf(ms, fn, 0, ms->state.serving_cell.arfcn);
}