mwifiex: mlinux: moal_pcie: add pm_qos support

Enable pm_qos to avoid system enter idle:
- to avoid suspend failed on i.MX8MP platform
- to get high performance for pcie wlan

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
This commit is contained in:
Fugang Duan 2020-03-02 17:28:05 +08:00
parent 82481e5f16
commit a33aa6ef80
1 changed files with 5 additions and 0 deletions

View File

@ -25,6 +25,7 @@ Change log:
********************************************************/
#include <linux/firmware.h>
#include <linux/pm_qos.h>
#include "moal_pcie.h"
@ -33,6 +34,7 @@ Change log:
********************************************************/
#define DRV_NAME "Marvell mdriver PCIe"
static struct pm_qos_request woal_pcie_pm_qos_req;
/* PCIE resume handler */
static int woal_pcie_resume(struct pci_dev *pdev);
@ -956,9 +958,11 @@ woal_bus_register(void)
mlan_status ret = MLAN_STATUS_SUCCESS;
ENTER();
pm_qos_add_request(&woal_pcie_pm_qos_req, PM_QOS_CPU_DMA_LATENCY, 0);
/* API registers the Marvell PCIE driver */
if (pci_register_driver(&wlan_pcie)) {
PRINTM(MFATAL, "PCIE Driver Registration Failed \n");
pm_qos_remove_request(&woal_pcie_pm_qos_req);
ret = MLAN_STATUS_FAILURE;
}
@ -978,6 +982,7 @@ woal_bus_unregister(void)
/* PCIE Driver Unregistration */
pci_unregister_driver(&wlan_pcie);
pm_qos_remove_request(&woal_pcie_pm_qos_req);
LEAVE();
}