[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<SA2PR10MB4460B6485B1104727C02701BA6DEA@SA2PR10MB4460.namprd10.prod.outlook.com>
Date: Wed, 26 Nov 2025 09:19:19 +0000
From: Les Boys <lesboyspp43@...look.com>
To: Ping-Ke Shih <pkshih@...ltek.com>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-wireless@...r.kernel.org" <linux-wireless@...r.kernel.org>
Subject:
回复: [PATCH rtw-next v5] realtek: rtlwifi: remove dead code and ensure unicast is always set explicitly in every iteration
Removed dead code and ensured unicast is always set explicitly in every
iteration to ensure the unicast of (n-1)th iteration will not apply to nth
iteration, the previous code checked multicast and broadcast but no any
logic if the state is multicast or broadcast, this patch removed them and
check it is unicast or not only, and removed the initalizer of unicast
because all possible path will set unicast.
Signed-off-by: Les Boys <lesboyspp43@...look.com>
---
CHANGE:
1. Optimize commit message
2. Change subject
---
drivers/net/wireless/realtek/rtlwifi/pci.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/net/wireless/realtek/rtlwifi/pci.c b/drivers/net/wireless/realtek/rtlwifi/pci.c
index d08046926..eda3b80df 100644
--- a/drivers/net/wireless/realtek/rtlwifi/pci.c
+++ b/drivers/net/wireless/realtek/rtlwifi/pci.c
@@ -652,7 +652,7 @@ static void _rtl_pci_rx_interrupt(struct ieee80211_hw *hw)
unsigned int count = rtlpci->rxringcount;
u8 own;
u8 tmp_one;
- bool unicast = false;
+ bool unicast;
u8 hw_queue = 0;
unsigned int rx_remained_cnt = 0;
struct rtl_stats stats = {
@@ -752,14 +752,13 @@ static void _rtl_pci_rx_interrupt(struct ieee80211_hw *hw)
memcpy(IEEE80211_SKB_RXCB(skb), &rx_status,
sizeof(rx_status));
- if (is_broadcast_ether_addr(hdr->addr1)) {
- ;/*TODO*/
- } else if (is_multicast_ether_addr(hdr->addr1)) {
- ;/*TODO*/
- } else {
+ if (is_unicast_ether_addr(hdr->addr1)) {
unicast = true;
rtlpriv->stats.rxbytesunicast += skb->len;
+ } else {
+ unicast = false;
}
+
rtl_is_special_data(hw, skb, false, true);
if (ieee80211_is_data(fc)) {
--
2.44.0
Powered by blists - more mailing lists