qca6164 support

Michal Kazior michal.kazior at tieto.com
Wed Aug 5 22:20:47 PDT 2015


On 3 August 2015 at 20:45, vvanpo <vvanpo at gmail.com> wrote:
> Hi,
>
> I just got a Lenovo Yoga 3 11, only to find the wireless doesn't work.
>
> The PCI id is 168c:0041:17aa:3545
[...]
>   - what would need to be changed to add support for qca6164 in ath10k?

Can you try the diff below, please? (warning, whitespace damage).

/me crosses fingers


Michał


diff --git a/drivers/net/wireless/ath/ath10k/core.c
b/drivers/net/wireless/ath/ath10k/core.c
index 29d2541d87dd..8c46338a90de 100644
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -231,6 +231,15 @@ static int ath10k_init_configure_target(struct ath10k *ar)
                return ret;
        }

+       /* Some devices, e.g. qca6164 needs this host interest field to contain
+        * PCI Device ID in order to boot.
+         */
+       ret = ath10k_bmi_write32(ar, hi_hci_uart_pwr_mgmt_params, ar->dev_id);
+       if (ret) {
+               ath10k_err(ar, "failed to set pwr_mgmt_params: %d\n", ret);
+               return ret;
+       }
+
        return 0;
 }

diff --git a/drivers/net/wireless/ath/ath10k/core.h
b/drivers/net/wireless/ath/ath10k/core.h
index 35f40388b622..9776f0d85a35 100644
--- a/drivers/net/wireless/ath/ath10k/core.h
+++ b/drivers/net/wireless/ath/ath10k/core.h
@@ -554,6 +554,7 @@ struct ath10k {
        u8 mac_addr[ETH_ALEN];

        enum ath10k_hw_rev hw_rev;
+       u16 dev_id;
        u32 chip_id;
        u32 target_version;
        u8 fw_version_major;
diff --git a/drivers/net/wireless/ath/ath10k/pci.c
b/drivers/net/wireless/ath/ath10k/pci.c
index a69bfa41c68b..1debb45e49d6 100644
--- a/drivers/net/wireless/ath/ath10k/pci.c
+++ b/drivers/net/wireless/ath/ath10k/pci.c
@@ -2920,6 +2920,7 @@ static int ath10k_pci_probe(struct pci_dev *pdev,
        ar_pci->pdev = pdev;
        ar_pci->dev = &pdev->dev;
        ar_pci->ar = ar;
+       ar->dev_id = pci_dev->device;

        if (pdev->subsystem_vendor || pdev->subsystem_device)
                scnprintf(ar->spec_board_id, sizeof(ar->spec_board_id),



More information about the ath10k mailing list