chenhaiq / mt7610u_wifi_sta_v3002_dpo_20130916

Modified usb wifi driver for TP_link TL-WDN5200
MIT License
132 stars 116 forks source link

tp-link ac600 disconnects for unknown reason, then causes kernel to freeze when unpluggin. #7

Open zhengwy888 opened 8 years ago

zhengwy888 commented 8 years ago

ubuntu 14.04, cpu is intel. I am using TP-link AC600. and the forked driver from https://github.com/Myria-de/mt7610u_wifi_sta_v3002_dpo_20130916

The network card would occasionally go disconnect. and upon unplugging it, ubuntu kernel would freeze. There are some messages in syslog, which I couldn't decipher, so looking for some expertise in figuring out what is the issue here. Thanks in advance.

Aug  2 21:11:00 acorn NetworkManager[885]: <info> Activation (ra0/wireless): connection 'Narcissa' has security, and secrets exist.  No new secrets needed.
Aug  2 21:11:00 acorn NetworkManager[885]: <info> Config: added 'ssid' value 'Narcissa'
Aug  2 21:11:00 acorn NetworkManager[885]: <info> Config: added 'scan_ssid' value '1'
Aug  2 21:11:00 acorn NetworkManager[885]: <info> Config: added 'key_mgmt' value 'WPA-PSK'
Aug  2 21:11:00 acorn NetworkManager[885]: <info> Config: added 'psk' value '<omitted>'
Aug  2 21:11:00 acorn NetworkManager[885]: <info> Activation (ra0) Stage 2 of 5 (Device Configure) complete.
Aug  2 21:11:00 acorn NetworkManager[885]: <info> Config: set interface ap_scan to 1
Aug  2 21:11:00 acorn wpa_supplicant[1276]: ra0: Trying to associate with e8:94:f6:41:83:4e (SSID='Narcissa' freq=2442 MHz)
Aug  2 21:11:00 acorn kernel: [526100.560353] 80211 [CONNECT TEST]> CFG80211_OpsConnect ==>
Aug  2 21:11:00 acorn kernel: [526100.560355] Groupwise: fac04
Aug  2 21:11:00 acorn kernel: [526100.560356] Pairwise fac04
Aug  2 21:11:00 acorn kernel: [526100.560356] Wpa_versions 2
Aug  2 21:11:00 acorn kernel: [526100.560357] Keymgmt fac02
Aug  2 21:11:00 acorn kernel: [526100.560357] Auth_type 0
Aug  2 21:11:00 acorn kernel: [526100.560358] WLAN_CIPHER_SUITE_CCMP...
Aug  2 21:11:00 acorn kernel: [526100.560358] ConnInfo.KeyLen ===> 0
Aug  2 21:11:00 acorn kernel: [526100.560359] ConnInfo.KeyIdx ===> 0
Aug  2 21:11:00 acorn kernel: [526100.560360] 80211> Connect bssid e8:94:f6:41:83:4e
Aug  2 21:11:00 acorn kernel: [526100.560362] 80211> EncrypType = 6
Aug  2 21:11:00 acorn NetworkManager[885]: <info> (ra0): supplicant interface state: disconnected -> associating
Aug  2 21:11:03 acorn kernel: [526103.554838] 80211> cfg80211_scan_done
Aug  2 21:11:03 acorn kernel: [526103.554859] BUG: unable to handle kernel paging request at 00000000656367de
Aug  2 21:11:03 acorn kernel: [526103.554862] IP: [<ffffffffc022d149>] cfg80211_scan_done+0x29/0xc0 [cfg80211]
Aug  2 21:11:03 acorn kernel: [526103.554877] PGD dcece067 PUD 0 
Aug  2 21:11:03 acorn kernel: [526103.554880] Oops: 0000 [#1] SMP 
Aug  2 21:11:03 acorn kernel: [526103.554882] Modules linked in: snd_hda_codec_hdmi ip6t_REJECT nf_reject_ipv6 nvidia_uvm(POE) nf_log_ipv6 xt_hl ip6t_rt rfcomm bnep eeepc_wmi asus_wm
i nf_conntrack_ipv6 mt7610u_sta(OE) bluetooth sparse_keymap mxm_wmi nf_defrag_ipv6 ipt_REJECT nf_reject_ipv4 nf_log_ipv4 nf_log_common xt_LOG xt_multiport intel_rapl x86_pkg_temp_the
rmal intel_powerclamp coretemp kvm crct10dif_pclmul crc32_pclmul xt_limit xt_tcpudp nvidia_drm(POE) nvidia_modeset(POE) xt_addrtype drm_kms_helper aesni_intel drm snd_hda_codec_realt
ek snd_hda_codec_generic aes_x86_64 lrw gf128mul nf_conntrack_ipv4 glue_helper nvidia(POE) nf_defrag_ipv4 ablk_helper cryptd xt_conntrack snd_hda_intel snd_hda_codec ip6table_filter 
joydev snd_hda_core input_leds ip6_tables snd_hwdep nf_conntrack_netbios_ns snd_pcm nf_conntrack_broadcast nf_nat_ftp nf_nat cfg80211 snd_seq_midi snd_seq_midi_event nf_conntrack_ftp
 nf_conntrack snd_rawmidi iptable_filter serio_raw ip_tables x_tables nls_iso8859_1 lpc_ich snd_seq mei_me snd_seq_device mei snd_timer snd soundcore 8250_fintek tpm_infineon parport
_pc video shpchp ppdev acpi_pad wmi mac_hid lp parport hid_generic usbhid hid e1000e psmouse ahci ptp libahci pps_core
Aug  2 21:11:03 acorn kernel: [526103.554920] CPU: 3 PID: 28788 Comm: RtmpCmdQTask Tainted: P        W  OE   4.2.0-27-generic #32~14.04.1-Ubuntu
Aug  2 21:11:03 acorn kernel: [526103.554921] Hardware name: ASUS All Series/Z97-PRO GAMER, BIOS 2202 12/08/2015
Aug  2 21:11:03 acorn kernel: [526103.554922] task: ffff8801a2958000 ti: ffff8807eaf10000 task.ti: ffff8807eaf10000
Aug  2 21:11:03 acorn kernel: [526103.554923] RIP: 0010:[<ffffffffc022d149>]  [<ffffffffc022d149>] cfg80211_scan_done+0x29/0xc0 [cfg80211]
Aug  2 21:11:03 acorn kernel: [526103.554929] RSP: 0018:ffff8807eaf13db8  EFLAGS: 00010202
Aug  2 21:11:03 acorn kernel: [526103.554930] RAX: 0000000000000019 RBX: ffff8807ee9c0000 RCX: 0000000000000000
Aug  2 21:11:03 acorn kernel: [526103.554931] RDX: 0000000065636976 RSI: 0000000000000000 RDI: ffff8801d4546800
Aug  2 21:11:03 acorn kernel: [526103.554931] RBP: ffff8807eaf13dd8 R08: 000000000000000a R09: 0000000000000000
Aug  2 21:11:03 acorn kernel: [526103.554932] R10: 0000000000000000 R11: 0000000000037668 R12: ffff8801d4546800
Aug  2 21:11:03 acorn kernel: [526103.554933] R13: ffffc9000447c348 R14: 0000000000000000 R15: 0000000000000000
Aug  2 21:11:03 acorn kernel: [526103.554934] FS:  0000000000000000(0000) GS:ffff88081ecc0000(0000) knlGS:0000000000000000
Aug  2 21:11:03 acorn kernel: [526103.554934] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Aug  2 21:11:03 acorn kernel: [526103.554935] CR2: 00000000656367de CR3: 00000000dce5e000 CR4: 00000000001406e0
Aug  2 21:11:03 acorn kernel: [526103.554936] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
Aug  2 21:11:03 acorn kernel: [526103.554937] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Aug  2 21:11:03 acorn kernel: [526103.554937] Stack:
Aug  2 21:11:03 acorn kernel: [526103.554938]  ffff8807ee9c0000 ffffc9000447c368 ffffc9000447c348 0000000000000000
Aug  2 21:11:03 acorn kernel: [526103.554940]  ffff8807eaf13e08 ffffffffc13b3612 ffff8807eaf13e08 000000000447c370
Aug  2 21:11:03 acorn kernel: [526103.554942]  0000000000000000 ffffc9000447c000 ffff8807eaf13e28 ffffffffc13b79d6
Aug  2 21:11:03 acorn kernel: [526103.554944] Call Trace:
Aug  2 21:11:03 acorn kernel: [526103.554959]  [<ffffffffc13b3612>] CFG80211OS_ScanEnd+0x32/0x50 [mt7610u_sta]
Aug  2 21:11:03 acorn kernel: [526103.554970]  [<ffffffffc13b79d6>] CFG80211_ScanEnd+0x66/0x90 [mt7610u_sta]
Aug  2 21:11:03 acorn kernel: [526103.554980]  [<ffffffffc13bb260>] RT_Mac80211_ScanEnd+0x10/0x20 [mt7610u_sta]
Aug  2 21:11:03 acorn kernel: [526103.554989]  [<ffffffffc13bd3a5>] CMDHandler+0xd5/0x160 [mt7610u_sta]
Aug  2 21:11:03 acorn kernel: [526103.554999]  [<ffffffffc13bfc81>] RTUSBCmdThread+0x131/0x170 [mt7610u_sta]
Aug  2 21:11:03 acorn kernel: [526103.555005]  [<ffffffffc13bfb50>] ? MlmeThread+0xb0/0xb0 [mt7610u_sta]
Aug  2 21:11:03 acorn kernel: [526103.555010]  [<ffffffff81095732>] kthread+0xd2/0xf0
Aug  2 21:11:03 acorn kernel: [526103.555012]  [<ffffffff81095660>] ? kthread_create_on_node+0x1c0/0x1c0
Aug  2 21:11:03 acorn kernel: [526103.555015]  [<ffffffff817bc7df>] ret_from_fork+0x3f/0x70
Aug  2 21:11:03 acorn kernel: [526103.555017]  [<ffffffff81095660>] ? kthread_create_on_node+0x1c0/0x1c0
Aug  2 21:11:03 acorn kernel: [526103.555018] Code: 00 00 0f 1f 44 00 00 55 48 89 e5 41 56 41 89 f6 41 55 41 54 49 89 fc 53 0f 1f 44 00 00 49 8b 54 24 50 48 85 d2 0f 84 88 00 00 00 <4c> 3b a2 68 fe ff ff 75 59 45 88 74 24 60 41 c6 44 24 61 01 48 
Aug  2 21:11:03 acorn kernel: [526103.555037] RIP  [<ffffffffc022d149>] cfg80211_scan_done+0x29/0xc0 [cfg80211]
Aug  2 21:11:03 acorn kernel: [526103.555044]  RSP <ffff8807eaf13db8>
Aug  2 21:11:03 acorn kernel: [526103.555045] CR2: 00000000656367de
Aug  2 21:11:03 acorn kernel: [526103.555046] ---[ end trace 1fbad3e98b979ad2 ]---

later on

Aug  2 21:11:50 acorn NetworkManager[885]: <info> (ra0): device state change: failed -> disconnected (reason 'none') [120 30 0]
Aug  2 21:11:50 acorn NetworkManager[885]: <info> (ra0): deactivating device (reason 'none') [0]
Aug  2 21:11:50 acorn NetworkManager[885]: <info> (ra0): taking down device.
Aug  2 21:11:50 acorn kernel: [526150.626680] ===> rt28xx_close
Aug  2 21:11:50 acorn kernel: [526150.643345] ERROR!!! MlmeEnqueueForRecv: fRTMP_ADAPTER_HALT_IN_PROGRESS
Aug  2 21:11:50 acorn kernel: [526150.646622] ==>RT65xx_WLAN_ChipOnOff(): OnOff:0, Reset= 0, pAd->WlanFunCtrl:0xff000003, Reg-WlanFunCtrl=0xff000003
Aug  2 21:11:50 acorn kernel: [526150.646786] receive cmd msg fail(-2)
Aug  2 21:11:50 acorn kernel: [526150.646793] tx_kickout_fail_count = 0
Aug  2 21:11:50 acorn kernel: [526150.646794] tx_timeout_fail_count = 0
Aug  2 21:11:50 acorn kernel: [526150.646794] rx_receive_fail_count = 0
Aug  2 21:11:50 acorn kernel: [526150.646794] alloc_cmd_msg = 5245
Aug  2 21:11:50 acorn kernel: [526150.646795] free_cmd_msg = 5245
Aug  2 21:11:50 acorn kernel: [526150.696579] BUG: unable to handle kernel NULL pointer dereference at           (null)
Aug  2 21:11:50 acorn kernel: [526150.696584] IP: [<ffffffff810975bf>] exit_creds+0x1f/0x70
Aug  2 21:11:50 acorn kernel: [526150.696588] PGD 7f6b67067 PUD 7ea516067 PMD 0 
Aug  2 21:11:50 acorn kernel: [526150.696591] Oops: 0000 [#2] SMP 
Aug  2 21:11:50 acorn kernel: [526150.696592] Modules linked in: snd_hda_codec_hdmi ip6t_REJECT nf_reject_ipv6 nvidia_uvm(POE) nf_log_ipv6 xt_hl ip6t_rt rfcomm bnep eeepc_wmi asus_wmi nf_conntrack_ipv6 mt7610u_sta(OE) bluetooth sparse_keymap mxm_wmi nf_defrag_ipv6 ipt_REJECT nf_reject_ipv4 nf_log_ipv4 nf_log_common xt_LOG xt_multiport intel_rapl x86_pkg_temp_thermal intel_powerclamp coretemp kvm crct10dif_pclmul crc32_pclmul xt_limit xt_tcpudp nvidia_drm(POE) nvidia_modeset(POE) xt_addrtype drm_kms_helper aesni_intel drm snd_hda_codec_realtek snd_hda_codec_generic aes_x86_64 lrw gf128mul nf_conntrack_ipv4 glue_helper nvidia(POE) nf_defrag_ipv4 ablk_helper cryptd xt_conntrack snd_hda_intel snd_hda_codec ip6table_filter joydev snd_hda_core input_leds ip6_tables snd_hwdep nf_conntrack_netbios_ns snd_pcm nf_conntrack_broadcast nf_nat_ftp nf_nat cfg80211 snd_seq_midi snd_seq_midi_event nf_conntrack_ftp nf_conntrack snd_rawmidi iptable_filter serio_raw ip_tables x_tables nls_iso8859_1 lpc_ich snd_seq mei_me snd_seq_device mei snd_timer snd soundcore 8250_fintek tpm_infineon parport_pc video shpchp ppdev acpi_pad wmi mac_hid lp parport hid_generic usbhid hid e1000e psmouse ahci ptp libahci pps_core  
Aug  2 21:11:50 acorn kernel: [526150.696624] CPU: 2 PID: 885 Comm: NetworkManager Tainted: P      D W  OE   4.2.0-27-generic #32~14.04.1-Ubuntu
Aug  2 21:11:50 acorn kernel: [526150.696625] Hardware name: ASUS All Series/Z97-PRO GAMER, BIOS 2202 12/08/2015
Aug  2 21:11:50 acorn kernel: [526150.696626] task: ffff8807f7c48000 ti: ffff8807f9b54000 task.ti: ffff8807f9b54000
Aug  2 21:11:50 acorn kernel: [526150.696627] RIP: 0010:[<ffffffff810975bf>]  [<ffffffff810975bf>] exit_creds+0x1f/0x70
Aug  2 21:11:50 acorn kernel: [526150.696629] RSP: 0018:ffff8807f9b575b8  EFLAGS: 00010296
Aug  2 21:11:50 acorn kernel: [526150.696629] RAX: 0000000000000000 RBX: ffff8801a2958000 RCX: 0000000000000000
Aug  2 21:11:50 acorn kernel: [526150.696630] RDX: ffffffff81c9e800 RSI: ffff8801a2958000 RDI: 0000000000000000
Aug  2 21:11:50 acorn kernel: [526150.696631] RBP: ffff8807f9b575c8 R08: ffff8807f9b54000 R09: 00000000ffffffff
Aug  2 21:11:50 acorn kernel: [526150.696631] R10: 0000000000000017 R11: 000000000000ac6c R12: ffff8801a2958000

Then the internet goes completely out.

tohava commented 8 years ago

I don't know what is causing the disconnections, but I managed to fix the problem that causes kernel error. Thus, instead of rebooting, you can do rmmod, disconnect, and reconnect the wifi card.

Here is the commit containing the fix, good luck.

https://github.com/tohava/mt7610u_wifi_sta_v3002_dpo_20130916/commit/0de1c98aab902f42c1d4734fb173dde6150ffe6f

p.s. Do you have any idea how do I let others know about this change?

ZelphirKaltstahl commented 7 years ago

@tohava I've got no idea how to let others know, but for me a very similar and possibly related problem occurs: Freeze when plugging the USB device in. (T2UH AC600) Is your change already merged into master?

tohava commented 7 years ago

@ZelphirKaltstahl Yes, it is the pull request linked above, "Fix page fault that occurs when we call..."