From: Hungyu Lin <dennylin0707@gmail.com>
To: gregkh@linuxfoundation.org
Cc: error27@gmail.com, khomenkov@mailbox.org,
khushalchitturi@gmail.com, s9430939@naver.com,
nikolayof23@gmail.com, linux-staging@lists.linux.dev,
linux-kernel@vger.kernel.org, Hungyu Lin <dennylin0707@gmail.com>
Subject: [PATCH 5/5] staging: rtl8723bs: convert rtw_xmitframe_coalesce() to return errno
Date: Mon, 13 Jul 2026 07:05:37 +0000 [thread overview]
Message-ID: <20260713070537.15903-6-dennylin0707@gmail.com> (raw)
In-Reply-To: <20260713070537.15903-1-dennylin0707@gmail.com>
Convert rtw_xmitframe_coalesce() to return 0 on success
and a negative errno on failure.
Propagate errno values returned by the helper functions
instead of converting them to _FAIL.
No functional change intended.
Signed-off-by: Hungyu Lin <dennylin0707@gmail.com>
---
drivers/staging/rtl8723bs/core/rtw_xmit.c | 10 +++++-----
drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c | 2 +-
drivers/staging/rtl8723bs/include/rtw_xmit.h | 2 +-
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_xmit.c b/drivers/staging/rtl8723bs/core/rtw_xmit.c
index d4bdda50b68f..2626ac8ba178 100644
--- a/drivers/staging/rtl8723bs/core/rtw_xmit.c
+++ b/drivers/staging/rtl8723bs/core/rtw_xmit.c
@@ -1064,7 +1064,7 @@ u32 rtw_calculate_wlan_pkt_size_by_attribue(struct pkt_attrib *pattrib)
* 5. move frag chunk from pframe to pxmitframe->mem
* 6. apply sw-encrypt, if necessary.
*/
-s32 rtw_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, struct xmit_frame *pxmitframe)
+int rtw_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, struct xmit_frame *pxmitframe)
{
struct pkt_file pktfile;
@@ -1085,7 +1085,7 @@ s32 rtw_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, struct
int ret;
if (!pxmitframe->buf_addr)
- return _FAIL;
+ return -EINVAL;
pbuf_start = pxmitframe->buf_addr;
@@ -1094,7 +1094,7 @@ s32 rtw_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, struct
ret = rtw_make_wlanhdr(padapter, mem_start, pattrib);
if (ret)
- return _FAIL;
+ return ret;
_rtw_open_pktfile(pkt, &pktfile);
ret = _rtw_pktfile_read(&pktfile, NULL, pattrib->pkt_hdrlen);
@@ -1174,7 +1174,7 @@ s32 rtw_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, struct
ret = xmitframe_addmic(padapter, pxmitframe);
if (ret)
- return _FAIL;
+ return ret;
xmitframe_swencrypt(padapter, pxmitframe);
@@ -1183,7 +1183,7 @@ s32 rtw_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, struct
else
pattrib->vcs_mode = NONE_VCS;
- return _SUCCESS;
+ return 0;
}
/* broadcast or multicast management pkt use BIP, unicast management pkt use CCMP encryption */
diff --git a/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c b/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c
index e40f69c13c44..79dbca1b5525 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c
@@ -285,7 +285,7 @@ static s32 xmit_xmitframes(struct adapter *padapter, struct xmit_priv *pxmitpriv
pxmitframe->buf_addr = pxmitbuf->ptail;
ret = rtw_xmitframe_coalesce(padapter, pxmitframe->pkt, pxmitframe);
- if (ret != _SUCCESS) {
+ if (ret) {
netdev_err(padapter->pnetdev,
"%s: coalesce failed with error %d\n",
__func__, ret);
diff --git a/drivers/staging/rtl8723bs/include/rtw_xmit.h b/drivers/staging/rtl8723bs/include/rtw_xmit.h
index 303b50051274..917e846e9ce2 100644
--- a/drivers/staging/rtl8723bs/include/rtw_xmit.h
+++ b/drivers/staging/rtl8723bs/include/rtw_xmit.h
@@ -423,7 +423,7 @@ int rtw_xmitframe_enqueue(struct adapter *padapter, struct xmit_frame *pxmitfram
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)
-extern s32 rtw_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, struct xmit_frame *pxmitframe);
+extern int rtw_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, struct xmit_frame *pxmitframe);
extern s32 rtw_mgmt_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, struct xmit_frame *pxmitframe);
s32 _rtw_init_hw_txqueue(struct hw_txqueue *phw_txqueue, u8 ac_tag);
void _rtw_init_sta_xmit_priv(struct sta_xmit_priv *psta_xmitpriv);
--
2.43.0
next prev parent reply other threads:[~2026-07-13 7:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-13 7:05 [PATCH 0/5] staging: rtl8723bs: convert xmit helpers to return errno Hungyu Lin
2026-07-13 7:05 ` [PATCH 1/5] staging: rtl8723bs: remove redundant return variable in rtw_make_wlanhdr() Hungyu Lin
2026-07-13 7:05 ` [PATCH 2/5] staging: rtl8723bs: convert rtw_make_wlanhdr() to return errno Hungyu Lin
2026-07-13 8:16 ` Dan Carpenter
2026-07-13 7:05 ` [PATCH 3/5] staging: rtl8723bs: convert xmitframe_addmic() " Hungyu Lin
2026-07-13 7:05 ` [PATCH 4/5] staging: rtl8723bs: simplify rtw_xmitframe_coalesce() control flow Hungyu Lin
2026-07-13 7:05 ` Hungyu Lin [this message]
2026-07-13 8:15 ` [PATCH 0/5] staging: rtl8723bs: convert xmit helpers to return errno 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=20260713070537.15903-6-dennylin0707@gmail.com \
--to=dennylin0707@gmail.com \
--cc=error27@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=khomenkov@mailbox.org \
--cc=khushalchitturi@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=nikolayof23@gmail.com \
--cc=s9430939@naver.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox