]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
staging: rtl8723bs: move rtw_os_xmit_resource_alloc to rtw_xmit.c
authorHungyu Lin <dennylin0707@gmail.com>
Wed, 8 Apr 2026 11:13:12 +0000 (11:13 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Apr 2026 11:01:53 +0000 (05:01 -0600)
Move rtw_os_xmit_resource_alloc() into core/rtw_xmit.c and make
it static so the xmit init helpers live together.

Signed-off-by: Hungyu Lin <dennylin0707@gmail.com>
Reviewed-by: Dan Carpenter <error27@gmail.com>
Link: https://patch.msgid.link/20260408111314.19329-5-dennylin0707@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/core/rtw_xmit.c
drivers/staging/rtl8723bs/include/xmit_osdep.h
drivers/staging/rtl8723bs/os_dep/xmit_linux.c

index befe74a1bc4ca4881f52b493bac7c7e3248a6d7d..249947a7d91054e16b6a8b647a1c9eb712b4f4ad 100644 (file)
@@ -73,6 +73,19 @@ static s32 rtw_alloc_hwxmits(struct adapter *padapter)
        return 0;
 }
 
+static int rtw_os_xmit_resource_alloc(struct adapter *padapter, struct xmit_buf *pxmitbuf, u32 alloc_sz, u8 flag)
+{
+       if (alloc_sz > 0) {
+               pxmitbuf->pallocated_buf = kzalloc(alloc_sz, GFP_KERNEL);
+               if (!pxmitbuf->pallocated_buf)
+                       return _FAIL;
+
+               pxmitbuf->pbuf = (u8 *)N_BYTE_ALIGMENT((SIZE_PTR)(pxmitbuf->pallocated_buf), XMITBUF_ALIGN_SZ);
+       }
+
+       return _SUCCESS;
+}
+
 s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, struct adapter *padapter)
 {
        int i;
index 880344bffe2f03721aad45f7bb1c6d58d79bb8f1..5b351652e31bd5438bc795583776de2acf8ba529 100644 (file)
@@ -30,7 +30,6 @@ extern netdev_tx_t rtw_xmit_entry(struct sk_buff *pkt, struct net_device *pnetde
 
 void rtw_os_xmit_schedule(struct adapter *padapter);
 
-int rtw_os_xmit_resource_alloc(struct adapter *padapter, struct xmit_buf *pxmitbuf, u32 alloc_sz, u8 flag);
 void rtw_os_xmit_resource_free(struct adapter *padapter, struct xmit_buf *pxmitbuf, u32 free_sz, u8 flag);
 
 extern uint rtw_remainder_len(struct pkt_file *pfile);
index dc0b77f38b1aea57d9f2a1275d88e12615ea353a..54a6d54400e2784e0fe741dafabaabafd724654a 100644 (file)
@@ -46,19 +46,6 @@ signed int rtw_endofpktfile(struct pkt_file *pfile)
        return false;
 }
 
-int rtw_os_xmit_resource_alloc(struct adapter *padapter, struct xmit_buf *pxmitbuf, u32 alloc_sz, u8 flag)
-{
-       if (alloc_sz > 0) {
-               pxmitbuf->pallocated_buf = kzalloc(alloc_sz, GFP_KERNEL);
-               if (!pxmitbuf->pallocated_buf)
-                       return _FAIL;
-
-               pxmitbuf->pbuf = (u8 *)N_BYTE_ALIGMENT((SIZE_PTR)(pxmitbuf->pallocated_buf), XMITBUF_ALIGN_SZ);
-       }
-
-       return _SUCCESS;
-}
-
 void rtw_os_xmit_resource_free(struct adapter *padapter, struct xmit_buf *pxmitbuf, u32 free_sz, u8 flag)
 {
        if (free_sz > 0)