public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] realtek/rtlwifi: ensure unicast is reinitialized to false in each iteration
@ 2025-11-25  7:00 Les Boys
  2025-11-25  7:23 ` Ping-Ke Shih
  0 siblings, 1 reply; 11+ messages in thread
From: Les Boys @ 2025-11-25  7:00 UTC (permalink / raw)
  To: pkshih@realtek.com
  Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org

Previously, the unicast variable was only initialized once during the function execution. Therefore, if unicast was set to true in the (n-1)th iteration, it would affect the nth iteration. This patch resolves the issue by reinitializing unicast to false at the start of each iteration.

Signed-off-by: LBLaiSiNanHai <lesboyspp43@outlook.com>
---
 drivers/net/wireless/realtek/rtlwifi/pci.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/wireless/realtek/rtlwifi/pci.c b/drivers/net/wireless/realtek/rtlwifi/pci.c
index d08046926..fe7140328 100644
--- a/drivers/net/wireless/realtek/rtlwifi/pci.c
+++ b/drivers/net/wireless/realtek/rtlwifi/pci.c
@@ -752,6 +752,8 @@ static void _rtl_pci_rx_interrupt(struct ieee80211_hw *hw)
                        memcpy(IEEE80211_SKB_RXCB(skb), &rx_status,
                               sizeof(rx_status));

+      unicast = false;
+
                        if (is_broadcast_ether_addr(hdr->addr1)) {
                                ;/*TODO*/
                        } else if (is_multicast_ether_addr(hdr->addr1)) {
--
2.44.0

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2025-12-23  5:21 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-25  7:00 [PATCH v1] realtek/rtlwifi: ensure unicast is reinitialized to false in each iteration Les Boys
2025-11-25  7:23 ` Ping-Ke Shih
     [not found]   ` <SA2PR10MB44605A853386FE1BB7174498A6D1A@SA2PR10MB4460.namprd10.prod.outlook.com>
2025-11-25  8:34     ` [PATCH rtw-next v2] " Les Boys
2025-11-25  9:03       ` Ping-Ke Shih
2025-11-25 11:43         ` [PATCH rtw-next v3] realtek/rtlwifi: remove unused two if blocks and put unicast set inner if and else block Les Boys
2025-11-26  0:47           ` Ping-Ke Shih
2025-11-26  5:55             ` [PATCH rtw-next v4] " Les Boys
2025-11-26  8:54               ` Ping-Ke Shih
2025-11-26  9:19                 ` 回复: [PATCH rtw-next v5] realtek: rtlwifi: remove dead code and ensure unicast is always set explicitly in every iteration Les Boys
2025-11-26  9:34                   ` Ping-Ke Shih
2025-12-23  5:21                   ` Ping-Ke Shih

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox