drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c- Extension
.c- Size
- 131148 bytes
- Lines
- 4241
- 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 btc8723b2ant_bt_rssi_statefunction btc8723b2ant_wifi_rssi_statefunction btc8723b2ant_limited_rxfunction btc8723b2ant_monitor_bt_ctrfunction btc8723b2ant_monitor_wifi_ctrfunction btc8723b2ant_query_bt_infofunction btc8723b2ant_is_wifi_status_changedfunction btc8723b2ant_update_bt_link_infofunction btc8723b2ant_action_algorithmfunction btc8723b2ant_set_fw_dac_swing_levelfunction btc8723b2ant_set_fw_dec_bt_pwrfunction btc8723b2ant_dec_bt_pwrfunction halbtc8723b2ant_set_bt_auto_reportfunction btc8723b2ant_bt_auto_reportfunction btc8723b2ant_fw_dac_swing_lvlfunction btc8723b_set_penalty_txratefunction btc8723b2ant_low_penalty_rafunction btc8723b2ant_set_dac_swing_regfunction btc8723b2ant_set_sw_fulltime_dac_swingfunction btc8723b2ant_dac_swingfunction btc8723b2ant_set_coex_tablefunction btc8723b2ant_coex_tablefunction btc8723b2ant_coex_table_with_typefunction btc8723b2ant_set_fw_ignore_wlan_actfunction btc8723b2ant_set_lps_rpwmfunction btc8723b2ant_lps_rpwmfunction btc8723b2ant_ignore_wlan_actfunction btc8723b2ant_set_fw_ps_tdmafunction btc8723b2ant_sw_mechanismfunction btc8723b2ant_set_ant_pathfunction btc8723b2ant_ps_tdmafunction btc8723b2ant_ps_tdma_check_for_power_save_statefunction btc8723b2ant_power_save_statefunction btc8723b2ant_coex_allofffunction btc8723b2ant_init_coex_dmfunction btc8723b2ant_action_bt_inquiryfunction btc8723b2ant_action_wifi_link_processfunction btc8723b2ant_action_wifi_idle_processfunction btc8723b2ant_is_common_actionfunction btc8723b2ant_tdma_duration_adjustfunction btc8723b2ant_action_scofunction btc8723b2ant_action_hidfunction btc8723b2ant_action_a2dpfunction btc8723b2ant_action_a2dp_pan_hsfunction btc8723b2ant_action_pan_edrfunction btc8723b2ant_action_pan_hsfunction btc8723b2ant_action_pan_edr_a2dpfunction btc8723b2ant_action_pan_edr_hid
Annotated Snippet
if (bt_rssi < rssi_thresh) {
bt_rssi_state = BTC_RSSI_STATE_LOW;
rtl_dbg(rtlpriv, COMP_BT_COEXIST, DBG_LOUD,
"[BTCoex], BT Rssi state switch to Low\n");
} else {
bt_rssi_state = BTC_RSSI_STATE_STAY_HIGH;
rtl_dbg(rtlpriv, COMP_BT_COEXIST, DBG_LOUD,
"[BTCoex], BT Rssi state stay at High\n");
}
}
} else if (level_num == 3) {
if (rssi_thresh > rssi_thresh1) {
rtl_dbg(rtlpriv, COMP_BT_COEXIST, DBG_LOUD,
"[BTCoex], BT Rssi thresh error!!\n");
return coex_sta->pre_bt_rssi_state;
}
if ((coex_sta->pre_bt_rssi_state == BTC_RSSI_STATE_LOW) ||
(coex_sta->pre_bt_rssi_state == BTC_RSSI_STATE_STAY_LOW)) {
if (bt_rssi >= rssi_thresh +
BTC_RSSI_COEX_THRESH_TOL_8723B_2ANT) {
bt_rssi_state = BTC_RSSI_STATE_MEDIUM;
rtl_dbg(rtlpriv, COMP_BT_COEXIST, DBG_LOUD,
"[BTCoex], BT Rssi state switch to Medium\n");
} else {
bt_rssi_state = BTC_RSSI_STATE_STAY_LOW;
rtl_dbg(rtlpriv, COMP_BT_COEXIST, DBG_LOUD,
"[BTCoex], BT Rssi state stay at Low\n");
}
} else if ((coex_sta->pre_bt_rssi_state ==
BTC_RSSI_STATE_MEDIUM) ||
(coex_sta->pre_bt_rssi_state ==
BTC_RSSI_STATE_STAY_MEDIUM)) {
if (bt_rssi >= rssi_thresh1 +
BTC_RSSI_COEX_THRESH_TOL_8723B_2ANT) {
bt_rssi_state = BTC_RSSI_STATE_HIGH;
rtl_dbg(rtlpriv, COMP_BT_COEXIST, DBG_LOUD,
"[BTCoex], BT Rssi state switch to High\n");
} else if (bt_rssi < rssi_thresh) {
bt_rssi_state = BTC_RSSI_STATE_LOW;
rtl_dbg(rtlpriv, COMP_BT_COEXIST, DBG_LOUD,
"[BTCoex], BT Rssi state switch to Low\n");
} else {
bt_rssi_state = BTC_RSSI_STATE_STAY_MEDIUM;
rtl_dbg(rtlpriv, COMP_BT_COEXIST, DBG_LOUD,
"[BTCoex], BT Rssi state stay at Medium\n");
}
} else {
if (bt_rssi < rssi_thresh1) {
bt_rssi_state = BTC_RSSI_STATE_MEDIUM;
rtl_dbg(rtlpriv, COMP_BT_COEXIST, DBG_LOUD,
"[BTCoex], BT Rssi state switch to Medium\n");
} else {
bt_rssi_state = BTC_RSSI_STATE_STAY_HIGH;
rtl_dbg(rtlpriv, COMP_BT_COEXIST, DBG_LOUD,
"[BTCoex], BT Rssi state stay at High\n");
}
}
}
coex_sta->pre_bt_rssi_state = bt_rssi_state;
return bt_rssi_state;
}
static u8 btc8723b2ant_wifi_rssi_state(struct btc_coexist *btcoexist,
u8 index, u8 level_num,
u8 rssi_thresh, u8 rssi_thresh1)
{
struct rtl_priv *rtlpriv = btcoexist->adapter;
s32 wifi_rssi = 0;
u8 wifi_rssi_state = coex_sta->pre_wifi_rssi_state[index];
btcoexist->btc_get(btcoexist, BTC_GET_S4_WIFI_RSSI, &wifi_rssi);
if (level_num == 2) {
if ((coex_sta->pre_wifi_rssi_state[index] ==
BTC_RSSI_STATE_LOW) ||
(coex_sta->pre_wifi_rssi_state[index] ==
BTC_RSSI_STATE_STAY_LOW)) {
if (wifi_rssi >= rssi_thresh +
BTC_RSSI_COEX_THRESH_TOL_8723B_2ANT) {
wifi_rssi_state = BTC_RSSI_STATE_HIGH;
rtl_dbg(rtlpriv, COMP_BT_COEXIST, DBG_LOUD,
"[BTCoex], wifi RSSI state switch to High\n");
} else {
wifi_rssi_state = BTC_RSSI_STATE_STAY_LOW;
rtl_dbg(rtlpriv, COMP_BT_COEXIST, DBG_LOUD,
"[BTCoex], wifi RSSI state stay at Low\n");
}
Annotation
- Immediate include surface: `halbt_precomp.h`.
- Detected declarations: `function btc8723b2ant_bt_rssi_state`, `function btc8723b2ant_wifi_rssi_state`, `function btc8723b2ant_limited_rx`, `function btc8723b2ant_monitor_bt_ctr`, `function btc8723b2ant_monitor_wifi_ctr`, `function btc8723b2ant_query_bt_info`, `function btc8723b2ant_is_wifi_status_changed`, `function btc8723b2ant_update_bt_link_info`, `function btc8723b2ant_action_algorithm`, `function btc8723b2ant_set_fw_dac_swing_level`.
- 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.