From: Hank Yang <s950343@gmail.com>
To: gregkh@linuxfoundation.org
Cc: linux-staging@lists.linux.dev, b9788213@gmail.com,
guojy.bj@gmail.com, Hank Yang <s950343@gmail.com>
Subject: [PATCH] staging: rtl8723bs: remove dead 5GHz fallback in GetDeltaSwingTable_8723B
Date: Sun, 6 Sep 2026 12:20:43 +0800 [thread overview]
Message-ID: <20260906042043.1850-1-s950343@gmail.com> (raw)
GetDeltaSwingTable_8723B() falls back to calibration tables from a
different chip (8188E) when `channel` is outside the range of 1 to 14:
} else {
*TemperatureUP_A = (u8 *)DeltaSwingTableIdx_2GA_P_8188E;
...
}
This branch is unreachable. `channel` comes from `CurrentChannel`,
which is only updated in rtl8723b_phycfg.c after passing
HAL_IsLegalChannel(), which enforces a range of 1 to 14. Since
RTL8723BS is a 2.4GHz-only chip [1][2], with no 5GHz support,
`CurrentChannel` can never exceed the range of 1 to 14, so this
fallback branch can never execute.
See discussion at [3] for the full reasoning.
Also remove the two DeltaSwingTableIdx_*_8188E arrays that were
only used by this branch, along with a comment referencing a
TxPowerTrack.txt config file — no such file-reading logic exists
anywhere in this driver, so the comment is stale as well.
[1] https://www.realtek.com/Product/Index?id=610&cate_id=194
[2] https://fccid.io/TX2-RTL8723BS/User-Manual/User-Manual-System-pdf-2365682
[3] https://lore.kernel.org/linux-staging/2026090527-outdoors-press-9602@gregkh/T/#t
Assisted-by: Claude:claude-sonnet-5
Signed-off-by: Hank Yang <s950343@gmail.com>
---
.../staging/rtl8723bs/hal/HalPhyRf_8723B.c | 19 -------------------
1 file changed, 19 deletions(-)
diff --git a/drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.c b/drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.c
index 6c5f56d5a1f4..394ee4e732a6 100644
--- a/drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.c
+++ b/drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.c
@@ -21,20 +21,6 @@
#define PATH_S1 0 /* RF_PATH_A */
#define IDX_0xC4C 2
-/*---------------------------Define Local Constant---------------------------*/
-
-/* In the case that we fail to read TxPowerTrack.txt, we use the table for
- * 88E as the default table.
- */
-static u8 DeltaSwingTableIdx_2GA_N_8188E[] = {
- 0, 0, 0, 2, 2, 3, 3, 4, 4, 4, 4, 5, 5, 6, 6,
- 7, 7, 7, 7, 8, 8, 9, 9, 10, 10, 10, 11, 11, 11, 11
-};
-static u8 DeltaSwingTableIdx_2GA_P_8188E[] = {
- 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4,
- 4, 4, 4, 5, 5, 7, 7, 8, 8, 8, 9, 9, 9, 9, 9
-};
-
/* 3 ============================================================ */
/* 3 Tx Power Tracking */
/* 3 ============================================================ */
@@ -312,11 +298,6 @@ static void GetDeltaSwingTable_8723B(
*TemperatureUP_B = pRFCalibrateInfo->DeltaSwingTableIdx_2GB_P;
*TemperatureDOWN_B = pRFCalibrateInfo->DeltaSwingTableIdx_2GB_N;
}
- } else {
- *TemperatureUP_A = (u8 *)DeltaSwingTableIdx_2GA_P_8188E;
- *TemperatureDOWN_A = (u8 *)DeltaSwingTableIdx_2GA_N_8188E;
- *TemperatureUP_B = (u8 *)DeltaSwingTableIdx_2GA_P_8188E;
- *TemperatureDOWN_B = (u8 *)DeltaSwingTableIdx_2GA_N_8188E;
}
}
--
2.43.0
next reply other threads:[~2026-09-06 4:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-06 4:20 Hank Yang [this message]
2026-09-06 11:29 ` [PATCH] staging: rtl8723bs: remove dead 5GHz fallback in GetDeltaSwingTable_8723B b9788213
2026-09-06 12:46 ` Hank Yang
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=20260906042043.1850-1-s950343@gmail.com \
--to=s950343@gmail.com \
--cc=b9788213@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=guojy.bj@gmail.com \
--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.