All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ping-Ke Shih <pkshih@realtek.com>
To: <linux-wireless@vger.kernel.org>
Cc: <gary.chang@realtek.com>, <damon.chen@realtek.com>
Subject: [PATCH rtw-next 7/8] wifi: rtw89: fix BSSID comparison for non-transmitted BSSID
Date: Mon, 11 Aug 2025 20:39:50 +0800	[thread overview]
Message-ID: <20250811123950.15697-1-pkshih@realtek.com> (raw)
In-Reply-To: <20250811123744.15361-1-pkshih@realtek.com>

From: Kuan-Chung Chen <damon.chen@realtek.com>

For non-transmitted connections, beacons are received from the
transmitted BSSID. Fix this to avoid missing beacon statistics.

Signed-off-by: Kuan-Chung Chen <damon.chen@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
---
 drivers/net/wireless/realtek/rtw89/core.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/realtek/rtw89/core.c b/drivers/net/wireless/realtek/rtw89/core.c
index 7d522031dfa1..0ad7562632a5 100644
--- a/drivers/net/wireless/realtek/rtw89/core.c
+++ b/drivers/net/wireless/realtek/rtw89/core.c
@@ -2668,6 +2668,7 @@ static void rtw89_vif_rx_stats_iter(void *data, u8 *mac,
 	struct ieee80211_bss_conf *bss_conf;
 	struct rtw89_vif_link *rtwvif_link;
 	const u8 *bssid = iter_data->bssid;
+	const u8 *target_bssid;
 
 	if (rtwdev->scanning &&
 	    (ieee80211_is_beacon(hdr->frame_control) ||
@@ -2689,7 +2690,10 @@ static void rtw89_vif_rx_stats_iter(void *data, u8 *mac,
 		goto out;
 	}
 
-	if (!ether_addr_equal(bss_conf->bssid, bssid))
+	target_bssid = ieee80211_is_beacon(hdr->frame_control) &&
+		       bss_conf->nontransmitted ?
+		       bss_conf->transmitter_bssid : bss_conf->bssid;
+	if (!ether_addr_equal(target_bssid, bssid))
 		goto out;
 
 	if (is_mld) {
-- 
2.25.1


  parent reply	other threads:[~2025-08-11 12:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-11 12:37 [PATCH rtw-next 0/8] wifi: rtw89: improve connection loss and 8851B performance Ping-Ke Shih
2025-08-11 12:37 ` [PATCH rtw-next 1/8] wifi: rtw89: introduce beacon tracking to improve connection stability Ping-Ke Shih
2025-08-19  1:18   ` Ping-Ke Shih
2025-08-11 12:37 ` [PATCH rtw-next 2/8] wifi: rtw89: debug: add beacon_info debugfs Ping-Ke Shih
2025-08-11 12:37 ` [PATCH rtw-next 3/8] wifi: rtw89: wow: remove notify during WoWLAN net-detect Ping-Ke Shih
2025-08-11 12:37 ` [PATCH rtw-next 4/8] wifi: rtw89: 8851b: rfk: update IQK TIA setting Ping-Ke Shih
2025-08-11 12:39 ` [PATCH rtw-next 5/8] wifi: rtw89: 8851b: rfk: update TX wideband IQK Ping-Ke Shih
2025-08-11 12:39 ` [PATCH rtw-next 6/8] wifi: rtw89: 8852c: check LPS H2C command complete by C2H reg instead of done ack Ping-Ke Shih
2025-08-11 12:39 ` Ping-Ke Shih [this message]
2025-08-11 12:40 ` [PATCH rtw-next 8/8] wifi: rtw89: fix group frames loss when connected to non-transmitted BSSID Ping-Ke Shih

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=20250811123950.15697-1-pkshih@realtek.com \
    --to=pkshih@realtek.com \
    --cc=damon.chen@realtek.com \
    --cc=gary.chang@realtek.com \
    --cc=linux-wireless@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.