Lines Matching refs:rc

49 void uwb_drp_avail_init(struct uwb_rc *rc)  in uwb_drp_avail_init()  argument
51 bitmap_fill(rc->drp_avail.global, UWB_NUM_MAS); in uwb_drp_avail_init()
52 bitmap_fill(rc->drp_avail.local, UWB_NUM_MAS); in uwb_drp_avail_init()
53 bitmap_fill(rc->drp_avail.pending, UWB_NUM_MAS); in uwb_drp_avail_init()
61 void uwb_drp_available(struct uwb_rc *rc, struct uwb_mas_bm *avail) in uwb_drp_available() argument
63 bitmap_and(avail->bm, rc->drp_avail.global, rc->drp_avail.local, UWB_NUM_MAS); in uwb_drp_available()
64 bitmap_and(avail->bm, avail->bm, rc->drp_avail.pending, UWB_NUM_MAS); in uwb_drp_available()
74 int uwb_drp_avail_reserve_pending(struct uwb_rc *rc, struct uwb_mas_bm *mas) in uwb_drp_avail_reserve_pending() argument
78 uwb_drp_available(rc, &avail); in uwb_drp_avail_reserve_pending()
82 bitmap_andnot(rc->drp_avail.pending, rc->drp_avail.pending, mas->bm, UWB_NUM_MAS); in uwb_drp_avail_reserve_pending()
91 void uwb_drp_avail_reserve(struct uwb_rc *rc, struct uwb_mas_bm *mas) in uwb_drp_avail_reserve() argument
93 bitmap_or(rc->drp_avail.pending, rc->drp_avail.pending, mas->bm, UWB_NUM_MAS); in uwb_drp_avail_reserve()
94 bitmap_andnot(rc->drp_avail.local, rc->drp_avail.local, mas->bm, UWB_NUM_MAS); in uwb_drp_avail_reserve()
95 rc->drp_avail.ie_valid = false; in uwb_drp_avail_reserve()
103 void uwb_drp_avail_release(struct uwb_rc *rc, struct uwb_mas_bm *mas) in uwb_drp_avail_release() argument
105 bitmap_or(rc->drp_avail.local, rc->drp_avail.local, mas->bm, UWB_NUM_MAS); in uwb_drp_avail_release()
106 bitmap_or(rc->drp_avail.pending, rc->drp_avail.pending, mas->bm, UWB_NUM_MAS); in uwb_drp_avail_release()
107 rc->drp_avail.ie_valid = false; in uwb_drp_avail_release()
108 uwb_rsv_handle_drp_avail_change(rc); in uwb_drp_avail_release()
117 void uwb_drp_avail_ie_update(struct uwb_rc *rc) in uwb_drp_avail_ie_update() argument
121 bitmap_and(avail.bm, rc->drp_avail.global, rc->drp_avail.local, UWB_NUM_MAS); in uwb_drp_avail_ie_update()
123 rc->drp_avail.ie.hdr.element_id = UWB_IE_DRP_AVAILABILITY; in uwb_drp_avail_ie_update()
124 rc->drp_avail.ie.hdr.length = UWB_NUM_MAS / 8; in uwb_drp_avail_ie_update()
125 uwb_mas_bm_copy_le(rc->drp_avail.ie.bmp, &avail); in uwb_drp_avail_ie_update()
126 rc->drp_avail.ie_valid = true; in uwb_drp_avail_ie_update()
229 struct device *dev = &evt->rc->uwb_dev.dev; in uwbd_evt_get_drp_avail()
274 struct uwb_rc *rc = evt->rc; in uwbd_evt_handle_rc_drp_avail() local
281 mutex_lock(&rc->rsvs_mutex); in uwbd_evt_handle_rc_drp_avail()
282 bitmap_copy(rc->drp_avail.global, bmp, UWB_NUM_MAS); in uwbd_evt_handle_rc_drp_avail()
283 rc->drp_avail.ie_valid = false; in uwbd_evt_handle_rc_drp_avail()
284 uwb_rsv_handle_drp_avail_change(rc); in uwbd_evt_handle_rc_drp_avail()
285 mutex_unlock(&rc->rsvs_mutex); in uwbd_evt_handle_rc_drp_avail()
287 uwb_rsv_sched_update(rc); in uwbd_evt_handle_rc_drp_avail()