From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Marinela Tatiana Selseth <marinela.selseth@firmwaredesign.org>
Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: rtl8723bs: remove dead antenna diversity infrastructure (FAT/SWAT)
Date: Sat, 3 Oct 2026 08:44:59 +0200 [thread overview]
Message-ID: <2026100304-entomb-collector-9004@gregkh> (raw)
In-Reply-To: <20261003003341.238789-1-marinela.selseth@firmwaredesign.org>
On Fri, Oct 02, 2026 at 07:33:41PM -0500, Marinela Tatiana Selseth wrote:
> Deep analysis reveals that the driver contains major vestigial out-of-tree
> architectural frameworks for Fast Antenna Training (FAT) and Software
> Antenna Switching (SWAS) that are completely uninitialized, unread, or
> write-only.
what tool did this "deep analysis"?
>
> Remove the 'struct fat_t' definition from hal/odm.h and refactor the
> fallback path in hal/rtl8723b_phycfg.c. Because the unassigned structural
> member 'RxIdleAnt' naturally defaults to 0, the conditional path check
> statically resolves to false, permanently routing RFPath to RF_PATH_B
> whenever antenna diversity is active. Hardcode this layout behavior to
> match factual reality and remove the now unused macro 'MAIN_ANT'.
>
> Additionally, purge the write-only 'struct swat_t' infrastructure from
> hal/odm.h and include/hal_data.h. Inside hal/odm.c, eliminate the dead
> variable tracking assignments while explicitly preserving the hardware
> register read to rDPDT_control as a dummy read to ensure initialization
> sequencing and hardware timing remain completely unaltered.
>
> Lastly, clean up legacy comment baggage across hal/odm.c and
> hal/odm_DIG.c. Remove arbitrary spreadsheet digits and references to
> unsupported legacy chipsets (92E, 8723A, 8821, 8812) to ensure inline
> notes are highly focused on the active RTL8723B Bluetooth coexistence
> parameters.
>
> Signed-off-by: Marinela Tatiana Selseth <marinela.selseth@firmwaredesign.org>
> ---
> drivers/staging/rtl8723bs/hal/odm.c | 12 +--
> drivers/staging/rtl8723bs/hal/odm.h | 100 ------------------
> drivers/staging/rtl8723bs/hal/odm_DIG.c | 5 +-
> .../staging/rtl8723bs/hal/rtl8723b_phycfg.c | 11 +-
> drivers/staging/rtl8723bs/include/hal_data.h | 1 -
> 5 files changed, 11 insertions(+), 118 deletions(-)
>
> diff --git a/drivers/staging/rtl8723bs/hal/odm.c b/drivers/staging/rtl8723bs/hal/odm.c
> index f3989fa33d9f..00b938071dee 100644
> --- a/drivers/staging/rtl8723bs/hal/odm.c
> +++ b/drivers/staging/rtl8723bs/hal/odm.c
> @@ -461,12 +461,8 @@ static void odm_RSSIMonitorCheck(struct dm_odm_t *pDM_Odm)
> /* 3 ============================================================ */
> static void odm_SwAntDetectInit(struct dm_odm_t *pDM_Odm)
> {
> - struct swat_t *pDM_SWAT_Table = &pDM_Odm->DM_SWAT_Table;
> -
> - pDM_SWAT_Table->SWAS_NoLink_BK_Reg92c = rtw_read32(pDM_Odm->Adapter, rDPDT_control);
> - pDM_SWAT_Table->PreAntenna = MAIN_ANT;
> - pDM_SWAT_Table->CurAntenna = MAIN_ANT;
> - pDM_SWAT_Table->SWAS_NoLink_State = 0;
> + /* Dummy read rDPDT_control to preserve initialization hardware sequencing */
> + rtw_read32(pDM_Odm->Adapter, rDPDT_control);
While it's nice to preserve this, how about testing on real hardware to
see if it too can be dropped?
thanks,
greg k-h
next prev parent reply other threads:[~2026-10-03 6:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-03 0:33 Marinela Tatiana Selseth
2026-10-03 6:44 ` Greg Kroah-Hartman [this message]
2026-10-04 20:46 ` Marinela Tatiana Selseth
2026-10-04 22:28 ` [PATCH v2] " Marinela Tatiana Selseth
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=2026100304-entomb-collector-9004@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=marinela.selseth@firmwaredesign.org \
/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
all inboxes | Powered by JetHome®