Lines Matching refs:skb
79 struct sk_buff *skb; in btbcm_check_bdaddr() local
81 skb = __hci_cmd_sync(hdev, HCI_OP_READ_BD_ADDR, 0, NULL, in btbcm_check_bdaddr()
83 if (IS_ERR(skb)) { in btbcm_check_bdaddr()
84 int err = PTR_ERR(skb); in btbcm_check_bdaddr()
90 if (skb->len != sizeof(*bda)) { in btbcm_check_bdaddr()
92 kfree_skb(skb); in btbcm_check_bdaddr()
96 bda = (struct hci_rp_read_bd_addr *)skb->data; in btbcm_check_bdaddr()
141 kfree_skb(skb); in btbcm_check_bdaddr()
149 struct sk_buff *skb; in btbcm_set_bdaddr() local
152 skb = __hci_cmd_sync(hdev, 0xfc01, 6, bdaddr, HCI_INIT_TIMEOUT); in btbcm_set_bdaddr()
153 if (IS_ERR(skb)) { in btbcm_set_bdaddr()
154 err = PTR_ERR(skb); in btbcm_set_bdaddr()
158 kfree_skb(skb); in btbcm_set_bdaddr()
167 struct sk_buff *skb; in btbcm_read_pcm_int_params() local
170 skb = __hci_cmd_sync(hdev, 0xfc1d, 0, NULL, HCI_INIT_TIMEOUT); in btbcm_read_pcm_int_params()
171 if (IS_ERR(skb)) { in btbcm_read_pcm_int_params()
172 err = PTR_ERR(skb); in btbcm_read_pcm_int_params()
177 if (skb->len != 6 || skb->data[0]) { in btbcm_read_pcm_int_params()
179 kfree_skb(skb); in btbcm_read_pcm_int_params()
184 memcpy(params, skb->data + 1, 5); in btbcm_read_pcm_int_params()
186 kfree_skb(skb); in btbcm_read_pcm_int_params()
195 struct sk_buff *skb; in btbcm_write_pcm_int_params() local
198 skb = __hci_cmd_sync(hdev, 0xfc1c, 5, params, HCI_INIT_TIMEOUT); in btbcm_write_pcm_int_params()
199 if (IS_ERR(skb)) { in btbcm_write_pcm_int_params()
200 err = PTR_ERR(skb); in btbcm_write_pcm_int_params()
204 kfree_skb(skb); in btbcm_write_pcm_int_params()
215 struct sk_buff *skb; in btbcm_patchram() local
220 skb = __hci_cmd_sync(hdev, 0xfc2e, 0, NULL, HCI_INIT_TIMEOUT); in btbcm_patchram()
221 if (IS_ERR(skb)) { in btbcm_patchram()
222 err = PTR_ERR(skb); in btbcm_patchram()
227 kfree_skb(skb); in btbcm_patchram()
254 skb = __hci_cmd_sync(hdev, opcode, cmd->plen, cmd_param, in btbcm_patchram()
256 if (IS_ERR(skb)) { in btbcm_patchram()
257 err = PTR_ERR(skb); in btbcm_patchram()
262 kfree_skb(skb); in btbcm_patchram()
275 struct sk_buff *skb; in btbcm_reset() local
277 skb = __hci_cmd_sync(hdev, HCI_OP_RESET, 0, NULL, HCI_INIT_TIMEOUT); in btbcm_reset()
278 if (IS_ERR(skb)) { in btbcm_reset()
279 int err = PTR_ERR(skb); in btbcm_reset()
284 kfree_skb(skb); in btbcm_reset()
294 struct sk_buff *skb; in btbcm_read_local_name() local
296 skb = __hci_cmd_sync(hdev, HCI_OP_READ_LOCAL_NAME, 0, NULL, in btbcm_read_local_name()
298 if (IS_ERR(skb)) { in btbcm_read_local_name()
300 PTR_ERR(skb)); in btbcm_read_local_name()
301 return skb; in btbcm_read_local_name()
304 if (skb->len != sizeof(struct hci_rp_read_local_name)) { in btbcm_read_local_name()
306 kfree_skb(skb); in btbcm_read_local_name()
310 return skb; in btbcm_read_local_name()
315 struct sk_buff *skb; in btbcm_read_local_version() local
317 skb = __hci_cmd_sync(hdev, HCI_OP_READ_LOCAL_VERSION, 0, NULL, in btbcm_read_local_version()
319 if (IS_ERR(skb)) { in btbcm_read_local_version()
321 PTR_ERR(skb)); in btbcm_read_local_version()
322 return skb; in btbcm_read_local_version()
325 if (skb->len != sizeof(struct hci_rp_read_local_version)) { in btbcm_read_local_version()
327 kfree_skb(skb); in btbcm_read_local_version()
331 return skb; in btbcm_read_local_version()
336 struct sk_buff *skb; in btbcm_read_verbose_config() local
338 skb = __hci_cmd_sync(hdev, 0xfc79, 0, NULL, HCI_INIT_TIMEOUT); in btbcm_read_verbose_config()
339 if (IS_ERR(skb)) { in btbcm_read_verbose_config()
341 PTR_ERR(skb)); in btbcm_read_verbose_config()
342 return skb; in btbcm_read_verbose_config()
345 if (skb->len != 7) { in btbcm_read_verbose_config()
347 kfree_skb(skb); in btbcm_read_verbose_config()
351 return skb; in btbcm_read_verbose_config()
356 struct sk_buff *skb; in btbcm_read_controller_features() local
358 skb = __hci_cmd_sync(hdev, 0xfc6e, 0, NULL, HCI_INIT_TIMEOUT); in btbcm_read_controller_features()
359 if (IS_ERR(skb)) { in btbcm_read_controller_features()
361 PTR_ERR(skb)); in btbcm_read_controller_features()
362 return skb; in btbcm_read_controller_features()
365 if (skb->len != 9) { in btbcm_read_controller_features()
367 kfree_skb(skb); in btbcm_read_controller_features()
371 return skb; in btbcm_read_controller_features()
376 struct sk_buff *skb; in btbcm_read_usb_product() local
378 skb = __hci_cmd_sync(hdev, 0xfc5a, 0, NULL, HCI_INIT_TIMEOUT); in btbcm_read_usb_product()
379 if (IS_ERR(skb)) { in btbcm_read_usb_product()
381 PTR_ERR(skb)); in btbcm_read_usb_product()
382 return skb; in btbcm_read_usb_product()
385 if (skb->len != 5) { in btbcm_read_usb_product()
387 kfree_skb(skb); in btbcm_read_usb_product()
391 return skb; in btbcm_read_usb_product()
442 struct sk_buff *skb; in btbcm_read_info() local
445 skb = btbcm_read_verbose_config(hdev); in btbcm_read_info()
446 if (IS_ERR(skb)) in btbcm_read_info()
447 return PTR_ERR(skb); in btbcm_read_info()
449 bt_dev_info(hdev, "BCM: chip id %u", skb->data[1]); in btbcm_read_info()
450 kfree_skb(skb); in btbcm_read_info()
457 struct sk_buff *skb; in btbcm_print_controller_features() local
460 skb = btbcm_read_controller_features(hdev); in btbcm_print_controller_features()
461 if (IS_ERR(skb)) in btbcm_print_controller_features()
462 return PTR_ERR(skb); in btbcm_print_controller_features()
464 bt_dev_info(hdev, "BCM: features 0x%2.2x", skb->data[1]); in btbcm_print_controller_features()
465 kfree_skb(skb); in btbcm_print_controller_features()
476 struct sk_buff *skb; in btbcm_print_local_name() local
479 skb = btbcm_read_local_name(hdev); in btbcm_print_local_name()
480 if (IS_ERR(skb)) in btbcm_print_local_name()
481 return PTR_ERR(skb); in btbcm_print_local_name()
483 bt_dev_info(hdev, "%s", (char *)(skb->data + 1)); in btbcm_print_local_name()
484 kfree_skb(skb); in btbcm_print_local_name()
575 struct sk_buff *skb; in btbcm_initialize() local
594 skb = btbcm_read_local_version(hdev); in btbcm_initialize()
595 if (IS_ERR(skb)) in btbcm_initialize()
596 return PTR_ERR(skb); in btbcm_initialize()
598 ver = (struct hci_rp_read_local_version *)skb->data; in btbcm_initialize()
601 kfree_skb(skb); in btbcm_initialize()
639 skb = btbcm_read_usb_product(hdev); in btbcm_initialize()
640 if (IS_ERR(skb)) in btbcm_initialize()
641 return PTR_ERR(skb); in btbcm_initialize()
643 vid = get_unaligned_le16(skb->data + 1); in btbcm_initialize()
644 pid = get_unaligned_le16(skb->data + 3); in btbcm_initialize()
645 kfree_skb(skb); in btbcm_initialize()
738 struct sk_buff *skb; in btbcm_setup_apple() local
747 skb = btbcm_read_verbose_config(hdev); in btbcm_setup_apple()
748 if (!IS_ERR(skb)) { in btbcm_setup_apple()
750 skb->data[1], get_unaligned_le16(skb->data + 5)); in btbcm_setup_apple()
751 kfree_skb(skb); in btbcm_setup_apple()
755 skb = btbcm_read_usb_product(hdev); in btbcm_setup_apple()
756 if (!IS_ERR(skb)) { in btbcm_setup_apple()
758 get_unaligned_le16(skb->data + 1), in btbcm_setup_apple()
759 get_unaligned_le16(skb->data + 3)); in btbcm_setup_apple()
760 kfree_skb(skb); in btbcm_setup_apple()
764 skb = btbcm_read_controller_features(hdev); in btbcm_setup_apple()
765 if (!IS_ERR(skb)) { in btbcm_setup_apple()
766 bt_dev_info(hdev, "BCM: features 0x%2.2x", skb->data[1]); in btbcm_setup_apple()
767 kfree_skb(skb); in btbcm_setup_apple()
771 skb = btbcm_read_local_name(hdev); in btbcm_setup_apple()
772 if (!IS_ERR(skb)) { in btbcm_setup_apple()
773 bt_dev_info(hdev, "%s", (char *)(skb->data + 1)); in btbcm_setup_apple()
774 kfree_skb(skb); in btbcm_setup_apple()