diff options
| author | Hungyu Lin <dennylin0707@gmail.com> | 2026-05-14 13:07:06 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-05-21 13:39:51 +0300 |
| commit | 091729b2e09dbd97309abc59246d727602014c4a (patch) | |
| tree | 44b4eab305fa7407bfd074a59b3605bbfb35f0ec | |
| parent | 2803ff08e7983265302ef97892367bc0336bdce3 (diff) | |
| download | linux-091729b2e09dbd97309abc59246d727602014c4a.tar.xz | |
staging: rtl8723bs: convert rtw_xmit_classifier to return errno
Convert rtw_xmit_classifier() to return 0 on success and
negative error codes on failure.
Update the caller to check for non-zero return values and
preserve the existing _FAIL/_SUCCESS semantics.
Signed-off-by: Hungyu Lin <dennylin0707@gmail.com>
Link: https://patch.msgid.link/20260514100708.25031-4-dennylin0707@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| -rw-r--r-- | drivers/staging/rtl8723bs/core/rtw_xmit.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/staging/rtl8723bs/core/rtw_xmit.c b/drivers/staging/rtl8723bs/core/rtw_xmit.c index b9dc54cdf401..46ee8f43064a 100644 --- a/drivers/staging/rtl8723bs/core/rtw_xmit.c +++ b/drivers/staging/rtl8723bs/core/rtw_xmit.c @@ -1818,7 +1818,7 @@ void rtw_free_xmitframe_queue(struct xmit_priv *pxmitpriv, struct __queue *pfram * Will enqueue pxmitframe to the proper queue, * and indicate it to xx_pending list..... */ -static s32 rtw_xmit_classifier(struct adapter *padapter, struct xmit_frame *pxmitframe) +static int rtw_xmit_classifier(struct adapter *padapter, struct xmit_frame *pxmitframe) { u8 ac_index; struct sta_info *psta; @@ -1828,13 +1828,13 @@ static s32 rtw_xmit_classifier(struct adapter *padapter, struct xmit_frame *pxmi psta = rtw_get_stainfo(&padapter->stapriv, pattrib->ra); if (pattrib->psta != psta) - return _FAIL; + return -ENODEV; if (!psta) - return _FAIL; + return -EINVAL; if (!(psta->state & _FW_LINKED)) - return _FAIL; + return -ENETDOWN; ptxservq = rtw_get_sta_pending(padapter, psta, pattrib->priority, (u8 *)(&ac_index)); @@ -1845,12 +1845,15 @@ static s32 rtw_xmit_classifier(struct adapter *padapter, struct xmit_frame *pxmi ptxservq->qcnt++; phwxmits[ac_index].accnt++; - return _SUCCESS; + return 0; } s32 rtw_xmitframe_enqueue(struct adapter *padapter, struct xmit_frame *pxmitframe) { - if (rtw_xmit_classifier(padapter, pxmitframe) == _FAIL) + int res; + + res = rtw_xmit_classifier(padapter, pxmitframe); + if (res) return _FAIL; return _SUCCESS; |
