* [PATCH] staging: rtl8723bs: fix mismatched free of HalData in rtw_sdio_if1_init()
From: Dawei Feng @ 2026-05-25 9:18 UTC (permalink / raw)
To: gregkh
Cc: error27, omer.e.idrissi, hansg, hi, straube.linux, xela,
ethantidmore06, liangjie, linux-staging, linux-kernel, jianhao.xu,
Dawei Feng, Zilin Guan
padapter->HalData is allocated via vzalloc(), but incorrectly freed
using kfree() in the rtw_sdio_if1_init() error path. Using kfree() to
release this vmalloc-backed buffer can lead to memory corruption.
Use rtw_hal_data_deinit() to pair the free correctly and free
HalData with vfree().
The bug was first flagged by an experimental static analysis tool we
are developing for kernel memory-management bugs. Manual inspection
confirms that the issue is still present in current mainline.
An x86_64 allyesconfig build showed no new warnings. As we do not have
suitable RTL8723BS SDIO hardware to test with, no runtime testing was
able to be performed.
Fixes: 554c0a3abf21 ("staging: Add rtl8723bs sdio wifi driver")
Signed-off-by: Zilin Guan <zilin@seu.edu.cn>
Signed-off-by: Dawei Feng <dawei.feng@seu.edu.cn>
---
drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/rtl8723bs/os_dep/sdio_intf.c b/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
index d0feb28b7043..67ef0e1271b0 100644
--- a/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
+++ b/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
@@ -287,8 +287,8 @@ static struct adapter *rtw_sdio_if1_init(struct dvobj_priv *dvobj, const struct
status = _SUCCESS;
free_hal_data:
- if (status != _SUCCESS && padapter->HalData)
- kfree(padapter->HalData);
+ if (status != _SUCCESS)
+ rtw_hal_data_deinit(padapter);
if (status != _SUCCESS) {
rtw_wdev_unregister(padapter->rtw_wdev);
--
2.34.1
^ permalink raw reply related
* [PATCH v3 4/4 staging: rtl8723bs: cleanup braces of sdio_intf.c
From: Manuel Ebner @ 2026-05-25 9:06 UTC (permalink / raw)
To: Greg Kroah-Hartman, Dan Carpenter, Omer El Idrissi,
open list:STAGING SUBSYSTEM, open list
Cc: Manuel Ebner
In-Reply-To: <20260525084956.215254-2-manuelebner@mailbox.org>
Remove braces of one-line if arm.
Signed-off-by: Manuel Ebner <manuelebner@mailbox.org>
---
drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/staging/rtl8723bs/os_dep/sdio_intf.c b/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
index fd805ee74a1b..32a0ee08f175 100644
--- a/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
+++ b/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
@@ -143,9 +143,8 @@ static void sdio_deinit(struct dvobj_priv *dvobj)
sdio_claim_host(func);
sdio_disable_func(func);
- if (dvobj->irq_alloc) {
+ if (dvobj->irq_alloc)
sdio_release_irq(func);
- }
sdio_release_host(func);
}
--
2.54.0
^ permalink raw reply related
* [PATCH v3 2/4] staging: rtl8723bs: cleanup whitespace of sdio_intf.c
From: Manuel Ebner @ 2026-05-25 9:05 UTC (permalink / raw)
To: Greg Kroah-Hartman, Dan Carpenter, Omer El Idrissi,
open list:STAGING SUBSYSTEM, open list
Cc: Manuel Ebner
In-Reply-To: <20260525084956.215254-2-manuelebner@mailbox.org>
Add and remove empty lines where appropriate.
Signed-off-by: Manuel Ebner <manuelebner@mailbox.org>
---
drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/staging/rtl8723bs/os_dep/sdio_intf.c b/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
index ff58923e43f1..63ec486f9a34 100644
--- a/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
+++ b/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
@@ -47,7 +47,6 @@ static void sd_sync_int_hdl(struct sdio_func *func)
{
struct dvobj_priv *psdpriv;
-
psdpriv = sdio_get_drvdata(func);
if (!psdpriv->if1)
@@ -151,6 +150,7 @@ static void sdio_deinit(struct dvobj_priv *dvobj)
sdio_release_host(func);
}
}
+
static struct dvobj_priv *sdio_dvobj_init(struct sdio_func *func)
{
struct dvobj_priv *dvobj = NULL;
@@ -216,7 +216,6 @@ static void sd_intf_stop(struct adapter *padapter)
rtw_hal_disable_interrupt(padapter);
}
-
static struct adapter *rtw_sdio_if1_init(struct dvobj_priv *dvobj)
{
int status = _FAIL;
@@ -250,7 +249,6 @@ static struct adapter *rtw_sdio_if1_init(struct dvobj_priv *dvobj)
/* 4 3.1 set hardware operation functions */
rtw_set_hal_ops(padapter);
-
/* 3 5. initialize Chip version */
padapter->intf_start = &sd_intf_start;
padapter->intf_stop = &sd_intf_stop;
--
2.54.0
^ permalink raw reply related
* [PATCH v3 4/4] staging: sm750fb: deduplicate fbinfo loop in suspend/resume
From: Ahmet Sezgin Duran @ 2026-05-25 8:58 UTC (permalink / raw)
To: gregkh
Cc: error27, linux-fbdev, linux-staging, linux-kernel,
Ahmet Sezgin Duran
In-Reply-To: <20260525085808.171974-1-ahmet@sezginduran.net>
lynxfb_suspend() and lynxfb_resume() both walk sm750_dev->fbinfo[]
via duplicated per-index blocks for fbinfo[0] and fbinfo[1].
Replace each pair of blocks with a for-loop bounded by
sm750_dev->fb_count, the number of successfully registered
framebuffers.
No functional changes intended.
Signed-off-by: Ahmet Sezgin Duran <ahmet@sezginduran.net>
---
v3: Add braces around the multi-line if (info) body in the
suspend loop per Dan Carpenter's review.
Remove a stray blank line left behind in lynxfb_resume()
after the dedup.
Link: <https://lore.kernel.org/linux-staging/ahQB8C1gTr7LF0FO@stanley.mountain/>
v2: No changes.
drivers/staging/sm750fb/sm750.c | 36 +++++++++++++--------------------
1 file changed, 14 insertions(+), 22 deletions(-)
diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
index fff9c35ee7b0..1f6f92473c80 100644
--- a/drivers/staging/sm750fb/sm750.c
+++ b/drivers/staging/sm750fb/sm750.c
@@ -388,18 +388,19 @@ static int __maybe_unused lynxfb_suspend(struct device *dev)
{
struct fb_info *info;
struct sm750_dev *sm750_dev;
+ int i;
sm750_dev = dev_get_drvdata(dev);
console_lock();
- info = sm750_dev->fbinfo[0];
- if (info)
- /* 1 means do suspend */
- fb_set_suspend(info, 1);
- info = sm750_dev->fbinfo[1];
- if (info)
- /* 1 means do suspend */
- fb_set_suspend(info, 1);
+
+ for (i = 0; i < sm750_dev->fb_count; i++) {
+ info = sm750_dev->fbinfo[i];
+ if (info) {
+ /* 1 means do suspend */
+ fb_set_suspend(info, 1);
+ }
+ }
console_unlock();
return 0;
@@ -414,6 +415,7 @@ static int __maybe_unused lynxfb_resume(struct device *dev)
struct lynxfb_par *par;
struct lynxfb_crtc *crtc;
struct lynx_cursor *cursor;
+ int i;
sm750_dev = pci_get_drvdata(pdev);
@@ -421,21 +423,11 @@ static int __maybe_unused lynxfb_resume(struct device *dev)
hw_sm750_inithw(sm750_dev, pdev);
- info = sm750_dev->fbinfo[0];
-
- if (info) {
- par = info->par;
- crtc = &par->crtc;
- cursor = &crtc->cursor;
- memset_io(cursor->vstart, 0x0, cursor->size);
- memset_io(crtc->v_screen, 0x0, crtc->vidmem_size);
- lynxfb_ops_set_par(info);
- fb_set_suspend(info, 0);
- }
-
- info = sm750_dev->fbinfo[1];
+ for (i = 0; i < sm750_dev->fb_count; i++) {
+ info = sm750_dev->fbinfo[i];
+ if (!info)
+ continue;
- if (info) {
par = info->par;
crtc = &par->crtc;
cursor = &crtc->cursor;
--
2.54.0
^ permalink raw reply related
* [PATCH v3 3/4] staging: sm750fb: remove unused struct fields
From: Ahmet Sezgin Duran @ 2026-05-25 8:58 UTC (permalink / raw)
To: gregkh
Cc: error27, linux-fbdev, linux-staging, linux-kernel,
Ahmet Sezgin Duran
In-Reply-To: <20260525085808.171974-1-ahmet@sezginduran.net>
Remove `void *priv` pointer field in following struct definitions:
- `struct lynxfb_crtc`
- `struct lynxfb_output`
Verified that no other code references them.
No functional changes.
Signed-off-by: Ahmet Sezgin Duran <ahmet@sezginduran.net>
---
v3: No changes.
v2: No changes.
drivers/staging/sm750fb/sm750.h | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/staging/sm750fb/sm750.h b/drivers/staging/sm750fb/sm750.h
index d2c522e67f26..56d7e1fa4557 100644
--- a/drivers/staging/sm750fb/sm750.h
+++ b/drivers/staging/sm750fb/sm750.h
@@ -145,8 +145,6 @@ struct lynxfb_crtc {
u16 ypanstep;
u16 ywrapstep;
- void *priv;
-
/* cursor information */
struct lynx_cursor cursor;
};
@@ -168,7 +166,6 @@ struct lynxfb_output {
* *channel=1 means secondary channel
* output->channel ==> &crtc->channel
*/
- void *priv;
};
struct lynxfb_par {
--
2.54.0
^ permalink raw reply related
* [PATCH v3 2/4] staging: sm750fb: remove unnecessary initializations
From: Ahmet Sezgin Duran @ 2026-05-25 8:58 UTC (permalink / raw)
To: gregkh
Cc: error27, linux-fbdev, linux-staging, linux-kernel,
Ahmet Sezgin Duran
In-Reply-To: <20260525085808.171974-1-ahmet@sezginduran.net>
Remove two instances of `ret = 0` initializations since the
variable is overridden unconditionally before being used.
Signed-off-by: Ahmet Sezgin Duran <ahmet@sezginduran.net>
---
v3: No changes.
v2: No changes.
drivers/staging/sm750fb/sm750.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
index 02db1418476b..fff9c35ee7b0 100644
--- a/drivers/staging/sm750fb/sm750.c
+++ b/drivers/staging/sm750fb/sm750.c
@@ -343,7 +343,6 @@ static int lynxfb_ops_set_par(struct fb_info *info)
if (!info)
return -EINVAL;
- ret = 0;
par = info->par;
crtc = &par->crtc;
output = &par->output;
@@ -463,7 +462,6 @@ static int lynxfb_ops_check_var(struct fb_var_screeninfo *var,
if (!var->pixclock)
return -EINVAL;
- ret = 0;
par = info->par;
crtc = &par->crtc;
--
2.54.0
^ permalink raw reply related
* [PATCH v3 1/4] staging: sm750fb: remove commented-out forward declarations
From: Ahmet Sezgin Duran @ 2026-05-25 8:58 UTC (permalink / raw)
To: gregkh
Cc: error27, linux-fbdev, linux-staging, linux-kernel,
Ahmet Sezgin Duran
In-Reply-To: <20260525085808.171974-1-ahmet@sezginduran.net>
The block at the top of sm750.c declares lynxfb_ops_write() and
lynxfb_ops_read() inside a commented-out #ifdef __BIG_ENDIAN guard.
Neither function is defined anywhere in the driver, so the block
is dead. Remove it.
Signed-off-by: Ahmet Sezgin Duran <ahmet@sezginduran.net>
---
v3: No changes.
v2: No changes.
drivers/staging/sm750fb/sm750.c | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
index 89c811e0806c..02db1418476b 100644
--- a/drivers/staging/sm750fb/sm750.c
+++ b/drivers/staging/sm750fb/sm750.c
@@ -8,15 +8,6 @@
#include "sm750_accel.h"
#include "sm750_cursor.h"
-/*
- * #ifdef __BIG_ENDIAN
- * ssize_t lynxfb_ops_write(struct fb_info *info, const char __user *buf,
- * size_t count, loff_t *ppos);
- * ssize_t lynxfb_ops_read(struct fb_info *info, char __user *buf,
- * size_t count, loff_t *ppos);
- * #endif
- */
-
/* common var for all device */
static int g_hwcursor = 1;
static int g_noaccel __ro_after_init;
--
2.54.0
^ permalink raw reply related
* [PATCH v3 0/4] staging: sm750fb: various code cleanups
From: Ahmet Sezgin Duran @ 2026-05-25 8:58 UTC (permalink / raw)
To: gregkh
Cc: error27, linux-fbdev, linux-staging, linux-kernel,
Ahmet Sezgin Duran
This series performs several cleanups on the sm750fb staging driver
to improve code readability and remove redundancy.
The changes include:
- Removing a block of commented-out forward declarations.
- Removing redundant variable initializations.
- Removing unused struct fields.
- Deduplicating per-index fbinfo handling in suspend/resume using
a loop.
No functional changes are intended.
Changes since v2:
- Add braces around the multi-line if (info) body in the
suspend loop per Dan Carpenter's review.
- Remove a stray blank line left behind in lynxfb_resume()
after the dedup.
Link: <https://lore.kernel.org/linux-staging/ahQB8C1gTr7LF0FO@stanley.mountain/>
Changes since v1:
- Dropped "staging: sm750fb: use ARRAY_SIZE macro in fb_find_mode
loop" per Dan Carpenter's review.
Link: <https://lore.kernel.org/linux-staging/ahF8dacOkX0tdxGf@stanley.mountain/>
v2: <https://lore.kernel.org/linux-staging/20260523153459.177488-1-ahmet@sezginduran.net/>
v1: <https://lore.kernel.org/linux-staging/20260512164124.188210-1-ahmet@sezginduran.net/>
Ahmet Sezgin Duran (4):
staging: sm750fb: remove commented-out forward declarations
staging: sm750fb: remove unnecessary initializations
staging: sm750fb: remove unused struct fields
staging: sm750fb: deduplicate fbinfo loop in suspend/resume
drivers/staging/sm750fb/sm750.c | 47 ++++++++++-----------------------
drivers/staging/sm750fb/sm750.h | 3 ---
2 files changed, 14 insertions(+), 36 deletions(-)
--
2.54.0
^ permalink raw reply
* [PATCH v3 3/4] staging: rtl8723bs: cleanup braces of sdio_intf.c
From: Manuel Ebner @ 2026-05-25 8:54 UTC (permalink / raw)
To: Greg Kroah-Hartman, Dan Carpenter, Omer El Idrissi,
open list:STAGING SUBSYSTEM, open list
Cc: Manuel Ebner
In-Reply-To: <20260525084956.215254-2-manuelebner@mailbox.org>
Reformat function declaration.
Signed-off-by: Manuel Ebner <manuelebner@mailbox.org>
---
drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/rtl8723bs/os_dep/sdio_intf.c b/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
index 63ec486f9a34..fd805ee74a1b 100644
--- a/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
+++ b/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
@@ -334,9 +334,8 @@ static void rtw_sdio_if1_deinit(struct adapter *if1)
* notes: drv_init() is called when the bus driver has located a card for us to support.
* We accept the new device by returning 0.
*/
-static int rtw_drv_init(
- struct sdio_func *func,
- const struct sdio_device_id *id)
+static int rtw_drv_init(struct sdio_func *func,
+ const struct sdio_device_id *id)
{
int status = _FAIL;
struct adapter *if1 = NULL;
--
2.54.0
^ permalink raw reply related
* [PATCH v3 1/4] staging: rtl8723bs: sdio_intf.c: refactor function
From: Manuel Ebner @ 2026-05-25 8:49 UTC (permalink / raw)
To: Greg Kroah-Hartman, Dan Carpenter, Omer El Idrissi,
open list:STAGING SUBSYSTEM, open list
Cc: Manuel Ebner
Remove unused argument of rtw_sdio_if1_init().
Signed-off-by: Manuel Ebner <manuelebner@mailbox.org>
---
drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/rtl8723bs/os_dep/sdio_intf.c b/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
index d0feb28b7043..ff58923e43f1 100644
--- a/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
+++ b/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
@@ -217,7 +217,7 @@ static void sd_intf_stop(struct adapter *padapter)
}
-static struct adapter *rtw_sdio_if1_init(struct dvobj_priv *dvobj, const struct sdio_device_id *pdid)
+static struct adapter *rtw_sdio_if1_init(struct dvobj_priv *dvobj)
{
int status = _FAIL;
struct net_device *pnetdev;
@@ -348,7 +348,7 @@ static int rtw_drv_init(
if (!dvobj)
goto exit;
- if1 = rtw_sdio_if1_init(dvobj, id);
+ if1 = rtw_sdio_if1_init(dvobj);
if (!if1)
goto free_dvobj;
--
2.54.0
^ permalink raw reply related
* Re: [PATCH 5/5] staging: sm750fb: deduplicate fbinfo loop in suspend/resume
From: Ahmet Sezgin Duran @ 2026-05-25 8:23 UTC (permalink / raw)
To: Dan Carpenter; +Cc: gregkh, linux-fbdev, linux-staging, linux-kernel
In-Reply-To: <ahQB8C1gTr7LF0FO@stanley.mountain>
On 5/25/26 11:01 AM, Dan Carpenter wrote:
> I was waiting to see if anyone had other comments bout this patchset
> to decide if I should mention these minor nits. But then I was
> confused about v2 so I think there might end up being comments... :P
v2 was only about dropping another patch from series, no change for this
patch. (would be better to talk this in v2 mails, but I guess it's no
big deal.)
>> +
>> + for (i = 0; i < sm750_dev->fb_count; i++) {
>> + info = sm750_dev->fbinfo[i];
>> + if (info)
>> + /* 1 means do suspend */
>> + fb_set_suspend(info, 1);
>
> You didn't introduce this, but the rule is the multi-line indents get
> curly braces for readabilitly even if they're not required.
Oh ok, just tried your suggestion, checkpatch didn't generate a warning.
Got it.
>> - }
>> + for (i = 0; i < sm750_dev->fb_count; i++) {
>> + info = sm750_dev->fbinfo[i];
>>
>
> Better to delete this blank line so the NULL check is next to the
> assignment.
Got it.
I'll send v3, thanks for the review.
Regards,
Ahmet Sezgin Duran
^ permalink raw reply
* Re: [PATCH 5/5] staging: sm750fb: deduplicate fbinfo loop in suspend/resume
From: Dan Carpenter @ 2026-05-25 8:01 UTC (permalink / raw)
To: Ahmet Sezgin Duran; +Cc: gregkh, linux-fbdev, linux-staging, linux-kernel
In-Reply-To: <20260523051509.166152-6-ahmet@sezginduran.net>
I was waiting to see if anyone had other comments bout this patchset
to decide if I should mention these minor nits. But then I was
confused about v2 so I think there might end up being comments... :P
On Sat, May 23, 2026 at 05:15:09AM +0000, Ahmet Sezgin Duran wrote:
> @@ -388,18 +388,18 @@ static int __maybe_unused lynxfb_suspend(struct device *dev)
> {
> struct fb_info *info;
> struct sm750_dev *sm750_dev;
> + int i;
>
> sm750_dev = dev_get_drvdata(dev);
>
> console_lock();
> - info = sm750_dev->fbinfo[0];
> - if (info)
> - /* 1 means do suspend */
> - fb_set_suspend(info, 1);
> - info = sm750_dev->fbinfo[1];
> - if (info)
> - /* 1 means do suspend */
> - fb_set_suspend(info, 1);
> +
> + for (i = 0; i < sm750_dev->fb_count; i++) {
> + info = sm750_dev->fbinfo[i];
> + if (info)
> + /* 1 means do suspend */
> + fb_set_suspend(info, 1);
You didn't introduce this, but the rule is the multi-line indents get
curly braces for readabilitly even if they're not required.
> + }
>
> console_unlock();
> return 0;
> @@ -414,6 +414,7 @@ static int __maybe_unused lynxfb_resume(struct device *dev)
> struct lynxfb_par *par;
> struct lynxfb_crtc *crtc;
> struct lynx_cursor *cursor;
> + int i;
>
> sm750_dev = pci_get_drvdata(pdev);
>
> @@ -421,21 +422,12 @@ static int __maybe_unused lynxfb_resume(struct device *dev)
>
> hw_sm750_inithw(sm750_dev, pdev);
>
> - info = sm750_dev->fbinfo[0];
> -
> - if (info) {
> - par = info->par;
> - crtc = &par->crtc;
> - cursor = &crtc->cursor;
> - memset_io(cursor->vstart, 0x0, cursor->size);
> - memset_io(crtc->v_screen, 0x0, crtc->vidmem_size);
> - lynxfb_ops_set_par(info);
> - fb_set_suspend(info, 0);
> - }
> + for (i = 0; i < sm750_dev->fb_count; i++) {
> + info = sm750_dev->fbinfo[i];
>
Better to delete this blank line so the NULL check is next to the
assignment.
regards,
dan carpenter
> - info = sm750_dev->fbinfo[1];
> + if (!info)
> + continue;
>
> - if (info) {
> par = info->par;
> crtc = &par->crtc;
> cursor = &crtc->cursor;
^ permalink raw reply
* [PATCH] staging: rtl8723bs: rename camelcase variable nSubframe_Length
From: Anirban Bose @ 2026-05-25 7:44 UTC (permalink / raw)
To: gregkh; +Cc: linux-staging, linux-kernel, Anirban Bose
Rename the variable 'nSubframe_Length' to 'subframe_len' in
amsdu_to_msdu() and rtw_alloc_msdu_pkt() to resolve a
checkpatch.pl CamelCase warning.
Signed-off-by: Anirban Bose <boses156@gmail.com>
---
drivers/staging/rtl8723bs/core/rtw_recv.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_recv.c b/drivers/staging/rtl8723bs/core/rtw_recv.c
index 86c5e2c4e7dd..ddede3ad0e15 100644
--- a/drivers/staging/rtl8723bs/core/rtw_recv.c
+++ b/drivers/staging/rtl8723bs/core/rtw_recv.c
@@ -1576,7 +1576,7 @@ static signed int wlanhdr_to_ethhdr(union recv_frame *precvframe)
return _SUCCESS;
}
-static struct sk_buff *rtw_alloc_msdu_pkt(union recv_frame *prframe, u16 nSubframe_Length, u8 *pdata)
+static struct sk_buff *rtw_alloc_msdu_pkt(union recv_frame *prframe, u16 subframe_len, u8 *pdata)
{
u16 eth_type;
struct sk_buff *sub_skb;
@@ -1584,12 +1584,12 @@ static struct sk_buff *rtw_alloc_msdu_pkt(union recv_frame *prframe, u16 nSubfra
pattrib = &prframe->u.hdr.attrib;
- sub_skb = __dev_alloc_skb(nSubframe_Length + 12, GFP_ATOMIC);
+ sub_skb = __dev_alloc_skb(subframe_len + 12, GFP_ATOMIC);
if (!sub_skb)
return NULL;
skb_reserve(sub_skb, 12);
- skb_put_data(sub_skb, (pdata + ETH_HLEN), nSubframe_Length);
+ skb_put_data(sub_skb, (pdata + ETH_HLEN), subframe_len);
eth_type = get_unaligned_be16(&sub_skb->data[6]);
@@ -1666,7 +1666,7 @@ static void rtw_recv_indicate_pkt(struct adapter *padapter, struct sk_buff *pkt,
static int amsdu_to_msdu(struct adapter *padapter, union recv_frame *prframe)
{
int a_len, padding_len;
- u16 nSubframe_Length;
+ u16 subframe_len;
u8 nr_subframes, i;
u8 *pdata;
struct sk_buff *sub_pkt, *subframes[MAX_SUBFRAME_COUNT];
@@ -1686,12 +1686,12 @@ static int amsdu_to_msdu(struct adapter *padapter, union recv_frame *prframe)
while (a_len > ETH_HLEN) {
/* Offset 12 denote 2 mac address */
- nSubframe_Length = get_unaligned_be16(pdata + 12);
+ subframe_len = get_unaligned_be16(pdata + 12);
- if (a_len < ETH_HLEN + nSubframe_Length)
+ if (a_len < ETH_HLEN + subframe_len)
break;
- sub_pkt = rtw_alloc_msdu_pkt(prframe, nSubframe_Length, pdata);
+ sub_pkt = rtw_alloc_msdu_pkt(prframe, subframe_len, pdata);
if (!sub_pkt)
break;
@@ -1704,10 +1704,10 @@ static int amsdu_to_msdu(struct adapter *padapter, union recv_frame *prframe)
if (nr_subframes >= MAX_SUBFRAME_COUNT)
break;
- pdata += nSubframe_Length;
- a_len -= nSubframe_Length;
+ pdata += subframe_len;
+ a_len -= subframe_len;
if (a_len != 0) {
- padding_len = 4 - ((nSubframe_Length + ETH_HLEN) & (4 - 1));
+ padding_len = 4 - ((subframe_len + ETH_HLEN) & (4 - 1));
if (padding_len == 4)
padding_len = 0;
--
2.54.0
^ permalink raw reply related
* [PATCH] staging: rtl8723bs: rename camelcase variable bDumpRxPkt
From: Anirban Bose @ 2026-05-25 6:59 UTC (permalink / raw)
To: gregkh; +Cc: linux-staging, linux-kernel, Anirban Bose
Rename the local variable 'bDumpRxPkt' to 'dump_rx_pkt' in
validate_recv_frame() to resolve a checkpatch.pl CamelCase warning.
Signed-off-by: Anirban Bose <boses156@gmail.com>
---
drivers/staging/rtl8723bs/core/rtw_recv.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_recv.c b/drivers/staging/rtl8723bs/core/rtw_recv.c
index 86c5e2c4e7dd..808f67b61f77 100644
--- a/drivers/staging/rtl8723bs/core/rtw_recv.c
+++ b/drivers/staging/rtl8723bs/core/rtw_recv.c
@@ -1447,7 +1447,7 @@ static signed int validate_recv_frame(struct adapter *adapter, union recv_frame
u8 type;
u8 subtype;
signed int retval = _SUCCESS;
- u8 bDumpRxPkt;
+ u8 dump_rx_pkt;
struct rx_pkt_attrib *pattrib = &precv_frame->u.hdr.attrib;
@@ -1473,7 +1473,7 @@ static signed int validate_recv_frame(struct adapter *adapter, union recv_frame
pattrib->mdata = GetMData(ptr);
pattrib->privacy = GetPrivacy(ptr);
pattrib->order = GetOrder(ptr);
- rtw_hal_get_def_var(adapter, HAL_DEF_DBG_DUMP_RXPKT, &(bDumpRxPkt));
+ rtw_hal_get_def_var(adapter, HAL_DEF_DBG_DUMP_RXPKT, &(dump_rx_pkt));
switch (type) {
case WIFI_MGT_TYPE: /* mgnt */
--
2.54.0
^ permalink raw reply related
* Re: [PATCH] staging: rtl8723bs: remove unnecessary braces and fix indentation in HalPhyRf.c
From: Dan Carpenter @ 2026-05-25 6:48 UTC (permalink / raw)
To: Igor Putko; +Cc: gregkh, linux-staging, linux-kernel
In-Reply-To: <20260524175247.5229-1-igorpetindev@gmail.com>
On Sun, May 24, 2026 at 08:52:47PM +0300, Igor Putko wrote:
> Fixed braces around single statement blocks and corrected indentation
> to follow the Linux kernel coding style.
You're going to need to split this into multiple patches.
> @@ -230,14 +229,11 @@ void ODM_TXPowerTrackingCallback_ThermalMeter(struct adapter *Adapter)
> /* else if (pDM_Odm->RFCalibrateInfo.CCK_index < 0) */
> /* pDM_Odm->RFCalibrateInfo.CCK_index = 0; */
> } else {
> - for (p = RF_PATH_A; p < c.RfPathCount; p++)
> - pDM_Odm->RFCalibrateInfo.PowerIndexOffset[p] = 0;
> + for (p = RF_PATH_A; p < c.RfPathCount; p++)
> + pDM_Odm->RFCalibrateInfo.PowerIndexOffset[p] = 0;
> }
>
> /* Print Swing base & current */
> - for (p = RF_PATH_A; p < c.RfPathCount; p++) {
> - }
> -
The comment makes no sense now.
> if (
> (pDM_Odm->RFCalibrateInfo.PowerIndexOffset[RF_PATH_A] != 0 ||
> pDM_Odm->RFCalibrateInfo.PowerIndexOffset[RF_PATH_B] != 0) &&
regards,
dan carpenter
^ permalink raw reply
* Re: [PATCH 1/4] staging: rtl8723bs: fix comparison in hal_com_config_channel_plan
From: Dan Carpenter @ 2026-05-25 6:36 UTC (permalink / raw)
To: Oliwier Iwan; +Cc: linux-staging, gregkh, straube.linux, linux-kernel
In-Reply-To: <20260523123043.22907-1-oliwieriwan@mailbox.org>
On Sat, May 23, 2026 at 01:30:40PM +0100, Oliwier Iwan wrote:
> Place the constant on the right side of the comparison as preferred
> by the kernel coding style.
>
> Signed-off-by: Oliwier Iwan <oliwieriwan@mailbox.org>
> ---
You're not working against the currently staging-devel tree.
regards,
dan carpenter
^ permalink raw reply
* Re: [PATCH 13/16] media: sun6i-isp: Add dummy params link_validate implementation
From: arash golgol @ 2026-05-25 3:25 UTC (permalink / raw)
To: Paul Kocialkowski
Cc: linux-media, linux-arm-kernel, linux-sunxi, linux-kernel,
linux-staging, Mauro Carvalho Chehab, Chen-Yu Tsai,
Jernej Skrabec, Samuel Holland, Greg Kroah-Hartman,
Laurent Pinchart, Nicolas Dufresne
In-Reply-To: <20260518102451.417971-14-paulk@sys-base.io>
Hi Paul,
On Mon, May 18, 2026 at 2:01 PM Paul Kocialkowski <paulk@sys-base.io> wrote:
>
> There isn't anything configurable about the params video device link,
> but the v4l2 core complains that no op is provided so implement a dummy
> one to make it happy.
>
> Signed-off-by: Paul Kocialkowski <paulk@sys-base.io>
> ---
> .../media/sunxi/sun6i-isp/sun6i_isp_params.c | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)
>
> diff --git a/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_params.c b/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_params.c
> index 77c2d06c0436..b7ef33fa2b13 100644
> --- a/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_params.c
> +++ b/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_params.c
> @@ -450,6 +450,18 @@ static const struct v4l2_file_operations sun6i_isp_params_fops = {
> .poll = vb2_fop_poll,
> };
>
> +/* Media Entity */
> +
> +static int sun6i_isp_params_link_validate(struct media_link *link)
> +{
> + /* Nothing to validate here. */
> + return 0;
> +}
> +
> +static const struct media_entity_operations sun6i_isp_params_entity_ops = {
> + .link_validate = sun6i_isp_params_link_validate,
> +};
> +
> /* Params */
>
> int sun6i_isp_params_setup(struct sun6i_isp_device *isp_dev)
> @@ -470,6 +482,10 @@ int sun6i_isp_params_setup(struct sun6i_isp_device *isp_dev)
> INIT_LIST_HEAD(&state->queue);
> spin_lock_init(&state->lock);
>
> + /* Media Entity */
> +
> + video_dev->entity.ops = &sun6i_isp_params_entity_ops;
> +
> /* Media Pads */
>
> pad->flags = MEDIA_PAD_FL_SOURCE | MEDIA_PAD_FL_MUST_CONNECT;
> --
> 2.54.0
>
Tested on a LicheePi Zero Dock (V3s) with the following pipeline:
ov5647 -> sun6i-mipi-csi2 -> sun6i-csi-bridge -> sun6i-isp-proc ->
sun6i-isp-capture
I verified that streaming through the ISP pipeline works correctly
after this change and that the previous .link_validate() warning for
'sun6i-isp-params' device is no longer triggered.
Tested-by: Arash Golgol <arash.golgol@gmail.com>
--
Regards,
Arash Golgol
^ permalink raw reply
* [PATCH v2 2/2] staging: sm750fb: rename pvReg to pv_reg
From: Michail Tatas @ 2026-05-24 23:15 UTC (permalink / raw)
To: sudipm.mukherjee, teddy.wang, gregkh
Cc: linux-fbdev, linux-staging, linux-kernel, Michail Tatas
In-Reply-To: <cover.1779661132.git.michail.tatas@gmail.com>
Rename variable pvReg to pv_reg as per
the Linux coding standards
Signed-off-by: Michail Tatas <michail.tatas@gmail.com>
---
drivers/staging/sm750fb/sm750.c | 4 ++--
drivers/staging/sm750fb/sm750.h | 2 +-
drivers/staging/sm750fb/sm750_hw.c | 12 ++++++------
3 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
index 00c293430a7d..716a8935f58d 100644
--- a/drivers/staging/sm750fb/sm750.c
+++ b/drivers/staging/sm750fb/sm750.c
@@ -743,7 +743,7 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index)
* must be set after crtc member initialized
*/
crtc->cursor.offset = crtc->o_screen + crtc->vidmem_size - 1024;
- crtc->cursor.mmio = sm750_dev->pvReg +
+ crtc->cursor.mmio = sm750_dev->pv_reg +
0x800f0 + (int)crtc->channel * 0x140;
crtc->cursor.max_h = 64;
@@ -1047,7 +1047,7 @@ static void lynxfb_pci_remove(struct pci_dev *pdev)
sm750fb_framebuffer_release(sm750_dev);
arch_phys_wc_del(sm750_dev->mtrr.vram);
- iounmap(sm750_dev->pvReg);
+ iounmap(sm750_dev->pv_reg);
iounmap(sm750_dev->vmem);
pci_release_region(pdev, 1);
kfree(g_settings);
diff --git a/drivers/staging/sm750fb/sm750.h b/drivers/staging/sm750fb/sm750.h
index 589ae51444f8..e8885133da2e 100644
--- a/drivers/staging/sm750fb/sm750.h
+++ b/drivers/staging/sm750fb/sm750.h
@@ -97,7 +97,7 @@ struct sm750_dev {
unsigned long vidreg_start;
__u32 vidmem_size;
__u32 vidreg_size;
- void __iomem *pvReg;
+ void __iomem *pv_reg;
unsigned char __iomem *vmem;
/* locks*/
spinlock_t slock;
diff --git a/drivers/staging/sm750fb/sm750_hw.c b/drivers/staging/sm750fb/sm750_hw.c
index 34a837fb4b64..95f797e5776a 100644
--- a/drivers/staging/sm750fb/sm750_hw.c
+++ b/drivers/staging/sm750fb/sm750_hw.c
@@ -23,18 +23,18 @@ int hw_sm750_map(struct sm750_dev *sm750_dev, struct pci_dev *pdev)
}
/* now map mmio and vidmem */
- sm750_dev->pvReg =
+ sm750_dev->pv_reg =
ioremap(sm750_dev->vidreg_start, sm750_dev->vidreg_size);
- if (!sm750_dev->pvReg) {
+ if (!sm750_dev->pv_reg) {
dev_err(&pdev->dev, "mmio failed\n");
ret = -EFAULT;
goto err_release_region;
}
- sm750_dev->accel.dpr_base = sm750_dev->pvReg + DE_BASE_ADDR_TYPE1;
- sm750_dev->accel.dp_port_base = sm750_dev->pvReg + DE_PORT_ADDR_TYPE1;
+ sm750_dev->accel.dpr_base = sm750_dev->pv_reg + DE_BASE_ADDR_TYPE1;
+ sm750_dev->accel.dp_port_base = sm750_dev->pv_reg + DE_PORT_ADDR_TYPE1;
- mmio750 = sm750_dev->pvReg;
+ mmio750 = sm750_dev->pv_reg;
sm750_set_chip_type(sm750_dev->devid, sm750_dev->revid);
sm750_dev->vidmem_start = pci_resource_start(pdev, 0);
@@ -58,7 +58,7 @@ int hw_sm750_map(struct sm750_dev *sm750_dev, struct pci_dev *pdev)
return 0;
err_unmap_reg:
- iounmap(sm750_dev->pvReg);
+ iounmap(sm750_dev->pv_reg);
err_release_region:
pci_release_region(pdev, 1);
return ret;
--
2.43.0
^ permalink raw reply related
* [PATCH v2 1/2] staging: sm750fb: rename setAllEngOff to set_all_eng_off
From: Michail Tatas @ 2026-05-24 23:15 UTC (permalink / raw)
To: sudipm.mukherjee, teddy.wang, gregkh
Cc: linux-fbdev, linux-staging, linux-kernel, Michail Tatas
In-Reply-To: <cover.1779661132.git.michail.tatas@gmail.com>
Rename variable setAllEngOff to set_all_eng_off as
per the Linux coding standards
Signed-off-by: Michail Tatas <michail.tatas@gmail.com>
---
drivers/staging/sm750fb/sm750.c | 2 +-
drivers/staging/sm750fb/sm750.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
index 89c811e0806c..00c293430a7d 100644
--- a/drivers/staging/sm750fb/sm750.c
+++ b/drivers/staging/sm750fb/sm750.c
@@ -848,7 +848,7 @@ static void sm750fb_setup(struct sm750_dev *sm750_dev, char *src)
sm750_dev->init_parm.mem_clk = 0;
sm750_dev->init_parm.master_clk = 0;
sm750_dev->init_parm.power_mode = 0;
- sm750_dev->init_parm.setAllEngOff = 0;
+ sm750_dev->init_parm.set_all_eng_off = 0;
sm750_dev->init_parm.reset_memory = 1;
/* defaultly turn g_hwcursor on for both view */
diff --git a/drivers/staging/sm750fb/sm750.h b/drivers/staging/sm750fb/sm750.h
index d2c522e67f26..589ae51444f8 100644
--- a/drivers/staging/sm750fb/sm750.h
+++ b/drivers/staging/sm750fb/sm750.h
@@ -44,7 +44,7 @@ struct init_status {
ushort chip_clk;
ushort mem_clk;
ushort master_clk;
- ushort setAllEngOff;
+ ushort set_all_eng_off;
ushort reset_memory;
};
--
2.43.0
^ permalink raw reply related
* [PATCH v2 0/2] Staging: sm750fb: Change camelCase to snake_case
From: Michail Tatas @ 2026-05-24 23:15 UTC (permalink / raw)
To: sudipm.mukherjee, teddy.wang, gregkh
Cc: linux-fbdev, linux-staging, linux-kernel, Michail Tatas
Change variable names from camelCase to snake_case
as per the Linux Kernel standards.
Michail Tatas (2):
staging: sm750fb: rename setAllEngOff to set_all_eng_off
staging: sm750fb: rename pvReg to pv_reg
drivers/staging/sm750fb/sm750.c | 6 +++---
drivers/staging/sm750fb/sm750.h | 4 ++--
drivers/staging/sm750fb/sm750_hw.c | 12 ++++++------
3 files changed, 11 insertions(+), 11 deletions(-)
--
2.43.0
^ permalink raw reply
* Re: [PATCH] Staging: sm750fb: Change camelCase to snake_case
From: Michail Tatas @ 2026-05-24 23:13 UTC (permalink / raw)
To: Dan Carpenter
Cc: sudipm.mukherjee, teddy.wang, gregkh, linux-fbdev, linux-staging,
linux-kernel
In-Reply-To: <ag_ucCZEOnZuJOCz@stanley.mountain>
On Fri, May 22, 2026 at 08:49:36AM +0300, Dan Carpenter wrote:
> On Fri, May 22, 2026 at 02:39:01AM +0300, Michail Tatas wrote:
> > Change variable names from camelCase to snake_case
> > as per the Linux Kernel standards.
> >
> > These changes remove 9 CHECK messages from checkpatch.pl
> > regarding sm750.c, sm750.h and sm750_hw.c
> >
> > Tested changes by building the module sm750fb/
>
> Don't put this kind of meta comment in the commit message. Put it
> under the --- cur off line.
>
> Please wait a day between resends.
>
> I don't think you're working against the correct staging-next
> tree.
>
> regards,
> dan carpenter
>
Thanks a lot for the quick replies, much appreciated!
Dan you are correct thanks for noticing, I was
working on the main branch.
Some variables have not yet been converted, so
I will send them on a separate patch series as a v2
^ permalink raw reply
* Re: [PATCH 5/7] arm64: dts: allwinner: sun50i-h6: Add missing SRAM region for video engine
From: Chen-Yu Tsai @ 2026-05-24 20:46 UTC (permalink / raw)
To: Paul Kocialkowski
Cc: Maxime Ripard, Mauro Carvalho Chehab, Jernej Skrabec,
Samuel Holland, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Greg Kroah-Hartman, linux-media, linux-staging, devicetree,
linux-sunxi, linux-arm-kernel, linux-kernel
In-Reply-To: <afpUiupOgPhLksM8@shepard>
On Tue, May 5, 2026 at 10:35 PM Paul Kocialkowski <paulk@sys-base.io> wrote:
>
> Hi Chen-Yu,
>
> On Tue 05 May 26, 21:48, Chen-Yu Tsai wrote:
> > The SRAM C region contains a partial alias to the VE SRAM already
> > referenced by the video engine. To avoid access through this alias
> > window, the region should also be claimed by the video engine.
> >
> > Add a reference to the SRAM C region to the video engine node.
>
> It feels very weird to have a reference to the DE2 SRAM region in the
> VE node. It seems unlikely that the same region would be used by both DE2 and
> VE and I am pretty sure can have both running at the same time without
> overstepping.
>
> From what I can see we have so far assumed that the SRAM C and SRAM C1
> are two different physical SRAM areas, but this is most likely not the case.
> My guess would be that SRAM C1 is actually a part of SRAM C and the DE2 is
No. It's the opposite. 0x28000 maps to the same SRAM block at 0x1a00000.
If you write to one, you see the results in both. However the alias at
028000 can be disabled while retaining access to 0x1a00000. I don't
remember how much of the alias points to VE SRAM (0x1a00000). Maybe it
was the whole alias on the H6.
Also, I can't remember if this was tested on the H6 or H616, but the
VE indeed writes to VE SRAM (0x1a00000), so that part is indeed used
by the video engine.
> using another part of it. The syscon block probably allows switching access
> to these different parts of SRAM C.
From what I've seen in the vendor BSP, both drivers toggle the switch.
I believe the goal is to prevent the CPU from having access, rather than
either peripheral claiming it as its own. And that is also what our SRAM
driver does. It claims the SRAM from the CPU. That's all. The toggle bit
pattern used by both drivers is the same.
> Also the sram_c1 node implies it's 2 MiB, which sounds quite unlikely.
That is what the memory map says. Calling it SRAM C1 is probably wrong.
ChenYu
> All the best,
>
> Paul
>
> >
> > Fixes: b542570e5605 ("arm64: dts: allwinner: h6: Add Video Engine node")
> > Signed-off-by: Chen-Yu Tsai <wens@kernel.org>
> > ---
> > arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
> > index 72ce1a75647b..88c6e3e105c0 100644
> > --- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
> > +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
> > @@ -205,7 +205,7 @@ video-codec@1c0e000 {
> > clock-names = "ahb", "mod", "ram";
> > resets = <&ccu RST_BUS_VE>;
> > interrupts = <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>;
> > - allwinner,sram = <&ve_sram 1>;
> > + allwinner,sram = <&ve_sram 1>, <&de2_sram 1>;
> > iommus = <&iommu 3>;
> > };
> >
> > --
> > 2.47.3
> >
>
> --
> Paul Kocialkowski,
>
> Independent contractor - sys-base - https://www.sys-base.io/
> Free software developer - https://www.paulk.fr/
>
> Expert in multimedia, graphics and embedded hardware support with Linux.
^ permalink raw reply
* Re: [PATCH v8 0/2] staging: rtl8723bs: Fix error handling in _rtw_pktfile_read()
From: Bitterblue Smith @ 2026-05-24 18:30 UTC (permalink / raw)
To: Minu Jin, gregkh
Cc: andriy.shevchenko, dan.carpenter, abrahamadekunle50,
zxcv2569763104, milospuric856, karanja99erick, weibu,
linux-staging, linux-kernel
In-Reply-To: <20260127153811.1592900-1-s9430939@naver.com>
On 27/01/2026 17:38, Minu Jin wrote:
> This series improves error handling in _rtw_pktfile_read() and cleans up
> the code style to comply with kernel standards.
>
> 1. The first patch combines the logic change and caller updates.
> The function change and the caller updates must be in the same
> patch. If they are separated, the code will not work correctly
> or will cause errors at that specific point in the history.
>
> 2. The second patch focuses purely on code style cleanup (changing uint
> to unsigned int) as requested by Andy Shevchenko.
>
> Regarding the logic change in _rtw_pktfile_read():
>
> The original code used a ternary operator to read whatever data was
> available, even if it was less than requested. This could lead to
> callers processing incomplete data without knowing it.
>
> I have changed this to return -EINVAL when the remaining data is insufficient.
> This is safer because most callers expect the exact amount of data and
> should not proceed with a partial read.
>
> Testing and Verification:
>
> I do not have access to the physical RTL8723BS hardware. However, I have
> performed a rigorous manual audit of the data path and verified the
> changes using Smatch static analysis. The analysis confirmed that no
> new warnings or logical regressions were introduced in the modified files.
>
Hi!
I have some bad news:
https://bbs.archlinux.org/viewtopic.php?id=313401
[quote]
Hey everyone,
I recently upgraded my system, and now I’m having a strange issue with my WiFi (Realtek RTL8723BS).
now I can no longer connect to any WiFi networks as a client. however, creating an Access Point (AP) still works fine, but whenever I try to connect to an existing network, the connection fails.
dmesg logs:
Every time I attempt a connection, dmesg gets spammed with this error:
[ 1083.925640] rtl8723bs mmc0:0001:1 wlan0: xmit_xmitframes: coalesce failed with error -22
[ 1084.921217] rtl8723bs mmc0:0001:1 wlan0: xmit_xmitframes: coalesce failed with error -22
[ 1085.921434] rtl8723bs mmc0:0001:1 wlan0: xmit_xmitframes: coalesce failed with error -22
[ 1086.922320] rtl8723bs mmc0:0001:1 wlan0: xmit_xmitframes: coalesce failed with error -22
....
Has anyone encountered this specific "coalesce" error with the rtl8723bs driver? I'm looking for advice on whether this is a known bug in recent kernels or if there's a specific module parameter I should try to bypass this.
System Info:
Chipset: RTL8723BS (SDIO)
Kernel version: 7.0.3-zen1-2-zen
update: I fixed the issue after kernel downgrade
[/quote]
^ permalink raw reply
* [PATCH] staging: rtl8723bs: remove unnecessary braces and fix indentation in HalPhyRf.c
From: Igor Putko @ 2026-05-24 17:52 UTC (permalink / raw)
To: gregkh; +Cc: linux-staging, linux-kernel, Igor Putko
Fixed braces around single statement blocks and corrected indentation
to follow the Linux kernel coding style.
Signed-off-by: Igor Putko <igorpetindev@gmail.com>
---
drivers/staging/rtl8723bs/hal/HalPhyRf.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/drivers/staging/rtl8723bs/hal/HalPhyRf.c b/drivers/staging/rtl8723bs/hal/HalPhyRf.c
index 7bef05a9a..3b81bc2e2 100644
--- a/drivers/staging/rtl8723bs/hal/HalPhyRf.c
+++ b/drivers/staging/rtl8723bs/hal/HalPhyRf.c
@@ -118,9 +118,8 @@ void ODM_TXPowerTrackingCallback_ThermalMeter(struct adapter *Adapter)
}
/* Calculate Average ThermalValue after average enough times */
- if (ThermalValue_AVG_count) {
+ if (ThermalValue_AVG_count)
ThermalValue = (u8)(ThermalValue_AVG / ThermalValue_AVG_count);
- }
/* 4 5. Calculate delta, delta_LCK */
/* delta" here is used to determine whether thermal value changes or not. */
@@ -230,14 +229,11 @@ void ODM_TXPowerTrackingCallback_ThermalMeter(struct adapter *Adapter)
/* else if (pDM_Odm->RFCalibrateInfo.CCK_index < 0) */
/* pDM_Odm->RFCalibrateInfo.CCK_index = 0; */
} else {
- for (p = RF_PATH_A; p < c.RfPathCount; p++)
- pDM_Odm->RFCalibrateInfo.PowerIndexOffset[p] = 0;
+ for (p = RF_PATH_A; p < c.RfPathCount; p++)
+ pDM_Odm->RFCalibrateInfo.PowerIndexOffset[p] = 0;
}
/* Print Swing base & current */
- for (p = RF_PATH_A; p < c.RfPathCount; p++) {
- }
-
if (
(pDM_Odm->RFCalibrateInfo.PowerIndexOffset[RF_PATH_A] != 0 ||
pDM_Odm->RFCalibrateInfo.PowerIndexOffset[RF_PATH_B] != 0) &&
@@ -254,7 +250,7 @@ void ODM_TXPowerTrackingCallback_ThermalMeter(struct adapter *Adapter)
if (ThermalValue > pHalData->EEPROMThermalMeter) {
for (p = RF_PATH_A; p < c.RfPathCount; p++)
- (*c.ODM_TxPwrTrackSetPwr)(pDM_Odm, MIX_MODE, p, 0);
+ (*c.ODM_TxPwrTrackSetPwr)(pDM_Odm, MIX_MODE, p, 0);
} else {
for (p = RF_PATH_A; p < c.RfPathCount; p++)
(*c.ODM_TxPwrTrackSetPwr)(pDM_Odm, MIX_MODE, p, Indexforchannel);
--
2.34.1
^ permalink raw reply related
* [PATCH] staging: rtl8723bs: hal: Fix block comment style in HalPwrSeqCmd.c
From: Praveen Jayaprakash Pattar @ 2026-05-24 15:25 UTC (permalink / raw)
To: gregkh; +Cc: linux-staging, linux-kernel, Praveen Jayaprakash Pattar
Fix non-standard block comment format. The comment was using '/*++'
and '--*/' delimiters instead of the standard '/*' and '*/' used in
kernel coding style. Also fix missing '*' prefix on subsequent lines
and remove space before tab characters.
Detected by checkpatch.pl with --strict flag.
Signed-off-by: Praveen Jayaprakash Pattar <praveen.pattar2022@gmail.com>
---
drivers/staging/rtl8723bs/hal/HalPwrSeqCmd.c | 32 ++++++++++----------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/drivers/staging/rtl8723bs/hal/HalPwrSeqCmd.c b/drivers/staging/rtl8723bs/hal/HalPwrSeqCmd.c
index a59505cc4a07..7527ff051865 100644
--- a/drivers/staging/rtl8723bs/hal/HalPwrSeqCmd.c
+++ b/drivers/staging/rtl8723bs/hal/HalPwrSeqCmd.c
@@ -4,22 +4,22 @@
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
*
******************************************************************************/
-/*++
-Copyright (c) Realtek Semiconductor Corp. All rights reserved.
-
-Module Name:
- HalPwrSeqCmd.c
-
-Abstract:
- Implement HW Power sequence configuration CMD handling routine for Realtek devices.
-
-Major Change History:
- When Who What
- ---------- --------------- -------------------------------
- 2011-10-26 Lucas Modify to be compatible with SD4-CE driver.
- 2011-07-07 Roger Create.
-
---*/
+/*
+ * Copyright (c) Realtek Semiconductor Corp. All rights reserved.
+ *
+ * Module Name:
+ * HalPwrSeqCmd.c
+ *
+ * Abstract:
+ * Implement HW Power sequence configuration CMD handling routine for Realtek devices.
+ *
+ * Major Change History:
+ * When Who What
+ * ---------- --------------- -------------------------------
+ * 2011-10-26 Lucas Modify to be compatible with SD4-CE driver.
+ * 2011-07-07 Roger Create.
+ *
+ */
#include <drv_types.h>
#include <HalPwrSeqCmd.h>
--
2.54.0
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox