Lines Matching refs:skb
38 struct sk_buff *skb; in btbcm_check_bdaddr() local
40 skb = __hci_cmd_sync(hdev, HCI_OP_READ_BD_ADDR, 0, NULL, in btbcm_check_bdaddr()
42 if (IS_ERR(skb)) { in btbcm_check_bdaddr()
43 int err = PTR_ERR(skb); in btbcm_check_bdaddr()
49 if (skb->len != sizeof(*bda)) { in btbcm_check_bdaddr()
51 kfree_skb(skb); in btbcm_check_bdaddr()
55 bda = (struct hci_rp_read_bd_addr *)skb->data; in btbcm_check_bdaddr()
93 kfree_skb(skb); in btbcm_check_bdaddr()
101 struct sk_buff *skb; in btbcm_set_bdaddr() local
104 skb = __hci_cmd_sync(hdev, 0xfc01, 6, bdaddr, HCI_INIT_TIMEOUT); in btbcm_set_bdaddr()
105 if (IS_ERR(skb)) { in btbcm_set_bdaddr()
106 err = PTR_ERR(skb); in btbcm_set_bdaddr()
110 kfree_skb(skb); in btbcm_set_bdaddr()
119 struct sk_buff *skb; in btbcm_read_pcm_int_params() local
122 skb = __hci_cmd_sync(hdev, 0xfc1d, 0, NULL, HCI_INIT_TIMEOUT); in btbcm_read_pcm_int_params()
123 if (IS_ERR(skb)) { in btbcm_read_pcm_int_params()
124 err = PTR_ERR(skb); in btbcm_read_pcm_int_params()
129 if (skb->len != 6 || skb->data[0]) { in btbcm_read_pcm_int_params()
131 kfree_skb(skb); in btbcm_read_pcm_int_params()
136 memcpy(params, skb->data + 1, 5); in btbcm_read_pcm_int_params()
138 kfree_skb(skb); in btbcm_read_pcm_int_params()
147 struct sk_buff *skb; in btbcm_write_pcm_int_params() local
150 skb = __hci_cmd_sync(hdev, 0xfc1c, 5, params, HCI_INIT_TIMEOUT); in btbcm_write_pcm_int_params()
151 if (IS_ERR(skb)) { in btbcm_write_pcm_int_params()
152 err = PTR_ERR(skb); in btbcm_write_pcm_int_params()
156 kfree_skb(skb); in btbcm_write_pcm_int_params()
167 struct sk_buff *skb; in btbcm_patchram() local
172 skb = __hci_cmd_sync(hdev, 0xfc2e, 0, NULL, HCI_INIT_TIMEOUT); in btbcm_patchram()
173 if (IS_ERR(skb)) { in btbcm_patchram()
174 err = PTR_ERR(skb); in btbcm_patchram()
179 kfree_skb(skb); in btbcm_patchram()
206 skb = __hci_cmd_sync(hdev, opcode, cmd->plen, cmd_param, in btbcm_patchram()
208 if (IS_ERR(skb)) { in btbcm_patchram()
209 err = PTR_ERR(skb); in btbcm_patchram()
214 kfree_skb(skb); in btbcm_patchram()
227 struct sk_buff *skb; in btbcm_reset() local
229 skb = __hci_cmd_sync(hdev, HCI_OP_RESET, 0, NULL, HCI_INIT_TIMEOUT); in btbcm_reset()
230 if (IS_ERR(skb)) { in btbcm_reset()
231 int err = PTR_ERR(skb); in btbcm_reset()
236 kfree_skb(skb); in btbcm_reset()
246 struct sk_buff *skb; in btbcm_read_local_name() local
248 skb = __hci_cmd_sync(hdev, HCI_OP_READ_LOCAL_NAME, 0, NULL, in btbcm_read_local_name()
250 if (IS_ERR(skb)) { in btbcm_read_local_name()
252 PTR_ERR(skb)); in btbcm_read_local_name()
253 return skb; in btbcm_read_local_name()
256 if (skb->len != sizeof(struct hci_rp_read_local_name)) { in btbcm_read_local_name()
258 kfree_skb(skb); in btbcm_read_local_name()
262 return skb; in btbcm_read_local_name()
267 struct sk_buff *skb; in btbcm_read_local_version() local
269 skb = __hci_cmd_sync(hdev, HCI_OP_READ_LOCAL_VERSION, 0, NULL, in btbcm_read_local_version()
271 if (IS_ERR(skb)) { in btbcm_read_local_version()
273 PTR_ERR(skb)); in btbcm_read_local_version()
274 return skb; in btbcm_read_local_version()
277 if (skb->len != sizeof(struct hci_rp_read_local_version)) { in btbcm_read_local_version()
279 kfree_skb(skb); in btbcm_read_local_version()
283 return skb; in btbcm_read_local_version()
288 struct sk_buff *skb; in btbcm_read_verbose_config() local
290 skb = __hci_cmd_sync(hdev, 0xfc79, 0, NULL, HCI_INIT_TIMEOUT); in btbcm_read_verbose_config()
291 if (IS_ERR(skb)) { in btbcm_read_verbose_config()
293 PTR_ERR(skb)); in btbcm_read_verbose_config()
294 return skb; in btbcm_read_verbose_config()
297 if (skb->len != 7) { in btbcm_read_verbose_config()
299 kfree_skb(skb); in btbcm_read_verbose_config()
303 return skb; in btbcm_read_verbose_config()
308 struct sk_buff *skb; in btbcm_read_controller_features() local
310 skb = __hci_cmd_sync(hdev, 0xfc6e, 0, NULL, HCI_INIT_TIMEOUT); in btbcm_read_controller_features()
311 if (IS_ERR(skb)) { in btbcm_read_controller_features()
313 PTR_ERR(skb)); in btbcm_read_controller_features()
314 return skb; in btbcm_read_controller_features()
317 if (skb->len != 9) { in btbcm_read_controller_features()
319 kfree_skb(skb); in btbcm_read_controller_features()
323 return skb; in btbcm_read_controller_features()
328 struct sk_buff *skb; in btbcm_read_usb_product() local
330 skb = __hci_cmd_sync(hdev, 0xfc5a, 0, NULL, HCI_INIT_TIMEOUT); in btbcm_read_usb_product()
331 if (IS_ERR(skb)) { in btbcm_read_usb_product()
333 PTR_ERR(skb)); in btbcm_read_usb_product()
334 return skb; in btbcm_read_usb_product()
337 if (skb->len != 5) { in btbcm_read_usb_product()
339 kfree_skb(skb); in btbcm_read_usb_product()
343 return skb; in btbcm_read_usb_product()
348 struct sk_buff *skb; in btbcm_read_info() local
351 skb = btbcm_read_verbose_config(hdev); in btbcm_read_info()
352 if (IS_ERR(skb)) in btbcm_read_info()
353 return PTR_ERR(skb); in btbcm_read_info()
355 bt_dev_info(hdev, "BCM: chip id %u", skb->data[1]); in btbcm_read_info()
356 kfree_skb(skb); in btbcm_read_info()
359 skb = btbcm_read_controller_features(hdev); in btbcm_read_info()
360 if (IS_ERR(skb)) in btbcm_read_info()
361 return PTR_ERR(skb); in btbcm_read_info()
363 bt_dev_info(hdev, "BCM: features 0x%2.2x", skb->data[1]); in btbcm_read_info()
364 kfree_skb(skb); in btbcm_read_info()
371 struct sk_buff *skb; in btbcm_print_local_name() local
374 skb = btbcm_read_local_name(hdev); in btbcm_print_local_name()
375 if (IS_ERR(skb)) in btbcm_print_local_name()
376 return PTR_ERR(skb); in btbcm_print_local_name()
378 bt_dev_info(hdev, "%s", (char *)(skb->data + 1)); in btbcm_print_local_name()
379 kfree_skb(skb); in btbcm_print_local_name()
431 struct sk_buff *skb; in btbcm_initialize() local
447 skb = btbcm_read_local_version(hdev); in btbcm_initialize()
448 if (IS_ERR(skb)) in btbcm_initialize()
449 return PTR_ERR(skb); in btbcm_initialize()
451 ver = (struct hci_rp_read_local_version *)skb->data; in btbcm_initialize()
454 kfree_skb(skb); in btbcm_initialize()
485 skb = btbcm_read_usb_product(hdev); in btbcm_initialize()
486 if (IS_ERR(skb)) in btbcm_initialize()
487 return PTR_ERR(skb); in btbcm_initialize()
489 vid = get_unaligned_le16(skb->data + 1); in btbcm_initialize()
490 pid = get_unaligned_le16(skb->data + 3); in btbcm_initialize()
491 kfree_skb(skb); in btbcm_initialize()
573 struct sk_buff *skb; in btbcm_setup_apple() local
582 skb = btbcm_read_verbose_config(hdev); in btbcm_setup_apple()
583 if (!IS_ERR(skb)) { in btbcm_setup_apple()
585 skb->data[1], get_unaligned_le16(skb->data + 5)); in btbcm_setup_apple()
586 kfree_skb(skb); in btbcm_setup_apple()
590 skb = btbcm_read_usb_product(hdev); in btbcm_setup_apple()
591 if (!IS_ERR(skb)) { in btbcm_setup_apple()
593 get_unaligned_le16(skb->data + 1), in btbcm_setup_apple()
594 get_unaligned_le16(skb->data + 3)); in btbcm_setup_apple()
595 kfree_skb(skb); in btbcm_setup_apple()
599 skb = btbcm_read_controller_features(hdev); in btbcm_setup_apple()
600 if (!IS_ERR(skb)) { in btbcm_setup_apple()
601 bt_dev_info(hdev, "BCM: features 0x%2.2x", skb->data[1]); in btbcm_setup_apple()
602 kfree_skb(skb); in btbcm_setup_apple()
606 skb = btbcm_read_local_name(hdev); in btbcm_setup_apple()
607 if (!IS_ERR(skb)) { in btbcm_setup_apple()
608 bt_dev_info(hdev, "%s", (char *)(skb->data + 1)); in btbcm_setup_apple()
609 kfree_skb(skb); in btbcm_setup_apple()