From bf6bae2b2363a182bb1b95574c2922bf4257c4d9 Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Mon, 22 Aug 2016 18:23:03 +0200 Subject: common/rsl: move decision whether to chan act ack/nack to common function Prepare for a dyn TS patch that needs to call rsl_tx_chan_act_ack() directly without the rel_act_kind decision. Add function rsl_tx_chan_act_acknack() to wrap rsl_tx_chan_act_ack() and rsl_tx_chan_act_nack(). Move the decision whether to drop the ack/nack, based on lchan->rel_act_kind, to the new function, losing some code dup. Change all callers to use the new function; drop the two older ones from rsl.h and make them static. Note: for nack, the exception for dyn TS in PDCH mode was missing (rsl_tx_chan_act_nack() had only the rel_act_kind != LCHAN_REL_ACT_RSL condition, but should also have had the dyn TS exception as in rsl_tx_chan_act_ack()). I already know that this exception will again be removed in an upcoming commit, but for patch readability it logically makes sense to add it here. To easily include the nack case, drop the check for which pchan the dyn TS is operating as, because a rel_act_kind == LCHAN_REL_ACT_PCU implies that it is either already in or trying to become PDCH mode. Change-Id: I57ba60c670730c6d7877a6a9b96ece0a7679a0bb --- include/osmo-bts/rsl.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'include') diff --git a/include/osmo-bts/rsl.h b/include/osmo-bts/rsl.h index 72ed2fcb..093e9cb7 100644 --- a/include/osmo-bts/rsl.h +++ b/include/osmo-bts/rsl.h @@ -19,8 +19,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); -int rsl_tx_chan_act_nack(struct gsm_lchan *lchan, uint8_t cause); +int rsl_tx_chan_act_acknack(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); int rsl_tx_hando_det(struct gsm_lchan *lchan, uint8_t *ho_delay); -- cgit v1.2.3