Linux 5.17 compat: tasklet_init

This commit is contained in:
Rin Cat (鈴猫) 2022-03-02 20:13:49 -05:00
parent aacd0d5c37
commit 5f6ef2ff4f
No known key found for this signature in database
GPG Key ID: 2F3A6F9E2721BF2A
5 changed files with 14 additions and 15 deletions

View File

@ -2954,9 +2954,9 @@ exit:
return annc_cnt; return annc_cnt;
} }
static void mpath_tx_tasklet_hdl(void *priv) static void mpath_tx_tasklet_hdl(unsigned long data)
{ {
_adapter *adapter = (_adapter *)priv; _adapter *adapter = (_adapter *)data;
struct rtw_mesh_info *minfo = &adapter->mesh_info; struct rtw_mesh_info *minfo = &adapter->mesh_info;
struct xmit_frame *xframe; struct xmit_frame *xframe;
_list *list, *head; _list *list, *head;
@ -3376,10 +3376,9 @@ void rtw_mesh_init_mesh_info(_adapter *adapter)
rtw_mesh_pathtbl_init(adapter); rtw_mesh_pathtbl_init(adapter);
_rtw_init_queue(&minfo->mpath_tx_queue); _rtw_init_queue(&minfo->mpath_tx_queue);
tasklet_init(&minfo->mpath_tx_tasklet tasklet_init(&minfo->mpath_tx_tasklet,
, (void(*)(unsigned long))mpath_tx_tasklet_hdl mpath_tx_tasklet_hdl,
, (unsigned long)adapter); (unsigned long)adapter);
rtw_mrc_init(adapter); rtw_mrc_init(adapter);
_rtw_init_listhead(&minfo->preq_queue.list); _rtw_init_listhead(&minfo->preq_queue.list);

View File

@ -26,7 +26,7 @@ int usb_init_recv_priv(_adapter *padapter, u16 ini_in_buf_sz)
#ifdef PLATFORM_LINUX #ifdef PLATFORM_LINUX
tasklet_init(&precvpriv->recv_tasklet, tasklet_init(&precvpriv->recv_tasklet,
(void(*)(unsigned long))usb_recv_tasklet, usb_recv_tasklet,
(unsigned long)padapter); (unsigned long)padapter);
#endif /* PLATFORM_LINUX */ #endif /* PLATFORM_LINUX */

View File

@ -847,10 +847,10 @@ static s32 rtl8822bu_xmitframe_complete(PADAPTER padapter, struct xmit_priv *pxm
} }
#endif #endif
static void rtl8822bu_xmit_tasklet(void *priv) static void rtl8822bu_xmit_tasklet(unsigned long data)
{ {
int ret = _FALSE; int ret = _FALSE;
_adapter *padapter = (_adapter *)priv; _adapter *padapter = (_adapter *)data;
struct xmit_priv *pxmitpriv = &padapter->xmitpriv; struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
while (1) { while (1) {
@ -878,7 +878,7 @@ s32 rtl8822bu_init_xmit_priv(PADAPTER padapter)
#ifdef PLATFORM_LINUX #ifdef PLATFORM_LINUX
tasklet_init(&pxmitpriv->xmit_tasklet, tasklet_init(&pxmitpriv->xmit_tasklet,
(void(*)(unsigned long))rtl8822bu_xmit_tasklet, rtl8822bu_xmit_tasklet,
(unsigned long)padapter); (unsigned long)padapter);
#endif #endif
#ifdef CONFIG_TX_EARLY_MODE #ifdef CONFIG_TX_EARLY_MODE

View File

@ -89,7 +89,7 @@ int usb_write16(struct intf_hdl *pintfhdl, u32 addr, u16 val);
int usb_write32(struct intf_hdl *pintfhdl, u32 addr, u32 val); int usb_write32(struct intf_hdl *pintfhdl, u32 addr, u32 val);
int usb_writeN(struct intf_hdl *pintfhdl, u32 addr, u32 length, u8 *pdata); int usb_writeN(struct intf_hdl *pintfhdl, u32 addr, u32 length, u8 *pdata);
u32 usb_read_port(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *rmem); u32 usb_read_port(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *rmem);
void usb_recv_tasklet(void *priv); void usb_recv_tasklet(unsigned long data);
#ifdef CONFIG_USB_INTERRUPT_IN_PIPE #ifdef CONFIG_USB_INTERRUPT_IN_PIPE
void usb_read_interrupt_complete(struct urb *purb, struct pt_regs *regs); void usb_read_interrupt_complete(struct urb *purb, struct pt_regs *regs);

View File

@ -746,10 +746,10 @@ void usb_init_recvbuf(_adapter *padapter, struct recv_buf *precvbuf)
int recvbuf2recvframe(PADAPTER padapter, void *ptr); int recvbuf2recvframe(PADAPTER padapter, void *ptr);
#ifdef CONFIG_USE_USB_BUFFER_ALLOC_RX #ifdef CONFIG_USE_USB_BUFFER_ALLOC_RX
void usb_recv_tasklet(void *priv) void usb_recv_tasklet(unsigned long data)
{ {
struct recv_buf *precvbuf = NULL; struct recv_buf *precvbuf = NULL;
_adapter *padapter = (_adapter *)priv; _adapter *padapter = (_adapter *)data;
struct recv_priv *precvpriv = &padapter->recvpriv; struct recv_priv *precvpriv = &padapter->recvpriv;
while (NULL != (precvbuf = rtw_dequeue_recvbuf(&precvpriv->recv_buf_pending_queue))) { while (NULL != (precvbuf = rtw_dequeue_recvbuf(&precvpriv->recv_buf_pending_queue))) {
@ -884,10 +884,10 @@ u32 usb_read_port(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *rmem)
} }
#else /* CONFIG_USE_USB_BUFFER_ALLOC_RX */ #else /* CONFIG_USE_USB_BUFFER_ALLOC_RX */
void usb_recv_tasklet(void *priv) void usb_recv_tasklet(unsigned long data)
{ {
_pkt *pskb; _pkt *pskb;
_adapter *padapter = (_adapter *)priv; _adapter *padapter = (_adapter *)data;
struct recv_priv *precvpriv = &padapter->recvpriv; struct recv_priv *precvpriv = &padapter->recvpriv;
struct recv_buf *precvbuf = NULL; struct recv_buf *precvbuf = NULL;