summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/marvell/mwifiex/pcie.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/marvell/mwifiex/pcie.c')
-rw-r--r--drivers/net/wireless/marvell/mwifiex/pcie.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/net/wireless/marvell/mwifiex/pcie.c b/drivers/net/wireless/marvell/mwifiex/pcie.c
index 248b7b3..a6d643c 100644
--- a/drivers/net/wireless/marvell/mwifiex/pcie.c
+++ b/drivers/net/wireless/marvell/mwifiex/pcie.c
@@ -320,6 +320,7 @@ static void mwifiex_pcie_shutdown(struct pci_dev *pdev)
return;
}
+#if LINUX_VERSION_IS_GEQ(4,16,0)
static void mwifiex_pcie_coredump(struct device *dev)
{
struct pci_dev *pdev;
@@ -332,6 +333,7 @@ static void mwifiex_pcie_coredump(struct device *dev)
&card->work_flags))
schedule_work(&card->work);
}
+#endif
static const struct pci_device_id mwifiex_ids[] = {
{
@@ -428,7 +430,7 @@ struct pci_error_handlers mwifiex_pcie_err_handler = {
#if LINUX_VERSION_IS_GEQ(4,13,0)
.reset_prepare = mwifiex_pcie_reset_prepare,
.reset_done = mwifiex_pcie_reset_done,
-#else
+#elif LINUX_VERSION_IS_GEQ(3,16,0)
.reset_notify = mwifiex_pcie_reset_prepare_notify,
#endif
@@ -447,7 +449,9 @@ static struct pci_driver __refdata mwifiex_pcie = {
.probe = mwifiex_pcie_probe,
.remove = mwifiex_pcie_remove,
.driver = {
+#if LINUX_VERSION_IS_GEQ(4,16,0)
.coredump = mwifiex_pcie_coredump,
+#endif
#ifdef CONFIG_PM_SLEEP
.pm = &mwifiex_pcie_pm_ops,
#endif
@@ -2818,11 +2822,14 @@ static void mwifiex_pcie_device_dump_work(struct mwifiex_adapter *adapter)
static void mwifiex_pcie_card_reset_work(struct mwifiex_adapter *adapter)
{
struct pcie_service_card *card = adapter->card;
-
+#if LINUX_VERSION_IS_LESS(3,14,0)
+ pci_reset_function(card->dev);
+#else
/* We can't afford to wait here; remove() might be waiting on us. If we
* can't grab the device lock, maybe we'll get another chance later.
*/
pci_try_reset_function(card->dev);
+#endif
}
static void mwifiex_pcie_work(struct work_struct *work)