88Q9098/88W8987 connectivity problems with station/AP modes both enabled simultaneously

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

88Q9098/88W8987 connectivity problems with station/AP modes both enabled simultaneously

Jump to solution
2,601 Views
jrhaws
Contributor I

Hey everyone!

I'm running an 88Q9098 in SDIO/UART mode attached to an iMX6ULL EVK board running 5.10 Linux with the latest mwifiex community driver.  I'm running into a few problems when I have things configured in certain ways.

First, I would like to have the device operate in dual AP mode (one AP in 5GHz on one phy and another in 2.4GHz on the other one) as well as be connected in station mode on either of those frequencies.  This works fine for a while, but after running a bunch of data on a 2.4GHz connection the whole driver seems to crash

[27570.946553] ------------[ cut here ]------------
[27570.951399] WARNING: CPU: 0 PID: 0 at net/sched/sch_generic.c:485 dev_watchdog+0x314/0x318
[27570.960096] NETDEV WATCHDOG: mlan0 (wlan_sdio): transmit queue 2 timed out
[27570.967264] Modules linked in: can_raw xt_conntrack xt_MASQUERADE nf_conntrack_netlink nfnetlink xfrm_user xt_addrtype iptable_filter iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 ip_tables x_tables snd_soc_fsl_asoc_card ov5640 v4l2_fwnode snd_soc_imx_audmux snd_soc_simple_card_utils snd_ac97_codec videodev ac97_bus mc snd_soc_wm8960 snd_soc_fsl_sai imx_pcm_dma snd_soc_fsl_asrc snd_soc_core imx_sdma snd_pcm_dmaengine snd_pcm snd_timer snd soundcore flexcan can_dev sch_fq_codel vxcan vcan moal(O) mlan(O) lz4 lz4_compress cfg80211 zram can_isotp can_gw can fuse configfs
[27571.021138] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G           O      5.10.93-lmp-standard #1
[27571.029841] Hardware name: Freescale i.MX6 Ultralite (Device Tree)
[27571.036140] Backtrace:
[27571.038745] [<c0cb740c>] (dump_backtrace) from [<c0cb77ac>] (show_stack+0x20/0x24)
[27571.046482]  r7:000001e5 r6:60010113 r5:00000000 r4:c11f2b18
[27571.052284] [<c0cb778c>] (show_stack) from [<c0cbb804>] (dump_stack+0x90/0xa4)
[27571.059680] [<c0cbb774>] (dump_stack) from [<c0136be0>] (__warn+0xfc/0x158)
[27571.066781]  r7:000001e5 r6:00000009 r5:c0abdec0 r4:c0f528dc
[27571.072576] [<c0136ae4>] (__warn) from [<c0cb8020>] (warn_slowpath_fmt+0x8c/0xc0)
[27571.080214]  r7:000001e5 r6:c0f528dc r5:c0f528a0 r4:c1100000
[27571.086022] [<c0cb7f98>] (warn_slowpath_fmt) from [<c0abdec0>] (dev_watchdog+0x314/0x318)
[27571.094368]  r9:ffffffff r8:c22b6000 r7:c22b6254 r6:c1102d00 r5:c22b62a8 r4:00000002
[27571.102292] [<c0abdbac>] (dev_watchdog) from [<c01ce9a0>] (call_timer_fn+0x50/0x22c)
[27571.110208]  r10:c0abdbac r9:d3b48640 r8:00299d40 r7:00000101 r6:c0abdbac r5:c22b62a8
[27571.118180]  r4:c124cfa0
[27571.120841] [<c01ce950>] (call_timer_fn) from [<c01cedc4>] (__run_timers.part.0+0x248/0x35c)
[27571.129453]  r9:d3b48640 r8:00299d40 r7:c124cfa0 r6:00000000 r5:c1101d1c r4:c22b62a8
[27571.137376] [<c01ceb7c>] (__run_timers.part.0) from [<c01cef28>] (run_timer_softirq+0x50/0x80)
[27571.146162]  r10:00000002 r9:00000101 r8:c1100000 r7:c124c740 r6:c1102d00 r5:c1104550
[27571.154130]  r4:c10a3640
[27571.156788] [<c01ceed8>] (run_timer_softirq) from [<c010154c>] (__do_softirq+0x164/0x4ac)
[27571.165125]  r7:c124c740 r6:00000001 r5:00000002 r4:c1102084
[27571.170934] [<c01013e8>] (__do_softirq) from [<c013ee78>] (irq_exit+0x118/0x11c)
[27571.178495]  r10:c1101e10 r9:c1101e70 r8:00000001 r7:00000000 r6:c10a9d5c r5:00000000
[27571.186462]  r4:c10aab00
[27571.189122] [<c013ed60>] (irq_exit) from [<c01a3798>] (__handle_domain_irq+0xbc/0x128)
[27571.197184]  r5:00000000 r4:c10a9d5c
[27571.200888] [<c01a36dc>] (__handle_domain_irq) from [<c01013d4>] (gic_handle_irq+0x8c/0xa0)
[27571.209414]  r10:c124d420 r9:c1101e70 r8:de80200c r7:c10a9d68 r6:de802000 r5:c11f2bd8
[27571.217382]  r4:c11048cc
[27571.220028] [<c0101348>] (gic_handle_irq) from [<c0100b0c>] (__irq_svc+0x6c/0xa8)
[27571.227650] Exception stack(0xc1101e70 to 0xc1101eb8)
[27571.232822] 1e60:                                     00000000 c0ea6de0 00000000 d3b4ff40
[27571.241169] 1e80: 00000000 d3b4f270 c110b860 00000000 00001913 00000000 c124d420 c1101efc
[27571.249504] 1ea0: c1101e98 c1101ec0 c0cc418c c098efd4 60010013 ffffffff
[27571.256262]  r9:c1100000 r8:00001913 r7:c1101ea4 r6:ffffffff r5:60010013 r4:c098efd4
[27571.264187] [<c098ee18>] (cpuidle_enter_state) from [<c098f35c>] (cpuidle_enter+0x40/0x50)
[27571.272627]  r10:c1100000 r9:00001913 r8:ae56d800 r7:c1103fd8 r6:00000000 r5:c110b860
[27571.280593]  r4:d3b4f270
[27571.283246] [<c098f31c>] (cpuidle_enter) from [<c0173434>] (do_idle+0x234/0x2ec)
[27571.290808]  r9:c110b860 r8:d3b4f270 r7:c1103fd8 r6:c1103f90 r5:c1100000 r4:00000000
[27571.298718] [<c0173200>] (do_idle) from [<c017380c>] (cpu_startup_entry+0x28/0x2c)
[27571.306451]  r10:c42c56d2 r9:c0e87714 r8:c12a7964 r7:c1103f40 r6:00000001 r5:00000002
[27571.314418]  r4:000000d9
[27571.317068] [<c01737e4>] (cpu_startup_entry) from [<c0cc4284>] (rest_init+0xd4/0xdc)
[27571.324978] [<c0cc41b0>] (rest_init) from [<c1000ae0>] (arch_call_rest_init+0x18/0x1c)
[27571.333043]  r5:c1100000 r4:c1276068
[27571.336740] [<c1000ac8>] (arch_call_rest_init) from [<c1001110>] (start_kernel+0x5b4/0x5f4)
[27571.345261] [<c1000b5c>] (start_kernel) from [<00000000>] (0x0)
[27571.351685] ---[ end trace e85a66773c765f1a ]---
[27571.356561] 2727273 : mlan0 (bss=0): Tx timeout (1)
[27581.825860] 2728320 : mlan0 (bss=0): Tx timeout (2)
[27592.065356] 2729344 : mlan0 (bss=0): Tx timeout (3)
[27602.944920] 2730432 : mlan0 (bss=0): Tx timeout (4)
[27613.824120] 2731520 : mlan0 (bss=0): Tx timeout (5)
[27624.063472] 2732544 : mlan0 (bss=0): Tx timeout (6)
[27634.942838] 2733632 : mlan0 (bss=0): Tx timeout (7)
[27645.822233] 2734720 : mlan0 (bss=0): Tx timeout (8)
[27656.061596] 2735744 : mlan0 (bss=0): Tx timeout (9)
[27666.940893] 2736832 : mlan0 (bss=0): Tx timeout (10)
[27666.946142] ------------mlan_debug_info-------------
[27666.951324] mlan_processing =0
[27666.954437] main_lock_flag =0
[27666.957448] main_process_cnt =319746
[27666.961129] delay_task_flag =0
[27666.964342] mlan_rx_processing =0
[27666.967709] rx_pkts_queued=0
[27666.970632] tx_pkts_queued=28
[27666.973696] fw_hang_report = 0
[27666.976848] num_cmd_timeout = 0
[27666.980038] Timeout cmd id = 0x0, act = 0x0
[27666.984326] last_cmd_index = 5
[27666.987447] last_cmd_id = 0x107 0x10d 0x107 0x10d 0x107 0x10d 0x107 0x10d 0x107 0x10d
[27666.995523] last_cmd_act = 0x1 0x1 0x1 0x1 0x1 0x1 0x1 0x1 0x1 0x1
[27667.001900] last_cmd_resp_index = 5
[27667.005457] last_cmd_resp_id = 0x8107 0x810d 0x8107 0x810d 0x8107 0x810d 0x8107 0x810d 0x8107 0x810d
[27667.014795] last_event_index = 1
[27667.018131] last_event = 0x55 0x55 0x55 0x58 0x58 0x7f 0x55 0x5f 0x55 0x55
[27667.018148] num_data_h2c_failure = 0
[27667.028869] num_cmd_h2c_failure = 0
[27667.032445] num_alloc_buffer_failure = 0
[27667.036418] num_pkt_dropped = 0
[27667.039616] num_data_c2h_failure = 0
[27667.043287] num_cmdevt_c2h_failure = 0
[27667.047085] num_int_read_failure = 0
[27667.050700] last_int_status = 1
[27667.053935] mp_rd_bitmap=0x0 curr_rd_port=0x1b
[27667.058430] mp_wr_bitmap=0x0 curr_wr_port=0xf
[27667.062889] mp_data_port_mask=0xffffffff
[27667.066861] last_recv_rd_bitmap=0x4000000 mp_invalid_update=0
[27667.072709] last_recv_wr_bitmap=0xf8007fff last_mp_index = 4
[27667.078510] mp_wr_bitmap: 0x7000 mp_wr_ports=0x1000b len=256 curr_wr_port=0xc
               0x5c 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
[27667.094268] mp_wr_bitmap: 0x6000 mp_wr_ports=0x1000c len=256 curr_wr_port=0xd
               0x5c 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
[27667.110012] mp_wr_bitmap: 0x4000 mp_wr_ports=0x1000d len=256 curr_wr_port=0xe
               0x5c 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
[27667.125756] mp_wr_bitmap: 0x0 mp_wr_ports=0x1000e len=256 curr_wr_port=0xf
               0x5c 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
[27667.141239] mp_wr_bitmap: 0x7fc0 mp_wr_ports=0x10005 len=256 curr_wr_port=0x6
               0x5c 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
[27667.156977] mp_wr_bitmap: 0x7f80 mp_wr_ports=0x10006 len=256 curr_wr_port=0x7
               0x5c 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
[27667.172718] mp_wr_bitmap: 0x7f00 mp_wr_ports=0x10007 len=256 curr_wr_port=0x8
               0x5c 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
[27667.188462] mp_wr_bitmap: 0x7e00 mp_wr_ports=0x10008 len=256 curr_wr_port=0x9
               0x5c 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
[27667.204204] mp_wr_bitmap: 0x7c00 mp_wr_ports=0x10009 len=256 curr_wr_port=0xa
               0x5c 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
[27667.219941] mp_wr_bitmap: 0x7800 mp_wr_ports=0x1000a len=256 curr_wr_port=0xb
               0x5c 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
[27667.235648] num_event_deauth = 0
[27667.238919] num_event_disassoc = 0
[27667.242407] num_event_link_lost = 0
[27667.245938] num_cmd_deauth = 0
[27667.249033] num_cmd_assoc_success = 3
[27667.252788] num_cmd_assoc_failure = 0
[27667.256497] num_cons_assoc_failure = 0
[27667.260288] cmd_resp_received = 0
[27667.263693] event_received = 0
[27667.266790] max_tx_buf_size = 4096
[27667.270232] tx_buf_size = 3072
[27667.273374] curr_tx_buf_size = 3072
[27667.276907] bypass_pkt_count=828
[27667.280176] data_sent=1 cmd_sent=0
[27667.283662] data_sent_cnt=0
[27667.286498] ps_mode=1 ps_state=0
[27667.289769] wakeup_dev_req=0 wakeup_tries=0 wakeup_timeout=0
[27667.295523] hs_configured=0 hs_activated=0
[27667.299666] pps_uapsd_mode=0 sleep_pd=0
[27667.303587] tx_lock_flag = 0
[27667.306512] port_open = 1
[27667.309175] scan_processing = 0
[27667.312411] ralist ra: a2:c9:eb:21:bb:aa tid=0 pkts=28 pause=0
[27667.318298] ------------mlan_debug_info End-------------
[27667.323723] Driver version = SD9098----17.92.1.p98.1-MM5X17299.p1-GPL-(FP92)
[27667.330967] main_state = 4
[27667.333714] ioctl_pending = 0
[27667.336720] tx_pending = 856
[27667.339641] wmm_tx_pending[0] = 0
[27667.343048] wmm_tx_pending[1] = 0
[27667.346409] wmm_tx_pending[2] = 800
[27667.349937] wmm_tx_pending[3] = 0
[27667.353344] rx_pending = 0
[27667.356095] lock_count = 79
[27667.358925] malloc_count = 65
[27667.361972] mbufalloc_count = 56
[27667.365246] hs_skip_count = 0
[27667.368250] hs_force_count = 0
[27667.371397] Media state = "Connected"
[27667.375104] carrier on
[27667.377502] tx queue 0: started
[27667.380683] tx queue 1: started
[27667.383915] tx queue 2: stopped
[27667.387102] tx queue 3: started
[27667.390286] mlan0: num_tx_timeout = 10
[27667.394132] uap0: num_tx_timeout = 0
[27667.397755] wfd0: num_tx_timeout = 0
[27667.411210] Block woal_cfg80211_del_key in abnormal driver state
[27667.417320] Block woal_cfg80211_del_key in abnormal driver state
[27667.424321] Block woal_cfg80211_del_key in abnormal driver state
[27667.430482] Block woal_cfg80211_del_key in abnormal driver state
[27667.436779] Block woal_cfg80211_del_key in abnormal driver state
[27667.442995] Block woal_cfg80211_del_key in abnormal driver state
[27667.581294] Fail to set EXTCAP IE
[27667.584695] woal_do_scan fails!
[27668.611892] Fail to set EXTCAP IE
[27668.615342] woal_do_scan fails!
[27669.625811] Fail to set EXTCAP IE
[27669.629260] woal_do_scan fails!
[27670.640028] Fail to set EXTCAP IE
[27670.643633] woal_do_scan fails!
[27671.658755] Fail to set EXTCAP IE
[27671.664245] woal_do_scan fails!
[27671.713117] net_ratelimit: 95 callbacks suppressed

