1 // SPDX-License-Identifier: GPL-2.0
2 /* Copyright(c) 2016-2017 Realtek Corporation.*/
4 #include "halbt_precomp.h"
6 void ex_hal8822b_wifi_only_hw_config(struct wifi_only_cfg
*wifionlycfg
)
9 halwifionly_phy_set_bb_reg(wifionlycfg
, 0x4c, 0x01800000, 0x2);
11 halwifionly_phy_set_bb_reg(wifionlycfg
, 0xcb4, 0xff, 0x77);
12 /*antenna mux switch */
13 halwifionly_phy_set_bb_reg(wifionlycfg
, 0x974, 0x300, 0x3);
15 halwifionly_phy_set_bb_reg(wifionlycfg
, 0x1990, 0x300, 0x0);
17 halwifionly_phy_set_bb_reg(wifionlycfg
, 0xcbc, 0x80000, 0x0);
18 /*switch to WL side controller and gnt_wl gnt_bt debug signal */
19 halwifionly_phy_set_bb_reg(wifionlycfg
, 0x70, 0xff000000, 0x0e);
20 /*gnt_wl=1 , gnt_bt=0*/
21 halwifionly_phy_set_bb_reg(wifionlycfg
, 0x1704, 0xffffffff, 0x7700);
22 halwifionly_phy_set_bb_reg(wifionlycfg
, 0x1700, 0xffffffff, 0xc00f0038);
25 void ex_hal8822b_wifi_only_scannotify(struct wifi_only_cfg
*wifionlycfg
,
28 hal8822b_wifi_only_switch_antenna(wifionlycfg
, is_5g
);
31 void ex_hal8822b_wifi_only_switchbandnotify(struct wifi_only_cfg
*wifionlycfg
,
34 hal8822b_wifi_only_switch_antenna(wifionlycfg
, is_5g
);
37 void hal8822b_wifi_only_switch_antenna(struct wifi_only_cfg
*wifionlycfg
,
41 halwifionly_phy_set_bb_reg(wifionlycfg
, 0xcbc, 0x300, 0x1);
43 halwifionly_phy_set_bb_reg(wifionlycfg
, 0xcbc, 0x300, 0x2);