drivers/net/wireless/realtek/rtlwifi/btcoexist/rtl_btc.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/realtek/rtlwifi/btcoexist/rtl_btc.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/realtek/rtlwifi/btcoexist/rtl_btc.c- Extension
.c- Size
- 12621 bytes
- Lines
- 522
- Domain
- Driver Families
- Bucket
- drivers/net
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
../wifi.hlinux/vmalloc.hlinux/module.hrtl_btc.hhalbt_precomp.h
Detected Declarations
function rtl_btc_display_bt_coex_infofunction rtl_btc_record_pwr_modefunction rtl_btc_get_lps_valfunction rtl_btc_get_rpwm_valfunction rtl_btc_is_bt_ctrl_lpsfunction rtl_btc_is_bt_lps_onfunction rtl_btc_get_ampdu_cfgfunction rtl_btc_alloc_variablefunction rtl_btc_free_variablefunction rtl_btc_init_variablesfunction rtl_btc_init_variables_wifi_onlyfunction rtl_btc_deinit_variablesfunction rtl_btc_init_hal_varsfunction rtl_btc_init_hw_configfunction rtl_btc_init_hw_config_wifi_onlyfunction rtl_btc_ips_notifyfunction rtl_btc_lps_notifyfunction rtl_btc_scan_notifyfunction rtl_btc_scan_notify_wifi_onlyfunction rtl_btc_connect_notifyfunction rtl_btc_mediastatus_notifyfunction rtl_btc_periodicalfunction rtl_btc_halt_notifyfunction rtl_btc_btinfo_notifyfunction rtl_btc_btmpinfo_notifyfunction rtl_btc_is_limited_digfunction rtl_btc_is_disable_edca_turbofunction rtl_btc_is_bt_disabledfunction rtl_btc_special_packet_notifyfunction rtl_btc_switch_band_notifyfunction rtl_btc_switch_band_notify_wifionlyfunction mgnt_link_status_queryfunction rtl_get_hwpg_bt_existexport rtl_btc_get_ops_pointer
Annotated Snippet
if (cur_edca_val != edca_bt_hs_uplink) {
edca_hs = edca_bt_hs_uplink;
bt_change_edca = true;
}
} else {
if (cur_edca_val != edca_bt_hs_downlink) {
edca_hs = edca_bt_hs_downlink;
bt_change_edca = true;
}
}
if (bt_change_edca)
rtl_write_dword(rtlpriv, edca_addr, edca_hs);
return true;
}
bool rtl_btc_is_bt_disabled(struct rtl_priv *rtlpriv)
{
struct btc_coexist *btcoexist = rtl_btc_coexist(rtlpriv);
if (!btcoexist)
return true;
/* It seems 'bt_disabled' is never be initialized or set. */
if (btcoexist->bt_info.bt_disabled)
return true;
else
return false;
}
void rtl_btc_special_packet_notify(struct rtl_priv *rtlpriv, u8 pkt_type)
{
struct btc_coexist *btcoexist = rtl_btc_coexist(rtlpriv);
if (!btcoexist)
return;
return exhalbtc_special_packet_notify(btcoexist, pkt_type);
}
void rtl_btc_switch_band_notify(struct rtl_priv *rtlpriv, u8 band_type,
bool scanning)
{
struct btc_coexist *btcoexist = rtl_btc_coexist(rtlpriv);
u8 type = BTC_NOT_SWITCH;
if (!btcoexist)
return;
switch (band_type) {
case BAND_ON_2_4G:
if (scanning)
type = BTC_SWITCH_TO_24G;
else
type = BTC_SWITCH_TO_24G_NOFORSCAN;
break;
case BAND_ON_5G:
type = BTC_SWITCH_TO_5G;
break;
}
if (type != BTC_NOT_SWITCH)
exhalbtc_switch_band_notify(btcoexist, type);
}
void rtl_btc_switch_band_notify_wifionly(struct rtl_priv *rtlpriv, u8 band_type,
bool scanning)
{
struct wifi_only_cfg *wifionly_cfg = rtl_btc_wifi_only(rtlpriv);
u8 is_5g = (band_type == BAND_ON_5G);
if (!wifionly_cfg)
return;
exhalbtc_switch_band_notify_wifi_only(wifionly_cfg, is_5g);
}
struct rtl_btc_ops *rtl_btc_get_ops_pointer(void)
{
return &rtl_btc_operation;
}
EXPORT_SYMBOL(rtl_btc_get_ops_pointer);
enum rt_media_status mgnt_link_status_query(struct ieee80211_hw *hw)
{
struct rtl_priv *rtlpriv = rtl_priv(hw);
struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
Annotation
- Immediate include surface: `../wifi.h`, `linux/vmalloc.h`, `linux/module.h`, `rtl_btc.h`, `halbt_precomp.h`.
- Detected declarations: `function rtl_btc_display_bt_coex_info`, `function rtl_btc_record_pwr_mode`, `function rtl_btc_get_lps_val`, `function rtl_btc_get_rpwm_val`, `function rtl_btc_is_bt_ctrl_lps`, `function rtl_btc_is_bt_lps_on`, `function rtl_btc_get_ampdu_cfg`, `function rtl_btc_alloc_variable`, `function rtl_btc_free_variable`, `function rtl_btc_init_variables`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: integration 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.