From: Hungyu Lin <dennylin0707@gmail.com>
To: gregkh@linuxfoundation.org
Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
error27@gmail.com, Hungyu Lin <dennylin0707@gmail.com>
Subject: [PATCH v2 1/3] staging: rtl8723bs: convert mgmt xmit coalesce to errno
Date: Fri, 31 Jul 2026 15:52:26 +0000 [thread overview]
Message-ID: <20260731155228.22526-2-dennylin0707@gmail.com> (raw)
In-Reply-To: <20260731155228.22526-1-dennylin0707@gmail.com>
Change rtw_mgmt_xmitframe_coalesce() to use kernel-style return values.
Return 0 on success and negative errno on failure. The only caller
currently doesn't check for errors, so this change does not affect
runtime behavior. Later patches in this series will propagate error
handling to the caller.
Signed-off-by: Hungyu Lin <dennylin0707@gmail.com>
---
drivers/staging/rtl8723bs/core/rtw_xmit.c | 8 ++++----
drivers/staging/rtl8723bs/include/rtw_xmit.h | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_xmit.c b/drivers/staging/rtl8723bs/core/rtw_xmit.c
index 16e6c9567224..01512f438295 100644
--- a/drivers/staging/rtl8723bs/core/rtw_xmit.c
+++ b/drivers/staging/rtl8723bs/core/rtw_xmit.c
@@ -1187,7 +1187,7 @@ int rtw_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, struct
}
/* broadcast or multicast management pkt use BIP, unicast management pkt use CCMP encryption */
-s32 rtw_mgmt_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, struct xmit_frame *pxmitframe)
+int rtw_mgmt_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, struct xmit_frame *pxmitframe)
{
u8 *pframe, *mem_start = NULL, *tmp_buf = NULL;
u8 subtype;
@@ -1210,7 +1210,7 @@ s32 rtw_mgmt_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, s
BIP_AAD = kzalloc(ori_len, GFP_ATOMIC);
if (!BIP_AAD)
- return _FAIL;
+ return -ENOMEM;
tmp_buf = BIP_AAD;
subtype = GetFrameSubType(pframe); /* bit(7)~bit(2) */
@@ -1341,12 +1341,12 @@ s32 rtw_mgmt_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, s
xmitframe_coalesce_success:
spin_unlock_bh(&padapter->security_key_mutex);
kfree(BIP_AAD);
- return _SUCCESS;
+ return 0;
xmitframe_coalesce_fail:
spin_unlock_bh(&padapter->security_key_mutex);
kfree(BIP_AAD);
- return _FAIL;
+ return -EINVAL;
}
/* Logical Link Control(LLC) SubNetwork Attachment Point(SNAP) header
diff --git a/drivers/staging/rtl8723bs/include/rtw_xmit.h b/drivers/staging/rtl8723bs/include/rtw_xmit.h
index 917e846e9ce2..31decc210e73 100644
--- a/drivers/staging/rtl8723bs/include/rtw_xmit.h
+++ b/drivers/staging/rtl8723bs/include/rtw_xmit.h
@@ -424,7 +424,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 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);
+extern int 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-31 15:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-31 15:52 [PATCH v2 0/3] staging: rtl8723bs: clean up management transmit return values Hungyu Lin
2026-07-31 15:52 ` Hungyu Lin [this message]
2026-07-31 15:52 ` [PATCH v2 2/3] staging: rtl8723bs: propagate errno handling for mgmt xmit Hungyu Lin
2026-07-31 15:52 ` [PATCH v2 3/3] staging: rtl8723bs: make dump_mgntframe_and_wait() return void Hungyu Lin
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=20260731155228.22526-2-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox