From nobody Sun Jan 19 20:25:20 2025 X-Original-To: wireless@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YblMh6jngz5lfxr for ; Sun, 19 Jan 2025 20:25:20 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YblMh69Yvz44PH for ; Sun, 19 Jan 2025 20:25:20 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737318320; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kFTH4Sq3DwfUZotX+MaRNguCd/ulHotN2a/U8t082p8=; b=yNZ/m45cKmsykn5kwe8BfExgHDaR+hNQXkJ3JYlSZEeKOEtwlPVChVf+zdjMSDEyq0qAfY 4KhPkgKA772pYIGukIUv590Dw8Xyr4J7seiF0MilHPDh2y6sgVL+aI8dckwF5sbOfem4H1 VDnhzjKU1js2gn2kbhH8xuGh57tm2ulDAy2UyqgKehTCY+bIstnecssum7YqqdhAog+JBl 5BqZdnTmoJmi27Z6vpKf9LkpS5U/EcrS6XxhXZeXnHmgZGyB6uDy9yorcqO7Yx9CMZUV6x y+cdg7hHII39HEv1sjgNgZZsWwDxhuy0j9UNvV6xdDVU5jJK1/vxO3t7hsw4ug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737318320; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kFTH4Sq3DwfUZotX+MaRNguCd/ulHotN2a/U8t082p8=; b=q35U2mq0PZ2xoUNGQJh/ntZR8is51DkbOPctPhNUEH6iptGfj/hjlNIukPhZuho2RdmR/x 9QjMF9i29JJafziPd7RuYZnabpqYv4cCC+qWl+CBe1dHVRtG7frjE+jLOJIH4VDFA7iLXR Nd+wJrJkiVCYxWJMQtPmCP/KAEYKtJxQ0hIdZ5OWbJYSCQkCyWTqp+ItbXX8xisgrlP+BX n3KjwhqWK9reXjpM1rd95pBbdJ1AymbIspZt9VwlcHQ//yz9TfaoGG93Ge56ZUEVzhiHsA 8XKU0V+mniUFlNuLWje+grq6eQKouseW6PRdhbru7YcwmOjKSps+LVcUrDENsw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737318320; a=rsa-sha256; cv=none; b=qZ8kDlH1LnOAWZF+ggPqrh4ejGG4Ga4cbbPVkgwTYb8/E0I5SYwaNkXU3nX8Nadx5boWdS jEORMcrYkGxi+qsHnap7A9RZgGaWM7o8roDWnqkYx6y6ofxkhMqxITCf6WHxi6DW7KsNVL KWchcFlG52m01SjdDn4voWl7V/Zadm9r6PeXOJp7ujOG4PEp2o/gEkiz0PDUAqg5S9G/E6 28Aeej6oxIaDG3X6Asb4TsDxJEH3R9JAAmdjeeclPx28quHzajX0m0b76lmiOChVTaIrPZ DH29Ctyx28cTBVgax6qwhfBqRfJeLw6xX4YE1mgCn0+H1jyl5O7PXxMZHfT6Gw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4YblMh5ncnz14p1 for ; Sun, 19 Jan 2025 20:25:20 +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 50JKPKjP011568 for ; Sun, 19 Jan 2025 20:25:20 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 50JKPKgV011567 for wireless@FreeBSD.org; Sun, 19 Jan 2025 20:25:20 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] rtwn(4) RTL8192EU usb wifi dongle can't connect to AP Date: Sun, 19 Jan 2025 20:25:20 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: wireless X-Bugzilla-Version: Unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: adrian@freebsd.org X-Bugzilla-Status: In Progress X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: cy@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Discussions List-Archive: https://lists.freebsd.org/archives/freebsd-wireless List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-wireless@freebsd.org Sender: owner-freebsd-wireless@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D247528 --- Comment #60 from Adrian Chadd --- I've been digging deep in this and i've found some fun stuff. First, the power up / down / up sequencing problem. there's code in rtl8192= eu that doesn't exist at all in rtl8xxxu in linux. If I just delete them, the power up / down / up / down sequence doesn't break for me. https://reviews.freebsd.org/D48428 Second, there's some extra delays in the rtl8192eu RF register programming = in rtl8xxxu - it looks like some bit is toggled high -> low to kick start some hardware shifting/state machine. https://reviews.freebsd.org/D48512 Third, after tracing the write sleeps in cy@'s patch through the setup path= , it turns out we only need a sleep at the end of the channel programming, not f= or every write. https://reviews.freebsd.org/D48517 The last one is interesting. I added setting the CCX report bit in the TX descriptor for raw frames, so I'd get a per-frame report. However, when this condition occurs, I don't get /any/ response. It's like the frame isn't even attempted to be sent. So, I checked the contents of TXPAUSE after the chann= el config, and it's 0x0f and 0x4f, not 0x0 - so SOME queues are blocked. I also tried logging it during the TX path and yes, it's non-zero too during association attempts - however since the net80211 comlock is held during sc= ans, and net80211 txlock is held during normal transmit, things blew up pretty quickly there. (I'll fix those locks later.) Linux also retries the auth send more than once, whereas freebsd only tries= it once. If the NIC isn't ready or fails to send it with its hardware/firmware retry setup, then association fails. This is also likely suboptimal and fix= ing this in net80211 would be awesome, but again, we'll have to tackle that lat= er. So, I'd like cy@ and others w/ an RTL8192EU to try the three above diffs and report back. Let's see if it improves things or not. --=20 You are receiving this mail because: You are on the CC list for the bug.=