From: Michael Straube <straube.linux@gmail.com>
To: gregkh@linuxfoundation.org
Cc: hdegoede@redhat.com, Larry.Finger@lwfinger.net,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
Michael Straube <straube.linux@gmail.com>
Subject: [PATCH 06/13] staging: rtl8723bs: merge rtw_os_recv_resource_free into rtw_recv.c
Date: Fri, 22 Aug 2025 15:54:11 +0200 [thread overview]
Message-ID: <20250822135418.118115-7-straube.linux@gmail.com> (raw)
In-Reply-To: <20250822135418.118115-1-straube.linux@gmail.com>
Merge the functionality of rtw_os_recv_resource_free in os_dep/recv_linux.c
into _rtw_free_recv_priv in core/rtw_recv.c to reduce code in the os_dep
directory.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
drivers/staging/rtl8723bs/core/rtw_recv.c | 13 ++++++++++++-
drivers/staging/rtl8723bs/include/recv_osdep.h | 3 ---
drivers/staging/rtl8723bs/os_dep/recv_linux.c | 18 ------------------
3 files changed, 12 insertions(+), 22 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_recv.c b/drivers/staging/rtl8723bs/core/rtw_recv.c
index fcc28d4556c5..cda51aab752d 100644
--- a/drivers/staging/rtl8723bs/core/rtw_recv.c
+++ b/drivers/staging/rtl8723bs/core/rtw_recv.c
@@ -91,11 +91,22 @@ signed int _rtw_init_recv_priv(struct recv_priv *precvpriv, struct adapter *pada
void _rtw_free_recv_priv(struct recv_priv *precvpriv)
{
+ signed int i;
+ union recv_frame *precvframe;
struct adapter *padapter = precvpriv->adapter;
rtw_free_uc_swdec_pending_queue(padapter);
- rtw_os_recv_resource_free(precvpriv);
+ precvframe = (union recv_frame *)precvpriv->precv_frame_buf;
+
+ for (i = 0; i < NR_RECVFRAME; i++) {
+ if (precvframe->u.hdr.pkt) {
+ /* free skb by driver */
+ dev_kfree_skb_any(precvframe->u.hdr.pkt);
+ precvframe->u.hdr.pkt = NULL;
+ }
+ precvframe++;
+ }
vfree(precvpriv->pallocated_frame_buf);
diff --git a/drivers/staging/rtl8723bs/include/recv_osdep.h b/drivers/staging/rtl8723bs/include/recv_osdep.h
index 763ddef4ad90..9b3f4e8293ee 100644
--- a/drivers/staging/rtl8723bs/include/recv_osdep.h
+++ b/drivers/staging/rtl8723bs/include/recv_osdep.h
@@ -18,9 +18,6 @@ extern void rtw_recv_returnpacket(struct net_device *cnxt, struct sk_buff *pretu
int rtw_init_recv_priv(struct recv_priv *precvpriv, struct adapter *padapter);
void rtw_free_recv_priv(struct recv_priv *precvpriv);
-
-void rtw_os_recv_resource_free(struct recv_priv *precvpriv);
-
void rtw_os_recvbuf_resource_free(struct adapter *padapter, struct recv_buf *precvbuf);
struct sk_buff *rtw_os_alloc_msdu_pkt(union recv_frame *prframe, u16 nSubframe_Length, u8 *pdata);
diff --git a/drivers/staging/rtl8723bs/os_dep/recv_linux.c b/drivers/staging/rtl8723bs/os_dep/recv_linux.c
index ccd00f8bee7e..c71e0c762f4f 100644
--- a/drivers/staging/rtl8723bs/os_dep/recv_linux.c
+++ b/drivers/staging/rtl8723bs/os_dep/recv_linux.c
@@ -9,24 +9,6 @@
#include <net/cfg80211.h>
#include <linux/unaligned.h>
-/* free os related resource in union recv_frame */
-void rtw_os_recv_resource_free(struct recv_priv *precvpriv)
-{
- signed int i;
- union recv_frame *precvframe;
-
- precvframe = (union recv_frame *) precvpriv->precv_frame_buf;
-
- for (i = 0; i < NR_RECVFRAME; i++) {
- if (precvframe->u.hdr.pkt) {
- /* free skb by driver */
- dev_kfree_skb_any(precvframe->u.hdr.pkt);
- precvframe->u.hdr.pkt = NULL;
- }
- precvframe++;
- }
-}
-
/* free os related resource in struct recv_buf */
void rtw_os_recvbuf_resource_free(struct adapter *padapter, struct recv_buf *precvbuf)
{
--
2.51.0
next prev parent reply other threads:[~2025-08-22 13:55 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-22 13:54 [PATCH 00/13] staging: rtl8723bs: get rid of os_dep/recv_linux.c Michael Straube
2025-08-22 13:54 ` [PATCH 01/13] staging: rtl8723bs: remove wrapper rtw_init_recv_timer Michael Straube
2025-08-22 13:54 ` [PATCH 02/13] staging: rtl8723bs: move rtw_recv_indicatepkt to rtw_recv.c Michael Straube
2025-08-22 13:54 ` [PATCH 03/13] staging: rtl8723bs: move rtw_handle_tkip_mic_err " Michael Straube
2025-08-22 13:54 ` [PATCH 04/13] staging: rtl8723bs: merge rtw_os_free_recvframe into rtw_recv.c Michael Straube
2025-08-22 13:54 ` [PATCH 05/13] staging: rtl8723bs: merge rtw_os_recv_resource_alloc " Michael Straube
2025-08-22 13:54 ` Michael Straube [this message]
2025-08-22 13:54 ` [PATCH 07/13] staging: rtl8723bs: merge rtw_os_recvbuf_resource_free into rtl8723bs_recv.c Michael Straube
2025-08-22 13:54 ` [PATCH 08/13] staging: rtl8723bs: move rtw_os_alloc_msdu_pkt to rtw_recv.c Michael Straube
2025-08-22 13:54 ` [PATCH 09/13] staging: rtl8723bs: rename rtw_os_alloc_msdu_pkt Michael Straube
2025-08-22 13:54 ` [PATCH 10/13] staging: rtl8723bs: move rtw_os_recv_indicate_pkt to rtw_recv.c Michael Straube
2025-08-22 13:54 ` [PATCH 11/13] staging: rtl8723bs: rename rtw_os_recv_indicate_pkt Michael Straube
2025-08-22 13:54 ` [PATCH 12/13] staging: rtl8723bs: remove os_dep/recv_linux.c Michael Straube
2025-08-22 13:54 ` [PATCH 13/13] staging: rtl8723bs: remove include/recv_osdep.h Michael Straube
2025-08-22 14:06 ` [PATCH 00/13] staging: rtl8723bs: get rid of os_dep/recv_linux.c Hans de Goede
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=20250822135418.118115-7-straube.linux@gmail.com \
--to=straube.linux@gmail.com \
--cc=Larry.Finger@lwfinger.net \
--cc=gregkh@linuxfoundation.org \
--cc=hdegoede@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
/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 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).