.. | .. |
---|
| 1 | +// SPDX-License-Identifier: ISC |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright (c) 2007-2011 Atheros Communications Inc. |
---|
3 | 4 | * Copyright (c) 2011-2012,2017 Qualcomm Atheros, Inc. |
---|
4 | 5 | * Copyright (c) 2016-2017 Erik Stromdahl <erik.stromdahl@gmail.com> |
---|
5 | | - * |
---|
6 | | - * Permission to use, copy, modify, and/or distribute this software for any |
---|
7 | | - * purpose with or without fee is hereby granted, provided that the above |
---|
8 | | - * copyright notice and this permission notice appear in all copies. |
---|
9 | | - * |
---|
10 | | - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
---|
11 | | - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
---|
12 | | - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |
---|
13 | | - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
---|
14 | | - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
---|
15 | | - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
---|
16 | | - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
---|
17 | 6 | */ |
---|
18 | 7 | |
---|
19 | 8 | #include <linux/module.h> |
---|
.. | .. |
---|
704 | 693 | return 0; |
---|
705 | 694 | } |
---|
706 | 695 | |
---|
707 | | -/* This op is currently only used by htc_wait_target if the HTC ready |
---|
708 | | - * message times out. It is not applicable for USB since there is nothing |
---|
709 | | - * we can do if the HTC ready message does not arrive in time. |
---|
710 | | - * TODO: Make this op non mandatory by introducing a NULL check in the |
---|
711 | | - * hif op wrapper. |
---|
712 | | - */ |
---|
713 | | -static void ath10k_usb_hif_send_complete_check(struct ath10k *ar, |
---|
714 | | - u8 pipe, int force) |
---|
715 | | -{ |
---|
716 | | -} |
---|
717 | | - |
---|
718 | | -static int ath10k_usb_hif_power_up(struct ath10k *ar) |
---|
| 696 | +static int ath10k_usb_hif_power_up(struct ath10k *ar, |
---|
| 697 | + enum ath10k_firmware_mode fw_mode) |
---|
719 | 698 | { |
---|
720 | 699 | return 0; |
---|
721 | 700 | } |
---|
.. | .. |
---|
747 | 726 | .stop = ath10k_usb_hif_stop, |
---|
748 | 727 | .map_service_to_pipe = ath10k_usb_hif_map_service_to_pipe, |
---|
749 | 728 | .get_default_pipe = ath10k_usb_hif_get_default_pipe, |
---|
750 | | - .send_complete_check = ath10k_usb_hif_send_complete_check, |
---|
751 | 729 | .get_free_queue_number = ath10k_usb_hif_get_free_queue_number, |
---|
752 | 730 | .power_up = ath10k_usb_hif_power_up, |
---|
753 | 731 | .power_down = ath10k_usb_hif_power_down, |
---|
.. | .. |
---|
846 | 824 | |
---|
847 | 825 | ath10k_dbg(ar, ATH10K_DBG_USB, "usb setting up pipes using interface\n"); |
---|
848 | 826 | |
---|
849 | | - /* walk decriptors and setup pipes */ |
---|
| 827 | + /* walk descriptors and setup pipes */ |
---|
850 | 828 | for (i = 0; i < iface_desc->desc.bNumEndpoints; ++i) { |
---|
851 | 829 | endpoint = &iface_desc->endpoint[i].desc; |
---|
852 | 830 | |
---|
.. | .. |
---|
997 | 975 | struct usb_device *dev = interface_to_usbdev(interface); |
---|
998 | 976 | int ret, vendor_id, product_id; |
---|
999 | 977 | enum ath10k_hw_rev hw_rev; |
---|
1000 | | - u32 chip_id; |
---|
| 978 | + struct ath10k_bus_params bus_params = {}; |
---|
1001 | 979 | |
---|
1002 | 980 | /* Assumption: All USB based chipsets (so far) are QCA9377 based. |
---|
1003 | 981 | * If there will be newer chipsets that does not use the hw reg |
---|
.. | .. |
---|
1032 | 1010 | ar->id.vendor = vendor_id; |
---|
1033 | 1011 | ar->id.device = product_id; |
---|
1034 | 1012 | |
---|
| 1013 | + bus_params.dev_type = ATH10K_DEV_TYPE_HL; |
---|
1035 | 1014 | /* TODO: don't know yet how to get chip_id with USB */ |
---|
1036 | | - chip_id = 0; |
---|
1037 | | - ret = ath10k_core_register(ar, chip_id); |
---|
| 1015 | + bus_params.chip_id = 0; |
---|
| 1016 | + ret = ath10k_core_register(ar, &bus_params); |
---|
1038 | 1017 | if (ret) { |
---|
1039 | 1018 | ath10k_warn(ar, "failed to register driver core: %d\n", ret); |
---|
1040 | 1019 | goto err_usb_destroy; |
---|