mxm_wifiex: update to mxm5x17247.p5 release

changes:
1. Fixed Mu-MIMO not working issue.
2. Added a workaround for suspend-resume failure to block suspend when
   WLAN is in connected state.

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
Reviewed-by: yang.tian <yang.tian@nxp.com>
This commit is contained in:
Sherry Sun 2021-06-02 09:47:10 +08:00 committed by yang.tian
parent 467f24a974
commit b28f182943
8 changed files with 102 additions and 70 deletions

View file

@ -923,7 +923,7 @@ static int prepare_host_cmd_buffer(FILE *fp, char *cmd_name, t_u8 *buf)
}
#define SUBID_OFFSET 2
static t_u16 supported_subcmd[] = {0x111, 0x11b, 0x11e};
static t_u16 supported_subcmd[] = {0x104, 0x111, 0x11b, 0x11e};
static int check_if_hostcmd_subcmd_allowed(t_u8 *buf)
{

View file

@ -974,7 +974,7 @@ static t_u16 wlan_get_cmd_timeout(t_u16 cmd_id)
timeout = MRVDRV_TIMER_5S;
break;
default:
timeout = MRVDRV_TIMER_1S * 2;
timeout = MRVDRV_TIMER_1S * 5;
break;
}
LEAVE();

View file

@ -24,7 +24,7 @@
#define _MLAN_DECL_H_
/** MLAN release version */
#define MLAN_RELEASE_VERSION "247.p1"
#define MLAN_RELEASE_VERSION "247.p5"
/** Re-define generic data types for MLAN/MOAL */
/** Signed char (1-byte) */

View file

@ -24,7 +24,7 @@
#define _MLAN_DECL_H_
/** MLAN release version */
#define MLAN_RELEASE_VERSION "247.p1"
#define MLAN_RELEASE_VERSION "247.p5"
/** Re-define generic data types for MLAN/MOAL */
/** Signed char (1-byte) */

View file

@ -30,10 +30,6 @@ Change log:
#include "moal_pcie.h"
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 35)
#include <linux/pm_qos.h>
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 70)
#ifdef IMX_SUPPORT
#include <linux/busfreq-imx.h>
@ -44,11 +40,6 @@ Change log:
Local Variables
********************************************************/
#define DRV_NAME "NXP mdriver PCIe"
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 35)
#ifdef IMX_SUPPORT
static struct pm_qos_request woal_pcie_pm_qos_req;
#endif
#endif
/* PCIE resume handler */
static int woal_pcie_resume(struct pci_dev *pdev);
@ -128,50 +119,6 @@ static moal_if_ops pcie_ops;
Local Functions
********************************************************/
void woal_request_pmqos_busfreq_high(void)
{
#if LINUX_VERSION_CODE <= KERNEL_VERSION(5, 6, 0)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 35)
#ifdef IMX_SUPPORT
pm_qos_add_request(&woal_pcie_pm_qos_req, PM_QOS_CPU_DMA_LATENCY, 0);
#endif
#endif
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(5, 7, 0)
#ifdef IMX_SUPPORT
cpu_latency_qos_add_request(&woal_pcie_pm_qos_req, 0);
#endif
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 70)
#ifdef IMX_SUPPORT
request_bus_freq(BUS_FREQ_HIGH);
#endif
#endif
return;
}
void woal_release_pmqos_busfreq_high(void)
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 70)
#ifdef IMX_SUPPORT
release_bus_freq(BUS_FREQ_HIGH);
#endif
#endif
#if LINUX_VERSION_CODE <= KERNEL_VERSION(5, 6, 0)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 35)
#ifdef IMX_SUPPORT
pm_qos_remove_request(&woal_pcie_pm_qos_req);
#endif
#endif
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(5, 7, 0)
#ifdef IMX_SUPPORT
cpu_latency_qos_remove_request(&woal_pcie_pm_qos_req);
#endif
#endif
return;
}
static mlan_status woal_pcie_preinit(struct pci_dev *pdev);
/** @brief This function updates the card types
@ -586,6 +533,23 @@ static int woal_pcie_suspend(struct pci_dev *pdev, pm_message_t state)
if (handle->priv[i] &&
(GET_BSS_ROLE(handle->priv[i]) == MLAN_BSS_ROLE_STA))
woal_cancel_scan(handle->priv[i], MOAL_IOCTL_WAIT);
#ifdef PCIE9098
if (IS_PCIE9098(handle->card_type)) {
if ((cardp->dev->device ==
PCIE_DEVICE_ID_NXP_88W9098P_FN0) ||
(cardp->dev->device ==
PCIE_DEVICE_ID_NXP_88W9098P_FN1)) {
if (handle->priv[i] &&
handle->priv[i]->media_connected) {
PRINTM(MMSG,
"Suspend not allowed while connected\n");
ret = -EBUSY;
goto done;
}
}
}
#endif
}
handle->suspend_fail = MFALSE;
memset(&pm_info, 0, sizeof(pm_info));
@ -1114,10 +1078,8 @@ static mlan_status woal_pcie_preinit(struct pci_dev *pdev)
{
int ret;
#ifndef IMX_SUPPORT
if (pdev->multifunction)
device_disable_async_suspend(&pdev->dev);
#endif
ret = pci_enable_device(pdev);

View file

@ -140,9 +140,4 @@ mlan_status woal_pcie_bus_register(void);
/** Unregister from bus driver function */
void woal_pcie_bus_unregister(void);
/* pmqos busfreq request handler*/
void woal_request_pmqos_busfreq_high(void);
/* pmqos busfreq release handler*/
void woal_release_pmqos_busfreq_high(void);
#endif /* _MOAL_PCIE_H_ */

