trxcon/l1sched: cosmetic: rename l1sched_find_lchan()

An upcoming patch will add a similar function taking chan_nr/link_id
as the search criteria, so let's clarify the existing API first.

Change-Id: Ib9f733c22d7fc6bd933219906ca680f246b07f4b
Related: OS#5500
This commit is contained in:
Vadim Yanitskiy 2023-04-13 09:43:30 +07:00
parent e535c0488d
commit bef3f38044
2 changed files with 10 additions and 10 deletions

View File

@ -436,8 +436,8 @@ int l1sched_lchan_set_amr_cfg(struct l1sched_lchan_state *lchan,
uint8_t codecs_bitmask, uint8_t start_codec);
int l1sched_activate_lchan(struct l1sched_ts *ts, enum l1sched_lchan_type chan);
int l1sched_deactivate_lchan(struct l1sched_ts *ts, enum l1sched_lchan_type chan);
struct l1sched_lchan_state *l1sched_find_lchan(struct l1sched_ts *ts,
enum l1sched_lchan_type chan);
struct l1sched_lchan_state *l1sched_find_lchan_by_type(struct l1sched_ts *ts,
enum l1sched_lchan_type type);
/* Primitive management functions */
struct l1sched_ts_prim *l1sched_prim_push(struct l1sched_state *sched,

View File

@ -115,7 +115,7 @@ void l1sched_pull_burst(struct l1sched_state *sched, struct l1sched_burst_req *b
return;
/* Make sure that lchan is allocated and active */
lchan = l1sched_find_lchan(ts, chan);
lchan = l1sched_find_lchan_by_type(ts, chan);
if (lchan == NULL || !lchan->active)
return;
@ -413,13 +413,13 @@ int l1sched_start_ciphering(struct l1sched_ts *ts, uint8_t algo,
return 0;
}
struct l1sched_lchan_state *l1sched_find_lchan(struct l1sched_ts *ts,
enum l1sched_lchan_type chan)
struct l1sched_lchan_state *l1sched_find_lchan_by_type(struct l1sched_ts *ts,
enum l1sched_lchan_type type)
{
struct l1sched_lchan_state *lchan;
llist_for_each_entry(lchan, &ts->lchans, list)
if (lchan->type == chan)
if (lchan->type == type)
return lchan;
return NULL;
@ -485,7 +485,7 @@ int l1sched_activate_lchan(struct l1sched_ts *ts, enum l1sched_lchan_type chan)
struct l1sched_lchan_state *lchan;
/* Try to find requested logical channel */
lchan = l1sched_find_lchan(ts, chan);
lchan = l1sched_find_lchan_by_type(ts, chan);
if (lchan == NULL)
return -EINVAL;
@ -572,7 +572,7 @@ int l1sched_deactivate_lchan(struct l1sched_ts *ts, enum l1sched_lchan_type chan
struct l1sched_lchan_state *lchan;
/* Try to find requested logical channel */
lchan = l1sched_find_lchan(ts, chan);
lchan = l1sched_find_lchan_by_type(ts, chan);
if (lchan == NULL)
return -EINVAL;
@ -794,7 +794,7 @@ int l1sched_handle_rx_burst(struct l1sched_state *sched,
return -ENODEV;
/* Find required channel state */
lchan = l1sched_find_lchan(ts, chan);
lchan = l1sched_find_lchan_by_type(ts, chan);
if (lchan == NULL)
return -ENODEV;
@ -851,7 +851,7 @@ int l1sched_handle_rx_probe(struct l1sched_state *sched,
return -ENODEV;
/* Find the appropriate logical channel */
lchan = l1sched_find_lchan(ts, frame->dl_chan);
lchan = l1sched_find_lchan_by_type(ts, frame->dl_chan);
if (lchan == NULL)
return -ENODEV;