mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-07 13:13:57 +08:00
staging: rtl8712: convert tasklets to use new tasklet_setup() API
In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier <romain.perier@gmail.com> Signed-off-by: Allen Pais <apais@linux.microsoft.com> Link: https://lore.kernel.org/r/20200916061831.57848-1-allen.lkml@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
02c4260713
commit
1062aa9e99
@ -28,7 +28,7 @@
|
|||||||
#include "usb_ops.h"
|
#include "usb_ops.h"
|
||||||
#include "wifi.h"
|
#include "wifi.h"
|
||||||
|
|
||||||
static void recv_tasklet(unsigned long priv);
|
static void recv_tasklet(struct tasklet_struct *t);
|
||||||
|
|
||||||
void r8712_init_recv_priv(struct recv_priv *precvpriv,
|
void r8712_init_recv_priv(struct recv_priv *precvpriv,
|
||||||
struct _adapter *padapter)
|
struct _adapter *padapter)
|
||||||
@ -60,8 +60,7 @@ void r8712_init_recv_priv(struct recv_priv *precvpriv,
|
|||||||
precvbuf++;
|
precvbuf++;
|
||||||
}
|
}
|
||||||
precvpriv->free_recv_buf_queue_cnt = NR_RECVBUFF;
|
precvpriv->free_recv_buf_queue_cnt = NR_RECVBUFF;
|
||||||
tasklet_init(&precvpriv->recv_tasklet, recv_tasklet,
|
tasklet_setup(&precvpriv->recv_tasklet, recv_tasklet);
|
||||||
(unsigned long)padapter);
|
|
||||||
skb_queue_head_init(&precvpriv->rx_skb_queue);
|
skb_queue_head_init(&precvpriv->rx_skb_queue);
|
||||||
|
|
||||||
skb_queue_head_init(&precvpriv->free_recv_skb_queue);
|
skb_queue_head_init(&precvpriv->free_recv_skb_queue);
|
||||||
@ -1057,10 +1056,11 @@ static void recvbuf2recvframe(struct _adapter *padapter, struct sk_buff *pskb)
|
|||||||
} while ((transfer_len > 0) && pkt_cnt > 0);
|
} while ((transfer_len > 0) && pkt_cnt > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void recv_tasklet(unsigned long priv)
|
static void recv_tasklet(struct tasklet_struct *t)
|
||||||
{
|
{
|
||||||
struct sk_buff *pskb;
|
struct sk_buff *pskb;
|
||||||
struct _adapter *padapter = (struct _adapter *)priv;
|
struct _adapter *padapter = from_tasklet(padapter, t,
|
||||||
|
recvpriv.recv_tasklet);
|
||||||
struct recv_priv *precvpriv = &padapter->recvpriv;
|
struct recv_priv *precvpriv = &padapter->recvpriv;
|
||||||
|
|
||||||
while (NULL != (pskb = skb_dequeue(&precvpriv->rx_skb_queue))) {
|
while (NULL != (pskb = skb_dequeue(&precvpriv->rx_skb_queue))) {
|
||||||
|
@ -144,8 +144,7 @@ int _r8712_init_xmit_priv(struct xmit_priv *pxmitpriv,
|
|||||||
INIT_WORK(&padapter->wk_filter_rx_ff0, r8712_SetFilter);
|
INIT_WORK(&padapter->wk_filter_rx_ff0, r8712_SetFilter);
|
||||||
alloc_hwxmits(padapter);
|
alloc_hwxmits(padapter);
|
||||||
init_hwxmits(pxmitpriv->hwxmits, pxmitpriv->hwxmit_entry);
|
init_hwxmits(pxmitpriv->hwxmits, pxmitpriv->hwxmit_entry);
|
||||||
tasklet_init(&pxmitpriv->xmit_tasklet, r8712_xmit_bh,
|
tasklet_setup(&pxmitpriv->xmit_tasklet, r8712_xmit_bh);
|
||||||
(unsigned long)padapter);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -277,7 +277,7 @@ int r8712_pre_xmit(struct _adapter *padapter, struct xmit_frame *pxmitframe);
|
|||||||
int r8712_xmit_enqueue(struct _adapter *padapter,
|
int r8712_xmit_enqueue(struct _adapter *padapter,
|
||||||
struct xmit_frame *pxmitframe);
|
struct xmit_frame *pxmitframe);
|
||||||
void r8712_xmit_direct(struct _adapter *padapter, struct xmit_frame *pxmitframe);
|
void r8712_xmit_direct(struct _adapter *padapter, struct xmit_frame *pxmitframe);
|
||||||
void r8712_xmit_bh(unsigned long priv);
|
void r8712_xmit_bh(struct tasklet_struct *t);
|
||||||
|
|
||||||
void xmitframe_xmitbuf_attach(struct xmit_frame *pxmitframe,
|
void xmitframe_xmitbuf_attach(struct xmit_frame *pxmitframe,
|
||||||
struct xmit_buf *pxmitbuf);
|
struct xmit_buf *pxmitbuf);
|
||||||
|
@ -308,10 +308,11 @@ void r8712_usb_read_port_cancel(struct _adapter *padapter)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void r8712_xmit_bh(unsigned long priv)
|
void r8712_xmit_bh(struct tasklet_struct *t)
|
||||||
{
|
{
|
||||||
int ret = false;
|
int ret = false;
|
||||||
struct _adapter *padapter = (struct _adapter *)priv;
|
struct _adapter *padapter = from_tasklet(padapter, t,
|
||||||
|
xmitpriv.xmit_tasklet);
|
||||||
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
|
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
|
||||||
|
|
||||||
if (padapter->driver_stopped ||
|
if (padapter->driver_stopped ||
|
||||||
|
Loading…
Reference in New Issue
Block a user