* [PATCH] rtlwifi: rtlwifi: remove dead halbtc8822bwifionly.c and header
@ 2026-12-03 18:29 Julian Braha
2026-12-04 0:49 ` Ping-Ke Shih
0 siblings, 1 reply; 2+ messages in thread
From: Julian Braha @ 2026-12-03 18:29 UTC (permalink / raw)
To: pkshih; +Cc: linux-kernel, linux-wireless, Julian Braha
halbtc8822bwifionly.c and header halbtc8822bwifionly.h are completely dead
code. No Makefile builds the C file and no C file includes the header.
It seems these two files have never actually been in use, because they
were originally created by commit 94907e8d135b ("rtlwifi: btcoex: Add
8822be btcoex supported files for wifi only") with the intent that the
r8822be driver in staging/ would use it for antenna control, once the
driver moved out of staging.
However, the staging driver (and staging copies of these files) were later
removed completely in commit ef4a0c317373 ("staging: rtlwifi: delete the
staging driver") without these two files being removed with it, leaving
them as lingering dead code.
Let's remove them.
Signed-off-by: Julian Braha <julianbraha@gmail.com>
---
.../rtlwifi/btcoexist/halbtc8822bwifionly.c | 44 -------------------
.../rtlwifi/btcoexist/halbtc8822bwifionly.h | 14 ------
2 files changed, 58 deletions(-)
delete mode 100644 drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8822bwifionly.c
delete mode 100644 drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8822bwifionly.h
diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8822bwifionly.c b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8822bwifionly.c
deleted file mode 100644
index 145d6f9c017a..000000000000
--- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8822bwifionly.c
+++ /dev/null
@@ -1,44 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-/* Copyright(c) 2016-2017 Realtek Corporation.*/
-
-#include "halbt_precomp.h"
-
-void ex_hal8822b_wifi_only_hw_config(struct wifi_only_cfg *wifionlycfg)
-{
- /*BB control*/
- halwifionly_phy_set_bb_reg(wifionlycfg, 0x4c, 0x01800000, 0x2);
- /*SW control*/
- halwifionly_phy_set_bb_reg(wifionlycfg, 0xcb4, 0xff, 0x77);
- /*antenna mux switch */
- halwifionly_phy_set_bb_reg(wifionlycfg, 0x974, 0x300, 0x3);
-
- halwifionly_phy_set_bb_reg(wifionlycfg, 0x1990, 0x300, 0x0);
-
- halwifionly_phy_set_bb_reg(wifionlycfg, 0xcbc, 0x80000, 0x0);
- /*switch to WL side controller and gnt_wl gnt_bt debug signal */
- halwifionly_phy_set_bb_reg(wifionlycfg, 0x70, 0xff000000, 0x0e);
- /*gnt_wl=1 , gnt_bt=0*/
- halwifionly_phy_set_bb_reg(wifionlycfg, 0x1704, 0xffffffff, 0x7700);
- halwifionly_phy_set_bb_reg(wifionlycfg, 0x1700, 0xffffffff, 0xc00f0038);
-}
-
-void ex_hal8822b_wifi_only_scannotify(struct wifi_only_cfg *wifionlycfg,
- u8 is_5g)
-{
- hal8822b_wifi_only_switch_antenna(wifionlycfg, is_5g);
-}
-
-void ex_hal8822b_wifi_only_switchbandnotify(struct wifi_only_cfg *wifionlycfg,
- u8 is_5g)
-{
- hal8822b_wifi_only_switch_antenna(wifionlycfg, is_5g);
-}
-
-void hal8822b_wifi_only_switch_antenna(struct wifi_only_cfg *wifionlycfg,
- u8 is_5g)
-{
- if (is_5g)
- halwifionly_phy_set_bb_reg(wifionlycfg, 0xcbc, 0x300, 0x1);
- else
- halwifionly_phy_set_bb_reg(wifionlycfg, 0xcbc, 0x300, 0x2);
-}
diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8822bwifionly.h b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8822bwifionly.h
deleted file mode 100644
index 5fc66cea74b2..000000000000
--- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8822bwifionly.h
+++ /dev/null
@@ -1,14 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/* Copyright(c) 2016-2017 Realtek Corporation.*/
-
-#ifndef __INC_HAL8822BWIFIONLYHWCFG_H
-#define __INC_HAL8822BWIFIONLYHWCFG_H
-
-void ex_hal8822b_wifi_only_hw_config(struct wifi_only_cfg *wifionlycfg);
-void ex_hal8822b_wifi_only_scannotify(struct wifi_only_cfg *wifionlycfg,
- u8 is_5g);
-void ex_hal8822b_wifi_only_switchbandnotify(struct wifi_only_cfg *wifionlycfg,
- u8 is_5g);
-void hal8822b_wifi_only_switch_antenna(struct wifi_only_cfg *wifionlycfg,
- u8 is_5g);
-#endif
--
2.56.1
^ permalink raw reply [flat|nested] 2+ messages in thread* RE: [PATCH] rtlwifi: rtlwifi: remove dead halbtc8822bwifionly.c and header
2026-12-03 18:29 [PATCH] rtlwifi: rtlwifi: remove dead halbtc8822bwifionly.c and header Julian Braha
@ 2026-12-04 0:49 ` Ping-Ke Shih
0 siblings, 0 replies; 2+ messages in thread
From: Ping-Ke Shih @ 2026-12-04 0:49 UTC (permalink / raw)
To: Julian Braha; +Cc: linux-kernel, linux-wireless
Julian Braha <julian.braha@gmail.com> On Behalf Of Julian Braha wrote:
> halbtc8822bwifionly.c and header halbtc8822bwifionly.h are completely dead
> code. No Makefile builds the C file and no C file includes the header.
I'll only keep this paragraph during committing.
>
> It seems these two files have never actually been in use, because they
> were originally created by commit 94907e8d135b ("rtlwifi: btcoex: Add
> 8822be btcoex supported files for wifi only") with the intent that the
> r8822be driver in staging/ would use it for antenna control, once the
> driver moved out of staging.
>
> However, the staging driver (and staging copies of these files) were later
> removed completely in commit ef4a0c317373 ("staging: rtlwifi: delete the
> staging driver") without these two files being removed with it, leaving
> them as lingering dead code.
The actual reason is that years ago we did plan to add RTL8822BE to rtlwifi,
but finally we gave up and proposed new driver rtw88.
>
> Let's remove them.
>
> Signed-off-by: Julian Braha <julianbraha@gmail.com>
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-12-04 0:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-12-03 18:29 [PATCH] rtlwifi: rtlwifi: remove dead halbtc8822bwifionly.c and header Julian Braha
2026-12-04 0:49 ` Ping-Ke Shih
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®