View file

@ -44,6 +44,24 @@ Change log:
#endif
#include <asm/div64.h>
#if defined(PCIE) || defined(SDIO)
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 70)
#ifdef IMX_SUPPORT
#include <linux/busfreq-imx.h>
#endif
#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 35)
#include <linux/pm_qos.h>
#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 35)
#ifdef IMX_SUPPORT
static struct pm_qos_request woal_pm_qos_req;
#endif
#endif
#endif /*defined(PCIE) || defined(SDIO)*/
/********************************************************
Local Variables
********************************************************/
@ -1525,6 +1543,57 @@ done:
return status;
}
#if defined(PCIE) || defined(SDIO)
void woal_request_busfreq_pmqos_add(t_u16 card_type)
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 70)
#ifdef IMX_SUPPORT
if (IS_PCIE(card_type)) {
request_bus_freq(BUS_FREQ_HIGH);
}
#endif
#endif
#if LINUX_VERSION_CODE <= KERNEL_VERSION(5, 6, 0)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 35)
#ifdef IMX_SUPPORT
pm_qos_add_request(&woal_pm_qos_req, PM_QOS_CPU_DMA_LATENCY, 0);
#endif
#endif
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(5, 7, 0)
#ifdef IMX_SUPPORT
cpu_latency_qos_add_request(&woal_pm_qos_req, 0);
#endif
#endif
return;
}
void woal_release_busfreq_pmqos_remove(t_u16 card_type)
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 70)
#ifdef IMX_SUPPORT
if (IS_PCIE(card_type)) {
release_bus_freq(BUS_FREQ_HIGH);
}
#endif
#endif
#if LINUX_VERSION_CODE <= KERNEL_VERSION(5, 6, 0)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 35)
#ifdef IMX_SUPPORT
pm_qos_remove_request(&woal_pm_qos_req);
#endif
#endif
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(5, 7, 0)
#ifdef IMX_SUPPORT
cpu_latency_qos_remove_request(&woal_pm_qos_req);
#endif
#endif
return;
}
#endif /*defined(PCIE) || defined(SDIO)*/
/**
* @brief This function checks media_connected state for
* BSS types UAP/STA/P2P_GO/GC
@ -1561,17 +1630,15 @@ static void moal_connection_status_check_pmqos(t_void *pmoal)
if ((woal_check_media_connected(pmoal) == MTRUE)) {
if ((pmhandle->request_pm == MFALSE)) {
pmhandle->request_pm = MTRUE;
#ifdef PCIE
if (IS_PCIE(pmhandle->card_type))
woal_request_pmqos_busfreq_high();
#if defined(PCIE) || defined(SDIO)
woal_request_busfreq_pmqos_add(pmhandle->card_type);
#endif
}
} else {
if (pmhandle->request_pm == MTRUE) {
pmhandle->request_pm = MFALSE;
#ifdef PCIE
if (IS_PCIE(pmhandle->card_type))
woal_release_pmqos_busfreq_high();
#if defined(PCIE) || defined(SDIO)
woal_release_busfreq_pmqos_remove(pmhandle->card_type);
#endif
}
}

View file

@ -118,4 +118,12 @@ mlan_status moal_stop_timer(t_void *pmoal, t_void *ptimer);
void moal_tp_accounting(t_void *pmoal, void *buf, t_u32 drop_point);
void moal_tp_accounting_rx_param(t_void *pmoal, unsigned int type,
unsigned int rsvd1);
#if defined(PCIE) || defined(SDIO)
/* pmqos busfreq add request handler*/
void woal_request_busfreq_pmqos_add(t_u16 card_type);
/* pmqos busfreq remove handler*/
void woal_release_busfreq_pmqos_remove(t_u16 card_type);
#endif
#endif /*_MOAL_H */