• Home
  • Raw
  • Download

Lines Matching refs:uwb_rc

110 ssize_t uwb_rc_get_ie(struct uwb_rc *uwb_rc, struct uwb_rc_evt_get_ie **pget_ie)  in uwb_rc_get_ie()  argument
113 struct device *dev = &uwb_rc->uwb_dev.dev; in uwb_rc_get_ie()
124 result = uwb_rc_vcmd(uwb_rc, "GET_IE", cmd, sizeof(*cmd), in uwb_rc_get_ie()
155 int uwb_rc_set_ie(struct uwb_rc *rc, struct uwb_rc_cmd_set_ie *cmd) in uwb_rc_set_ie()
184 void uwb_rc_ie_init(struct uwb_rc *uwb_rc) in uwb_rc_ie_init() argument
186 mutex_init(&uwb_rc->ies_mutex); in uwb_rc_ie_init()
200 int uwb_rc_ie_setup(struct uwb_rc *uwb_rc) in uwb_rc_ie_setup() argument
205 capacity = uwb_rc_get_ie(uwb_rc, &ie_info); in uwb_rc_ie_setup()
209 mutex_lock(&uwb_rc->ies_mutex); in uwb_rc_ie_setup()
211 uwb_rc->ies = (struct uwb_rc_cmd_set_ie *)ie_info; in uwb_rc_ie_setup()
212 uwb_rc->ies->rccb.bCommandType = UWB_RC_CET_GENERAL; in uwb_rc_ie_setup()
213 uwb_rc->ies->rccb.wCommand = cpu_to_le16(UWB_RC_CMD_SET_IE); in uwb_rc_ie_setup()
214 uwb_rc->ies_capacity = capacity; in uwb_rc_ie_setup()
216 mutex_unlock(&uwb_rc->ies_mutex); in uwb_rc_ie_setup()
223 void uwb_rc_ie_release(struct uwb_rc *uwb_rc) in uwb_rc_ie_release() argument
225 kfree(uwb_rc->ies); in uwb_rc_ie_release()
226 uwb_rc->ies = NULL; in uwb_rc_ie_release()
227 uwb_rc->ies_capacity = 0; in uwb_rc_ie_release()
231 static int uwb_rc_ie_add_one(struct uwb_rc *rc, const struct uwb_ie_hdr *new_ie) in uwb_rc_ie_add_one()
285 int uwb_rc_ie_add(struct uwb_rc *uwb_rc, in uwb_rc_ie_add() argument
292 mutex_lock(&uwb_rc->ies_mutex); in uwb_rc_ie_add()
300 result = uwb_rc_ie_add_one(uwb_rc, ie); in uwb_rc_ie_add()
306 if (uwb_rc->beaconing != -1) in uwb_rc_ie_add()
307 result = uwb_rc_set_ie(uwb_rc, uwb_rc->ies); in uwb_rc_ie_add()
312 mutex_unlock(&uwb_rc->ies_mutex); in uwb_rc_ie_add()
332 void uwb_rc_ie_cache_rm(struct uwb_rc *uwb_rc, enum uwb_ie to_remove) in uwb_rc_ie_cache_rm() argument
335 size_t len = le16_to_cpu(uwb_rc->ies->wIELength); in uwb_rc_ie_cache_rm()
339 ptr = uwb_rc->ies->IEData; in uwb_rc_ie_cache_rm()
351 uwb_rc->ies->wIELength = cpu_to_le16(len); in uwb_rc_ie_cache_rm()
365 int uwb_rc_ie_rm(struct uwb_rc *uwb_rc, enum uwb_ie element_id) in uwb_rc_ie_rm() argument
369 mutex_lock(&uwb_rc->ies_mutex); in uwb_rc_ie_rm()
371 uwb_rc_ie_cache_rm(uwb_rc, element_id); in uwb_rc_ie_rm()
373 if (uwb_rc->beaconing != -1) in uwb_rc_ie_rm()
374 result = uwb_rc_set_ie(uwb_rc, uwb_rc->ies); in uwb_rc_ie_rm()
376 mutex_unlock(&uwb_rc->ies_mutex); in uwb_rc_ie_rm()