aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Straube <straube.linux@gmail.com>2022-08-07 20:15:34 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-08-16 15:19:05 +0200
commit401ae6efe3a21a3812b92eb49ea32a18a4416c50 (patch)
treeb4fe4fc58079db3b27c6dc82557c0704ea3af5da
parentstaging: r8188eu: do not spam the kernel log (diff)
staging: r8188eu: merge rtw_os_recvbuf_resource_free() into rtw_recv.c
The function rtw_os_recvbuf_resource_free() is just a wrapper around usb_free_urb(). Call usb_free_urb() directly in rtl8188eu_free_recv_priv() and remove rtw_os_recvbuf_resource_free() to simplify the driver code. Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220807181538.8499-2-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/r8188eu/core/rtw_recv.c2
-rw-r--r--drivers/staging/r8188eu/include/recv_osdep.h1
-rw-r--r--drivers/staging/r8188eu/os_dep/recv_linux.c8
3 files changed, 1 insertions, 10 deletions
diff --git a/drivers/staging/r8188eu/core/rtw_recv.c b/drivers/staging/r8188eu/core/rtw_recv.c
index 2d4baca804e9..7a97c090f297 100644
--- a/drivers/staging/r8188eu/core/rtw_recv.c
+++ b/drivers/staging/r8188eu/core/rtw_recv.c
@@ -159,7 +159,7 @@ static void rtl8188eu_free_recv_priv(struct adapter *padapter)
precvbuf = (struct recv_buf *)precvpriv->precv_buf;
for (i = 0; i < NR_RECVBUFF; i++) {
- rtw_os_recvbuf_resource_free(padapter, precvbuf);
+ usb_free_urb(precvbuf->purb);
precvbuf++;
}
diff --git a/drivers/staging/r8188eu/include/recv_osdep.h b/drivers/staging/r8188eu/include/recv_osdep.h
index ca8a613508fd..b9dc32c20cfd 100644
--- a/drivers/staging/r8188eu/include/recv_osdep.h
+++ b/drivers/staging/r8188eu/include/recv_osdep.h
@@ -20,7 +20,6 @@ int rtw_init_recv_priv(struct recv_priv *precvpriv, struct adapter *padapter);
void rtw_free_recv_priv(struct recv_priv *precvpriv);
int rtw_os_recvbuf_resource_alloc(struct adapter *adapt, struct recv_buf *buf);
-int rtw_os_recvbuf_resource_free(struct adapter *adapt, struct recv_buf *buf);
void rtw_init_recv_timer(struct recv_reorder_ctrl *preorder_ctrl);
int _netdev_open(struct net_device *pnetdev);
diff --git a/drivers/staging/r8188eu/os_dep/recv_linux.c b/drivers/staging/r8188eu/os_dep/recv_linux.c
index 1e14b6d49795..abdb42ab649b 100644
--- a/drivers/staging/r8188eu/os_dep/recv_linux.c
+++ b/drivers/staging/r8188eu/os_dep/recv_linux.c
@@ -26,14 +26,6 @@ int rtw_os_recvbuf_resource_alloc(struct adapter *padapter,
return res;
}
-/* free os related resource in struct recv_buf */
-int rtw_os_recvbuf_resource_free(struct adapter *padapter,
- struct recv_buf *precvbuf)
-{
- usb_free_urb(precvbuf->purb);
- return _SUCCESS;
-}
-
void rtw_handle_tkip_mic_err(struct adapter *padapter, u8 bgroup)
{
union iwreq_data wrqu;