treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / drivers / net / wireless / realtek / rtlwifi / btcoexist / halbtc8822bwifionly.c
blob145d6f9c017a6a95a9335eb494e62b48082390bb
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)
8 /*BB control*/
9 halwifionly_phy_set_bb_reg(wifionlycfg, 0x4c, 0x01800000, 0x2);
10 /*SW control*/
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,
26 u8 is_5g)
28 hal8822b_wifi_only_switch_antenna(wifionlycfg, is_5g);
31 void ex_hal8822b_wifi_only_switchbandnotify(struct wifi_only_cfg *wifionlycfg,
32 u8 is_5g)
34 hal8822b_wifi_only_switch_antenna(wifionlycfg, is_5g);
37 void hal8822b_wifi_only_switch_antenna(struct wifi_only_cfg *wifionlycfg,
38 u8 is_5g)
40 if (is_5g)
41 halwifionly_phy_set_bb_reg(wifionlycfg, 0xcbc, 0x300, 0x1);
42 else
43 halwifionly_phy_set_bb_reg(wifionlycfg, 0xcbc, 0x300, 0x2);