[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <f745cdb79d564a5686d5e146d460133d@realtek.com>
Date: Wed, 26 Nov 2025 09:34:54 +0000
From: Ping-Ke Shih <pkshih@...ltek.com>
To: Les Boys <lesboyspp43@...look.com>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-wireless@...r.kernel.org" <linux-wireless@...r.kernel.org>
Subject: RE: [PATCH rtw-next v5] realtek: rtlwifi: remove dead code and ensure
unicast is always set explicitly in every iteration
Les Boys <lesboyspp43@...look.com> wrote:
Subject should be "wifi: rtlwifi: ...". I can change it during getting merged.
No need to resend because of this.
>
> 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>
Acked-by: Ping-Ke Shih <pkshih@...ltek.com>
> ---
> CHANGE:
> 1. Optimize commit message
> 2. Change subject
Change log should point out changes of v2, v3, v4, ...
No need to resend because of this neither.
> ---
> 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