[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221129043442.14717-1-JunASAKA@zzy040330.moe>
Date: Tue, 29 Nov 2022 12:34:42 +0800
From: JunASAKA <JunASAKA@...040330.moe>
To: Jes.Sorensen@...il.com
Cc: kvalo@...nel.org, davem@...emloft.net, edumazet@...gle.com,
kuba@...nel.org, pabeni@...hat.com, linux-wireless@...r.kernel.org,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
JunASAKA <JunASAKA@...040330.moe>
Subject: [PATCH] drivers: rewrite and remove a superfluous parameter.
I noticed there is a superfluous "*hdr" parameter in rtl8xxxu module
when I am trying to fix some bugs for the rtl8192eu wifi dongle. This
parameter can be removed and then gained from the skb object to make the
function more beautiful.
Signed-off-by: JunASAKA <JunASAKA@...040330.moe>
---
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
index ac641a56efb0..4c3d97e8e51f 100644
--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
+++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
@@ -4767,9 +4767,10 @@ static u32 rtl8xxxu_80211_to_rtl_queue(u32 queue)
return rtlqueue;
}
-static u32 rtl8xxxu_queue_select(struct ieee80211_hdr *hdr, struct sk_buff *skb)
+static u32 rtl8xxxu_queue_select(struct sk_buff *skb)
{
u32 queue;
+ struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
if (ieee80211_is_mgmt(hdr->frame_control))
queue = TXDESC_QUEUE_MGNT;
@@ -5118,7 +5119,7 @@ static void rtl8xxxu_tx(struct ieee80211_hw *hw,
if (control && control->sta)
sta = control->sta;
- queue = rtl8xxxu_queue_select(hdr, skb);
+ queue = rtl8xxxu_queue_select(skb);
tx_desc = skb_push(skb, tx_desc_size);
--
2.38.1
Powered by blists - more mailing lists