From: Hungyu Lin <dennylin0707@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Dan Carpenter <error27@gmail.com>,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
Hungyu Lin <dennylin0707@gmail.com>
Subject: [PATCH 3/5] staging: rtl8723bs: convert rtw_xmit_classifier to return errno
Date: Thu, 14 May 2026 06:03:21 +0000 [thread overview]
Message-ID: <20260514060323.24895-4-dennylin0707@gmail.com> (raw)
In-Reply-To: <20260514060323.24895-1-dennylin0707@gmail.com>
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>
---
drivers/staging/rtl8723bs/core/rtw_xmit.c | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_xmit.c b/drivers/staging/rtl8723bs/core/rtw_xmit.c
index b3953bdedb04..80f3dfaf793d 100644
--- a/drivers/staging/rtl8723bs/core/rtw_xmit.c
+++ b/drivers/staging/rtl8723bs/core/rtw_xmit.c
@@ -1825,7 +1825,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;
@@ -1835,13 +1835,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));
@@ -1852,12 +1852,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;
--
2.34.1
next prev parent reply other threads:[~2026-05-14 6:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-14 6:03 [PATCH 0/5] staging: rtl8723bs: clean up xmit classifier and propagate errno Hungyu Lin
2026-05-14 6:03 ` [PATCH 1/5] staging: rtl8723bs: simplify rtw_xmit_classifier control flow Hungyu Lin
2026-05-14 6:03 ` [PATCH 2/5] staging: rtl8723bs: make rtw_xmit_classifier static Hungyu Lin
2026-05-14 6:03 ` Hungyu Lin [this message]
2026-05-14 6:03 ` [PATCH 4/5] staging: rtl8723bs: propagate errno through xmit enqueue path Hungyu Lin
2026-05-14 6:03 ` [PATCH 5/5] staging: rtl8723bs: propagate errno through hal xmit path Hungyu Lin
2026-05-14 8:58 ` Dan Carpenter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260514060323.24895-4-dennylin0707@gmail.com \
--to=dennylin0707@gmail.com \
--cc=error27@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.