mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 17:47:41 +02:00
staging: rtl8723bs: propagate errno through xmit enqueue path
Propagate errno values from rtw_xmit_classifier() through rtw_xmitframe_enqueue(), and update the local enqueue caller to check for non-zero return values. Signed-off-by: Hungyu Lin <dennylin0707@gmail.com> Link: https://patch.msgid.link/20260514100708.25031-5-dennylin0707@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
091729b2e0
commit
37dca26788
|
|
@ -1848,15 +1848,15 @@ static int rtw_xmit_classifier(struct adapter *padapter, struct xmit_frame *pxmi
|
|||
return 0;
|
||||
}
|
||||
|
||||
s32 rtw_xmitframe_enqueue(struct adapter *padapter, struct xmit_frame *pxmitframe)
|
||||
int rtw_xmitframe_enqueue(struct adapter *padapter, struct xmit_frame *pxmitframe)
|
||||
{
|
||||
int res;
|
||||
|
||||
res = rtw_xmit_classifier(padapter, pxmitframe);
|
||||
if (res)
|
||||
return _FAIL;
|
||||
return res;
|
||||
|
||||
return _SUCCESS;
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct tx_servq *rtw_get_sta_pending(struct adapter *padapter, struct sta_info *psta, signed int up, u8 *ac)
|
||||
|
|
|
|||
|
|
@ -458,8 +458,8 @@ s32 rtl8723bs_mgnt_xmit(
|
|||
*Handle xmitframe(packet) come from rtw_xmit()
|
||||
*
|
||||
* Return:
|
||||
*true dump packet directly ok
|
||||
*false enqueue, temporary can't transmit packets to hardware
|
||||
* true dump packet directly ok
|
||||
* false enqueue, temporary can't transmit packets to hardware
|
||||
*/
|
||||
s32 rtl8723bs_hal_xmit(
|
||||
struct adapter *padapter, struct xmit_frame *pxmitframe
|
||||
|
|
@ -484,7 +484,7 @@ s32 rtl8723bs_hal_xmit(
|
|||
spin_lock_bh(&pxmitpriv->lock);
|
||||
err = rtw_xmitframe_enqueue(padapter, pxmitframe);
|
||||
spin_unlock_bh(&pxmitpriv->lock);
|
||||
if (err != _SUCCESS) {
|
||||
if (err) {
|
||||
rtw_free_xmitframe(pxmitpriv, pxmitframe);
|
||||
|
||||
pxmitpriv->tx_drop++;
|
||||
|
|
@ -504,7 +504,7 @@ s32 rtl8723bs_hal_xmitframe_enqueue(
|
|||
s32 err;
|
||||
|
||||
err = rtw_xmitframe_enqueue(padapter, pxmitframe);
|
||||
if (err != _SUCCESS) {
|
||||
if (err) {
|
||||
rtw_free_xmitframe(pxmitpriv, pxmitframe);
|
||||
|
||||
pxmitpriv->tx_drop++;
|
||||
|
|
@ -512,7 +512,7 @@ s32 rtl8723bs_hal_xmitframe_enqueue(
|
|||
complete(&pxmitpriv->SdioXmitStart);
|
||||
}
|
||||
|
||||
return err;
|
||||
return err ? _FAIL : _SUCCESS;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -419,7 +419,7 @@ struct xmit_frame *rtw_alloc_xmitframe_once(struct xmit_priv *pxmitpriv);
|
|||
extern s32 rtw_free_xmitframe(struct xmit_priv *pxmitpriv, struct xmit_frame *pxmitframe);
|
||||
extern void rtw_free_xmitframe_queue(struct xmit_priv *pxmitpriv, struct __queue *pframequeue);
|
||||
struct tx_servq *rtw_get_sta_pending(struct adapter *padapter, struct sta_info *psta, signed int up, u8 *ac);
|
||||
extern s32 rtw_xmitframe_enqueue(struct adapter *padapter, struct xmit_frame *pxmitframe);
|
||||
int rtw_xmitframe_enqueue(struct adapter *padapter, struct xmit_frame *pxmitframe);
|
||||
|
||||
extern u32 rtw_calculate_wlan_pkt_size_by_attribue(struct pkt_attrib *pattrib);
|
||||
#define rtw_wlan_pkt_size(f) rtw_calculate_wlan_pkt_size_by_attribue(&f->attrib)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user