Linux wireless drivers development
 help / color / mirror / Atom feed
From: "Luka Gejak" <luka.gejak@linux.dev>
To: martin@rfdeck.de
Cc: linux-wireless@vger.kernel.org, "Ping-Ke Shih" <pkshih@realtek.com>
Subject: Re: wifi: rtw88: usb: AP sends no beacons after monitor capture on the same phy
Date: Thu, 26 Nov 2026 19:11:08 +0000	[thread overview]
Message-ID: <41ae89e5a8328124062eea53eab2fc49d6114a56@linux.dev> (raw)
In-Reply-To: <20261126161801.Horde.EPNAvNvUumt6-YVgeu2ZpuH@mail.your-server.de>

[-- Attachment #1: Type: text/plain, Size: 1093 bytes --]

Hi Martin,

Thanks for running these. My thoughts are below.

On November 26, 2026 4:18:01 PM GMT+01:00, <martin@rfdeck.de> wrote:

>    monitor up (C1-C5) 117/1/116/   0x71     0/0/0/0/0    0x31
>                       116/116

I think the queue bit explains the repeatable AP2 failure. Stopping AP1
clears BIT_EN_BCNQ_DL. With the monitor up, the device stays running and
the bit is still clear when AP2 starts. The driver uploads the beacon
before setting the bit again. Commit faa2e484b393 fixed another case of
USB devices going silent with this bit cleared during the upload.

[ ... ]

> It returned "OK" every time, and the silent AP2 came back:

The update uploads the beacon again with the bit already set. Could you
try the attached patch with the same fixed channel test, keeping the
monitor up? It sets the bit before the first USB AP beacon upload.
Please count beacons for both APs before running update_beacon.

C2 sent very few beacons on AP1 and again after the update, so the queue
bit alone may not account for that run.

Best regards,
Luka Gejak

[-- Attachment #2: usb-beacon-queue-test.patch --]
[-- Type: text/plain, Size: 700 bytes --]

diff --git a/drivers/net/wireless/realtek/rtw88/mac80211.c b/drivers/net/wireless/realtek/rtw88/mac80211.c
--- a/drivers/net/wireless/realtek/rtw88/mac80211.c
+++ b/drivers/net/wireless/realtek/rtw88/mac80211.c
@@ -429,7 +429,13 @@ static void rtw_ops_bss_info_changed(struct ieee80211_hw *hw,
 	}
 
 	if (changed & BSS_CHANGED_BEACON) {
+		if (rtw_hci_type(rtwdev) == RTW_HCI_TYPE_USB &&
+		    vif->type == NL80211_IFTYPE_AP && conf->enable_beacon &&
+		    (changed & BSS_CHANGED_BEACON_ENABLED))
+			rtw_write32_set(rtwdev, REG_FWHW_TXQ_CTRL,
+					BIT_EN_BCNQ_DL);
+
 		rtw_set_dtim_period(rtwdev, conf->dtim_period);
 		rtw_fw_download_rsvd_page(rtwdev);
 		rtw_send_rsvd_page_h2c(rtwdev);
 	}

      reply	other threads:[~2026-11-26 19:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-24 13:44 wifi: rtw88: usb: AP sends no beacons after monitor capture on the same phy martin
2026-11-25 22:32 ` Luka Gejak
2026-11-26  7:12   ` martin
2026-11-26  7:59     ` Luka Gejak
2026-11-26 15:18       ` martin
2026-11-26 19:11         ` Luka Gejak [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=41ae89e5a8328124062eea53eab2fc49d6114a56@linux.dev \
    --to=luka.gejak@linux.dev \
    --cc=linux-wireless@vger.kernel.org \
    --cc=martin@rfdeck.de \
    --cc=pkshih@realtek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox