Skip to content

Commit

Permalink
Linux 5.17 compat: tasklet_init
Browse files Browse the repository at this point in the history
  • Loading branch information
RinCat committed Mar 3, 2022
1 parent aacd0d5 commit 5f6ef2f
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 15 deletions.
11 changes: 5 additions & 6 deletions core/mesh/rtw_mesh.c
Original file line number Diff line number Diff line change
Expand Up @@ -2954,9 +2954,9 @@ u8 rtw_mesh_ps_annc(_adapter *adapter, u8 ps)
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 xmit_frame *xframe;
_list *list, *head;
Expand Down Expand Up @@ -3376,10 +3376,9 @@ void rtw_mesh_init_mesh_info(_adapter *adapter)
rtw_mesh_pathtbl_init(adapter);

_rtw_init_queue(&minfo->mpath_tx_queue);
tasklet_init(&minfo->mpath_tx_tasklet
, (void(*)(unsigned long))mpath_tx_tasklet_hdl
, (unsigned long)adapter);

tasklet_init(&minfo->mpath_tx_tasklet,
mpath_tx_tasklet_hdl,
(unsigned long)adapter);
rtw_mrc_init(adapter);

_rtw_init_listhead(&minfo->preq_queue.list);
Expand Down
2 changes: 1 addition & 1 deletion hal/hal_hci/hal_usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ int usb_init_recv_priv(_adapter *padapter, u16 ini_in_buf_sz)

#ifdef PLATFORM_LINUX
tasklet_init(&precvpriv->recv_tasklet,
(void(*)(unsigned long))usb_recv_tasklet,
usb_recv_tasklet,
(unsigned long)padapter);
#endif /* PLATFORM_LINUX */

Expand Down
6 changes: 3 additions & 3 deletions hal/rtl8822b/usb/rtl8822bu_xmit.c
Original file line number Diff line number Diff line change
Expand Up @@ -847,10 +847,10 @@ static s32 rtl8822bu_xmitframe_complete(PADAPTER padapter, struct xmit_priv *pxm
}
#endif

static void rtl8822bu_xmit_tasklet(void *priv)
static void rtl8822bu_xmit_tasklet(unsigned long data)
{
int ret = _FALSE;
_adapter *padapter = (_adapter *)priv;
_adapter *padapter = (_adapter *)data;
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;

while (1) {
Expand Down Expand Up @@ -878,7 +878,7 @@ s32 rtl8822bu_init_xmit_priv(PADAPTER padapter)

#ifdef PLATFORM_LINUX
tasklet_init(&pxmitpriv->xmit_tasklet,
(void(*)(unsigned long))rtl8822bu_xmit_tasklet,
rtl8822bu_xmit_tasklet,
(unsigned long)padapter);
#endif
#ifdef CONFIG_TX_EARLY_MODE
Expand Down
2 changes: 1 addition & 1 deletion include/usb_ops_linux.h
Original file line number Diff line number Diff line change
Expand Up @@ -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_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);
void usb_recv_tasklet(void *priv);
void usb_recv_tasklet(unsigned long data);

#ifdef CONFIG_USB_INTERRUPT_IN_PIPE
void usb_read_interrupt_complete(struct urb *purb, struct pt_regs *regs);
Expand Down
8 changes: 4 additions & 4 deletions os_dep/linux/usb_ops_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -746,10 +746,10 @@ void usb_init_recvbuf(_adapter *padapter, struct recv_buf *precvbuf)
int recvbuf2recvframe(PADAPTER padapter, void *ptr);

#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;
_adapter *padapter = (_adapter *)priv;
_adapter *padapter = (_adapter *)data;
struct recv_priv *precvpriv = &padapter->recvpriv;

while (NULL != (precvbuf = rtw_dequeue_recvbuf(&precvpriv->recv_buf_pending_queue))) {
Expand Down Expand Up @@ -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 */

void usb_recv_tasklet(void *priv)
void usb_recv_tasklet(unsigned long data)
{
_pkt *pskb;
_adapter *padapter = (_adapter *)priv;
_adapter *padapter = (_adapter *)data;
struct recv_priv *precvpriv = &padapter->recvpriv;
struct recv_buf *precvbuf = NULL;

Expand Down

0 comments on commit 5f6ef2f

Please sign in to comment.