diff --git a/mxm_wifiex/wlan_src/mlan/mlan_decl.h b/mxm_wifiex/wlan_src/mlan/mlan_decl.h index 319dc7c..9812046 100644 --- a/mxm_wifiex/wlan_src/mlan/mlan_decl.h +++ b/mxm_wifiex/wlan_src/mlan/mlan_decl.h @@ -24,7 +24,7 @@ #define _MLAN_DECL_H_ /** MLAN release version */ -#define MLAN_RELEASE_VERSION "283" +#define MLAN_RELEASE_VERSION "283.p2" /** Re-define generic data types for MLAN/MOAL */ /** Signed char (1-byte) */ diff --git a/mxm_wifiex/wlan_src/mlinux/mlan_decl.h b/mxm_wifiex/wlan_src/mlinux/mlan_decl.h index 319dc7c..9812046 100644 --- a/mxm_wifiex/wlan_src/mlinux/mlan_decl.h +++ b/mxm_wifiex/wlan_src/mlinux/mlan_decl.h @@ -24,7 +24,7 @@ #define _MLAN_DECL_H_ /** MLAN release version */ -#define MLAN_RELEASE_VERSION "283" +#define MLAN_RELEASE_VERSION "283.p2" /** Re-define generic data types for MLAN/MOAL */ /** Signed char (1-byte) */ diff --git a/mxm_wifiex/wlan_src/mlinux/moal_init.c b/mxm_wifiex/wlan_src/mlinux/moal_init.c index dfeb7da..f16dfb1 100644 --- a/mxm_wifiex/wlan_src/mlinux/moal_init.c +++ b/mxm_wifiex/wlan_src/mlinux/moal_init.c @@ -125,7 +125,11 @@ static int slew_rate = 3; int tx_work = 0; static int rps = 0; static int tx_skb_clone = 0; +#ifdef IMX_SUPPORT +static int pmqos = 1; +#else static int pmqos = 0; +#endif #if defined(STA_SUPPORT) /** 802.11d configuration */ diff --git a/mxm_wifiex/wlan_src/mlinux/moal_main.h b/mxm_wifiex/wlan_src/mlinux/moal_main.h index 0446fee..af8cd0d 100644 --- a/mxm_wifiex/wlan_src/mlinux/moal_main.h +++ b/mxm_wifiex/wlan_src/mlinux/moal_main.h @@ -133,6 +133,10 @@ Change log: #include #endif /* IMX_SUPPORT */ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 35) +#include +#endif + #ifndef MIN /** Find minimum */ #define MIN(a, b) ((a) < (b) ? (a) : (b)) @@ -2255,6 +2259,15 @@ struct _moal_handle { BOOLEAN is_tp_acnt_timer_set; t_u8 request_pm; +#ifdef IMX_SUPPORT +#if LINUX_VERSION_CODE <= KERNEL_VERSION(5, 6, 0) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 35) + struct dev_pm_qos_request woal_pm_qos_req; +#endif +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(5, 7, 0) + struct pm_qos_request woal_pm_qos_req; +#endif +#endif }; /** diff --git a/mxm_wifiex/wlan_src/mlinux/moal_shim.c b/mxm_wifiex/wlan_src/mlinux/moal_shim.c index 663fa48..92fd93b 100644 --- a/mxm_wifiex/wlan_src/mlinux/moal_shim.c +++ b/mxm_wifiex/wlan_src/mlinux/moal_shim.c @@ -51,15 +51,6 @@ Change log: #endif #endif -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 35) -#include -#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)*/ /******************************************************** @@ -1592,12 +1583,13 @@ void woal_request_busfreq_pmqos_add(t_void *handle) #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); + pm_qos_add_request(&pmhandle->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); + cpu_latency_qos_add_request(&pmhandle->woal_pm_qos_req, 0); #endif #endif } @@ -1619,12 +1611,12 @@ void woal_release_busfreq_pmqos_remove(t_void *handle) #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); + pm_qos_remove_request(&pmhandle->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); + cpu_latency_qos_remove_request(&pmhandle->woal_pm_qos_req); #endif #endif }