I thought this was odd and checked a few settings, but didn't really change anything and ran the test again and got this dump in dmesg:

[ 1622.590000] ------------[ cut here ]------------
[ 1622.605567] WARNING: CPU: 0 PID: 402 at net/wireless/util.c:1349 cfg80211_calculate_bitrate_he+0x240/0x34c [cfg80211]
[ 1622.632922] Modules linked in: xt_conntrack xt_MASQUERADE nf_conntrack_netlink nfnetlink xfrm_user xt_addrtype iptable_filter iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 ip_tables x_tables can_raw snd_soc_fsl_asoc_card ov5640 v4l2_fwnode snd_soc_imx_audmux snd_soc_simple_card_utils snd_ac97_codec videodev ac97_bus snd_soc_wm8960 mc snd_soc_fsl_sai snd_soc_fsl_asrc imx_pcm_dma snd_soc_core imx_sdma snd_pcm_dmaengine snd_pcm snd_timer snd flexcan soundcore can_dev sch_fq_codel vxcan vcan moal(O) mlan(O) cfg80211 lz4 lz4_compress zram can_isotp can_gw can fuse configfs
[ 1622.694574] CPU: 0 PID: 402 Comm: systemd-network Tainted: G           O      5.10.93-lmp-standard #1
[ 1622.703851] Hardware name: Freescale i.MX6 Ultralite (Device Tree)
[ 1622.710053] Backtrace:
[ 1622.712544] [<c0cb740c>] (dump_backtrace) from [<c0cb77ac>] (show_stack+0x20/0x24)
[ 1622.720145]  r7:00000545 r6:600f0013 r5:00000000 r4:c11f2b18
[ 1622.725831] [<c0cb778c>] (show_stack) from [<c0cbb804>] (dump_stack+0x90/0xa4)
[ 1622.733094] [<c0cbb774>] (dump_stack) from [<c0136be0>] (__warn+0xfc/0x158)
[ 1622.740084]  r7:00000545 r6:00000009 r5:bf047580 r4:bf0b40fc
[ 1622.745774] [<c0136ae4>] (__warn) from [<c0cb8020>] (warn_slowpath_fmt+0x8c/0xc0)
[ 1622.753288]  r7:00000545 r6:bf0b40fc r5:00000000 r4:c5694000
[ 1622.759181] [<c0cb7f98>] (warn_slowpath_fmt) from [<bf047580>] (cfg80211_calculate_bitrate_he+0x240/0x34c [cfg80211])
[ 1622.769847]  r9:c56959a0 r8:c56959ac r7:c5694000 r6:c56959b8 r5:c5695b7a r4:00000000
[ 1622.777816] [<bf047340>] (cfg80211_calculate_bitrate_he [cfg80211]) from [<bf047804>] (cfg80211_calculate_bitrate+0x178/0x2fc [cfg80211])
[ 1622.790219]  r10:c4ae0c00 r9:c5695c0e r8:c8cbed3c r7:c8cbecec r6:c5694000 r5:c5695b7a
[ 1622.798076]  r4:c4ae0c00
[ 1622.800804] [<bf04768c>] (cfg80211_calculate_bitrate [cfg80211]) from [<bf0777f4>] (nl80211_put_sta_rate+0x60/0x334 [cfg80211])
[ 1622.812323]  r4:c4ae0c00
[ 1622.815052] [<bf077794>] (nl80211_put_sta_rate [cfg80211]) from [<bf0780e8>] (nl80211_send_station+0x620/0xe90 [cfg80211])
[ 1622.826142]  r8:c5695c0e r7:c8cbecec r6:c2d6c800 r5:c4ae0c00 r4:c5695b38
[ 1622.833038] [<bf077ac8>] (nl80211_send_station [cfg80211]) from [<bf078a60>] (nl80211_dump_station+0x108/0x2e0 [cfg80211])
[ 1622.844128]  r10:c4ae0c00 r9:c5695c0e r8:c2d6c9c0 r7:c4a19a58 r6:00000000 r5:c5695b38
[ 1622.851986]  r4:00000000
[ 1622.854632] [<bf078958>] (nl80211_dump_station [cfg80211]) from [<c0ad5ebc>] (netlink_dump+0x158/0x338)
[ 1622.864068]  r10:c122d9c0 r9:00001244 r8:c4a19a58 r7:00001244 r6:c5694000 r5:c4ae0c00
[ 1622.871925]  r4:c4a19800
[ 1622.874487] [<c0ad5d64>] (netlink_dump) from [<c0ad6fe8>] (__netlink_dump_start+0x17c/0x294)
[ 1622.882963]  r10:c122d9c0 r9:c4a19a58 r8:00000000 r7:c5695cf8 r6:c4ae0000 r5:c4a19800
[ 1622.890818]  r4:c4a19864
[ 1622.893377] [<c0ad6e6c>] (__netlink_dump_start) from [<c0ad9954>] (genl_rcv_msg+0x344/0x378)
[ 1622.901852]  r9:c5695d88 r8:00000004 r7:c5694000 r6:c4ae0000 r5:bf0bb000 r4:c4a8b600
[ 1622.909633] [<c0ad9610>] (genl_rcv_msg) from [<c0ad87b4>] (netlink_rcv_skb+0xcc/0x124)
[ 1622.917582]  r10:c4a19984 r9:00000000 r8:0000001c r7:c4a8b600 r6:c5694000 r5:c0ad9610
[ 1622.925437]  r4:c4ae0000
[ 1622.927994] [<c0ad86e8>] (netlink_rcv_skb) from [<c0ad8e88>] (genl_rcv+0x34/0x44)
[ 1622.935507]  r8:c122d9c0 r7:c4ae0000 r6:c15f5a40 r5:c12347f8 r4:c4ae0000
[ 1622.942238] [<c0ad8e54>] (genl_rcv) from [<c0ad7d74>] (netlink_unicast+0x258/0x39c)
[ 1622.949921]  r5:c1604464 r4:c1604400
[ 1622.953524] [<c0ad7b1c>] (netlink_unicast) from [<c0ad80d8>] (netlink_sendmsg+0x220/0x49c)
[ 1622.961821]  r10:00000000 r9:c4a19800 r8:c4ae0000 r7:c5694000 r6:0000001c r5:c4a8b600
[ 1622.969677]  r4:c5695eb0
[ 1622.972240] [<c0ad7eb8>] (netlink_sendmsg) from [<c0a4bae0>] (__sys_sendto+0xe4/0x134)
[ 1622.980193]  r10:00000122 r9:c5694000 r8:be9207cc r7:00000040 r6:c5694000 r5:c840f680
[ 1622.988048]  r4:00000000
[ 1622.990606] [<c0a4b9fc>] (__sys_sendto) from [<c0a4bb54>] (sys_sendto+0x24/0x2c)
[ 1622.998035]  r8:c0100264 r7:00000122 r6:b6ef6810 r5:00000080 r4:be9207cc
[ 1623.004768] [<c0a4bb30>] (sys_sendto) from [<c0100244>] (__sys_trace_return+0x0/0x1c)
[ 1623.012628] Exception stack(0xc5695fa8 to 0xc5695ff0)
[ 1623.017708] 5fa0:                   be9207cc 00000080 00000009 0146be60 0000001c 00000000
[ 1623.025919] 5fc0: be9207cc 00000080 b6ef6810 00000122 00000000 00000192 0058a738 0058a738
[ 1623.034126] 5fe0: 00000122 be920798 b6c934e9 b6c06996
[ 1623.052863] ---[ end trace f5507a201779a69d ]---

