• Home
  • Raw
  • Download

Lines Matching refs:ar

133 static void carl9170_usb_submit_data_urb(struct ar9170 *ar)  in carl9170_usb_submit_data_urb()  argument
138 if (atomic_inc_return(&ar->tx_anch_urbs) > AR9170_NUM_TX_URBS) in carl9170_usb_submit_data_urb()
141 urb = usb_get_from_anchor(&ar->tx_wait); in carl9170_usb_submit_data_urb()
145 usb_anchor_urb(urb, &ar->tx_anch); in carl9170_usb_submit_data_urb()
150 dev_err(&ar->udev->dev, "tx submit failed (%d)\n", in carl9170_usb_submit_data_urb()
155 usb_anchor_urb(urb, &ar->tx_err); in carl9170_usb_submit_data_urb()
164 atomic_dec(&ar->tx_anch_urbs); in carl9170_usb_submit_data_urb()
169 struct ar9170 *ar = usb_get_intfdata(usb_ifnum_to_if(urb->dev, 0)); in carl9170_usb_tx_data_complete() local
171 if (WARN_ON_ONCE(!ar)) { in carl9170_usb_tx_data_complete()
176 atomic_dec(&ar->tx_anch_urbs); in carl9170_usb_tx_data_complete()
181 carl9170_tx_callback(ar, (void *)urb->context); in carl9170_usb_tx_data_complete()
194 usb_anchor_urb(urb, &ar->tx_err); in carl9170_usb_tx_data_complete()
200 dev_err(&ar->udev->dev, "tx failed (%d)\n", in carl9170_usb_tx_data_complete()
204 usb_anchor_urb(urb, &ar->tx_err); in carl9170_usb_tx_data_complete()
208 if (likely(IS_STARTED(ar))) in carl9170_usb_tx_data_complete()
209 carl9170_usb_submit_data_urb(ar); in carl9170_usb_tx_data_complete()
212 static int carl9170_usb_submit_cmd_urb(struct ar9170 *ar) in carl9170_usb_submit_cmd_urb() argument
217 if (atomic_inc_return(&ar->tx_cmd_urbs) != 1) { in carl9170_usb_submit_cmd_urb()
218 atomic_dec(&ar->tx_cmd_urbs); in carl9170_usb_submit_cmd_urb()
222 urb = usb_get_from_anchor(&ar->tx_cmd); in carl9170_usb_submit_cmd_urb()
224 atomic_dec(&ar->tx_cmd_urbs); in carl9170_usb_submit_cmd_urb()
228 usb_anchor_urb(urb, &ar->tx_anch); in carl9170_usb_submit_cmd_urb()
232 atomic_dec(&ar->tx_cmd_urbs); in carl9170_usb_submit_cmd_urb()
241 struct ar9170 *ar = urb->context; in carl9170_usb_cmd_complete() local
244 if (WARN_ON_ONCE(!ar)) in carl9170_usb_cmd_complete()
247 atomic_dec(&ar->tx_cmd_urbs); in carl9170_usb_cmd_complete()
266 if (!IS_INITIALIZED(ar)) in carl9170_usb_cmd_complete()
270 dev_err(&ar->udev->dev, "submit cmd cb failed (%d).\n", err); in carl9170_usb_cmd_complete()
272 err = carl9170_usb_submit_cmd_urb(ar); in carl9170_usb_cmd_complete()
274 dev_err(&ar->udev->dev, "submit cmd failed (%d).\n", err); in carl9170_usb_cmd_complete()
279 struct ar9170 *ar = urb->context; in carl9170_usb_rx_irq_complete() local
281 if (WARN_ON_ONCE(!ar)) in carl9170_usb_rx_irq_complete()
307 carl9170_handle_command_response(ar, urb->transfer_buffer, in carl9170_usb_rx_irq_complete()
311 usb_anchor_urb(urb, &ar->rx_anch); in carl9170_usb_rx_irq_complete()
316 static int carl9170_usb_submit_rx_urb(struct ar9170 *ar, gfp_t gfp) in carl9170_usb_submit_rx_urb() argument
321 while ((atomic_read(&ar->rx_anch_urbs) < AR9170_NUM_RX_URBS) && in carl9170_usb_submit_rx_urb()
324 urb = usb_get_from_anchor(&ar->rx_pool); in carl9170_usb_submit_rx_urb()
326 usb_anchor_urb(urb, &ar->rx_anch); in carl9170_usb_submit_rx_urb()
330 usb_anchor_urb(urb, &ar->rx_pool); in carl9170_usb_submit_rx_urb()
332 atomic_dec(&ar->rx_pool_urbs); in carl9170_usb_submit_rx_urb()
333 atomic_inc(&ar->rx_anch_urbs); in carl9170_usb_submit_rx_urb()
342 static void carl9170_usb_rx_work(struct ar9170 *ar) in carl9170_usb_rx_work() argument
348 urb = usb_get_from_anchor(&ar->rx_work); in carl9170_usb_rx_work()
352 atomic_dec(&ar->rx_work_urbs); in carl9170_usb_rx_work()
353 if (IS_INITIALIZED(ar)) { in carl9170_usb_rx_work()
354 carl9170_rx(ar, urb->transfer_buffer, in carl9170_usb_rx_work()
358 usb_anchor_urb(urb, &ar->rx_pool); in carl9170_usb_rx_work()
359 atomic_inc(&ar->rx_pool_urbs); in carl9170_usb_rx_work()
363 carl9170_usb_submit_rx_urb(ar, GFP_ATOMIC); in carl9170_usb_rx_work()
367 void carl9170_usb_handle_tx_err(struct ar9170 *ar) in carl9170_usb_handle_tx_err() argument
371 while ((urb = usb_get_from_anchor(&ar->tx_err))) { in carl9170_usb_handle_tx_err()
374 carl9170_tx_drop(ar, skb); in carl9170_usb_handle_tx_err()
375 carl9170_tx_callback(ar, skb); in carl9170_usb_handle_tx_err()
382 struct ar9170 *ar = from_tasklet(ar, t, usb_tasklet); in carl9170_usb_tasklet() local
384 if (!IS_INITIALIZED(ar)) in carl9170_usb_tasklet()
387 carl9170_usb_rx_work(ar); in carl9170_usb_tasklet()
394 if (IS_STARTED(ar)) in carl9170_usb_tasklet()
395 carl9170_tx_scheduler(ar); in carl9170_usb_tasklet()
400 struct ar9170 *ar = (struct ar9170 *)urb->context; in carl9170_usb_rx_complete() local
403 if (WARN_ON_ONCE(!ar)) in carl9170_usb_rx_complete()
406 atomic_dec(&ar->rx_anch_urbs); in carl9170_usb_rx_complete()
411 usb_anchor_urb(urb, &ar->rx_work); in carl9170_usb_rx_complete()
412 atomic_inc(&ar->rx_work_urbs); in carl9170_usb_rx_complete()
424 usb_anchor_urb(urb, &ar->rx_pool); in carl9170_usb_rx_complete()
425 atomic_inc(&ar->rx_pool_urbs); in carl9170_usb_rx_complete()
429 err = carl9170_usb_submit_rx_urb(ar, GFP_ATOMIC); in carl9170_usb_rx_complete()
437 tasklet_hi_schedule(&ar->usb_tasklet); in carl9170_usb_rx_complete()
439 if (atomic_read(&ar->rx_anch_urbs) == 0) { in carl9170_usb_rx_complete()
448 ieee80211_queue_work(ar->hw, &ar->ping_work); in carl9170_usb_rx_complete()
455 tasklet_hi_schedule(&ar->usb_tasklet); in carl9170_usb_rx_complete()
459 static struct urb *carl9170_usb_alloc_rx_urb(struct ar9170 *ar, gfp_t gfp) in carl9170_usb_alloc_rx_urb() argument
464 buf = kmalloc(ar->fw.rx_size, gfp); in carl9170_usb_alloc_rx_urb()
474 usb_fill_bulk_urb(urb, ar->udev, usb_rcvbulkpipe(ar->udev, in carl9170_usb_alloc_rx_urb()
475 AR9170_USB_EP_RX), buf, ar->fw.rx_size, in carl9170_usb_alloc_rx_urb()
476 carl9170_usb_rx_complete, ar); in carl9170_usb_alloc_rx_urb()
483 static int carl9170_usb_send_rx_irq_urb(struct ar9170 *ar) in carl9170_usb_send_rx_irq_urb() argument
497 usb_fill_int_urb(urb, ar->udev, usb_rcvintpipe(ar->udev, in carl9170_usb_send_rx_irq_urb()
499 carl9170_usb_rx_irq_complete, ar, 1); in carl9170_usb_send_rx_irq_urb()
503 usb_anchor_urb(urb, &ar->rx_anch); in carl9170_usb_send_rx_irq_urb()
513 static int carl9170_usb_init_rx_bulk_urbs(struct ar9170 *ar) in carl9170_usb_init_rx_bulk_urbs() argument
529 urb = carl9170_usb_alloc_rx_urb(ar, GFP_KERNEL); in carl9170_usb_init_rx_bulk_urbs()
535 usb_anchor_urb(urb, &ar->rx_pool); in carl9170_usb_init_rx_bulk_urbs()
536 atomic_inc(&ar->rx_pool_urbs); in carl9170_usb_init_rx_bulk_urbs()
540 err = carl9170_usb_submit_rx_urb(ar, GFP_KERNEL); in carl9170_usb_init_rx_bulk_urbs()
545 carl9170_set_state_when(ar, CARL9170_STOPPED, CARL9170_IDLE); in carl9170_usb_init_rx_bulk_urbs()
550 usb_scuttle_anchored_urbs(&ar->rx_pool); in carl9170_usb_init_rx_bulk_urbs()
551 usb_scuttle_anchored_urbs(&ar->rx_work); in carl9170_usb_init_rx_bulk_urbs()
552 usb_kill_anchored_urbs(&ar->rx_anch); in carl9170_usb_init_rx_bulk_urbs()
556 static int carl9170_usb_flush(struct ar9170 *ar) in carl9170_usb_flush() argument
561 while ((urb = usb_get_from_anchor(&ar->tx_wait))) { in carl9170_usb_flush()
563 carl9170_tx_drop(ar, skb); in carl9170_usb_flush()
564 carl9170_tx_callback(ar, skb); in carl9170_usb_flush()
568 ret = usb_wait_anchor_empty_timeout(&ar->tx_cmd, 1000); in carl9170_usb_flush()
573 ret = usb_wait_anchor_empty_timeout(&ar->tx_anch, 1000); in carl9170_usb_flush()
577 usb_kill_anchored_urbs(&ar->tx_anch); in carl9170_usb_flush()
578 carl9170_usb_handle_tx_err(ar); in carl9170_usb_flush()
583 static void carl9170_usb_cancel_urbs(struct ar9170 *ar) in carl9170_usb_cancel_urbs() argument
587 carl9170_set_state(ar, CARL9170_UNKNOWN_STATE); in carl9170_usb_cancel_urbs()
589 err = carl9170_usb_flush(ar); in carl9170_usb_cancel_urbs()
591 dev_err(&ar->udev->dev, "stuck tx urbs!\n"); in carl9170_usb_cancel_urbs()
593 usb_poison_anchored_urbs(&ar->tx_anch); in carl9170_usb_cancel_urbs()
594 carl9170_usb_handle_tx_err(ar); in carl9170_usb_cancel_urbs()
595 usb_poison_anchored_urbs(&ar->rx_anch); in carl9170_usb_cancel_urbs()
597 tasklet_kill(&ar->usb_tasklet); in carl9170_usb_cancel_urbs()
599 usb_scuttle_anchored_urbs(&ar->rx_work); in carl9170_usb_cancel_urbs()
600 usb_scuttle_anchored_urbs(&ar->rx_pool); in carl9170_usb_cancel_urbs()
601 usb_scuttle_anchored_urbs(&ar->tx_cmd); in carl9170_usb_cancel_urbs()
604 int __carl9170_exec_cmd(struct ar9170 *ar, struct carl9170_cmd *cmd, in __carl9170_exec_cmd() argument
610 if (!IS_INITIALIZED(ar)) { in __carl9170_exec_cmd()
626 if (ar->usb_ep_cmd_is_bulk) in __carl9170_exec_cmd()
627 usb_fill_bulk_urb(urb, ar->udev, in __carl9170_exec_cmd()
628 usb_sndbulkpipe(ar->udev, AR9170_USB_EP_CMD), in __carl9170_exec_cmd()
630 carl9170_usb_cmd_complete, ar); in __carl9170_exec_cmd()
632 usb_fill_int_urb(urb, ar->udev, in __carl9170_exec_cmd()
633 usb_sndintpipe(ar->udev, AR9170_USB_EP_CMD), in __carl9170_exec_cmd()
635 carl9170_usb_cmd_complete, ar, 1); in __carl9170_exec_cmd()
640 usb_anchor_urb(urb, &ar->tx_cmd); in __carl9170_exec_cmd()
643 return carl9170_usb_submit_cmd_urb(ar); in __carl9170_exec_cmd()
652 int carl9170_exec_cmd(struct ar9170 *ar, const enum carl9170_cmd_oids cmd, in carl9170_exec_cmd() argument
658 if (!IS_ACCEPTING_CMD(ar)) in carl9170_exec_cmd()
664 ar->cmd.hdr.len = plen; in carl9170_exec_cmd()
665 ar->cmd.hdr.cmd = cmd; in carl9170_exec_cmd()
667 if (plen && payload != (u8 *)(ar->cmd.data)) in carl9170_exec_cmd()
668 memcpy(ar->cmd.data, payload, plen); in carl9170_exec_cmd()
670 spin_lock_bh(&ar->cmd_lock); in carl9170_exec_cmd()
671 ar->readbuf = (u8 *)out; in carl9170_exec_cmd()
672 ar->readlen = outlen; in carl9170_exec_cmd()
673 spin_unlock_bh(&ar->cmd_lock); in carl9170_exec_cmd()
675 reinit_completion(&ar->cmd_wait); in carl9170_exec_cmd()
676 err = __carl9170_exec_cmd(ar, &ar->cmd, false); in carl9170_exec_cmd()
679 time_left = wait_for_completion_timeout(&ar->cmd_wait, HZ); in carl9170_exec_cmd()
685 if (ar->readlen != outlen) { in carl9170_exec_cmd()
695 if (IS_STARTED(ar)) { in carl9170_exec_cmd()
696 dev_err(&ar->udev->dev, "no command feedback " in carl9170_exec_cmd()
701 &ar->cmd, plen + 4); in carl9170_exec_cmd()
703 carl9170_restart(ar, CARL9170_RR_COMMAND_TIMEOUT); in carl9170_exec_cmd()
707 spin_lock_bh(&ar->cmd_lock); in carl9170_exec_cmd()
708 ar->readbuf = NULL; in carl9170_exec_cmd()
709 ar->readlen = 0; in carl9170_exec_cmd()
710 spin_unlock_bh(&ar->cmd_lock); in carl9170_exec_cmd()
715 void carl9170_usb_tx(struct ar9170 *ar, struct sk_buff *skb) in carl9170_usb_tx() argument
722 if (!IS_STARTED(ar)) in carl9170_usb_tx()
729 if (ar->fw.tx_stream) { in carl9170_usb_tx()
741 usb_fill_bulk_urb(urb, ar->udev, usb_sndbulkpipe(ar->udev, in carl9170_usb_tx()
747 usb_anchor_urb(urb, &ar->tx_wait); in carl9170_usb_tx()
751 carl9170_usb_submit_data_urb(ar); in carl9170_usb_tx()
755 carl9170_tx_drop(ar, skb); in carl9170_usb_tx()
756 carl9170_tx_callback(ar, skb); in carl9170_usb_tx()
759 static void carl9170_release_firmware(struct ar9170 *ar) in carl9170_release_firmware() argument
761 if (ar->fw.fw) { in carl9170_release_firmware()
762 release_firmware(ar->fw.fw); in carl9170_release_firmware()
763 memset(&ar->fw, 0, sizeof(ar->fw)); in carl9170_release_firmware()
767 void carl9170_usb_stop(struct ar9170 *ar) in carl9170_usb_stop() argument
771 carl9170_set_state_when(ar, CARL9170_IDLE, CARL9170_STOPPED); in carl9170_usb_stop()
773 ret = carl9170_usb_flush(ar); in carl9170_usb_stop()
775 dev_err(&ar->udev->dev, "kill pending tx urbs.\n"); in carl9170_usb_stop()
777 usb_poison_anchored_urbs(&ar->tx_anch); in carl9170_usb_stop()
778 carl9170_usb_handle_tx_err(ar); in carl9170_usb_stop()
781 spin_lock_bh(&ar->cmd_lock); in carl9170_usb_stop()
782 ar->readlen = 0; in carl9170_usb_stop()
783 spin_unlock_bh(&ar->cmd_lock); in carl9170_usb_stop()
784 complete(&ar->cmd_wait); in carl9170_usb_stop()
793 int carl9170_usb_open(struct ar9170 *ar) in carl9170_usb_open() argument
795 usb_unpoison_anchored_urbs(&ar->tx_anch); in carl9170_usb_open()
797 carl9170_set_state_when(ar, CARL9170_STOPPED, CARL9170_IDLE); in carl9170_usb_open()
801 static int carl9170_usb_load_firmware(struct ar9170 *ar) in carl9170_usb_load_firmware() argument
816 data = ar->fw.fw->data; in carl9170_usb_load_firmware()
817 len = ar->fw.fw->size; in carl9170_usb_load_firmware()
818 addr = ar->fw.address; in carl9170_usb_load_firmware()
821 data += ar->fw.offset; in carl9170_usb_load_firmware()
822 len -= ar->fw.offset; in carl9170_usb_load_firmware()
828 err = usb_control_msg(ar->udev, usb_sndctrlpipe(ar->udev, 0), in carl9170_usb_load_firmware()
843 err = usb_control_msg(ar->udev, usb_sndctrlpipe(ar->udev, 0), in carl9170_usb_load_firmware()
847 if (wait_for_completion_timeout(&ar->fw_boot_wait, HZ) == 0) { in carl9170_usb_load_firmware()
852 err = carl9170_echo_test(ar, 0x4a110123); in carl9170_usb_load_firmware()
857 ar->cmd_seq = -1; in carl9170_usb_load_firmware()
862 dev_err(&ar->udev->dev, "firmware upload failed (%d).\n", err); in carl9170_usb_load_firmware()
866 int carl9170_usb_restart(struct ar9170 *ar) in carl9170_usb_restart() argument
870 if (ar->intf->condition != USB_INTERFACE_BOUND) in carl9170_usb_restart()
879 ar->cmd_seq = -2; in carl9170_usb_restart()
881 err = carl9170_reboot(ar); in carl9170_usb_restart()
883 carl9170_usb_stop(ar); in carl9170_usb_restart()
888 tasklet_schedule(&ar->usb_tasklet); in carl9170_usb_restart()
893 err = carl9170_usb_open(ar); in carl9170_usb_restart()
897 err = carl9170_usb_load_firmware(ar); in carl9170_usb_restart()
904 carl9170_usb_cancel_urbs(ar); in carl9170_usb_restart()
908 void carl9170_usb_reset(struct ar9170 *ar) in carl9170_usb_reset() argument
919 carl9170_usb_cancel_urbs(ar); in carl9170_usb_reset()
921 carl9170_usb_stop(ar); in carl9170_usb_reset()
923 usb_queue_reset_device(ar->intf); in carl9170_usb_reset()
926 static int carl9170_usb_init_device(struct ar9170 *ar) in carl9170_usb_init_device() argument
937 ar->cmd_seq = -2; in carl9170_usb_init_device()
939 err = carl9170_usb_send_rx_irq_urb(ar); in carl9170_usb_init_device()
943 err = carl9170_usb_init_rx_bulk_urbs(ar); in carl9170_usb_init_device()
947 err = carl9170_usb_open(ar); in carl9170_usb_init_device()
951 mutex_lock(&ar->mutex); in carl9170_usb_init_device()
952 err = carl9170_usb_load_firmware(ar); in carl9170_usb_init_device()
953 mutex_unlock(&ar->mutex); in carl9170_usb_init_device()
960 carl9170_usb_stop(ar); in carl9170_usb_init_device()
963 carl9170_usb_cancel_urbs(ar); in carl9170_usb_init_device()
969 static void carl9170_usb_firmware_failed(struct ar9170 *ar) in carl9170_usb_firmware_failed() argument
975 struct usb_interface *intf = ar->intf; in carl9170_usb_firmware_failed()
976 struct usb_device *udev = ar->udev; in carl9170_usb_firmware_failed()
978 complete(&ar->fw_load_wait); in carl9170_usb_firmware_failed()
980 ar = NULL; in carl9170_usb_firmware_failed()
990 static void carl9170_usb_firmware_finish(struct ar9170 *ar) in carl9170_usb_firmware_finish() argument
992 struct usb_interface *intf = ar->intf; in carl9170_usb_firmware_finish()
995 err = carl9170_parse_firmware(ar); in carl9170_usb_firmware_finish()
999 err = carl9170_usb_init_device(ar); in carl9170_usb_firmware_finish()
1003 err = carl9170_register(ar); in carl9170_usb_firmware_finish()
1005 carl9170_usb_stop(ar); in carl9170_usb_firmware_finish()
1009 complete(&ar->fw_load_wait); in carl9170_usb_firmware_finish()
1014 carl9170_usb_cancel_urbs(ar); in carl9170_usb_firmware_finish()
1017 carl9170_release_firmware(ar); in carl9170_usb_firmware_finish()
1018 carl9170_usb_firmware_failed(ar); in carl9170_usb_firmware_finish()
1024 struct ar9170 *ar = context; in carl9170_usb_firmware_step2() local
1027 ar->fw.fw = fw; in carl9170_usb_firmware_step2()
1028 carl9170_usb_firmware_finish(ar); in carl9170_usb_firmware_step2()
1032 dev_err(&ar->udev->dev, "firmware not found.\n"); in carl9170_usb_firmware_step2()
1033 carl9170_usb_firmware_failed(ar); in carl9170_usb_firmware_step2()
1040 struct ar9170 *ar; in carl9170_usb_probe() local
1048 ar = carl9170_alloc(sizeof(*ar)); in carl9170_usb_probe()
1049 if (IS_ERR(ar)) in carl9170_usb_probe()
1050 return PTR_ERR(ar); in carl9170_usb_probe()
1053 ar->udev = udev; in carl9170_usb_probe()
1054 ar->intf = intf; in carl9170_usb_probe()
1055 ar->features = id->driver_info; in carl9170_usb_probe()
1069 ar->usb_ep_cmd_is_bulk = true; in carl9170_usb_probe()
1072 usb_set_intfdata(intf, ar); in carl9170_usb_probe()
1073 SET_IEEE80211_DEV(ar->hw, &intf->dev); in carl9170_usb_probe()
1075 init_usb_anchor(&ar->rx_anch); in carl9170_usb_probe()
1076 init_usb_anchor(&ar->rx_pool); in carl9170_usb_probe()
1077 init_usb_anchor(&ar->rx_work); in carl9170_usb_probe()
1078 init_usb_anchor(&ar->tx_wait); in carl9170_usb_probe()
1079 init_usb_anchor(&ar->tx_anch); in carl9170_usb_probe()
1080 init_usb_anchor(&ar->tx_cmd); in carl9170_usb_probe()
1081 init_usb_anchor(&ar->tx_err); in carl9170_usb_probe()
1082 init_completion(&ar->cmd_wait); in carl9170_usb_probe()
1083 init_completion(&ar->fw_boot_wait); in carl9170_usb_probe()
1084 init_completion(&ar->fw_load_wait); in carl9170_usb_probe()
1085 tasklet_setup(&ar->usb_tasklet, carl9170_usb_tasklet); in carl9170_usb_probe()
1087 atomic_set(&ar->tx_cmd_urbs, 0); in carl9170_usb_probe()
1088 atomic_set(&ar->tx_anch_urbs, 0); in carl9170_usb_probe()
1089 atomic_set(&ar->rx_work_urbs, 0); in carl9170_usb_probe()
1090 atomic_set(&ar->rx_anch_urbs, 0); in carl9170_usb_probe()
1091 atomic_set(&ar->rx_pool_urbs, 0); in carl9170_usb_probe()
1095 carl9170_set_state(ar, CARL9170_STOPPED); in carl9170_usb_probe()
1098 &ar->udev->dev, GFP_KERNEL, ar, carl9170_usb_firmware_step2); in carl9170_usb_probe()
1101 carl9170_free(ar); in carl9170_usb_probe()
1108 struct ar9170 *ar = usb_get_intfdata(intf); in carl9170_usb_disconnect() local
1110 if (WARN_ON(!ar)) in carl9170_usb_disconnect()
1113 wait_for_completion(&ar->fw_load_wait); in carl9170_usb_disconnect()
1115 if (IS_INITIALIZED(ar)) { in carl9170_usb_disconnect()
1116 carl9170_reboot(ar); in carl9170_usb_disconnect()
1117 carl9170_usb_stop(ar); in carl9170_usb_disconnect()
1120 carl9170_usb_cancel_urbs(ar); in carl9170_usb_disconnect()
1121 carl9170_unregister(ar); in carl9170_usb_disconnect()
1125 carl9170_release_firmware(ar); in carl9170_usb_disconnect()
1126 carl9170_free(ar); in carl9170_usb_disconnect()
1133 struct ar9170 *ar = usb_get_intfdata(intf); in carl9170_usb_suspend() local
1135 if (!ar) in carl9170_usb_suspend()
1138 carl9170_usb_cancel_urbs(ar); in carl9170_usb_suspend()
1145 struct ar9170 *ar = usb_get_intfdata(intf); in carl9170_usb_resume() local
1148 if (!ar) in carl9170_usb_resume()
1151 usb_unpoison_anchored_urbs(&ar->rx_anch); in carl9170_usb_resume()
1152 carl9170_set_state(ar, CARL9170_STOPPED); in carl9170_usb_resume()
1165 err = carl9170_usb_init_device(ar); in carl9170_usb_resume()
1172 carl9170_usb_cancel_urbs(ar); in carl9170_usb_resume()