summaryrefslogtreecommitdiffstats
path: root/src/host/virt_phy/src/virt_prim_traffic.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/host/virt_phy/src/virt_prim_traffic.c')
-rw-r--r--src/host/virt_phy/src/virt_prim_traffic.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/host/virt_phy/src/virt_prim_traffic.c b/src/host/virt_phy/src/virt_prim_traffic.c
index 4e58de60..5f6b273b 100644
--- a/src/host/virt_phy/src/virt_prim_traffic.c
+++ b/src/host/virt_phy/src/virt_prim_traffic.c
@@ -84,6 +84,7 @@ void l1ctl_tx_traffic_ind(struct l1_model_ms *ms, struct msgb *msg, uint16_t arf
struct msgb *l1ctl_msg = NULL;
struct l1ctl_traffic_ind * l1ti;
struct l1ctl_info_dl * l1dl;
+ uint8_t *frame, frame_len;
uint8_t rsl_chan_type, subchan, timeslot;
l1ctl_msg = l1ctl_msgb_alloc(L1CTL_TRAFFIC_IND);
l1dl = (struct l1ctl_info_dl *) msgb_put(l1ctl_msg, sizeof(*l1dl));
@@ -102,7 +103,10 @@ void l1ctl_tx_traffic_ind(struct l1_model_ms *ms, struct msgb *msg, uint16_t arf
/* TODO: traffic decoding and decryption */
- memcpy(l1ti->data, msgb_data(msg), msgb_length(msg));
+ frame_len = msgb_length(msg);
+ frame = (uint8_t *) msgb_put(l1ctl_msg, frame_len);
+ memcpy(frame, msgb_data(msg), frame_len);
+
DEBUGPMS(DL1P, ms, "Tx L1CTL_TRAFFIC_IND (chan_nr=0x%02x, link_id=0x%02x)\n", chan_nr, link_id);
l1ctl_sap_tx_to_l23_inst(ms, l1ctl_msg);
}