Lines Matching refs:ptr

30 u8 eir_append_local_name(struct hci_dev *hdev, u8 *ptr, u8 ad_len)  in eir_append_local_name()  argument
42 return eir_append_name(ptr, ad_len, EIR_NAME_COMPLETE, in eir_append_local_name()
48 return eir_append_name(ptr, ad_len, EIR_NAME_SHORT, in eir_append_local_name()
57 return eir_append_name(ptr, ad_len, EIR_NAME_SHORT, in eir_append_local_name()
64 u8 eir_append_appearance(struct hci_dev *hdev, u8 *ptr, u8 ad_len) in eir_append_appearance() argument
66 return eir_append_le16(ptr, ad_len, EIR_APPEARANCE, hdev->appearance); in eir_append_appearance()
84 u8 *ptr = data, *uuids_start = NULL; in create_uuid16_list() local
88 return ptr; in create_uuid16_list()
104 uuids_start = ptr; in create_uuid16_list()
107 ptr += 2; in create_uuid16_list()
111 if ((ptr - data) + sizeof(u16) > len) { in create_uuid16_list()
116 *ptr++ = (uuid16 & 0x00ff); in create_uuid16_list()
117 *ptr++ = (uuid16 & 0xff00) >> 8; in create_uuid16_list()
121 return ptr; in create_uuid16_list()
126 u8 *ptr = data, *uuids_start = NULL; in create_uuid32_list() local
130 return ptr; in create_uuid32_list()
137 uuids_start = ptr; in create_uuid32_list()
140 ptr += 2; in create_uuid32_list()
144 if ((ptr - data) + sizeof(u32) > len) { in create_uuid32_list()
149 memcpy(ptr, &uuid->uuid[12], sizeof(u32)); in create_uuid32_list()
150 ptr += sizeof(u32); in create_uuid32_list()
154 return ptr; in create_uuid32_list()
159 u8 *ptr = data, *uuids_start = NULL; in create_uuid128_list() local
163 return ptr; in create_uuid128_list()
170 uuids_start = ptr; in create_uuid128_list()
173 ptr += 2; in create_uuid128_list()
177 if ((ptr - data) + 16 > len) { in create_uuid128_list()
182 memcpy(ptr, uuid->uuid, 16); in create_uuid128_list()
183 ptr += 16; in create_uuid128_list()
187 return ptr; in create_uuid128_list()
192 u8 *ptr = data; in eir_create() local
201 ptr[1] = EIR_NAME_SHORT; in eir_create()
203 ptr[1] = EIR_NAME_COMPLETE; in eir_create()
207 ptr[0] = name_len + 1; in eir_create()
209 memcpy(ptr + 2, hdev->dev_name, name_len); in eir_create()
211 ptr += (name_len + 2); in eir_create()
215 ptr[0] = 2; in eir_create()
216 ptr[1] = EIR_TX_POWER; in eir_create()
217 ptr[2] = (u8)hdev->inq_tx_power; in eir_create()
219 ptr += 3; in eir_create()
223 ptr[0] = 9; in eir_create()
224 ptr[1] = EIR_DEVICE_ID; in eir_create()
226 put_unaligned_le16(hdev->devid_source, ptr + 2); in eir_create()
227 put_unaligned_le16(hdev->devid_vendor, ptr + 4); in eir_create()
228 put_unaligned_le16(hdev->devid_product, ptr + 6); in eir_create()
229 put_unaligned_le16(hdev->devid_version, ptr + 8); in eir_create()
231 ptr += 10; in eir_create()
234 ptr = create_uuid16_list(hdev, ptr, HCI_MAX_EIR_LENGTH - (ptr - data)); in eir_create()
235 ptr = create_uuid32_list(hdev, ptr, HCI_MAX_EIR_LENGTH - (ptr - data)); in eir_create()
236 ptr = create_uuid128_list(hdev, ptr, HCI_MAX_EIR_LENGTH - (ptr - data)); in eir_create()
239 u8 eir_create_per_adv_data(struct hci_dev *hdev, u8 instance, u8 *ptr) in eir_create_per_adv_data() argument
252 memcpy(ptr, adv->per_adv_data, adv->per_adv_data_len); in eir_create_per_adv_data()
254 ptr += adv->per_adv_data_len; in eir_create_per_adv_data()
260 u8 eir_create_adv_data(struct hci_dev *hdev, u8 instance, u8 *ptr) in eir_create_adv_data() argument
305 ptr[0] = 0x02; in eir_create_adv_data()
306 ptr[1] = EIR_FLAGS; in eir_create_adv_data()
307 ptr[2] = flags; in eir_create_adv_data()
310 ptr += 3; in eir_create_adv_data()
316 memcpy(ptr, adv->adv_data, adv->adv_data_len); in eir_create_adv_data()
318 ptr += adv->adv_data_len; in eir_create_adv_data()
335 ptr[0] = 0x02; in eir_create_adv_data()
336 ptr[1] = EIR_TX_POWER; in eir_create_adv_data()
337 ptr[2] = (u8)adv_tx_power; in eir_create_adv_data()
340 ptr += 3; in eir_create_adv_data()
347 static u8 create_default_scan_rsp(struct hci_dev *hdev, u8 *ptr) in create_default_scan_rsp() argument
352 scan_rsp_len = eir_append_appearance(hdev, ptr, scan_rsp_len); in create_default_scan_rsp()
354 return eir_append_local_name(hdev, ptr, scan_rsp_len); in create_default_scan_rsp()
357 u8 eir_create_scan_rsp(struct hci_dev *hdev, u8 instance, u8 *ptr) in eir_create_scan_rsp() argument
363 return create_default_scan_rsp(hdev, ptr); in eir_create_scan_rsp()
370 scan_rsp_len = eir_append_appearance(hdev, ptr, scan_rsp_len); in eir_create_scan_rsp()
372 memcpy(&ptr[scan_rsp_len], adv->scan_rsp_data, adv->scan_rsp_len); in eir_create_scan_rsp()
377 scan_rsp_len = eir_append_local_name(hdev, ptr, scan_rsp_len); in eir_create_scan_rsp()