After this I disabled the station connection and got similar results - the driver seemed to crash (this time without a dump in dmesg), and the wifi APs were down. A reboot of the system resolves any crashes or weird behavior in all cases.

However, if I disable everything but a single AP, then I can run seemingly forever without issues.

Another weird thing I noticed (and will try to provide more details on it if needed) was that if I was connected to two different WiFi networks on the two MACs and just tried to run `ping -I mlan0 8.8.8.8` or `ping -I mmlan0 8.8.8.8` I would get segfaults. Or ping just would flat out not run at all. If I disconnected one of them then it wouldn't have any issues. I can't say for certain whether I had an Ethernet connection into the box as well at the time, but it was certainly weird; cause I've run tests like that before with multiple active connections with no issues.

I have a 88W8987 board as well that I can run with this same driver. I found that it behaves in a similar fashion - if I have both station and AP connected on the same phy (the only phy in this case) then after a few minutes of pushing data through the driver loses it's mind and the interfaces are dead. With the 8987 I never saw a crash dump in dmesg.

I have been running the 8987 with no issues for a few months now, so this was surprising to me. I reverted my code back to a build that predated the 9098 support I pulled into my build last week and lo and behold all my problems with the 8987 were gone.

So - something seems to be up with the new driver with both a station and AP running on the same phy. Is this something anyone else has run into in the past?

