.. | .. |
---|
| 1 | +// SPDX-License-Identifier: ISC |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright (c) 2012-2017 Qualcomm Atheros, Inc. |
---|
3 | | - * Copyright (c) 2018, The Linux Foundation. All rights reserved. |
---|
4 | | - * |
---|
5 | | - * Permission to use, copy, modify, and/or distribute this software for any |
---|
6 | | - * purpose with or without fee is hereby granted, provided that the above |
---|
7 | | - * copyright notice and this permission notice appear in all copies. |
---|
8 | | - * |
---|
9 | | - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
---|
10 | | - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
---|
11 | | - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |
---|
12 | | - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
---|
13 | | - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
---|
14 | | - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
---|
15 | | - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
---|
| 4 | + * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved. |
---|
16 | 5 | */ |
---|
17 | 6 | |
---|
18 | 7 | #include <linux/module.h> |
---|
.. | .. |
---|
142 | 131 | min(sizeof(wil->platform_capa), sizeof(platform_capa))); |
---|
143 | 132 | } |
---|
144 | 133 | |
---|
| 134 | + wil_info(wil, "platform_capa 0x%lx\n", *wil->platform_capa); |
---|
| 135 | + |
---|
145 | 136 | /* extract FW capabilities from file without loading the FW */ |
---|
146 | 137 | wil_request_firmware(wil, wil->wil_fw_name, false); |
---|
147 | 138 | wil_refresh_fw_capabilities(wil); |
---|
.. | .. |
---|
176 | 167 | struct wil6210_vif *vif; |
---|
177 | 168 | int i; |
---|
178 | 169 | |
---|
179 | | - for (i = 1; i < wil->max_vifs; i++) { |
---|
| 170 | + for (i = 1; i < GET_MAX_VIFS(wil); i++) { |
---|
180 | 171 | vif = wil->vifs[i]; |
---|
181 | 172 | if (vif) { |
---|
182 | 173 | wil_vif_prepare_stop(vif); |
---|
.. | .. |
---|
418 | 409 | } |
---|
419 | 410 | /* rollback to bus_disable */ |
---|
420 | 411 | |
---|
| 412 | + wil_clear_fw_log_addr(wil); |
---|
421 | 413 | rc = wil_if_add(wil); |
---|
422 | 414 | if (rc) { |
---|
423 | 415 | wil_err(wil, "wil_if_add failed: %d\n", rc); |
---|
.. | .. |
---|
432 | 424 | mutex_unlock(&wil->mutex); |
---|
433 | 425 | if (rc) { |
---|
434 | 426 | wil_err(wil, "failed to load WMI only FW\n"); |
---|
435 | | - goto if_remove; |
---|
| 427 | + /* ignore the error to allow debugging */ |
---|
436 | 428 | } |
---|
437 | 429 | } |
---|
438 | 430 | |
---|
.. | .. |
---|
452 | 444 | |
---|
453 | 445 | return 0; |
---|
454 | 446 | |
---|
455 | | -if_remove: |
---|
456 | | - wil_if_remove(wil); |
---|
457 | 447 | bus_disable: |
---|
458 | 448 | wil_if_pcie_disable(wil); |
---|
459 | 449 | err_iounmap: |
---|
.. | .. |
---|
628 | 618 | |
---|
629 | 619 | static int __maybe_unused wil6210_pm_runtime_idle(struct device *dev) |
---|
630 | 620 | { |
---|
631 | | - struct pci_dev *pdev = to_pci_dev(dev); |
---|
632 | | - struct wil6210_priv *wil = pci_get_drvdata(pdev); |
---|
| 621 | + struct wil6210_priv *wil = dev_get_drvdata(dev); |
---|
633 | 622 | |
---|
634 | 623 | wil_dbg_pm(wil, "Runtime idle\n"); |
---|
635 | 624 | |
---|
.. | .. |
---|
643 | 632 | |
---|
644 | 633 | static int __maybe_unused wil6210_pm_runtime_suspend(struct device *dev) |
---|
645 | 634 | { |
---|
646 | | - struct pci_dev *pdev = to_pci_dev(dev); |
---|
647 | | - struct wil6210_priv *wil = pci_get_drvdata(pdev); |
---|
| 635 | + struct wil6210_priv *wil = dev_get_drvdata(dev); |
---|
648 | 636 | |
---|
649 | 637 | if (test_bit(wil_status_suspended, wil->status)) { |
---|
650 | 638 | wil_dbg_pm(wil, "trying to suspend while suspended\n"); |
---|