mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 17:47:41 +02:00
staging: rtl8723bs: move rtw_os_xmit_resource_alloc to rtw_xmit.c
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>
This commit is contained in:
parent
312989a3b0
commit
e7c3d33739
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user