A few final notes:

Driver Repo: https://source.codeaurora.org/external/imx/mwifiex/tree/?h=lf-5.15.5_1.0.0

Current driver version (with problems described): branch lf-5.15.5_1.0.0 commit 29b5d0

Previous driver version (that works properly): branch lf-5.10.72_2.2.0 commit 3c2a3c

0 Kudos
1 Solution
2,546 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hello @jrhaws ,

Since you are using 88W9098 with SDIO interface, microSD slot on i.MX6ULL-evk should be connected your wifi module.

So add no-1-8-v to usdhc1 node in device tree, then try to test it.

-------------------

&usdhc1 {

         pinctrl-names = "default", "state_100mhz", "state_200mhz";

         pinctrl-0 = <&pinctrl_usdhc1>;

         pinctrl-1 = <&pinctrl_usdhc1_100mhz>;

         pinctrl-2 = <&pinctrl_usdhc1_200mhz>;

         cd-gpios = <&gpio1 19 GPIO_ACTIVE_LOW>;

         keep-power-in-suspend;

         no-1-8-v;

         wakeup-source;

         vmmc-supply = <&reg_sd1_vmmc>;

         status = "okay";

};

-------------------------------

Have a good day!

Regards,

weidong

View solution in original post

0 Kudos
3 Replies
2,523 Views
jrhaws
Contributor I

