@@ -39,5 +39,7 @@ void load_timer_start(struct gsm_bts *bts);
void bts_update_status(enum bts_global_status which, int on);
+struct gsm_time *get_time(struct gsm_bts *bts);
+
#endif /* _BTS_H */
@@ -12,8 +12,6 @@
int bts_model_init(struct gsm_bts *bts);
-struct gsm_time *bts_model_get_time(struct gsm_bts *bts);
-
int bts_model_check_oml(struct gsm_bts *bts, uint8_t msg_type,
struct tlv_parsed *old_attr, struct tlv_parsed *new_attr,
void *obj);
@@ -17,7 +17,7 @@ int rsl_tx_chan_rqd(struct gsm_bts_trx *trx, struct gsm_time *gtime,
uint8_t ra, uint8_t acc_delay);
int rsl_tx_est_ind(struct gsm_lchan *lchan, uint8_t link_id, uint8_t *data, int len);
-int rsl_tx_chan_act_ack(struct gsm_lchan *lchan, struct gsm_time *gtime);
+int rsl_tx_chan_act_ack(struct gsm_lchan *lchan);
int rsl_tx_chan_act_nack(struct gsm_lchan *lchan, uint8_t cause);
int rsl_tx_conn_fail(struct gsm_lchan *lchan, uint8_t cause);
int rsl_tx_rf_rel_ack(struct gsm_lchan *lchan);
@@ -601,3 +601,11 @@ int bts_supports_cipher(struct gsm_bts_role_bts *bts, int rsl_cipher)
sup = (1 << (rsl_cipher - 2)) & bts->support.ciphers;
return sup > 0;
}
+
+struct gsm_time *get_time(struct gsm_bts *bts)
+{
+ struct gsm_bts_role_bts *btsb = bts->role;
+
+ return &btsb->gsm_time;
+}
+
@@ -520,8 +520,9 @@ int rsl_tx_rf_rel_ack(struct gsm_lchan *lchan)
}
/* 8.4.2 sending CHANnel ACTIVation ACKnowledge */
-int rsl_tx_chan_act_ack(struct gsm_lchan *lchan, struct gsm_time *gtime)
+int rsl_tx_chan_act_ack(struct gsm_lchan *lchan)
{
+ struct gsm_time *gtime = get_time(lchan->ts->trx->bts);
struct msgb *msg;
uint8_t chan_nr = gsm_lchan2chan_nr(lchan);
uint8_t ie[2];
@@ -960,10 +960,8 @@ static int sapi_activate_cb(struct gsm_lchan *lchan, int status)
if (lchan->state != LCHAN_S_ACT_REQ)
return 0;
- struct gsm_time *time;
lchan_set_state(lchan, LCHAN_S_ACTIVE);
- time = bts_model_get_time(lchan->ts->trx->bts);
- rsl_tx_chan_act_ack(lchan, time);
+ rsl_tx_chan_act_ack(lchan);
/* set the initial ciphering parameters for both directions */
l1if_set_ciphering(fl1h, lchan, 0);
@@ -1518,13 +1516,6 @@ static int lchan_deactivate_sacch(struct gsm_lchan *lchan)
return 0;
}
-struct gsm_time *bts_model_get_time(struct gsm_bts *bts)
-{
- struct femtol1_hdl *fl1h = trx_femtol1_hdl(bts->c0);
-
- return &fl1h->gsm_time;
-}
-
/* callback from OML */
int bts_model_check_oml(struct gsm_bts *bts, uint8_t msg_type,
struct tlv_parsed *old_attr, struct tlv_parsed *new_attr,
From: Andreas Eversberg <jolly@eversberg.eu> --- include/osmo-bts/bts.h | 2 ++ include/osmo-bts/bts_model.h | 2 -- include/osmo-bts/rsl.h | 2 +- src/common/bts.c | 8 ++++++++ src/common/rsl.c | 3 ++- src/osmo-bts-sysmo/oml.c | 11 +---------- 6 files changed, 14 insertions(+), 14 deletions(-)