diff --git a/mxm_wifiex/wlan_src/README_MLAN b/mxm_wifiex/wlan_src/README_MLAN index 800e769..0d3ccf6 100644 --- a/mxm_wifiex/wlan_src/README_MLAN +++ b/mxm_wifiex/wlan_src/README_MLAN @@ -60,9 +60,6 @@ hw_test=0|1 fw_serial=0|1 req_fw_nowait=0|1 - dfs53cfg=0|1|2 - SD8887: antcfg=0|1|2|0xffff - SD8897/SD8997: antcfg=0x11|0x13|0x33 slew_rate: Slew Rate Control value = 0|1|2|3 (0 is the slowest slew rate and 03 has the highest slew rate (default)) init_cfg= e.g. copy init_cfg.conf to firmware directory, init_cfg=nxp/init_cfg.conf @@ -99,7 +96,6 @@ pcie_int_mode=0|1|2 pcie_int_mode=0|1 ring_size=32|64|128|256|512 - aggrctrl=1|0 usb_aggr=0|1|2 low_power_mode_enable=0|1 When low power mode is enabled, the output power will be clipped at ~+10dBm and the @@ -257,21 +253,6 @@ hs_skip_count = hs_force_count = - Issue SDIO cmd52 read/write through proc. - Usage: - echo "sdcmd52rw= [data]" > /proc/mwlan/adapterX/config - where the parameters: - func: The function number to use (0-7) - reg: The address of the register - data: The value to write, read if the value is absent - For SDIO MMC driver, only function 0 and WLAN function access is allowed. - And there is a limitation for function 0 write, only vendor specific CCCR - registers (0xf0 -0xff) are permiited. - Examples: - echo "sdcmd52rw= 0 4" > /proc/mwlan/adapterX/config # read func 0 address 4 - cat /proc/mwlan/adapterX/config # display the register value - echo "sdcmd52rw= 1 3 0xf" > /proc/mwlan/adapterX/config # write 0xf to func 1 address 3 - Issue debug_dump command through proc. Usage: echo "debug_dump" > /proc/mwlan/adapterX/config @@ -1326,8 +1307,20 @@ hssetpara mlanutl mlanX hssetpara condition [GPIO# [gap]] (optional)[type ind_GPIO# [level]] (optional)[type event_force_ignore event_use_ext_gap ext_gap [gpio_wave]] (optional)[type hs_wakeup_interval] This command takes one (condition), two (condition and GPIO#) or three - (condition, GPIO# and gap).If more than three parameters, it can set different or multiple features indicating by type and - the detailed usage is the same as hscfg above. + (condition, GPIO# and gap).If more than three parameters, it can set different or multiple features indicating by type. + + If type=1, it will set indication gpio and its level. And the parameter format will be (condition, GPIO#,gap and type,ind_GPIO#) or + (condition, GPIO#, gap, type, ind_GPIO# and level). + + If type=2, it will set extend host sleep wakup method. And the parameter format will be (condition, GPIO#, gap, type, force_ignore, + use_ext_gap, ext_gap [gpio_wave]). gpio_wave parameter is optional and default value is 0(falling edge). Each bit of + event_force_ignore and event_use_ext_gap will be defined to one same event, and set one same event(same bit) in those two + parameters is not allowed. Set bit(s) in event_force_ignore means the event(s) will be forced ignore in firmware silently. + Set bit(s) in event_use_ext_gap mean the event(s) will use extend gap to inform host. Not set means not handle. + + If type=3, it will set hs_wakeup_interval. + + If no parameter provided, get is performed. where Condition is: bit 0 = 1 -- broadcast data @@ -1372,7 +1365,7 @@ hssetpara where ext_gap is the extend gap based on third parameter Gap. Only valid when use_ext_gap is used. The total gap is (Gap + (x+1)*ext_gap). x means the bit number(start from 0) of this reason in use_ext_gap. - where gpio_wave is used to set GPIO wave level for hscfg extend. 0 means falling edge, 1 means rising edge. + where gpio_wave is used to set GPIO wave level for host sleep extend. 0 means falling edge, 1 means rising edge. This parameter is optional and default value is 0. where hs_wakeup_interval is used to set host sleep wakeup interval and the type must set to 3 to indicate @@ -1410,7 +1403,7 @@ hssetpara mlanutl mlan0 hssetpara 2 1 0xa0 2 0 0x1 10 1: Unicast data Use GPIO 1 Gap 160 ms - type=2 to set extend hscfg feature + type=2 to set extend host sleep feature Force_ignore not used Disconnect will use extend gap to indicate host Use gap 170. @@ -1418,7 +1411,7 @@ hssetpara mlanutl mlan0 hssetpara 2 1 0xa0 2 0x1 0 0 0: Unicast data Use GPIO 1 Gap 160 ms - type=2 to set extend hscfg feature + type=2 to set extend host sleep feature Falling edge Force ignore Disconnect Extend gap not used diff --git a/mxm_wifiex/wlan_src/mlan/mlan_cmdevt.c b/mxm_wifiex/wlan_src/mlan/mlan_cmdevt.c index 24f23f6..f41a437 100644 --- a/mxm_wifiex/wlan_src/mlan/mlan_cmdevt.c +++ b/mxm_wifiex/wlan_src/mlan/mlan_cmdevt.c @@ -972,7 +972,11 @@ static t_u16 wlan_get_cmd_timeout(t_u16 cmd_id) case HOST_CMD_APCMD_STA_DEAUTH: #endif case HostCMD_APCMD_ACS_SCAN: +#ifdef IMX_SUPPORT + timeout = MRVDRV_TIMER_10S; +#else timeout = MRVDRV_TIMER_5S; +#endif break; default: #ifdef IMX_SUPPORT @@ -981,13 +985,13 @@ static t_u16 wlan_get_cmd_timeout(t_u16 cmd_id) * timeout are observed for commands like 0x5e, 0x16, 0xd1. * Observed that response has come just after default timeout of * 2 seconds for these commands. This random timeout is not - * observed when the default timeout is increased to 5 seconds - * (As an work around, Increase the default timeout to 5 + * observed when the default timeout is increased to 10 seconds + * (As an work around, Increase the default timeout to 10 * seconds. Need to further debug exact reason for delay in cmd * responses) * */ - timeout = MRVDRV_TIMER_1S * 5; + timeout = MRVDRV_TIMER_10S; #else timeout = MRVDRV_TIMER_1S * 2; #endif diff --git a/mxm_wifiex/wlan_src/mlan/mlan_decl.h b/mxm_wifiex/wlan_src/mlan/mlan_decl.h index 1688908..780c0b0 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 "266" +#define MLAN_RELEASE_VERSION "266.p2" /** Re-define generic data types for MLAN/MOAL */ /** Signed char (1-byte) */ @@ -435,8 +435,8 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH]; #define CARD_SD9098 "SD9098" /** SD9177 Card */ #define CARD_SD9177 "SD9177" -/** SD9177 Card */ -#define CARD_SD8801 "SD9177" +/** SD8801 Card */ +#define CARD_SD8801 "SD8801" #endif #ifdef PCIE diff --git a/mxm_wifiex/wlan_src/mlan/mlan_pcie.c b/mxm_wifiex/wlan_src/mlan/mlan_pcie.c index d7540c7..0c703fe 100644 --- a/mxm_wifiex/wlan_src/mlan/mlan_pcie.c +++ b/mxm_wifiex/wlan_src/mlan/mlan_pcie.c @@ -2581,7 +2581,7 @@ static void mlan_delay_for_sleep_cookie(mlan_adapter *pmadapter, } if (count >= max_delay_loop_cnt) - PRINTM(MERROR, "sleep cookie not found!!\n"); + PRINTM(MINFO, "sleep cookie not found!!\n"); } #endif diff --git a/mxm_wifiex/wlan_src/mlinux/mlan_decl.h b/mxm_wifiex/wlan_src/mlinux/mlan_decl.h index 1688908..780c0b0 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 "266" +#define MLAN_RELEASE_VERSION "266.p2" /** Re-define generic data types for MLAN/MOAL */ /** Signed char (1-byte) */ @@ -435,8 +435,8 @@ typedef t_u8 mlan_802_11_mac_addr[MLAN_MAC_ADDR_LENGTH]; #define CARD_SD9098 "SD9098" /** SD9177 Card */ #define CARD_SD9177 "SD9177" -/** SD9177 Card */ -#define CARD_SD8801 "SD9177" +/** SD8801 Card */ +#define CARD_SD8801 "SD8801" #endif #ifdef PCIE diff --git a/mxm_wifiex/wlan_src/mlinux/moal_init.c b/mxm_wifiex/wlan_src/mlinux/moal_init.c index 9d9f034..d46cb7d 100644 --- a/mxm_wifiex/wlan_src/mlinux/moal_init.c +++ b/mxm_wifiex/wlan_src/mlinux/moal_init.c @@ -115,6 +115,7 @@ static int slew_rate = 3; #endif int tx_work = 0; static int rps = 0; +static int tx_skb_clone = 0; #if defined(STA_SUPPORT) /** 802.11d configuration */ @@ -1096,6 +1097,19 @@ static mlan_status parse_cfg_read_block(t_u8 *data, t_u32 size, PRINTM(MMSG, "rps %s\n", moal_extflg_isset(handle, EXT_RPS) ? "on" : "off"); + } else if (strncmp(line, "tx_skb_clone", + strlen("tx_skb_clone")) == 0) { + if (parse_line_read_int(line, &out_data) != + MLAN_STATUS_SUCCESS) + goto err; + if (out_data) + moal_extflg_set(handle, EXT_TX_SKB_CLONE); + else + moal_extflg_clear(handle, EXT_TX_SKB_CLONE); + PRINTM(MMSG, "tx_skb_clone %s\n", + moal_extflg_isset(handle, EXT_TX_SKB_CLONE) ? + "on" : + "off"); } #if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 14, 0) else if (strncmp(line, "dfs_offload", strlen("dfs_offload")) == @@ -1442,6 +1456,8 @@ static void woal_setup_module_param(moal_handle *handle, moal_mod_para *params) moal_extflg_set(handle, EXT_TX_WORK); if (rps) moal_extflg_set(handle, EXT_RPS); + if (tx_skb_clone) + moal_extflg_set(handle, EXT_TX_SKB_CLONE); #if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 14, 0) if (dfs_offload) @@ -1660,6 +1676,12 @@ void woal_init_from_dev_tree(void) PRINTM(MIOCTL, "rps=0x%x\n", data); rps = data; } + } else if (!strncmp(prop->name, "tx_skb_clone", + strlen("tx_skb_clone"))) { + if (!of_property_read_u32(dt_node, prop->name, &data)) { + PRINTM(MIOCTL, "tx_skb_clone=0x%x\n", data); + tx_skb_clone = data; + } } #ifdef MFG_CMD_SUPPORT else if (!strncmp(prop->name, "mfg_mode", strlen("mfg_mode"))) { @@ -2201,6 +2223,10 @@ module_param(tx_work, uint, 0660); MODULE_PARM_DESC(tx_work, "1: Enable tx_work; 0: Disable tx_work"); module_param(rps, uint, 0660); MODULE_PARM_DESC(rps, "1: Enable rps; 0: Disable rps"); +module_param(tx_skb_clone, uint, 0660); +MODULE_PARM_DESC(tx_skb_clone, + "1: Enable tx_skb_clone; 0: Disable tx_skb_clone"); + module_param(dpd_data_cfg, charp, 0); MODULE_PARM_DESC(dpd_data_cfg, "DPD data file name"); module_param(init_cfg, charp, 0); diff --git a/mxm_wifiex/wlan_src/mlinux/moal_main.c b/mxm_wifiex/wlan_src/mlinux/moal_main.c index 80a446a..6be17e0 100644 --- a/mxm_wifiex/wlan_src/mlinux/moal_main.c +++ b/mxm_wifiex/wlan_src/mlinux/moal_main.c @@ -3027,9 +3027,8 @@ static mlan_status woal_req_dpd_data(moal_handle *handle, if (req_fw_nowait) { #if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 13, 0) if ((request_firmware_nowait( - THIS_MODULE, FW_ACTION_UEVENT, - dpd_data_cfg, handle->hotplug_device, - GFP_KERNEL, handle, + THIS_MODULE, FW_ACTION_UEVENT, dpd_data_cfg, + handle->hotplug_device, GFP_KERNEL, handle, woal_request_init_dpd_conf_callback)) < 0) { #else #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 32) @@ -3190,9 +3189,8 @@ static mlan_status woal_req_cal_data(moal_handle *handle, if (req_fw_nowait) { #if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 13, 0) if ((request_firmware_nowait( - THIS_MODULE, FW_ACTION_UEVENT, - cal_data_cfg, handle->hotplug_device, - GFP_KERNEL, handle, + THIS_MODULE, FW_ACTION_UEVENT, cal_data_cfg, + handle->hotplug_device, GFP_KERNEL, handle, woal_request_init_user_conf_callback)) < 0) { #else @@ -5815,15 +5813,17 @@ static int woal_start_xmit(moal_private *priv, struct sk_buff *skb) // kernel crash with cloned skb without copy // uap0 <-->muap0 bridge /* STA role need skb copy to improve throughput.but uAP unicast not */ - if ((skb->cloned && priv->bss_role == MLAN_BSS_ROLE_STA) || + if ((moal_extflg_isset(priv->phandle, EXT_TX_SKB_CLONE)) || + (skb->cloned && priv->bss_role == MLAN_BSS_ROLE_STA) || (skb->cloned && priv->bss_role == MLAN_BSS_ROLE_UAP && (!is_unicast_ether_addr(((struct ethhdr *)skb->data)->h_dest))) || (skb_headroom(skb) < (MLAN_MIN_DATA_HEADER_LEN + sizeof(mlan_buffer) + priv->extra_tx_head_len))) { - PRINTM(MWARN, - "Tx: skb cloned %d or Insufficient skb headroom %d\n", - skb->cloned, skb_headroom(skb)); + PRINTM(MINFO, + "Tx: skb cloned %d skb headroom %d tx_skb_clone=%d \n", + skb->cloned, skb_headroom(skb), + moal_extflg_isset(priv->phandle, EXT_TX_SKB_CLONE)); /* Insufficient skb headroom - allocate a new skb */ new_skb = skb_realloc_headroom( skb, MLAN_MIN_DATA_HEADER_LEN + sizeof(mlan_buffer) + @@ -9069,6 +9069,14 @@ moal_handle *woal_add_card(void *card, struct device *dev, moal_if_ops *if_ops, /* Init module parameters */ woal_init_module_param(handle); +#ifdef IMX_SUPPORT +#ifdef SDIO + if (IS_SD(handle->card_type)) { + moal_extflg_set(handle, EXT_TX_WORK); + moal_extflg_set(handle, EXT_TX_SKB_CLONE); + } +#endif +#endif if (handle->params.mac_addr #ifdef MFG_CMD_SUPPORT diff --git a/mxm_wifiex/wlan_src/mlinux/moal_main.h b/mxm_wifiex/wlan_src/mlinux/moal_main.h index 186c685..1ddd4a1 100644 --- a/mxm_wifiex/wlan_src/mlinux/moal_main.h +++ b/mxm_wifiex/wlan_src/mlinux/moal_main.h @@ -1693,6 +1693,7 @@ enum ext_mod_params { #endif EXT_TX_WORK, EXT_RPS, + EXT_TX_SKB_CLONE, EXT_MAX_PARAM, };