Lines Matching refs:skb
78 struct sk_buff *skb; in btbcm_check_bdaddr() local
80 skb = __hci_cmd_sync(hdev, HCI_OP_READ_BD_ADDR, 0, NULL, in btbcm_check_bdaddr()
82 if (IS_ERR(skb)) { in btbcm_check_bdaddr()
83 int err = PTR_ERR(skb); in btbcm_check_bdaddr()
89 if (skb->len != sizeof(*bda)) { in btbcm_check_bdaddr()
91 kfree_skb(skb); in btbcm_check_bdaddr()
95 bda = (struct hci_rp_read_bd_addr *)skb->data; in btbcm_check_bdaddr()
136 kfree_skb(skb); in btbcm_check_bdaddr()
144 struct sk_buff *skb; in btbcm_set_bdaddr() local
147 skb = __hci_cmd_sync(hdev, 0xfc01, 6, bdaddr, HCI_INIT_TIMEOUT); in btbcm_set_bdaddr()
148 if (IS_ERR(skb)) { in btbcm_set_bdaddr()
149 err = PTR_ERR(skb); in btbcm_set_bdaddr()
153 kfree_skb(skb); in btbcm_set_bdaddr()
162 struct sk_buff *skb; in btbcm_read_pcm_int_params() local
165 skb = __hci_cmd_sync(hdev, 0xfc1d, 0, NULL, HCI_INIT_TIMEOUT); in btbcm_read_pcm_int_params()
166 if (IS_ERR(skb)) { in btbcm_read_pcm_int_params()
167 err = PTR_ERR(skb); in btbcm_read_pcm_int_params()
172 if (skb->len != 6 || skb->data[0]) { in btbcm_read_pcm_int_params()
174 kfree_skb(skb); in btbcm_read_pcm_int_params()
179 memcpy(params, skb->data + 1, 5); in btbcm_read_pcm_int_params()
181 kfree_skb(skb); in btbcm_read_pcm_int_params()
190 struct sk_buff *skb; in btbcm_write_pcm_int_params() local
193 skb = __hci_cmd_sync(hdev, 0xfc1c, 5, params, HCI_INIT_TIMEOUT); in btbcm_write_pcm_int_params()
194 if (IS_ERR(skb)) { in btbcm_write_pcm_int_params()
195 err = PTR_ERR(skb); in btbcm_write_pcm_int_params()
199 kfree_skb(skb); in btbcm_write_pcm_int_params()
210 struct sk_buff *skb; in btbcm_patchram() local
215 skb = __hci_cmd_sync(hdev, 0xfc2e, 0, NULL, HCI_INIT_TIMEOUT); in btbcm_patchram()
216 if (IS_ERR(skb)) { in btbcm_patchram()
217 err = PTR_ERR(skb); in btbcm_patchram()
222 kfree_skb(skb); in btbcm_patchram()
249 skb = __hci_cmd_sync(hdev, opcode, cmd->plen, cmd_param, in btbcm_patchram()
251 if (IS_ERR(skb)) { in btbcm_patchram()
252 err = PTR_ERR(skb); in btbcm_patchram()
257 kfree_skb(skb); in btbcm_patchram()
270 struct sk_buff *skb; in btbcm_reset() local
272 skb = __hci_cmd_sync(hdev, HCI_OP_RESET, 0, NULL, HCI_INIT_TIMEOUT); in btbcm_reset()
273 if (IS_ERR(skb)) { in btbcm_reset()
274 int err = PTR_ERR(skb); in btbcm_reset()
279 kfree_skb(skb); in btbcm_reset()
289 struct sk_buff *skb; in btbcm_read_local_name() local
291 skb = __hci_cmd_sync(hdev, HCI_OP_READ_LOCAL_NAME, 0, NULL, in btbcm_read_local_name()
293 if (IS_ERR(skb)) { in btbcm_read_local_name()
295 PTR_ERR(skb)); in btbcm_read_local_name()
296 return skb; in btbcm_read_local_name()
299 if (skb->len != sizeof(struct hci_rp_read_local_name)) { in btbcm_read_local_name()
301 kfree_skb(skb); in btbcm_read_local_name()
305 return skb; in btbcm_read_local_name()
310 struct sk_buff *skb; in btbcm_read_local_version() local
312 skb = __hci_cmd_sync(hdev, HCI_OP_READ_LOCAL_VERSION, 0, NULL, in btbcm_read_local_version()
314 if (IS_ERR(skb)) { in btbcm_read_local_version()
316 PTR_ERR(skb)); in btbcm_read_local_version()
317 return skb; in btbcm_read_local_version()
320 if (skb->len != sizeof(struct hci_rp_read_local_version)) { in btbcm_read_local_version()
322 kfree_skb(skb); in btbcm_read_local_version()
326 return skb; in btbcm_read_local_version()
331 struct sk_buff *skb; in btbcm_read_verbose_config() local
333 skb = __hci_cmd_sync(hdev, 0xfc79, 0, NULL, HCI_INIT_TIMEOUT); in btbcm_read_verbose_config()
334 if (IS_ERR(skb)) { in btbcm_read_verbose_config()
336 PTR_ERR(skb)); in btbcm_read_verbose_config()
337 return skb; in btbcm_read_verbose_config()
340 if (skb->len != 7) { in btbcm_read_verbose_config()
342 kfree_skb(skb); in btbcm_read_verbose_config()
346 return skb; in btbcm_read_verbose_config()
351 struct sk_buff *skb; in btbcm_read_controller_features() local
353 skb = __hci_cmd_sync(hdev, 0xfc6e, 0, NULL, HCI_INIT_TIMEOUT); in btbcm_read_controller_features()
354 if (IS_ERR(skb)) { in btbcm_read_controller_features()
356 PTR_ERR(skb)); in btbcm_read_controller_features()
357 return skb; in btbcm_read_controller_features()
360 if (skb->len != 9) { in btbcm_read_controller_features()
362 kfree_skb(skb); in btbcm_read_controller_features()
366 return skb; in btbcm_read_controller_features()
371 struct sk_buff *skb; in btbcm_read_usb_product() local
373 skb = __hci_cmd_sync(hdev, 0xfc5a, 0, NULL, HCI_INIT_TIMEOUT); in btbcm_read_usb_product()
374 if (IS_ERR(skb)) { in btbcm_read_usb_product()
376 PTR_ERR(skb)); in btbcm_read_usb_product()
377 return skb; in btbcm_read_usb_product()
380 if (skb->len != 5) { in btbcm_read_usb_product()
382 kfree_skb(skb); in btbcm_read_usb_product()
386 return skb; in btbcm_read_usb_product()
391 struct sk_buff *skb; in btbcm_read_info() local
394 skb = btbcm_read_verbose_config(hdev); in btbcm_read_info()
395 if (IS_ERR(skb)) in btbcm_read_info()
396 return PTR_ERR(skb); in btbcm_read_info()
398 bt_dev_info(hdev, "BCM: chip id %u", skb->data[1]); in btbcm_read_info()
399 kfree_skb(skb); in btbcm_read_info()
402 skb = btbcm_read_controller_features(hdev); in btbcm_read_info()
403 if (IS_ERR(skb)) in btbcm_read_info()
404 return PTR_ERR(skb); in btbcm_read_info()
406 bt_dev_info(hdev, "BCM: features 0x%2.2x", skb->data[1]); in btbcm_read_info()
407 kfree_skb(skb); in btbcm_read_info()
414 struct sk_buff *skb; in btbcm_print_local_name() local
417 skb = btbcm_read_local_name(hdev); in btbcm_print_local_name()
418 if (IS_ERR(skb)) in btbcm_print_local_name()
419 return PTR_ERR(skb); in btbcm_print_local_name()
421 bt_dev_info(hdev, "%s", (char *)(skb->data + 1)); in btbcm_print_local_name()
422 kfree_skb(skb); in btbcm_print_local_name()
474 struct sk_buff *skb; in btbcm_initialize() local
490 skb = btbcm_read_local_version(hdev); in btbcm_initialize()
491 if (IS_ERR(skb)) in btbcm_initialize()
492 return PTR_ERR(skb); in btbcm_initialize()
494 ver = (struct hci_rp_read_local_version *)skb->data; in btbcm_initialize()
497 kfree_skb(skb); in btbcm_initialize()
528 skb = btbcm_read_usb_product(hdev); in btbcm_initialize()
529 if (IS_ERR(skb)) in btbcm_initialize()
530 return PTR_ERR(skb); in btbcm_initialize()
532 vid = get_unaligned_le16(skb->data + 1); in btbcm_initialize()
533 pid = get_unaligned_le16(skb->data + 3); in btbcm_initialize()
534 kfree_skb(skb); in btbcm_initialize()
616 struct sk_buff *skb; in btbcm_setup_apple() local
625 skb = btbcm_read_verbose_config(hdev); in btbcm_setup_apple()
626 if (!IS_ERR(skb)) { in btbcm_setup_apple()
628 skb->data[1], get_unaligned_le16(skb->data + 5)); in btbcm_setup_apple()
629 kfree_skb(skb); in btbcm_setup_apple()
633 skb = btbcm_read_usb_product(hdev); in btbcm_setup_apple()
634 if (!IS_ERR(skb)) { in btbcm_setup_apple()
636 get_unaligned_le16(skb->data + 1), in btbcm_setup_apple()
637 get_unaligned_le16(skb->data + 3)); in btbcm_setup_apple()
638 kfree_skb(skb); in btbcm_setup_apple()
642 skb = btbcm_read_controller_features(hdev); in btbcm_setup_apple()
643 if (!IS_ERR(skb)) { in btbcm_setup_apple()
644 bt_dev_info(hdev, "BCM: features 0x%2.2x", skb->data[1]); in btbcm_setup_apple()
645 kfree_skb(skb); in btbcm_setup_apple()
649 skb = btbcm_read_local_name(hdev); in btbcm_setup_apple()
650 if (!IS_ERR(skb)) { in btbcm_setup_apple()
651 bt_dev_info(hdev, "%s", (char *)(skb->data + 1)); in btbcm_setup_apple()
652 kfree_skb(skb); in btbcm_setup_apple()