summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/l1a_l23_interface.h14
-rw-r--r--src/host/layer23/src/l1ctl.c4
-rw-r--r--src/target/firmware/layer1/init.c5
3 files changed, 19 insertions, 4 deletions
diff --git a/include/l1a_l23_interface.h b/include/l1a_l23_interface.h
index 12eaf7ab..5651d7b1 100644
--- a/include/l1a_l23_interface.h
+++ b/include/l1a_l23_interface.h
@@ -30,12 +30,13 @@
#define L1CTL_RACH_REQ 4
#define L1CTL_DM_EST_REQ 5
#define L1CTL_DATA_REQ 7
-#define L1CTL_RESET 8
+#define L1CTL_RESET_IND 8
#define L1CTL_PM_REQ 9 /* power measurement */
#define L1CTL_PM_RESP 10 /* power measurement */
#define L1CTL_ECHO_REQ 11
#define L1CTL_ECHO_RESP 12
#define L1CTL_RACH_RESP 13
+#define L1CTL_RESET_REQ 14
/*
* NOTE: struct size. We do add manual padding out of the believe
@@ -166,4 +167,15 @@ struct l1ctl_pm_resp {
uint8_t pm[2];
} __attribute__((packed));
+enum l1ctl_reset_type {
+ L1CTL_RES_T_BOOT, /* only _IND */
+ L1CTL_RES_T_FULL,
+};
+
+/* argument to L1CTL_RESET_REQ and L1CTL_RESET_IND */
+struct l1ctl_reset {
+ uint8_t type;
+ uint8_t pad[3];
+} __attribute__((packed));
+
#endif
diff --git a/src/host/layer23/src/l1ctl.c b/src/host/layer23/src/l1ctl.c
index 5e683d3c..df0eb1d4 100644
--- a/src/host/layer23/src/l1ctl.c
+++ b/src/host/layer23/src/l1ctl.c
@@ -337,7 +337,7 @@ int l1ctl_tx_pm_req_range(struct osmocom_ms *ms, uint16_t arfcn_from,
return osmo_send_l1(ms, msg);
}
-/* Receive L1CTL_RESET */
+/* Receive L1CTL_RESET_IND */
static int rx_l1_reset(struct osmocom_ms *ms)
{
printf("Layer1 Reset.\n");
@@ -392,7 +392,7 @@ int l1ctl_recv(struct osmocom_ms *ms, struct msgb *msg)
case L1CTL_DATA_IND:
rc = rx_ph_data_ind(ms, msg);
break;
- case L1CTL_RESET:
+ case L1CTL_RESET_IND:
rc = rx_l1_reset(ms);
msgb_free(msg);
break;
diff --git a/src/target/firmware/layer1/init.c b/src/target/firmware/layer1/init.c
index ecffe7c3..c00d09fb 100644
--- a/src/target/firmware/layer1/init.c
+++ b/src/target/firmware/layer1/init.c
@@ -39,6 +39,7 @@
void layer1_init(void)
{
struct msgb *msg;
+ struct l1ctl_reset *res;
#ifndef CONFIG_TX_ENABLE
printf("\n\nTHIS FIRMWARE WAS COMPILED WITHOUT TX SUPPORT!!!\n\n");
@@ -72,6 +73,8 @@ void layer1_init(void)
irq_disable(IRQ_RTC_TIMER);
/* inform l2 and upwards that we are ready for orders */
- msg = l1_create_l2_msg(L1CTL_RESET, 0, 0, 0);
+ msg = l1_create_l2_msg(L1CTL_RESET_IND, 0, 0, 0);
+ res = msgb_put(msg, sizeof(*res));
+ res->type = L1CTL_RES_T_BOOT;
l1_queue_for_l2(msg);
}