@weidong_sun 

I added this as you suggested and I am no longer seeing the driver crashes with the W3 and the W2 connection seems stable as well. This is with all interfaces active as I was testing before.

It is unclear to me why that would cause the issues I was seeing, but they are cleaned up with that device tree update.

Note, this did not clean up the ping issues I was seeing, but I'll put that in another topic if I find it is relevant here.

Thanks for the support!

0 Kudos
2,507 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Dear @jrhaws ,

OK, good job!

your test is very important for solving the issue. in order to improve performance of your wifi, let me explain technical details for you. Then you can continue to test it.

1. Explanation for why adding no-1-8-v property to usdhc1 node

On our i.MX6ULL-EVK, by default, SD1 IO level is 3.3V, so the SD interface can only support less than or equal to 50MHz frequency, which also means that the SD interface can only work on SD2.0 spec.  So I suggested you add no-1-8-v to uSDHC1 node. 

weidong_sun_0-1655255401884.png

 

BUT after adding the property, you wifi module's max speed is 50MHz, only support 2 modes: Low speed 25MHz, high speed 50MHz(SDR50 mode)

2. How to improve WiFi performance 

(1) Using 1.8V IO level

you know, for SD card, NVCC_SD can be automatically switched from 3.3V to 1.8V, BUT for WiFi card, the swtich can't be performed, so we should do it manually. We have 2 way to get the purpose: software or hardware.

---software

