Commit 38a6598a authored by Wen-chien Jesse Sung's avatar Wen-chien Jesse Sung Committed by Luis Henriques

UBUNTU: SAUCE: mwifiex: Use PCI ID instead of DMI ID to identify Edge Gateways

BugLink: https://launchpad.net/bugs/1640418

The DMI ID string may be changed in some models. Use PCI ID as an
indentification instead.
Signed-off-by: default avatarWen-chien Jesse Sung <jesse.sung@canonical.com>
Acked-by: default avatarTim Gardner <tim.gardner@canonical.com>
Acked-by: default avatarSeth Forshee <seth.forshee@canonical.com>
Signed-off-by: default avatarLuis Henriques <luis.henriques@canonical.com>
parent 08bcc13b
...@@ -191,6 +191,7 @@ static int mwifiex_pcie_probe(struct pci_dev *pdev, ...@@ -191,6 +191,7 @@ static int mwifiex_pcie_probe(struct pci_dev *pdev,
{ {
struct pcie_service_card *card; struct pcie_service_card *card;
struct mwifiex_private *priv; struct mwifiex_private *priv;
struct pci_dev *pdev_host;
pr_debug("info: vendor=0x%4.04X device=0x%4.04X rev=%d\n", pr_debug("info: vendor=0x%4.04X device=0x%4.04X rev=%d\n",
pdev->vendor, pdev->device, pdev->revision); pdev->vendor, pdev->device, pdev->revision);
...@@ -219,9 +220,13 @@ static int mwifiex_pcie_probe(struct pci_dev *pdev, ...@@ -219,9 +220,13 @@ static int mwifiex_pcie_probe(struct pci_dev *pdev,
} }
priv = mwifiex_get_priv(card->adapter, MWIFIEX_BSS_ROLE_STA); priv = mwifiex_get_priv(card->adapter, MWIFIEX_BSS_ROLE_STA);
if (dmi_match(DMI_PRODUCT_NAME, "Edge Gateway 5000") || pdev_host = pci_get_subsys(PCI_ANY_ID, PCI_ANY_ID, 0x1028, 0x0720, NULL);
dmi_match(DMI_PRODUCT_NAME, "Edge Gateway 5100")) if (!pdev_host)
pdev_host = pci_get_subsys(PCI_ANY_ID, PCI_ANY_ID, 0x1028, 0x0733, NULL);
if (pdev_host) {
priv->is_edge_gateway = true; priv->is_edge_gateway = true;
pci_dev_put(pdev_host);
}
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment