From owner-freebsd-wireless@freebsd.org Sat Jul 25 20:22:26 2020 Return-Path: Delivered-To: freebsd-wireless@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3728F36F210 for ; Sat, 25 Jul 2020 20:22:26 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 4BDctp0k9nz4cPX for ; Sat, 25 Jul 2020 20:22:26 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id 18CBC36EDC7; Sat, 25 Jul 2020 20:22:26 +0000 (UTC) Delivered-To: wireless@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1899D36F20F for ; Sat, 25 Jul 2020 20:22:26 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BDctn6yngz4cSC for ; Sat, 25 Jul 2020 20:22:25 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D4338214C2 for ; Sat, 25 Jul 2020 20:22:25 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 06PKMPd3089244 for ; Sat, 25 Jul 2020 20:22:25 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 06PKMPDV089243 for wireless@FreeBSD.org; Sat, 25 Jul 2020 20:22:25 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: wireless@FreeBSD.org Subject: [Bug 247528] RTL8192EU usb wifi dongle can't connect to AP Date: Sat, 25 Jul 2020 20:22:25 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: usb X-Bugzilla-Version: 12.1-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: danilo@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: usb@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Jul 2020 20:22:26 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D247528 Danilo Egea Gondolfo changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |danilo@FreeBSD.org --- Comment #3 from Danilo Egea Gondolfo --- Exactly same problem here. I have a tplink wn823n (RTL8192EU). The issue is easily reproducible. The device will get UP and things like scanning and adhoc mode will work fine. But if you "ifconfig down" the interface and "ifconfig up" it again it will stuck and the device will get disconnected from the USB bus. This will make wpa_supplicant try to connect using WPA but it will fail: ifconfig wlan0 create wlandev rtwn0 wpa_supplicant -i wlan0 -c... Note that the interface is still down before running wpa_supplicant. wpa_supplicant will put the interface UP and try to connect although it will fail with authentication timeout. If you put the interface UP yourself and then run wpa_supplicant it will fa= il and the device will be kicked out from the USB bus when it sends a second ioctl(... IFF_UP) to the interface. So, the problem is reproducible with: ifconfig wlan0 create wlandev rtwn0 up ifconfig wlan0 down ifconfig wlan0 up The last command will stuck here: 17899 101638 ifconfig - mi_switch+0xc1 _sleep+0x1cb taskqueue_drain+0xeb ieee80211_waitfor_parent+0x28 ieee80211_ioctl+0x44b ifhwioctl+0xbb2 ifioctl+0x419 kern_ioctl+0x25e sys_ioctl+0xfa amd64_syscall+0x119 fast_syscall_common+0x101=20 And this is what happens: ugen0.4: at usbus0 rtwn0 on uhub0 rtwn0: <802.11n NIC > on usbus0 rtwn0: MAC/BB RTL8192EU, RF 6052 2T2R wlan1: Ethernet address: d0:37:45:0a:a3:81 ugen0.4: at usbus0 (disconnected) rtwn0: at uhub0, port 1, addr 13 (disconnected) rtwn0: r92e_power_off: failed to block Tx queues rtwn0: detached usb_alloc_device: set address 4 failed (USB_ERR_IOERROR, ignored) usbd_setup_device_desc: getting device descriptor at addr 4 failed, USB_ERR_IOERROR usbd_req_re_enumerate: addr=3D4, set address failed! (USB_ERR_IOERROR, igno= red) usbd_setup_device_desc: getting device descriptor at addr 4 failed, USB_ERR_IOERROR usbd_req_re_enumerate: addr=3D4, set address failed! (USB_ERR_IOERROR, igno= red) usbd_setup_device_desc: getting device descriptor at addr 4 failed, USB_ERR_IOERROR usbd_req_re_enumerate: addr=3D4, set address failed! (USB_ERR_IOERROR, igno= red) usbd_setup_device_desc: getting device descriptor at addr 4 failed, USB_ERR_IOERROR usbd_req_re_enumerate: addr=3D4, set address failed! (USB_ERR_IOERROR, igno= red) usbd_setup_device_desc: getting device descriptor at addr 4 failed, USB_ERR_IOERROR ugen0.4: at usbus0 (disconnected) uhub_reattach_port: could not allocate new device --=20 You are receiving this mail because: You are on the CC list for the bug.=