From above DCDC schematic , you can know default is 3.3V(when SD1_VSELECT=0), we should let NVCC_SD=1.8V(SD1_VSLECT=1).  So we can multiplex GPIO1_IO05 pin to be GPIO1_IO05 signal(not current SD1_VSELECT signal), and configure it to be internal pull-up, which ensure the line's level is HIGH.  Below is for you reference:

(1) changing iomux node in imx6ul-14x14-evk.dtsi

&iomuxc {
         pinctrl-names = "default";
         pinctrl-0 = <&pinctrl_hog>;
         pinctrl_hog: hoggrp {
        fsl,pins = <
                     MX6UL_PAD_GPIO1_IO05__GPIO1_IO05 0x17059
          >;
         };

(2) Removing default IOMUX of the pin

Please REMOVE 'MX6UL_PAD_GPIO1_IO05__USDHC1_VSELECT' line from pinctrl_usdhc1 node!
......
pinctrl_usdhc1: usdhc1grp {
fsl,pins = <
MX6UL_PAD_SD1_CMD__USDHC1_CMD 0x17059
MX6UL_PAD_SD1_CLK__USDHC1_CLK 0x10071
MX6UL_PAD_SD1_DATA0__USDHC1_DATA0 0x17059
MX6UL_PAD_SD1_DATA1__USDHC1_DATA1 0x17059
MX6UL_PAD_SD1_DATA2__USDHC1_DATA2 0x17059
MX6UL_PAD_SD1_DATA3__USDHC1_DATA3 0x17059
MX6UL_PAD_UART1_RTS_B__GPIO1_IO19 0x17059 /* SD1 CD */
MX6UL_PAD_GPIO1_IO05__USDHC1_VSELECT 0x17059 /* SD1 VSELECT */
MX6UL_PAD_GPIO1_IO09__GPIO1_IO09 0x17059 /* SD1 RESET */
>;
};

---Hardware

Change above DCDC output to be 1.8V. like below.

weidong_sun_1-1655256102123.png

If you change DCDC output like above, software don't need to be modify, default bsp is OK.

 

3. Removing no-1-8-v from usdhc1 node

It means , now SD1 IOlevel is 1.8V, we can make it speed up. due to hardware limitation, SD1 max speed is limited to max 132MHz. so your wifi module speed can get to the value.

in imx6ull.dtsi, we can see the limitaion.

&usdhc1 {

         compatible = "fsl,imx6ull-usdhc", "fsl,imx6sx-usdhc";

         assigned-clocks = <&clks IMX6UL_CLK_USDHC1_SEL>, <&clks IMX6UL_CLK_USDHC1>;

         assigned-clock-parents = <&clks IMX6UL_CLK_PLL2_PFD2>;

         assigned-clock-rates = <0>, <132000000>;

};

[Note]

-- WiFi SD_VIO

Before your test , don't forget to set SD_VIO to be 1.8V on WiFi module side, otherwise, IO level will mismatch, communication will fail.

--If you use software to change NVCC_SD, you can measure GPIO1_IO05 output to check if it is HIGH, otherwise, you can control it on linux command line using GPIO operation method.

 

OK, try above stesp, please!

Have a good day!

Regards,

weidong

 

0 Kudos
2,547 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hello @jrhaws ,

Since you are using 88W9098 with SDIO interface, microSD slot on i.MX6ULL-evk should be connected your wifi module.

So add no-1-8-v to usdhc1 node in device tree, then try to test it.

-------------------

&usdhc1 {

         pinctrl-names = "default", "state_100mhz", "state_200mhz";

         pinctrl-0 = <&pinctrl_usdhc1>;

         pinctrl-1 = <&pinctrl_usdhc1_100mhz>;

         pinctrl-2 = <&pinctrl_usdhc1_200mhz>;

         cd-gpios = <&gpio1 19 GPIO_ACTIVE_LOW>;

         keep-power-in-suspend;

         no-1-8-v;

         wakeup-source;

         vmmc-supply = <&reg_sd1_vmmc>;

         status = "okay";

};

-------------------------------

Have a good day!

Regards,

weidong

0 Kudos