All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ho Jie Feng <hjf3108@gmail.com>
To: Ping-Ke Shih <pkshih@realtek.com>, linux-wireless@vger.kernel.org
Cc: Bitterblue Smith <rtl8821cerfe2@gmail.com>, linux-kernel@vger.kernel.org
Subject: [PATCH rtw-next v3 4/5] wifi: rtlwifi: usb: move the radiotap headroom size to usb.h
Date: Fri, 20 Nov 2026 19:31:13 +0800	[thread overview]
Message-ID: <20261120113116.153232-5-hjf3108@gmail.com> (raw)
In-Reply-To: <20261120113116.153232-1-hjf3108@gmail.com>

Let drivers use the same define to add headroom for the frames
split out of aggregated transfers.

Move __RADIO_TAP_SIZE_RSV to usb.h as RTL_RADIO_TAP_SIZE_RSV
so chip specific code can use it.

Signed-off-by: Ho Jie Feng <hjf3108@gmail.com>
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
---
 drivers/net/wireless/realtek/rtlwifi/usb.c | 8 ++------
 drivers/net/wireless/realtek/rtlwifi/usb.h | 1 +
 2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtlwifi/usb.c b/drivers/net/wireless/realtek/rtlwifi/usb.c
index d7b3192262..5aca1a49ca 100644
--- a/drivers/net/wireless/realtek/rtlwifi/usb.c
+++ b/drivers/net/wireless/realtek/rtlwifi/usb.c
@@ -488,8 +488,6 @@ static unsigned int _rtl_rx_get_padding(struct ieee80211_hdr *hdr,
 #endif
 }
 
-#define __RADIO_TAP_SIZE_RSV	32
-
 static void _rtl_rx_completed(struct urb *_urb)
 {
 	struct rtl_usb *rtlusb = (struct rtl_usb *)_urb->context;
@@ -521,7 +519,7 @@ static void _rtl_rx_completed(struct urb *_urb)
 		hdr = (void *)(_urb->transfer_buffer + RTL_RX_DESC_SIZE);
 		padding = _rtl_rx_get_padding(hdr, size - RTL_RX_DESC_SIZE);
 
-		skb = dev_alloc_skb(size + __RADIO_TAP_SIZE_RSV + padding);
+		skb = dev_alloc_skb(size + RTL_RADIO_TAP_SIZE_RSV + padding);
 		if (!skb) {
 			pr_err("Can't allocate skb for bulk IN!\n");
 			goto resubmit;
@@ -533,7 +531,7 @@ static void _rtl_rx_completed(struct urb *_urb)
 		skb_reserve(skb, padding);
 
 		/* reserve some space for mac80211's radiotap */
-		skb_reserve(skb, __RADIO_TAP_SIZE_RSV);
+		skb_reserve(skb, RTL_RADIO_TAP_SIZE_RSV);
 
 		skb_put_data(skb, _urb->transfer_buffer, size);
 
@@ -570,8 +568,6 @@ static void _rtl_rx_completed(struct urb *_urb)
 	usb_anchor_urb(_urb, &rtlusb->rx_cleanup_urbs);
 }
 
-#undef __RADIO_TAP_SIZE_RSV
-
 static void _rtl_usb_cleanup_rx(struct ieee80211_hw *hw)
 {
 	struct rtl_priv *rtlpriv = rtl_priv(hw);
diff --git a/drivers/net/wireless/realtek/rtlwifi/usb.h b/drivers/net/wireless/realtek/rtlwifi/usb.h
index b873bbc9c4..a7ffff2d7c 100644
--- a/drivers/net/wireless/realtek/rtlwifi/usb.h
+++ b/drivers/net/wireless/realtek/rtlwifi/usb.h
@@ -7,6 +7,7 @@
 #include <linux/skbuff.h>
 
 #define RTL_RX_DESC_SIZE		24
+#define RTL_RADIO_TAP_SIZE_RSV		32
 
 #define RTL_USB_DEVICE(vend, prod, cfg) \
 	.match_flags = USB_DEVICE_ID_MATCH_DEVICE, \
-- 
2.53.0


  parent reply	other threads:[~2026-11-20 11:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-20 11:31 [PATCH rtw-next v3 0/5] wifi: rtlwifi: rtl8192du fixes and additional support Ho Jie Feng
2026-11-20 11:31 ` [PATCH rtw-next v3 1/5] wifi: rtlwifi: rc: start no BA session for QoS null frames Ho Jie Feng
2026-11-20 11:31 ` [PATCH rtw-next v3 2/5] wifi: rtlwifi: rtl8192d: report no signal for frames without PHY status Ho Jie Feng
2026-11-20 11:31 ` [PATCH rtw-next v3 3/5] wifi: rtlwifi: usb: unify the RX code path Ho Jie Feng
2026-11-20 11:31 ` Ho Jie Feng [this message]
2026-11-20 11:31 ` [PATCH rtw-next v3 5/5] wifi: rtlwifi: rtl8192du: enable USB RX aggregation Ho Jie Feng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261120113116.153232-5-hjf3108@gmail.com \
    --to=hjf3108@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=pkshih@realtek.com \
    --cc=rtl8821cerfe2@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.