host/trxcon: send L1CTL_DATA_IND directly from lchan handler
Change-Id: Idfc86a59469c7a0bba1c16177502844e59ed8887
This commit is contained in:
parent
e738f7827e
commit
7ce986c638
|
@ -142,7 +142,6 @@ int l1ctl_tx_data_ind(struct l1ctl_link *l1l, struct l1ctl_info_dl *data)
|
|||
|
||||
/* Copy header and data from source message */
|
||||
memcpy(dl, data, len);
|
||||
talloc_free(data);
|
||||
|
||||
/* Put message to upper layers */
|
||||
return l1ctl_link_send(l1l, msg);
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
#include "logging.h"
|
||||
#include "trx_if.h"
|
||||
#include "trxcon.h"
|
||||
#include "l1ctl.h"
|
||||
|
||||
extern struct osmo_fsm_inst *trxcon_fsm;
|
||||
|
||||
|
@ -154,8 +155,9 @@ int rx_data_fn(struct trx_instance *trx, struct trx_ts *ts,
|
|||
/* Fill in decoded payload */
|
||||
memcpy(data->payload, l2, 23);
|
||||
|
||||
/* Raise an event to trxcon */
|
||||
osmo_fsm_inst_dispatch(trxcon_fsm, SCH_EVENT_DATA, data);
|
||||
/* Put a packet to higher layers */
|
||||
l1ctl_tx_data_ind(trx->l1l, data);
|
||||
talloc_free(data);
|
||||
|
||||
/* TODO: AGC, TA loops */
|
||||
return 0;
|
||||
|
|
|
@ -94,8 +94,6 @@ static void trxcon_fsm_managed_action(struct osmo_fsm_inst *fi,
|
|||
trx_if_cmd_poweroff(app_data.trx);
|
||||
}
|
||||
break;
|
||||
case SCH_EVENT_DATA:
|
||||
l1ctl_tx_data_ind(app_data.l1l, (struct l1ctl_info_dl *) data);
|
||||
case TRX_EVENT_RSP_ERROR:
|
||||
case TRX_EVENT_OFFLINE:
|
||||
case SCH_EVENT_CLCK_IND:
|
||||
|
@ -122,8 +120,7 @@ static struct osmo_fsm_state trxcon_fsm_states[] = {
|
|||
GEN_MASK(TRX_EVENT_RSP_ERROR) |
|
||||
GEN_MASK(TRX_EVENT_OFFLINE) |
|
||||
GEN_MASK(SCH_EVENT_CLCK_IND) |
|
||||
GEN_MASK(SCH_EVENT_CLCK_LOSS) |
|
||||
GEN_MASK(SCH_EVENT_DATA)),
|
||||
GEN_MASK(SCH_EVENT_CLCK_LOSS)),
|
||||
.out_state_mask = GEN_MASK(TRXCON_STATE_IDLE),
|
||||
.name = "MANAGED",
|
||||
.action = trxcon_fsm_managed_action,
|
||||
|
|
|
@ -20,5 +20,4 @@ enum trxcon_fsm_events {
|
|||
/* Scheduler specific events */
|
||||
SCH_EVENT_CLCK_IND,
|
||||
SCH_EVENT_CLCK_LOSS,
|
||||
SCH_EVENT_DATA,
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue