Skip to content

Commit d91ccaa

Browse files
mistraubegregkh
authored andcommitted
staging: rtl8723bs: merge rtw_os_free_recvframe into rtw_recv.c
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> Reviewed-by: Hans de Goede <hansg@kernel.org> Link: https://lore.kernel.org/r/20250822135418.118115-5-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 9766096 commit d91ccaa

3 files changed

Lines changed: 4 additions & 15 deletions

File tree

drivers/staging/rtl8723bs/core/rtw_recv.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,10 @@ int rtw_free_recvframe(union recv_frame *precvframe, struct __queue *pfree_recv_
147147
struct adapter *padapter = precvframe->u.hdr.adapter;
148148
struct recv_priv *precvpriv = &padapter->recvpriv;
149149

150-
rtw_os_free_recvframe(precvframe);
151-
150+
if (precvframe->u.hdr.pkt) {
151+
dev_kfree_skb_any(precvframe->u.hdr.pkt);/* free skb by driver */
152+
precvframe->u.hdr.pkt = NULL;
153+
}
152154

153155
spin_lock_bh(&pfree_recv_queue->lock);
154156

drivers/staging/rtl8723bs/include/recv_osdep.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@ void rtw_free_recv_priv(struct recv_priv *precvpriv);
2222
void rtw_os_recv_resource_alloc(struct adapter *padapter, union recv_frame *precvframe);
2323
void rtw_os_recv_resource_free(struct recv_priv *precvpriv);
2424

25-
26-
void rtw_os_free_recvframe(union recv_frame *precvframe);
27-
28-
2925
void rtw_os_recvbuf_resource_free(struct adapter *padapter, struct recv_buf *precvbuf);
3026

3127
struct sk_buff *rtw_os_alloc_msdu_pkt(union recv_frame *prframe, u16 nSubframe_Length, u8 *pdata);

drivers/staging/rtl8723bs/os_dep/recv_linux.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,6 @@
99
#include <net/cfg80211.h>
1010
#include <linux/unaligned.h>
1111

12-
void rtw_os_free_recvframe(union recv_frame *precvframe)
13-
{
14-
if (precvframe->u.hdr.pkt) {
15-
dev_kfree_skb_any(precvframe->u.hdr.pkt);/* free skb by driver */
16-
17-
precvframe->u.hdr.pkt = NULL;
18-
}
19-
}
20-
2112
/* alloc os related resource in union recv_frame */
2213
void rtw_os_recv_resource_alloc(struct adapter *padapter, union recv_frame *precvframe)
2314
{

0 commit comments

Comments
 (0)