mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 01:55:51 +02:00
staging: rtl8723bs: make rtw_alloc_hwxmits static
The rtw_alloc_hwxmits() function is only used within this file. Make it static to limit its scope. Signed-off-by: Hungyu Lin <dennylin0707@gmail.com> Reviewed-by: Dan Carpenter <error27@gmail.com> Link: https://patch.msgid.link/20260408111314.19329-3-dennylin0707@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
ab92b4aabf
commit
76b4ffc748
|
|
@ -33,6 +33,46 @@ void _rtw_init_sta_xmit_priv(struct sta_xmit_priv *psta_xmitpriv)
|
|||
INIT_LIST_HEAD(&psta_xmitpriv->apsd);
|
||||
}
|
||||
|
||||
static s32 rtw_alloc_hwxmits(struct adapter *padapter)
|
||||
{
|
||||
struct hw_xmit *hwxmits;
|
||||
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
|
||||
|
||||
pxmitpriv->hwxmit_entry = HWXMIT_ENTRY;
|
||||
|
||||
pxmitpriv->hwxmits = NULL;
|
||||
|
||||
pxmitpriv->hwxmits = kzalloc_objs(*hwxmits, pxmitpriv->hwxmit_entry,
|
||||
GFP_ATOMIC);
|
||||
if (!pxmitpriv->hwxmits)
|
||||
return _FAIL;
|
||||
|
||||
hwxmits = pxmitpriv->hwxmits;
|
||||
|
||||
if (pxmitpriv->hwxmit_entry == 5) {
|
||||
hwxmits[0] .sta_queue = &pxmitpriv->bm_pending;
|
||||
|
||||
hwxmits[1] .sta_queue = &pxmitpriv->vo_pending;
|
||||
|
||||
hwxmits[2] .sta_queue = &pxmitpriv->vi_pending;
|
||||
|
||||
hwxmits[3] .sta_queue = &pxmitpriv->bk_pending;
|
||||
|
||||
hwxmits[4] .sta_queue = &pxmitpriv->be_pending;
|
||||
} else if (pxmitpriv->hwxmit_entry == 4) {
|
||||
hwxmits[0] .sta_queue = &pxmitpriv->vo_pending;
|
||||
|
||||
hwxmits[1] .sta_queue = &pxmitpriv->vi_pending;
|
||||
|
||||
hwxmits[2] .sta_queue = &pxmitpriv->be_pending;
|
||||
|
||||
hwxmits[3] .sta_queue = &pxmitpriv->bk_pending;
|
||||
} else {
|
||||
}
|
||||
|
||||
return _SUCCESS;
|
||||
}
|
||||
|
||||
s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, struct adapter *padapter)
|
||||
{
|
||||
int i;
|
||||
|
|
@ -1852,46 +1892,6 @@ s32 rtw_xmit_classifier(struct adapter *padapter, struct xmit_frame *pxmitframe)
|
|||
return res;
|
||||
}
|
||||
|
||||
s32 rtw_alloc_hwxmits(struct adapter *padapter)
|
||||
{
|
||||
struct hw_xmit *hwxmits;
|
||||
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
|
||||
|
||||
pxmitpriv->hwxmit_entry = HWXMIT_ENTRY;
|
||||
|
||||
pxmitpriv->hwxmits = NULL;
|
||||
|
||||
pxmitpriv->hwxmits = kzalloc_objs(*hwxmits, pxmitpriv->hwxmit_entry,
|
||||
GFP_ATOMIC);
|
||||
if (!pxmitpriv->hwxmits)
|
||||
return _FAIL;
|
||||
|
||||
hwxmits = pxmitpriv->hwxmits;
|
||||
|
||||
if (pxmitpriv->hwxmit_entry == 5) {
|
||||
hwxmits[0] .sta_queue = &pxmitpriv->bm_pending;
|
||||
|
||||
hwxmits[1] .sta_queue = &pxmitpriv->vo_pending;
|
||||
|
||||
hwxmits[2] .sta_queue = &pxmitpriv->vi_pending;
|
||||
|
||||
hwxmits[3] .sta_queue = &pxmitpriv->bk_pending;
|
||||
|
||||
hwxmits[4] .sta_queue = &pxmitpriv->be_pending;
|
||||
} else if (pxmitpriv->hwxmit_entry == 4) {
|
||||
hwxmits[0] .sta_queue = &pxmitpriv->vo_pending;
|
||||
|
||||
hwxmits[1] .sta_queue = &pxmitpriv->vi_pending;
|
||||
|
||||
hwxmits[2] .sta_queue = &pxmitpriv->be_pending;
|
||||
|
||||
hwxmits[3] .sta_queue = &pxmitpriv->bk_pending;
|
||||
} else {
|
||||
}
|
||||
|
||||
return _SUCCESS;
|
||||
}
|
||||
|
||||
void rtw_free_hwxmits(struct adapter *padapter)
|
||||
{
|
||||
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
|
||||
|
|
|
|||
|
|
@ -457,7 +457,6 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, struct adapter *padapter);
|
|||
void _rtw_free_xmit_priv(struct xmit_priv *pxmitpriv);
|
||||
|
||||
|
||||
s32 rtw_alloc_hwxmits(struct adapter *padapter);
|
||||
void rtw_free_hwxmits(struct adapter *padapter);
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user