Lines Matching refs:cred_info

33 				       struct ath6kl_htc_credit_info *cred_info,
40 static void ath6kl_credit_deposit(struct ath6kl_htc_credit_info *cred_info, in ath6kl_credit_deposit() argument
49 cred_info->cur_free_credits -= credits; in ath6kl_credit_deposit()
52 static void ath6kl_credit_init(struct ath6kl_htc_credit_info *cred_info, in ath6kl_credit_init() argument
61 cred_info->cur_free_credits = tot_credits; in ath6kl_credit_init()
62 cred_info->total_avail_credits = tot_credits; in ath6kl_credit_init()
73 ath6kl_credit_deposit(cred_info, in ath6kl_credit_init()
81 ath6kl_credit_deposit(cred_info, cur_ep_dist, in ath6kl_credit_init()
107 cred_info->lowestpri_ep_dist = cur_ep_dist->list; in ath6kl_credit_init()
109 WARN_ON(cred_info->cur_free_credits <= 0); in ath6kl_credit_init()
126 count = (cred_info->cur_free_credits / in ath6kl_credit_init()
147 struct ath6kl_htc_credit_info *cred_info) in ath6kl_htc_mbox_credit_setup() argument
151 memset(cred_info, 0, sizeof(struct ath6kl_htc_credit_info)); in ath6kl_htc_mbox_credit_setup()
160 ath6kl_htc_set_credit_dist(htc_target, cred_info, servicepriority, 5); in ath6kl_htc_mbox_credit_setup()
166 static void ath6kl_credit_reduce(struct ath6kl_htc_credit_info *cred_info, in ath6kl_credit_reduce() argument
182 cred_info->cur_free_credits += credits; in ath6kl_credit_reduce()
185 static void ath6kl_credit_update(struct ath6kl_htc_credit_info *cred_info, in ath6kl_credit_update() argument
199 ath6kl_credit_reduce(cred_info, in ath6kl_credit_update()
204 ath6kl_credit_reduce(cred_info, cur_list, in ath6kl_credit_update()
209 ath6kl_credit_reduce(cred_info, in ath6kl_credit_update()
220 static void ath6kl_credit_seek(struct ath6kl_htc_credit_info *cred_info, in ath6kl_credit_seek() argument
242 credits = min(cred_info->cur_free_credits, ep_dist->seek_cred); in ath6kl_credit_seek()
258 &cred_info->lowestpri_ep_dist, in ath6kl_credit_seek()
263 need = ep_dist->seek_cred - cred_info->cur_free_credits; in ath6kl_credit_seek()
273 ath6kl_credit_reduce(cred_info, curdist_list, in ath6kl_credit_seek()
276 if (cred_info->cur_free_credits >= in ath6kl_credit_seek()
285 credits = min(cred_info->cur_free_credits, ep_dist->seek_cred); in ath6kl_credit_seek()
290 ath6kl_credit_deposit(cred_info, ep_dist, credits); in ath6kl_credit_seek()
329 static void ath6kl_credit_distribute(struct ath6kl_htc_credit_info *cred_info, in ath6kl_credit_distribute() argument
335 ath6kl_credit_update(cred_info, ep_dist_list); in ath6kl_credit_distribute()
338 ath6kl_credit_redistribute(cred_info, ep_dist_list); in ath6kl_credit_distribute()
344 WARN_ON(cred_info->cur_free_credits > cred_info->total_avail_credits); in ath6kl_credit_distribute()
345 WARN_ON(cred_info->cur_free_credits < 0); in ath6kl_credit_distribute()