diff --git a/drivers/staging/rtl8723bs/core/rtw_xmit.c b/drivers/staging/rtl8723bs/core/rtw_xmit.c index 5a108d911ee6..33004fd9cff2 100644 --- a/drivers/staging/rtl8723bs/core/rtw_xmit.c +++ b/drivers/staging/rtl8723bs/core/rtw_xmit.c @@ -654,7 +654,7 @@ static int set_qos(struct pkt_file *ppktfile, struct pkt_attrib *pattrib) return 0; } -static s32 update_attrib(struct adapter *padapter, struct sk_buff *pkt, struct pkt_attrib *pattrib) +static int update_attrib(struct adapter *padapter, struct sk_buff *pkt, struct pkt_attrib *pattrib) { struct pkt_file pktfile; struct sta_info *psta = NULL; @@ -741,24 +741,24 @@ static s32 update_attrib(struct adapter *padapter, struct sk_buff *pkt, struct p } else { psta = rtw_get_stainfo(pstapriv, pattrib->ra); if (!psta) /* if we cannot get psta => drop the pkt */ - return _FAIL; + return -EINVAL; else if (check_fwstate(pmlmepriv, WIFI_AP_STATE) && !(psta->state & _FW_LINKED)) - return _FAIL; + return -EINVAL; } if (!psta) { /* if we cannot get psta => drop the pkt */ - return _FAIL; + return -EINVAL; } if (!(psta->state & _FW_LINKED)) - return _FAIL; + return -EINVAL; spin_lock_bh(&psta->lock); ret = update_attrib_sec_info(padapter, pattrib, psta); if (ret) { spin_unlock_bh(&psta->lock); - return _FAIL; + return ret; } update_attrib_phy_info(padapter, pattrib, psta); @@ -794,7 +794,7 @@ static s32 update_attrib(struct adapter *padapter, struct sk_buff *pkt, struct p } /* pattrib->priority = 5; force to used VI queue, for testing */ - return _SUCCESS; + return 0; } static s32 xmitframe_addmic(struct adapter *padapter, struct xmit_frame *pxmitframe) @@ -1955,7 +1955,7 @@ s32 rtw_xmit(struct adapter *padapter, struct sk_buff **ppkt) struct xmit_priv *pxmitpriv = &padapter->xmitpriv; struct xmit_frame *pxmitframe = NULL; - s32 res; + int ret; if (start == 0) start = jiffies; @@ -1968,9 +1968,8 @@ s32 rtw_xmit(struct adapter *padapter, struct sk_buff **ppkt) if (!pxmitframe) return -1; - res = update_attrib(padapter, *ppkt, &pxmitframe->attrib); - - if (res != _SUCCESS) { + ret = update_attrib(padapter, *ppkt, &pxmitframe->attrib); + if (ret) { rtw_free_xmitframe(pxmitpriv, pxmitframe); return -1; }