Lines Matching refs:drp_ie
126 struct uwb_ie_drp *drp_ie; in uwb_drp_ie_alloc() local
128 drp_ie = kzalloc(sizeof(struct uwb_ie_drp) + in uwb_drp_ie_alloc()
131 if (drp_ie) { in uwb_drp_ie_alloc()
132 drp_ie->hdr.element_id = UWB_IE_DRP; in uwb_drp_ie_alloc()
134 return drp_ie; in uwb_drp_ie_alloc()
141 static void uwb_drp_ie_from_bm(struct uwb_ie_drp *drp_ie, in uwb_drp_ie_from_bm() argument
150 zones = drp_ie->allocs; in uwb_drp_ie_from_bm()
179 drp_ie->allocs[i].zone_bm = cpu_to_le16(zones[i].zone_bm); in uwb_drp_ie_from_bm()
180 drp_ie->allocs[i].mas_bm = cpu_to_le16(zones[i].mas_bm); in uwb_drp_ie_from_bm()
183 drp_ie->hdr.length = sizeof(struct uwb_ie_drp) - sizeof(struct uwb_ie_hdr) in uwb_drp_ie_from_bm()
193 struct uwb_ie_drp *drp_ie; in uwb_drp_ie_update() local
198 kfree(rsv->drp_ie); in uwb_drp_ie_update()
199 rsv->drp_ie = NULL; in uwb_drp_ie_update()
205 if (rsv->drp_ie == NULL) { in uwb_drp_ie_update()
206 rsv->drp_ie = uwb_drp_ie_alloc(); in uwb_drp_ie_update()
207 if (rsv->drp_ie == NULL) in uwb_drp_ie_update()
210 drp_ie = rsv->drp_ie; in uwb_drp_ie_update()
212 uwb_ie_drp_set_unsafe(drp_ie, unsafe); in uwb_drp_ie_update()
213 uwb_ie_drp_set_tiebreaker(drp_ie, rsv->tiebreaker); in uwb_drp_ie_update()
214 uwb_ie_drp_set_owner(drp_ie, uwb_rsv_is_owner(rsv)); in uwb_drp_ie_update()
215 uwb_ie_drp_set_status(drp_ie, uwb_rsv_status(rsv)); in uwb_drp_ie_update()
216 uwb_ie_drp_set_reason_code(drp_ie, uwb_rsv_reason_code(rsv)); in uwb_drp_ie_update()
217 uwb_ie_drp_set_stream_index(drp_ie, rsv->stream); in uwb_drp_ie_update()
218 uwb_ie_drp_set_type(drp_ie, rsv->type); in uwb_drp_ie_update()
223 drp_ie->dev_addr = rsv->target.dev->dev_addr; in uwb_drp_ie_update()
226 drp_ie->dev_addr = rsv->target.devaddr; in uwb_drp_ie_update()
230 drp_ie->dev_addr = rsv->owner->dev_addr; in uwb_drp_ie_update()
232 uwb_drp_ie_from_bm(drp_ie, &rsv->mas); in uwb_drp_ie_update()
241 drp_ie = mv->companion_drp_ie; in uwb_drp_ie_update()
244 memcpy(drp_ie, rsv->drp_ie, sizeof(struct uwb_ie_drp)); in uwb_drp_ie_update()
248 uwb_ie_drp_set_unsafe(drp_ie, 1); in uwb_drp_ie_update()
249 uwb_ie_drp_set_status(drp_ie, uwb_rsv_companion_status(rsv)); in uwb_drp_ie_update()
250 uwb_ie_drp_set_reason_code(drp_ie, uwb_rsv_companion_reason_code(rsv)); in uwb_drp_ie_update()
252 uwb_drp_ie_from_bm(drp_ie, &mv->companion_mas); in uwb_drp_ie_update()
296 void uwb_drp_ie_to_bm(struct uwb_mas_bm *bm, const struct uwb_ie_drp *drp_ie) in uwb_drp_ie_to_bm() argument
298 int numallocs = (drp_ie->hdr.length - 4) / 4; in uwb_drp_ie_to_bm()
308 alloc = &drp_ie->allocs[cnt]; in uwb_drp_ie_to_bm()