[PATCH 04/13] staging: rtl8723bs: merge rtw_os_free_recvframe into rtw_recv.c

Michael Straube posted 13 patches 1 month, 1 week ago
[PATCH 04/13] staging: rtl8723bs: merge rtw_os_free_recvframe into rtw_recv.c
Posted by Michael Straube 1 month, 1 week ago
Merge the functionality of rtw_os_free_recvframe in os_dep/recv_linux.c
into rtw_free_recvframe 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      | 6 ++++--
 drivers/staging/rtl8723bs/include/recv_osdep.h | 4 ----
 drivers/staging/rtl8723bs/os_dep/recv_linux.c  | 9 ---------
 3 files changed, 4 insertions(+), 15 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_recv.c b/drivers/staging/rtl8723bs/core/rtw_recv.c
index b043e3d1cd82..2b054525b3fd 100644
--- a/drivers/staging/rtl8723bs/core/rtw_recv.c
+++ b/drivers/staging/rtl8723bs/core/rtw_recv.c
@@ -147,8 +147,10 @@ int rtw_free_recvframe(union recv_frame *precvframe, struct __queue *pfree_recv_
 	struct adapter *padapter = precvframe->u.hdr.adapter;
 	struct recv_priv *precvpriv = &padapter->recvpriv;
 
-	rtw_os_free_recvframe(precvframe);
-
+	if (precvframe->u.hdr.pkt) {
+		dev_kfree_skb_any(precvframe->u.hdr.pkt);/* free skb by driver */
+		precvframe->u.hdr.pkt = NULL;
+	}
 
 	spin_lock_bh(&pfree_recv_queue->lock);
 
diff --git a/drivers/staging/rtl8723bs/include/recv_osdep.h b/drivers/staging/rtl8723bs/include/recv_osdep.h
index 91fb275cbcaf..51b52d6b0367 100644
--- a/drivers/staging/rtl8723bs/include/recv_osdep.h
+++ b/drivers/staging/rtl8723bs/include/recv_osdep.h
@@ -22,10 +22,6 @@ void rtw_free_recv_priv(struct recv_priv *precvpriv);
 void rtw_os_recv_resource_alloc(struct adapter *padapter, union recv_frame *precvframe);
 void rtw_os_recv_resource_free(struct recv_priv *precvpriv);
 
-
-void rtw_os_free_recvframe(union recv_frame *precvframe);
-
-
 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 72fd86e03b5c..c5819c3c59d8 100644
--- a/drivers/staging/rtl8723bs/os_dep/recv_linux.c
+++ b/drivers/staging/rtl8723bs/os_dep/recv_linux.c
@@ -9,15 +9,6 @@
 #include <net/cfg80211.h>
 #include <linux/unaligned.h>
 
-void rtw_os_free_recvframe(union recv_frame *precvframe)
-{
-	if (precvframe->u.hdr.pkt) {
-		dev_kfree_skb_any(precvframe->u.hdr.pkt);/* free skb by driver */
-
-		precvframe->u.hdr.pkt = NULL;
-	}
-}
-
 /* alloc os related resource in union recv_frame */
 void rtw_os_recv_resource_alloc(struct adapter *padapter, union recv_frame *precvframe)
 {
-- 
2.51.0