drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8822bwifionly.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8822bwifionly.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8822bwifionly.c- Extension
.c- Size
- 1418 bytes
- Lines
- 45
- Domain
- Driver Families
- Bucket
- drivers/net
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
halbt_precomp.h
Detected Declarations
function ex_hal8822b_wifi_only_hw_configfunction ex_hal8822b_wifi_only_scannotifyfunction ex_hal8822b_wifi_only_switchbandnotifyfunction hal8822b_wifi_only_switch_antenna
Annotated Snippet
// 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);
}
Annotation
- Immediate include surface: `halbt_precomp.h`.
- Detected declarations: `function ex_hal8822b_wifi_only_hw_config`, `function ex_hal8822b_wifi_only_scannotify`, `function ex_hal8822b_wifi_only_switchbandnotify`, `function hal8822b_wifi_only_switch_antenna`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.