Searched refs:drp_ie (Results 1 - 5 of 5) sorted by relevance

/linux-4.4.14/drivers/uwb/
H A Ddrp-ie.c126 struct uwb_ie_drp *drp_ie; uwb_drp_ie_alloc() local
128 drp_ie = kzalloc(sizeof(struct uwb_ie_drp) + uwb_drp_ie_alloc()
131 if (drp_ie) { uwb_drp_ie_alloc()
132 drp_ie->hdr.element_id = UWB_IE_DRP; uwb_drp_ie_alloc()
134 return drp_ie; uwb_drp_ie_alloc()
141 static void uwb_drp_ie_from_bm(struct uwb_ie_drp *drp_ie, uwb_drp_ie_from_bm() argument
150 zones = drp_ie->allocs; uwb_drp_ie_from_bm()
179 drp_ie->allocs[i].zone_bm = cpu_to_le16(zones[i].zone_bm); uwb_drp_ie_from_bm()
180 drp_ie->allocs[i].mas_bm = cpu_to_le16(zones[i].mas_bm); uwb_drp_ie_from_bm()
183 drp_ie->hdr.length = sizeof(struct uwb_ie_drp) - sizeof(struct uwb_ie_hdr) uwb_drp_ie_from_bm()
193 struct uwb_ie_drp *drp_ie; uwb_drp_ie_update() local
198 kfree(rsv->drp_ie); uwb_drp_ie_update()
199 rsv->drp_ie = NULL; uwb_drp_ie_update()
205 if (rsv->drp_ie == NULL) { uwb_drp_ie_update()
206 rsv->drp_ie = uwb_drp_ie_alloc(); uwb_drp_ie_update()
207 if (rsv->drp_ie == NULL) uwb_drp_ie_update()
210 drp_ie = rsv->drp_ie; uwb_drp_ie_update()
212 uwb_ie_drp_set_unsafe(drp_ie, unsafe); uwb_drp_ie_update()
213 uwb_ie_drp_set_tiebreaker(drp_ie, rsv->tiebreaker); uwb_drp_ie_update()
214 uwb_ie_drp_set_owner(drp_ie, uwb_rsv_is_owner(rsv)); uwb_drp_ie_update()
215 uwb_ie_drp_set_status(drp_ie, uwb_rsv_status(rsv)); uwb_drp_ie_update()
216 uwb_ie_drp_set_reason_code(drp_ie, uwb_rsv_reason_code(rsv)); uwb_drp_ie_update()
217 uwb_ie_drp_set_stream_index(drp_ie, rsv->stream); uwb_drp_ie_update()
218 uwb_ie_drp_set_type(drp_ie, rsv->type); uwb_drp_ie_update()
223 drp_ie->dev_addr = rsv->target.dev->dev_addr; uwb_drp_ie_update()
226 drp_ie->dev_addr = rsv->target.devaddr; uwb_drp_ie_update()
230 drp_ie->dev_addr = rsv->owner->dev_addr; uwb_drp_ie_update()
232 uwb_drp_ie_from_bm(drp_ie, &rsv->mas); uwb_drp_ie_update()
241 drp_ie = mv->companion_drp_ie; uwb_drp_ie_update()
243 /* keep all the same configuration of the main drp_ie */ uwb_drp_ie_update()
244 memcpy(drp_ie, rsv->drp_ie, sizeof(struct uwb_ie_drp)); uwb_drp_ie_update()
248 uwb_ie_drp_set_unsafe(drp_ie, 1); uwb_drp_ie_update()
249 uwb_ie_drp_set_status(drp_ie, uwb_rsv_companion_status(rsv)); uwb_drp_ie_update()
250 uwb_ie_drp_set_reason_code(drp_ie, uwb_rsv_companion_reason_code(rsv)); uwb_drp_ie_update()
252 uwb_drp_ie_from_bm(drp_ie, &mv->companion_mas); uwb_drp_ie_update()
285 * @drp_ie: the DRP IE that contains the allocation fields.
296 void uwb_drp_ie_to_bm(struct uwb_mas_bm *bm, const struct uwb_ie_drp *drp_ie) uwb_drp_ie_to_bm() argument
298 int numallocs = (drp_ie->hdr.length - 4) / 4; uwb_drp_ie_to_bm()
308 alloc = &drp_ie->allocs[cnt]; uwb_drp_ie_to_bm()
H A Ddrp.c113 if (rsv->drp_ie != NULL) { uwb_rc_send_all_drp_ie()
114 num_bytes += rsv->drp_ie->hdr.length + 2; uwb_rc_send_all_drp_ie()
139 if (rsv->drp_ie != NULL) { uwb_rc_send_all_drp_ie()
140 memcpy(IEDataptr, rsv->drp_ie, uwb_rc_send_all_drp_ie()
141 rsv->drp_ie->hdr.length + 2); uwb_rc_send_all_drp_ie()
142 IEDataptr += rsv->drp_ie->hdr.length + 2; uwb_rc_send_all_drp_ie()
250 static void handle_conflict_normal(struct uwb_ie_drp *drp_ie, handle_conflict_normal() argument
260 action = evaluate_conflict_action(drp_ie, ext_beacon_slot, rsv, uwb_rsv_status(rsv)); handle_conflict_normal()
293 static void handle_conflict_expanding(struct uwb_ie_drp *drp_ie, int ext_beacon_slot, handle_conflict_expanding() argument
304 action = evaluate_conflict_action(drp_ie, ext_beacon_slot, rsv, 0); handle_conflict_expanding()
347 struct uwb_ie_drp *drp_ie, uwb_drp_handle_conflict_rsv()
357 handle_conflict_expanding(drp_ie, uwb_drp_handle_conflict_rsv()
364 drp_ie, drp_evt->beacon_slot_number, uwb_drp_handle_conflict_rsv()
370 handle_conflict_normal(drp_ie, drp_evt->beacon_slot_number, uwb_drp_handle_conflict_rsv()
377 struct uwb_ie_drp *drp_ie, uwb_drp_handle_all_conflict_rsv()
383 uwb_drp_handle_conflict_rsv(rc, rsv, drp_evt, drp_ie, uwb_drp_handle_all_conflict_rsv()
390 struct uwb_ie_drp *drp_ie, struct uwb_mas_bm *mas) uwb_drp_process_target_accepted()
395 status = uwb_ie_drp_status(drp_ie); uwb_drp_process_target_accepted()
403 /* drp_ie is companion */ uwb_drp_process_target_accepted()
415 * that in drp_ie there is the uwb_drp_process_target_accepted()
418 drp_ie, mas); uwb_drp_process_target_accepted()
441 struct uwb_ie_drp *drp_ie, struct uwb_rc_evt_drp *drp_evt) uwb_drp_process_target()
449 status = uwb_ie_drp_status(drp_ie); uwb_drp_process_target()
450 reason_code = uwb_ie_drp_reason_code(drp_ie); uwb_drp_process_target()
451 uwb_drp_ie_to_bm(&mas, drp_ie); uwb_drp_process_target()
455 uwb_drp_process_target_accepted(rc, rsv, drp_evt, drp_ie, &mas); uwb_drp_process_target()
529 struct uwb_dev *src, struct uwb_ie_drp *drp_ie, uwb_drp_process_owner()
537 status = uwb_ie_drp_status(drp_ie); uwb_drp_process_owner()
538 reason_code = uwb_ie_drp_reason_code(drp_ie); uwb_drp_process_owner()
539 uwb_drp_ie_to_bm(&mas, drp_ie); uwb_drp_process_owner()
562 uwb_drp_handle_conflict_rsv(rc, rsv, drp_evt, drp_ie, &mas); uwb_drp_process_owner()
617 static void uwb_drp_handle_alien_drp(struct uwb_rc *rc, struct uwb_ie_drp *drp_ie) uwb_drp_handle_alien_drp() argument
624 uwb_drp_ie_to_bm(&mas, drp_ie); uwb_drp_handle_alien_drp()
665 struct uwb_ie_drp *drp_ie) uwb_drp_process_not_involved()
669 uwb_drp_ie_to_bm(&mas, drp_ie); uwb_drp_process_not_involved()
670 uwb_drp_handle_all_conflict_rsv(rc, drp_evt, drp_ie, &mas); uwb_drp_process_not_involved()
675 struct uwb_ie_drp *drp_ie) uwb_drp_process_involved()
679 rsv = uwb_rsv_find(rc, src, drp_ie); uwb_drp_process_involved()
698 if (uwb_ie_drp_owner(drp_ie)) uwb_drp_process_involved()
699 uwb_drp_process_target(rc, rsv, drp_ie, drp_evt); uwb_drp_process_involved()
701 uwb_drp_process_owner(rc, rsv, src, drp_ie, drp_evt); uwb_drp_process_involved()
706 static bool uwb_drp_involves_us(struct uwb_rc *rc, struct uwb_ie_drp *drp_ie) uwb_drp_involves_us() argument
708 return uwb_dev_addr_cmp(&rc->uwb_dev.dev_addr, &drp_ie->dev_addr) == 0; uwb_drp_involves_us()
715 struct uwb_dev *src, struct uwb_ie_drp *drp_ie) uwb_drp_process()
717 if (uwb_ie_drp_type(drp_ie) == UWB_DRP_TYPE_ALIEN_BP) uwb_drp_process()
718 uwb_drp_handle_alien_drp(rc, drp_ie); uwb_drp_process()
719 else if (uwb_drp_involves_us(rc, drp_ie)) uwb_drp_process()
720 uwb_drp_process_involved(rc, src, drp_evt, drp_ie); uwb_drp_process()
722 uwb_drp_process_not_involved(rc, drp_evt, drp_ie); uwb_drp_process()
345 uwb_drp_handle_conflict_rsv(struct uwb_rc *rc, struct uwb_rsv *rsv, struct uwb_rc_evt_drp *drp_evt, struct uwb_ie_drp *drp_ie, struct uwb_mas_bm *conflicting_mas) uwb_drp_handle_conflict_rsv() argument
375 uwb_drp_handle_all_conflict_rsv(struct uwb_rc *rc, struct uwb_rc_evt_drp *drp_evt, struct uwb_ie_drp *drp_ie, struct uwb_mas_bm *conflicting_mas) uwb_drp_handle_all_conflict_rsv() argument
388 uwb_drp_process_target_accepted(struct uwb_rc *rc, struct uwb_rsv *rsv, struct uwb_rc_evt_drp *drp_evt, struct uwb_ie_drp *drp_ie, struct uwb_mas_bm *mas) uwb_drp_process_target_accepted() argument
440 uwb_drp_process_target(struct uwb_rc *rc, struct uwb_rsv *rsv, struct uwb_ie_drp *drp_ie, struct uwb_rc_evt_drp *drp_evt) uwb_drp_process_target() argument
528 uwb_drp_process_owner(struct uwb_rc *rc, struct uwb_rsv *rsv, struct uwb_dev *src, struct uwb_ie_drp *drp_ie, struct uwb_rc_evt_drp *drp_evt) uwb_drp_process_owner() argument
663 uwb_drp_process_not_involved(struct uwb_rc *rc, struct uwb_rc_evt_drp *drp_evt, struct uwb_ie_drp *drp_ie) uwb_drp_process_not_involved() argument
673 uwb_drp_process_involved(struct uwb_rc *rc, struct uwb_dev *src, struct uwb_rc_evt_drp *drp_evt, struct uwb_ie_drp *drp_ie) uwb_drp_process_involved() argument
714 uwb_drp_process(struct uwb_rc *rc, struct uwb_rc_evt_drp *drp_evt, struct uwb_dev *src, struct uwb_ie_drp *drp_ie) uwb_drp_process() argument
H A Drsv.c720 struct uwb_ie_drp *drp_ie) uwb_rsv_match()
725 stream = uwb_ie_drp_stream_index(drp_ie); uwb_rsv_match()
734 if (uwb_ie_drp_owner(drp_ie)) uwb_rsv_match()
745 struct uwb_ie_drp *drp_ie) uwb_rsv_new_target()
761 rsv->type = uwb_ie_drp_type(drp_ie); uwb_rsv_new_target()
762 rsv->stream = uwb_ie_drp_stream_index(drp_ie); uwb_rsv_new_target()
763 uwb_drp_ie_to_bm(&rsv->mas, drp_ie); uwb_rsv_new_target()
813 * @drp_ie: the DRP IE
820 struct uwb_ie_drp *drp_ie) uwb_rsv_find()
825 if (uwb_rsv_match(rsv, src, drp_ie)) uwb_rsv_find()
829 if (uwb_ie_drp_owner(drp_ie)) uwb_rsv_find()
830 return uwb_rsv_new_target(rc, src, drp_ie); uwb_rsv_find()
719 uwb_rsv_match(struct uwb_rsv *rsv, struct uwb_dev *src, struct uwb_ie_drp *drp_ie) uwb_rsv_match() argument
743 uwb_rsv_new_target(struct uwb_rc *rc, struct uwb_dev *src, struct uwb_ie_drp *drp_ie) uwb_rsv_new_target() argument
819 uwb_rsv_find(struct uwb_rc *rc, struct uwb_dev *src, struct uwb_ie_drp *drp_ie) uwb_rsv_find() argument
H A Duwb-internal.h340 struct uwb_ie_drp *drp_ie);
345 void uwb_drp_ie_to_bm(struct uwb_mas_bm *bm, const struct uwb_ie_drp *drp_ie);
/linux-4.4.14/include/linux/
H A Duwb.h229 * @drp_ie: the DRP IE
261 struct uwb_ie_drp *drp_ie; member in struct:uwb_rsv

Completed in 103 milliseconds