sysmobts: Use the fl1h->priv to get the trx instead of using the lchan

I am working toward killing the last argument of the l1if_gsm_req_compl
and just have the trx inside the callback signature.
This commit is contained in:
Holger Hans Peter Freyther 2013-01-21 11:25:41 +01:00
parent dc9148d035
commit 60b090ac53
1 changed files with 9 additions and 9 deletions

View File

@ -210,8 +210,8 @@ static int opstart_compl_cb(struct msgb *l1_msg, void *data)
static int trx_init_compl_cb(struct msgb *l1_msg, void *data)
{
struct femtol1_hdl *fl1h = data;
struct gsm_bts_trx *trx = fl1h->priv;
struct gsm_bts_trx *trx = data;
struct femtol1_hdl *fl1h = trx_femtol1_hdl(trx);
GsmL1_Prim_t *l1p = msgb_l1prim(l1_msg);
GsmL1_MphInitCnf_t *ic = &l1p->u.mphInitCnf;
@ -286,7 +286,7 @@ static int trx_init(struct gsm_bts_trx *trx)
dev_par->fRxPowerLevel, dev_par->fTxPowerLevel);
/* send MPH-INIT-REQ, wait for MPH-INIT-CNF */
return l1if_gsm_req_compl(fl1h, msg, trx_init_compl_cb, fl1h);
return l1if_gsm_req_compl(fl1h, msg, trx_init_compl_cb, fl1h->priv);
}
uint32_t trx_get_hlayer1(struct gsm_bts_trx *trx)
@ -311,7 +311,7 @@ static int trx_close(struct gsm_bts_trx *trx)
prim_init(msgb_l1prim(msg), GsmL1_PrimId_MphCloseReq, fl1h);
LOGP(DL1C, LOGL_NOTICE, "Close TRX %u\n", trx->nr);
return l1if_gsm_req_compl(fl1h, msg, trx_close_compl_cb, fl1h);
return l1if_gsm_req_compl(fl1h, msg, trx_close_compl_cb, fl1h->priv);
}
static int ts_connect(struct gsm_bts_trx_ts *ts)
@ -706,7 +706,7 @@ static int mph_send_activate_req(struct gsm_lchan *lchan, int sapi, int dir)
get_value_string(femtobts_dir_names, act_req->dir));
/* send the primitive for all GsmL1_Sapi_* that match the LCHAN */
return l1if_gsm_req_compl(fl1h, msg, lchan_act_compl_cb, lchan->ts->trx);
return l1if_gsm_req_compl(fl1h, msg, lchan_act_compl_cb, fl1h->priv);
}
int lchan_activate(struct gsm_lchan *lchan)
@ -868,7 +868,7 @@ static int tx_confreq_logchpar(struct gsm_lchan *lchan, uint8_t direction)
&conf_req->cfgParams.setLogChParams.logChParams,
conf_req->cfgParams.setLogChParams.sapi);
return l1if_gsm_req_compl(fl1h, msg, chmod_modif_compl_cb, lchan->ts->trx);
return l1if_gsm_req_compl(fl1h, msg, chmod_modif_compl_cb, fl1h->priv);
}
int l1if_set_txpower(struct femtol1_hdl *fl1h, float tx_power)
@ -923,7 +923,7 @@ int l1if_set_ciphering(struct femtol1_hdl *fl1h,
memcpy(cfgr->cfgParams.setCipheringParams.u8Kc,
lchan->encr.key, lchan->encr.key_len);
return l1if_gsm_req_compl(fl1h, msg, chmod_modif_compl_cb, lchan->ts->trx);
return l1if_gsm_req_compl(fl1h, msg, chmod_modif_compl_cb, fl1h->priv);
}
@ -1024,7 +1024,7 @@ int lchan_deactivate(struct gsm_lchan *lchan)
osmo_timer_del(&fl1h->alive_timer);
/* send the primitive for all GsmL1_Sapi_* that match the LCHAN */
l1if_gsm_req_compl(fl1h, msg, lchan_deact_compl_cb, lchan->ts->trx);
l1if_gsm_req_compl(fl1h, msg, lchan_deact_compl_cb, fl1h->priv);
}
lchan_set_state(lchan, LCHAN_S_REL_REQ);
@ -1053,7 +1053,7 @@ static int lchan_deactivate_sacch(struct gsm_lchan *lchan)
get_value_string(femtobts_dir_names, deact_req->dir));
/* send the primitive for all GsmL1_Sapi_* that match the LCHAN */
return l1if_gsm_req_compl(fl1h, msg, lchan_deact_compl_cb, lchan->ts->trx);
return l1if_gsm_req_compl(fl1h, msg, lchan_deact_compl_cb, fl1h->priv);
}