linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drivers: rewrite and remove a superfluous parameter.
@ 2022-11-29  4:34 JunASAKA
  2022-11-29 14:06 ` Bitterblue Smith
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: JunASAKA @ 2022-11-29  4:34 UTC (permalink / raw)
  To: Jes.Sorensen
  Cc: kvalo, davem, edumazet, kuba, pabeni, linux-wireless, netdev,
	linux-kernel, JunASAKA

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@zzy040330.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


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

end of thread, other threads:[~2022-12-06 19:14 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-29  4:34 [PATCH] drivers: rewrite and remove a superfluous parameter JunASAKA
2022-11-29 14:06 ` Bitterblue Smith
2022-12-06 17:59   ` Arend Van Spriel
2022-12-06 18:19     ` Arend Van Spriel
2022-12-06 18:40       ` Bitterblue Smith
2022-12-06 19:14         ` Arend Van Spriel
2022-11-29 14:32 ` reply to Bitterblue Smith JunASAKA
2022-11-29 15:16   ` Bitterblue Smith
2022-11-29 14:55 ` JunASAKA
2022-11-29 15:22 ` JunASAKA
2022-11-29 15:55   ` reply to Bitterblue Smith (was [PATCH] drivers: rewrite and remove a superfluous parameter.) Willy Tarreau
2022-11-29 23:11 ` [PATCH] drivers: rewrite and remove a superfluous parameter JunASAKA

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).