Skip to content

Commit aec7478

Browse files
mistraubegregkh
authored andcommitted
staging: rtl8723bs: merge rtw_os_recv_resource_alloc into rtw_recv.c
Merge the functionality of rtw_os_recv_resource_alloc into _rtw_init_recv_priv 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-6-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent d91ccaa commit aec7478

3 files changed

Lines changed: 2 additions & 8 deletions

File tree

drivers/staging/rtl8723bs/core/rtw_recv.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ signed int _rtw_init_recv_priv(struct recv_priv *precvpriv, struct adapter *pada
6666

6767
list_add_tail(&(precvframe->u.list), &(precvpriv->free_recv_queue.queue));
6868

69-
rtw_os_recv_resource_alloc(padapter, precvframe);
69+
precvframe->u.hdr.pkt_newalloc = NULL;
70+
precvframe->u.hdr.pkt = NULL;
7071

7172
precvframe->u.hdr.len = 0;
7273

drivers/staging/rtl8723bs/include/recv_osdep.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ int rtw_init_recv_priv(struct recv_priv *precvpriv, struct adapter *padapter);
1919
void rtw_free_recv_priv(struct recv_priv *precvpriv);
2020

2121

22-
void rtw_os_recv_resource_alloc(struct adapter *padapter, union recv_frame *precvframe);
2322
void rtw_os_recv_resource_free(struct recv_priv *precvpriv);
2423

2524
void rtw_os_recvbuf_resource_free(struct adapter *padapter, struct recv_buf *precvbuf);

drivers/staging/rtl8723bs/os_dep/recv_linux.c

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

12-
/* alloc os related resource in union recv_frame */
13-
void rtw_os_recv_resource_alloc(struct adapter *padapter, union recv_frame *precvframe)
14-
{
15-
precvframe->u.hdr.pkt_newalloc = precvframe->u.hdr.pkt = NULL;
16-
}
17-
1812
/* free os related resource in union recv_frame */
1913
void rtw_os_recv_resource_free(struct recv_priv *precvpriv)
2014
{

0 commit comments

Comments
 (0)