mirror of
https://github.com/torvalds/linux.git
synced 2026-11-27 01:25:39 +01:00
staging: r8188eu: make rtw_os_pkt_complete() static
The function rtw_os_pkt_complete() is only used in rtw_xmit.c. Make it static. 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/20220820181623.12497-17-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
a80425de81
commit
16870509e9
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
|
|
@ -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_ */
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user