[PATCH 16/19] staging: r8188eu: make rtw_os_pkt_complete() static

From: Michael Straube
Date: Sat Aug 20 2022 - 14:17:57 EST


The function rtw_os_pkt_complete() is only used in rtw_xmit.c.
Make it static.

Signed-off-by: Michael Straube <straube.linux@xxxxxxxxx>
---
drivers/staging/r8188eu/core/rtw_xmit.c | 18 ++++++++++++++++++
drivers/staging/r8188eu/include/rtw_xmit.h | 3 +++
drivers/staging/r8188eu/include/xmit_osdep.h | 4 ----
drivers/staging/r8188eu/os_dep/xmit_linux.c | 20 --------------------
4 files changed, 21 insertions(+), 24 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_xmit.c b/drivers/staging/r8188eu/core/rtw_xmit.c
index 760b115938f2..c324dada4f5b 100644
--- a/drivers/staging/r8188eu/core/rtw_xmit.c
+++ b/drivers/staging/r8188eu/core/rtw_xmit.c
@@ -229,6 +229,24 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, struct adapter *padapter)
return res;
}

+static void rtw_os_pkt_complete(struct adapter *padapter, struct sk_buff *pkt)
+{
+ u16 queue;
+ struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
+
+ queue = skb_get_queue_mapping(pkt);
+ if (padapter->registrypriv.wifi_spec) {
+ if (__netif_subqueue_stopped(padapter->pnetdev, queue) &&
+ (pxmitpriv->hwxmits[queue].accnt < WMM_XMIT_THRESHOLD))
+ netif_wake_subqueue(padapter->pnetdev, queue);
+ } else {
+ if (__netif_subqueue_stopped(padapter->pnetdev, queue))
+ netif_wake_subqueue(padapter->pnetdev, queue);
+ }
+
+ dev_kfree_skb_any(pkt);
+}
+
void rtw_xmit_complete(struct adapter *padapter, struct xmit_frame *pxframe)
{
if (pxframe->pkt)
diff --git a/drivers/staging/r8188eu/include/rtw_xmit.h b/drivers/staging/r8188eu/include/rtw_xmit.h
index 2475ca084265..be9a7afad8ea 100644
--- a/drivers/staging/r8188eu/include/rtw_xmit.h
+++ b/drivers/staging/r8188eu/include/rtw_xmit.h
@@ -7,6 +7,9 @@
#include "osdep_service.h"
#include "drv_types.h"

+#define NR_XMITFRAME 256
+#define WMM_XMIT_THRESHOLD (NR_XMITFRAME * 2 / 5)
+
#define MAX_XMITBUF_SZ (20480) /* 20k */
#define NR_XMITBUFF (4)

diff --git a/drivers/staging/r8188eu/include/xmit_osdep.h b/drivers/staging/r8188eu/include/xmit_osdep.h
index b881399fd989..ae738d215e99 100644
--- a/drivers/staging/r8188eu/include/xmit_osdep.h
+++ b/drivers/staging/r8188eu/include/xmit_osdep.h
@@ -11,8 +11,6 @@ extern int rtw_ht_enable;
extern int rtw_cbw40_enable;
extern int rtw_ampdu_enable;/* for enable tx_ampdu */

-#define NR_XMITFRAME 256
-
struct xmit_priv;
struct pkt_attrib;
struct sta_xmit_priv;
@@ -21,6 +19,4 @@ struct xmit_buf;

int rtw_xmit_entry(struct sk_buff *pkt, struct net_device *pnetdev);

-void rtw_os_pkt_complete(struct adapter *padapter, struct sk_buff *pkt);
-
#endif /* __XMIT_OSDEP_H_ */
diff --git a/drivers/staging/r8188eu/os_dep/xmit_linux.c b/drivers/staging/r8188eu/os_dep/xmit_linux.c
index d67508096209..4721447a02e8 100644
--- a/drivers/staging/r8188eu/os_dep/xmit_linux.c
+++ b/drivers/staging/r8188eu/os_dep/xmit_linux.c
@@ -11,26 +11,6 @@
#include "../include/osdep_intf.h"
#include "../include/usb_osintf.h"

-#define WMM_XMIT_THRESHOLD (NR_XMITFRAME * 2 / 5)
-
-void rtw_os_pkt_complete(struct adapter *padapter, struct sk_buff *pkt)
-{
- u16 queue;
- struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
-
- queue = skb_get_queue_mapping(pkt);
- if (padapter->registrypriv.wifi_spec) {
- if (__netif_subqueue_stopped(padapter->pnetdev, queue) &&
- (pxmitpriv->hwxmits[queue].accnt < WMM_XMIT_THRESHOLD))
- netif_wake_subqueue(padapter->pnetdev, queue);
- } else {
- if (__netif_subqueue_stopped(padapter->pnetdev, queue))
- netif_wake_subqueue(padapter->pnetdev, queue);
- }
-
- dev_kfree_skb_any(pkt);
-}
-
static void rtw_check_xmit_resource(struct adapter *padapter, struct sk_buff *pkt)
{
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
--
2.37.2